Hi I am using following code to get PrimBin value from PlantWhseSearchAdapter but seems my whereclause not filtering the rows. Can you help please?
PlantWhseSearchAdapter adp = new PlantWhseSearchAdapter(this.oTrans);
adp.BOConnect();
SearchOptions opts = new SearchOptions(SearchMode.AutoSearch);
opts.DataSetMode = DataSetMode.RowsDataSet;
opts.PageSize = 0;
string whereClause = string.Format("Company='" + company + "' and PartNum = '" + vPartNum + "' and PrimBin != '' and Plant = '" + plant + "' and WarehouseCode = '" + primWhse + "'"); //2 days of data tops
opts.NamedSearch.WhereClauses.Add("PlantWhseSearch",whereClause);
bool MorePages = false;
adp.InvokeSearch(opts);
MessageBox.Show(whereClause);
//var ds = (Erp.BO.PlantWhseSearchDataSet) adp.GetRows(opts, out MorePages); //
var ds = adp.GetRows(opts, out MorePages);
/*opts.PreLoadSearchFilter = "Company='" + company + "' and PartNum = '" +vPartNum + "' and Plant = '" + plant + "' and PrimBin != ''";
opts.DataSetMode = DataSetMode.RowsDataSet;
opts.SelectMode = SelectMode.MultiSelect//;*/
MessageBox.Show(ds.Tables[0].Rows.Count.ToString());