// 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")); } }
public ActionResult LoadItemByItemType(string ItemTypeCode) { return(Json(LoadDropDown.LoadItemByItemType(ItemTypeCode, _CommonVmService), JsonRequestBehavior.AllowGet)); }