예제 #1
0
 // GET: PurchaseReturn
 public ActionResult PurchaseReturn(string errMsg)
 {
     if (Session["UserID"] != null)
     {
         DateTime datetime = DateTime.Now;
         ViewBag.GLProvition = Counter("PR");
         ViewBag.GLEntries   = CountEntries("PR", 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 == "2").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.PurRetNo    = LoadDropDown.GeneratePurRetNo(_PurRetMainService, "", Session["BranchCode"].ToString(), "", Session["VchrConv"].ToString());
         ViewBag.errMsg      = errMsg;
         return(View());
     }
     else
     {
         return(RedirectToAction("SecUserLogin", "SecUserLogin"));
     }
 }
예제 #2
0
 public ActionResult GeneratePurRetNo()
 {
     return(Json(LoadDropDown.GeneratePurRetNo(_PurRetMainService, "", Session["BranchCode"].ToString(), "", Session["VchrConv"].ToString()), JsonRequestBehavior.AllowGet));
 }