Ejemplo n.º 1
0
        //
        // GET: /Admin/Category/
        public ActionResult Index()
        {
            if (Session["UserId"] == null)
            {
                return Redirect("/admin/login");
            }

            CategoryModel model = new CategoryModel();

            CategoryService categoryService = new CategoryService();
            model.Categories = categoryService.GetCategories(null);

            return View(model);
        }
Ejemplo n.º 2
0
 public static void UpdateCategories()
 {
     CategoryService service = new CategoryService();
     categories = service.GetCategories(string.Empty);
 }