// GET: SalesReturn public ActionResult SalesReturn(string errMsg) { if (Session["UserID"] != null) { DateTime datetime = DateTime.Now; ViewBag.GLProvition = Counter("SR"); ViewBag.GLEntries = CountEntries("SR", datetime); ViewBag.LocCode = new SelectList(_locationService.All().Where(s => s.LocCode != "900").ToList(), "LocCode", "LocName"); ViewBag.CustCode = new SelectList(_subsidiaryInfoService.All().ToList().Where(x => x.SubType == "1").OrderBy(x => x.SubName), "SubCode", "SubName"); ViewBag.ItemCode = LoadDropDown.LoadEmpDlList(); var sysSet = _sysSetService.All().ToList().FirstOrDefault(); ViewBag.MaintJob = sysSet.MaintJob; Session["MaintLot"] = sysSet.MaintLot; ViewBag.MaintVAT = sysSet.MaintVAT; Session["MaintVAT"] = sysSet.MaintVAT; ViewBag.Reason = LoadDropDown.LoadAdjReason(); ViewBag.ApprBy = new SelectList(_EmployeeService.All().ToList(), "Id", "UserName"); ViewBag.JobNo = LoadDropDown.LoadJobInfo(); var VchrConv = _vchrSetService.All().ToList().FirstOrDefault().VchrConv; Session["VchrConv"] = VchrConv; ViewBag.SaleRetNo = LoadDropDown.GenerateSaleRetNo(_saleRetMainService, "", Session["BranchCode"].ToString(), "", Session["VchrConv"].ToString()); ViewBag.errMsg = errMsg; return(View()); } else { return(RedirectToAction("SecUserLogin", "SecUserLogin")); } }
public ActionResult GenerateSaleRetNo() { return(Json(LoadDropDown.GenerateSaleRetNo(_saleRetMainService, "", Session["BranchCode"].ToString(), "", Session["VchrConv"].ToString()), JsonRequestBehavior.AllowGet)); }