private void cboStores_EditValueChanged(object sender, EventArgs e) { var itm = new Items(); DataTable dtItem; if (cboStores.EditValue == null) return; if (lkCommodityTypes.EditValue == null) { dtItem = itm.GetNearlyExpiredItemsByBatchReport((int)cboStores.EditValue); } if (lkCommodityTypes.EditValue.ToString() == "0") { dtItem = itm.GetNearlyExpiredItemsByBatchReport((int)cboStores.EditValue); } else { dtItem = itm.GetNearlyExpiredItemsByBatch((int)cboStores.EditValue, (int)lkCommodityTypes.EditValue, _dtCurrent); } PopulateItemList(dtItem); }