Пример #1
0
 public ActionResult AddCategory(Category model)
 {
     model.CategoryId = Guid.NewGuid();
     result.resultint = cr.Insert(model);
     ViewBag.Mesaj    = result.resultint.UserMessage;
     return(View());
 }
Пример #2
0
 public ActionResult Create(Category model)
 {
     result = cr.Insert(model);
     if (result.IsSucceed)
     {
         return(RedirectToAction("List", "Category"));
     }
     return(View(model));
 }
Пример #3
0
 public ActionResult AddCategory(Category model)
 {
     if (Session["UserID"] == null)
     {
         return(RedirectToAction("AdminLogin", "AdminLogin"));
     }
     else
     {
         model.CategoryId = Guid.NewGuid();
         result.resultint = cr.Insert(model);
         ViewBag.Mesaj    = result.resultint.UserMessage;
         return(View());
     }
 }