예제 #1
0
 public ActionResult Edit(LoaiVanBan loaiVanBan)
 {
     if (ModelState.IsValid)
     {
         db.Entry(loaiVanBan).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(loaiVanBan);
 }
예제 #2
0
        public ActionResult Create(LoaiVanBan loaiVanBan)
        {
            if (ModelState.IsValid)
            {
                db.LoaiVanBan.Add(loaiVanBan);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(loaiVanBan);
        }
예제 #3
0
 public ActionResult _CreateOrUpdate(LoaiVanBan obj)
 {
     return View(obj);
 }