private void AlertForItemShortage() { CReorderLevelBO oReorderLevelBO = new CReorderLevelBO(); CResult oResultReorderLevel = new CResult(); CReorderLevel oReorderLevel = new CReorderLevel(); String ItemName = null; oResultReorderLevel = oReorderLevelBO.ReadAllReorderLevelData(oReorderLevel); if (oResultReorderLevel.IsSuccess) { foreach (CReorderLevel obj in oResultReorderLevel.Data as ArrayList) { oReorderLevel.Quantity = obj.Quantity; CInventoryBO oInventoryBO = new CInventoryBO(); CResult oResultInventory = new CResult(); CInventory oInventory = new CInventory(); oInventory.Invt_BranchOID = obj.Branch_ID; oInventory.Invt_LocOID = obj.Location_ID; oInventory.Invt_ItemOID = obj.Item_ID; oResultInventory = oInventoryBO.ReadForROL(oInventory); if (oResultInventory.IsSuccess) { foreach (CInventory oInv in oResultInventory.Data as ArrayList) { if (int.Parse(oInv.Invt_QTY.ToString()) < int.Parse(oReorderLevel.Quantity.ToString())) { ItemName = ItemName + oInv.Invt_ItemName.ToString() + "\n"; // MessageBox.Show("Item", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); } } } } //MessageBox.Show("Shortage Of Following Items "+ItemName+"", "Information", MessageBoxButtons.OK, MessageBoxIcon.Information); if (ItemName != null) { frmPopup ofrmPopUp = new frmPopup(PopupSkins.AlertSkin); ofrmPopUp.ShowPopup("Item Shortage!!", "Shortage Of Following Items-" + ItemName + "", 500, 2000, 500); } } }