public ActionResult Item(string errMsg) { if (Session["UserID"] != null) { ViewBag.ItemCode = GenerateItemCode(); var item = _ItemInfoService.All().ToList().LastOrDefault(); ViewBag.ItemType = new SelectList(_ItemTypeService.All().ToList(), "ItemTypeCode", "ItemTypeName"); ViewBag.UnitCode = new SelectList(_UnitService.All().ToList(), "UnitCode", "UnitName"); ViewBag.DetUnitCode = new SelectList(_UnitService.All().ToList(), "UnitCode", "UnitName"); ViewBag.PackItemCode = new SelectList(_ItemInfoService.All().ToList(), "ItemCode", "ItemName"); ViewBag.AltItemCode = new SelectList(_ItemInfoService.All().ToList(), "ItemCode", "ItemName"); ViewBag.Items = GetItemAll(); ViewBag.Group = LoadDropDown.LoadGroupInf(_CommonVmService); ViewBag.SubGroup = LoadDropDown.LoadSGroupInfo(_CommonVmService); ViewBag.SubSubGroup = LoadDropDown.LoadAllSSGroupInfo(_CommonVmService); var sysSet = _sysSetService.All().ToList().FirstOrDefault(); ViewBag.MaintVAT = sysSet.MaintVAT; Session["MaintVAT"] = sysSet.MaintVAT; #region For item Filtering option ViewBag.NoGrp = sysSet.NoGrp; ViewBag.OnlyGrp = sysSet.OnlyGrp; ViewBag.GrpAndSubGrp = sysSet.GrpAndSubGrp; ViewBag.SubSubGrp = sysSet.SubSubGrp; #endregion ViewBag.errMsg = errMsg; return(View()); } else { return(RedirectToAction("SecUserLogin", "SecUserLogin")); } }
// 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")); } }
// GET: SalesF1 public ActionResult SalesF1(string errMsg) { if (Session["UserID"] != null) { string branchCode = Session["BranchCode"].ToString(); ViewBag.SaleNo = GenerateSaleNo(branchCode); ViewBag.LocCode = new SelectList(_locationService.All().ToList(), "LocCode", "LocName"); ViewBag.CustCode = new SelectList(_subsidiaryInfoService.All().ToList().Where(x => x.SubType == "1").OrderBy(x => x.SubName), "SubCode", "SubName"); ViewBag.ItemType = new SelectList(_itemTypeService.All().ToList(), "ItemTypeCode", "ItemTypeName"); //ViewBag.Group = LoadDropDown.LoadGroupInfoByItemType("", _CommonVmService); //ViewBag.SubGroup = LoadDropDown.LoadSGroupByGroupId("", "", _CommonVmService); //ViewBag.SubSubGroup = LoadDropDown.LoadSSGroupInfo("", "", "", _CommonVmService); ViewBag.ItemCode = LoadDropDown.LoadItemBySSGroupID("", "", "", "", _itemInfoService, _CommonVmService); ViewBag.InvNo = GenerateInvNo(); ViewBag.GLProvition = Count("AR"); ViewBag.GLEntries = CountEntries("AR", DateTime.Now); //For Packing List ViewBag.PackItemCode = LoadDropDown.LoadEmpDlList(); ViewBag.PackItem = LoadDropDown.LoadEmpDlList(); ViewBag.errMsg = errMsg; return(View()); } else { return(RedirectToAction("SecUserLogin", "SecUserLogin")); } }
// GET: ProductionRpt public ActionResult ProductionRpt(string errMsg) { if (Session["UserID"] != null) { ViewBag.ItemType = new SelectList(_itemTypeService.All().ToList(), "ItemTypeCode", "ItemTypeName"); ViewBag.ItemCode = LoadDropDown.LoadItemByItemType("", _CommonVmService); ViewBag.BranchCode = new SelectList(_branchService.All().ToList(), "BranchCode", "BranchName"); var Fydd = _FYDDService.All().FirstOrDefault(s => s.FinYear == Session["FinYear"].ToString()); ViewBag.FyddFDate = Fydd.FYDF; ViewBag.FyddTDate = Fydd.FYDT; ViewBag.Message = errMsg; return(View()); } else { return(RedirectToAction("SecUserLogin", "SecUserLogin")); } }