예제 #1
0
 public ActionResult PackingPlan(int id, int? contractId, FormCollection collection)
 {
     if (!UserInfo.CurUser.HasRight("业务管理-PackingList&Invoice")) return Redirect("~/content/AccessDeny.htm");
     SalesContractPackDate p = db.SalesContractPackDates.Find(id);
     if (p == null)
     {
         p = new SalesContractPackDate { ContractId = (int)contractId };
         db.SalesContractPackDates.Add(p);
     }
     TryUpdateModel(p, collection);
     if (ModelState.IsValid)
     {
         db.SaveChanges();
         return Redirect("~/content/close.htm");
     }
     return View(p);
 }
예제 #2
0
 public ActionResult PackingPlan(int id, int? contractId)
 {
     if (!UserInfo.CurUser.HasRight("业务管理-PackingList&Invoice")) return Redirect("~/content/AccessDeny.htm");
     SalesContractPackDate p = db.SalesContractPackDates.Find(id);
     if (p == null)
     {
         p = new SalesContractPackDate { ContractId = (int)contractId };
     }
     return View(p);
 }