Exemplo n.º 1
0
        public ActionResult update(int Id)
        {
            Concreate.Irepostory <Category> category = new Category_manager();
            var x = category.Get_Item(Id);

            return(View(x));
        }
Exemplo n.º 2
0
 public ActionResult update(Category categories)
 {
     if (ModelState.IsValid)
     {
         Concreate.Irepostory <Category> category = new Category_manager();
         category.Update_Item(categories);
     }
     return(View());
 }
Exemplo n.º 3
0
 public ActionResult Add(Category item)
 {
     if (ModelState.IsValid)
     {
         Concreate.Irepostory <Category> category = new Category_manager();
         category.Add(item);
     }
     return(View("Add"));
 }
Exemplo n.º 4
0
        public ActionResult Index(string sershed_text)
        {
            Concreate.Irepostory <Category> category = new Category_manager();

            var ALL_User = category.GetAll();

            if (!string.IsNullOrWhiteSpace(sershed_text))
            {
                var serched = ALL_User.Where(m => m.Category_name.Contains(sershed_text));
                return(View(serched));
            }
            return(View(ALL_User));
        }
Exemplo n.º 5
0
 public ActionResult delete(Category categories)
 {
     Concreate.Irepostory <Category> category = new Category_manager();
     category.delete_ITeem(categories);
     return(RedirectToAction("index"));
 }