I have added a combo box to search for a warehouse on our eng workbench materials page, I have added the code for the search to work and it works fine.
My issue is I want to amend the ware clause to only return warehouses from the current plant.
I have this in at the moment, but it errors, saying I am missing a reference
Hi, The code was generated by the wizard, I am just editing the where clause, here is the code and the error.
private void SearchOnWarehseAdapterFillDropDown()
{
// Wizard Generated Search Method
// You will need to call this method from another method in custom code
// For example, [Form]_Load or [Button]_Click
// Wizard Generated Search Method
// You will need to call this method from another method in custom code
// For example, [Form]_Load or [Button]_Click
bool recSelected;
string whereClause = string.((Session)oTrans.Session).PlantID.ToString();
System.Data.DataSet dsWarehseAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "WarehseAdapter", out recSelected, false, whereClause);
if (recSelected)
{
// Set EpiUltraCombo Properties
this.cmbBackflushWarehouse.ValueMember = "WarehouseCode";
this.cmbBackflushWarehouse.DataSource = dsWarehseAdapter;
this.cmbBackflushWarehouse.DisplayMember = "Description";
string[] fields = new string[] {
"Description"};
this.cmbBackflushWarehouse.SetColumnFilter(fields);
}
Compiling Custom Code …
----------errors------------
Error: CS1001 - line 60 (559) - Identifier expected
It still doesn't like it
bool recSelected;
string whereClause = oTrans.Session.PlantID.ToString();
System.Data.DataSet dsWarehseAdapter = Ice.UI.FormFunctions.SearchFunctions.listLookup(this.oTrans, "WarehseAdapter", out recSelected, false, whereClause);
if (recSelected)
Compiling Custom Code …
----------errors------------
Error: CS1061 - line 60 (559) - ‘object’ does not contain a definition for ‘PlantID’ and no extension method ‘PlantID’ accepting a first argument of type ‘object’ could be found (are you missing a using directive or an assembly reference?)