DynamnicQuery for BAQ

文章转自:https://pastebin.com/9CsF6uEC

// DynamnicQuery for BAQ
        Epicor.Mfg.Core.Session epiSession = default(Epicor.Mfg.Core.Session);
        epiSession = (Epicor.Mfg.Core.Session)POEntryForm.Session;
        DynamicQuery dynamicQuery = new Epicor.Mfg.BO.DynamicQuery(epiSession.ConnectionPool);
        //Build Data Set
        QueryExecutionDataSet executionDS = new QueryExecutionDataSet();
        //Build parametors
        QueryExecutionDataSet parameters = new QueryExecutionDataSet();
        DataRow paramRow = parameters.ExecutionParameter.NewRow();
        paramRow["ParameterName"] = "POSuggestionsView.PartNum";
        paramRow["ParameterValue"] = "10050886";
        paramRow["ValueType"] = "nvarchar(50)";
        paramRow["IsEmpty"] = "False";
        paramRow["RowIdent"] = "";
        paramRow["RowMod"] = "";
        paramRow["DBRowIdent"] = new byte[0];
        parameters.ExecutionParameter.Rows.Add(paramRow);
        // Out variable which indicates if more results are available (likely for use with topNRecords)
        bool hasMoreRecords = false;
        //Executed named BAQ with parameter...
        DataSet results = dynamicQuery.ExecuteByIDParametrized("AD-999-SB_POSuggestion", parameters, "", 0, out hasMoreRecords);
        //Message Each Description....
        MessageBox.Show("Number of rows in Results = " + results.Tables["Results"].Rows.Count.ToString());
        foreach (DataRow item in results.Tables["Results"].Rows)
        {
            MessageBox.Show("Row Value = " + item["POSuggestionsView.PartNum"].ToString());

    }

//******************************************************************************************************

// DynamnicQuery for BAQ
        Epicor.Mfg.Core.Session epiSession = default(Epicor.Mfg.Core.Session);
        epiSession = (Epicor.Mfg.Core.Session)POEntryForm.Session;
        DynamicQuery dynamicQuery = new Epicor.Mfg.BO.DynamicQuery(epiSession.ConnectionPool);
        //Build Data Set
        QueryExecutionDataSet executionDS = new QueryExecutionDataSet();
        //Build parametors
        QueryExecutionDataSet parameters = new QueryExecutionDataSet();
        DataRow paramRow = parameters.ExecutionParameter.NewRow();
        paramRow["ParameterName"] = "POSuggestionsView.PartNum";
        paramRow["ParameterValue"] = "10050886";
        paramRow["ValueType"] = "nvarchar(50)";
        paramRow["IsEmpty"] = "False";
        paramRow["RowIdent"] = "";
        paramRow["RowMod"] = "";
        paramRow["DBRowIdent"] = new byte[0];
        parameters.ExecutionParameter.Rows.Add(paramRow);
        // Out variable which indicates if more results are available (likely for use with topNRecords)
        bool hasMoreRecords = false;
        //Executed named BAQ with parameter...
        DataSet results = dynamicQuery.ExecuteByIDParametrized("AD-999-SB_POSuggestion", parameters, "", 0, out hasMoreRecords);
        //Message Each Description....
        MessageBox.Show("Number of rows in Results = " + results.Tables["Results"].Rows.Count.ToString());
        foreach (DataRow item in results.Tables["Results"].Rows)
        {
            MessageBox.Show("Row Value = " + item["POSuggestionsView.PartNum"].ToString());
    }

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值