private void RefreshSubmitCommand() { string pgCategory = ""; ProductPGCategoryDataSource.RowFilter = "PG_CATEGORY='" + MandatoryFields.PG_CATEGORY + "'"; if (ProductPGCategoryDataSource.Count > 0) { pgCategory = ProductPGCategoryDataSource[0]["PG_CAT"].ToValueAsString(); } ProductPGCategoryDataSource.RowFilter = null; PRD_MAST productMaster = new PRD_MAST() { PART_NO = MandatoryFields.PART_NO, PART_DESC = MandatoryFields.PART_DESC, QUALITY = MandatoryFields.QUALITY, PG_CATEGORY = pgCategory, PSW_ST = pwsStatus }; DDCUST_MAST customerMaster = new DDCUST_MAST() { CUST_CODE = (selectedCustomer.IsNotNullOrEmpty() ? selectedCustomer.CUST_CODE : -999999) }; List <DDLOC_MAST> lstLocation = null; if (SelectedItems.IsNotNullOrEmpty()) { lstLocation = new List <DDLOC_MAST>(); foreach (object loc in SelectedItems.Values) { lstLocation.Add(new DDLOC_MAST() { LOC_CODE = loc.ToValueAsString() }); } } DataSet dsReport = bll.GetAllPartNos(productMaster, customerMaster, lstLocation); MandatoryFields.GRID_TITLE = REPORT_TITLE; if (!dsReport.IsNotNullOrEmpty() || !dsReport.Tables.IsNotNullOrEmpty() || dsReport.Tables.Count <= 0) { return; } MandatoryFields.GridData = dsReport.Tables[0].DefaultView; MandatoryFields.GRID_TITLE = REPORT_TITLE + " - " + MandatoryFields.GridData.Table.Rows.Count + " Entries"; }