コード例 #1
0
        public ActionResult update(int Id)
        {
            Concreate.Irepostory <Category> category = new Category_manager();
            var x = category.Get_Item(Id);

            return(View(x));
        }
コード例 #2
0
 public ActionResult update(Category categories)
 {
     if (ModelState.IsValid)
     {
         Concreate.Irepostory <Category> category = new Category_manager();
         category.Update_Item(categories);
     }
     return(View());
 }
コード例 #3
0
 public ActionResult Add(Category item)
 {
     if (ModelState.IsValid)
     {
         Concreate.Irepostory <Category> category = new Category_manager();
         category.Add(item);
     }
     return(View("Add"));
 }
コード例 #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));
        }
コード例 #5
0
 public ActionResult delete(Category categories)
 {
     Concreate.Irepostory <Category> category = new Category_manager();
     category.delete_ITeem(categories);
     return(RedirectToAction("index"));
 }