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); }
private void radioGroup1_EditValueChanged(object sender, EventArgs e) { if (cboStores.EditValue == null) return; Items itm = new Items(); _selectedType = radioGroup1.EditValue.ToString(); int storeId = (cboStores.EditValue != null) ? Convert.ToInt32(cboStores.EditValue) : 1; dtDate.Value = DateTime.Now; dtDate.CustomFormat = "MM/dd/yyyy"; DateTime dtCurrent = ConvertDate.DateConverter(dtDate.Text); int yr = (dtCurrent.Month < 11) ? dtCurrent.Year - 1 : dtCurrent.Year; DateTime dt1 = new DateTime(yr, 11, 1); int commodityType = Convert.ToInt32(lkCommodityTypes.EditValue); DataTable dtItem = itm.GetNearlyExpiredItemsByBatch(storeId,commodityType,dtCurrent) ; PopulateItemList(dtItem); PopulateCatTree(_selectedType); }