private void PopulateExpiredItems() { if (lkMode.EditValue != null) { int modeID = Convert.ToInt32(lkMode.EditValue); int warehouseID = Convert.ToInt32(lkWarehouse.EditValue); Item itm = new Item(); if (grpByItems.Checked) { gridDetailReport.DataSource = itm.GetExpiredItems(modeID ,warehouseID); colAccount.Visible = false; colDayDifference.Visible = false; colReceivedDate.Visible = false; colReceivedQuantity.Visible = false; } else { gridDetailReport.DataSource = itm.GetExpiredItemsByBatch(modeID ,warehouseID); colAccount.Visible = true; colDayDifference.Visible = true; colReceivedDate.Visible = true; colReceivedQuantity.Visible = true; } lblState.Text = "Expired Items"; } }