public ActionResult CreateType(DocumentTypesView doctype)
 {
     if (ModelState.IsValid)
     {
         var model = helper.CreateDocument(doctype);
         return(RedirectToAction("Index"));
     }
     return(View(doctype));
 }
Esempio n. 2
0
 public int CreateDocument(DocumentTypesView doctype)
 {
     using (DataAccess.JazMaxDBProdContext db = new DataAccess.JazMaxDBProdContext())
     {
         DataAccess.CoreDocumentType type = new DataAccess.CoreDocumentType()
         {
             CoreFileCategoryId = doctype.CoreFileCategoryId,
             CategoryName       = doctype.CategoryName,
             IsActive           = true,
         };
         db.CoreDocumentTypes.Add(type);
         db.SaveChanges();
         return(doctype.CoreFileCategoryId);
     }
 }