public ActionResult AddCategory(Category model) { model.CategoryId = Guid.NewGuid(); result.resultint = cr.Insert(model); ViewBag.Mesaj = result.resultint.UserMessage; return(View()); }
public ActionResult Create(Category model) { result = cr.Insert(model); if (result.IsSucceed) { return(RedirectToAction("List", "Category")); } return(View(model)); }
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()); } }