public ActionResult Index() { List <Category> Categories = dal_Category.RetriveAllCategories(); if (AccountController.userid != 0 && AccountController.usertype == "Admin") { return(View(Categories)); } else { return(RedirectToAction("Login", new { controller = "Account", action = "Login" })); } }
public ActionResult Index() { List <Category> category = dal_category.RetriveAllCategories(); return(View(category)); }