Example #1
0
        public JsonResult ManageCategoryJH()
        {
            CategoryDataBase cd = new CategoryDataBase();
            IEnumerable<Category> categories = cd.GetAllCategoriess();

            return Json(categories, JsonRequestBehavior.AllowGet);
        }
Example #2
0
        public JsonResult AddCategoryJ(string Category)
        {
            var cd = new CategoryDataBase();
            cd.AddNewCategory(Category);

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

            return Json(categories, JsonRequestBehavior.AllowGet);
        }
Example #3
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
                });
            }
        }
Example #4
0
        public ActionResult ManageCategory()
        {
            var cb = new CategoryDataBase();

            return View(cb.GetAllCategoriess());
        }