Esempio n. 1
0
 public ActionResult Create(VanBan vanBan)
 {
     if (ModelState.IsValid)
     {
         db.VanBan.Add(vanBan);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     GetViewBag(ViewReport.Create, vanBan.LoaiVanBan_ID);
     return View(vanBan);
 }
Esempio n. 2
0
 public ActionResult Edit(VanBan vanBan)
 {
     if (ModelState.IsValid)
     {
         db.Entry(vanBan).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     GetViewBag(ViewReport.Create, vanBan.LoaiVanBan_ID);
     return View(vanBan);
 }