// GET: StockLedgerRpt public ActionResult StockLedgerRpt(string errMsg) { if (Session["UserID"] != null) { ViewBag.BranchCode = new SelectList(_BranchService.All().ToList(), "BranchCode", "BranchName"); //GardenSelection(); ViewBag.AccountCode = new SelectList(_ItemService.All().ToList(), "ItemCode", "ItemName"); ViewBag.ItemType = new SelectList(_itemTypeService.All().ToList(), "ItemTypeCode", "ItemTypeName"); var Fydd = _FYDDService.All().FirstOrDefault(s => s.FinYear == Session["FinYear"].ToString()); ViewBag.FyddFDate = Fydd.FYDF; ViewBag.FyddTDate = Fydd.FYDT; var sysSet = _sysSetService.All().ToList().FirstOrDefault(); ViewBag.Group = LoadDropDown.LoadGroupInfoByItemType("", _CommonVmService); ViewBag.SubGroup = LoadDropDown.LoadSGroupByGroupId("", "", _CommonVmService); ViewBag.SubSubGroup = LoadDropDown.LoadSSGroupInfo("", "", "", _CommonVmService); #region For item Filtering option ViewBag.NoGrp = sysSet.NoGrp; ViewBag.OnlyGrp = sysSet.OnlyGrp; ViewBag.GrpAndSubGrp = sysSet.GrpAndSubGrp; ViewBag.SubSubGrp = sysSet.SubSubGrp; #endregion ViewBag.Message = errMsg; return(View()); } else { return(RedirectToAction("SecUserLogin", "SecUserLogin")); } }