Example #1
0
        public ActionResult CreateDocumentType(DocumentType type)
        {
            if (ModelState.IsValid)
            {
                db.DocumentTypes.Add(type);
                db.SaveChanges();
                return RedirectToAction("DocumentType");
            }

            return View(type);
        }
Example #2
0
 public ActionResult EditDocumentType(DocumentType type)
 {
     if (ModelState.IsValid)
     {
         db.Entry(type).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("DocumentType");
     }
     return View(type);
 }