Modifying BAQ to query with parameters「建议收藏」

Modifying BAQ to query with parameters「建议收藏」//DynamnicQueryforBAQEpicor.Mfg.Core.SessionepiSession=default(Epicor.Mfg.Core.Session);epiSession=(Epicor.Mfg.Core.Session)POEntryForm.Session;DynamicQuerydynamicQ

大家好,又见面了,我是你们的朋友全栈君。

// 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()); } 转自:https://stackoverflow.com/questions/17566099/modifying-baq-to-query-with-parameters?answertab=oldest#tab-top 
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。

发布者:全栈程序员-用户IM,转载请注明出处:https://javaforall.cn/149959.html原文链接:https://javaforall.cn

【正版授权,激活自己账号】: Jetbrains全家桶Ide使用,1年售后保障,每天仅需1毛

【官方授权 正版激活】: 官方授权 正版激活 支持Jetbrains家族下所有IDE 使用个人JB账号...

(0)


相关推荐

发表回复

您的电子邮箱地址不会被公开。

关注全栈程序员社区公众号