Last active
September 13, 2022 08:56
-
-
Save strepicor/31230c546e3da0b4185f20f531def2e2 to your computer and use it in GitHub Desktop.
Epicor Customization - Retrive filtered data from Adaptor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private void CallUserCodesAdapterGetListMethod() | |
{ | |
// Declare and Initialize EpiDataView Variables | |
// Declare and create an instance of the Adapter. | |
UserCodesAdapter adapterUserCodes = new UserCodesAdapter(this.oTrans); | |
adapterUserCodes.BOConnect(); | |
// Build where clause for search. | |
string whereClause = "CodeID = \'1\'"; | |
System.Collections.Hashtable whereClauses = new System.Collections.Hashtable(1); | |
whereClauses.Add("UDCodes", whereClause); | |
// Call the adapter search. | |
SearchOptions searchOptions = SearchOptions.CreateRuntimeSearch(whereClauses, DataSetMode.RowsDataSet); | |
adapterUserCodes.InvokeSearch(searchOptions); | |
var dr = adapterUserCodes.UserCodesData.UDCodes[0]; | |
//Or Call Adapter method----------------------------------------------------------------------- | |
//System.Boolean morePages; | |
//System.Data.DataSet dsUserCodes = adapterUserCodes.GetRows(searchOptions, out morePages); | |
//------------------------------------------------------------------------------------------- | |
// Cleanup Adapter Reference | |
adapterUserCodes.Dispose(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment