Пример #1
0
        public JsonResult ManageCategoryJH()
        {
            CategoryDataBase cd = new CategoryDataBase();
            IEnumerable<Category> categories = cd.GetAllCategoriess();

            return Json(categories, JsonRequestBehavior.AllowGet);
        }
Пример #2
0
        public ActionResult AddCategory(string Category)
        {
            var repo = new CategoryDataBase();
            repo.AddNewCategory(Category);

            return RedirectToAction("ManageCategory");
        }
Пример #3
0
        public JsonResult AddCategoryJ(string Category)
        {
            var cd = new CategoryDataBase();
            cd.AddNewCategory(Category);

            IEnumerable<Category> categories = cd.GetAllCategoriess();

            return Json(categories, JsonRequestBehavior.AllowGet);
        }
Пример #4
0
        public void CreateCategoryList()
        {
            CategoryDataBase cd = new CategoryDataBase();
            List<Category> categories = cd.GetAllCategoriess();

            foreach (var category in categories)
            {
                CategoryList.Add(new SelectListItem
                {
                    Text = category.categoryName
                });
            }
        }
Пример #5
0
        public ActionResult ManagePolicy()
        {
            var cb = new CategoryDataBase();

            return View(cb.CreateCategoryList());
        }
Пример #6
0
        public ActionResult ManageCategory()
        {
            var cb = new CategoryDataBase();

            return View(cb.GetAllCategoriess());
        }
Пример #7
0
        public ActionResult ViewPolicy()
        {
            var cd = new CategoryDataBase();
            var categories = cd.CreateCategoryList();

            return View(categories);
        }