コード例 #1
0
        public ActionResult Add()
        {
            Item_manager sub_fk = new Item_manager();

            ViewBag.fk = sub_fk.getfk();
            return(View());
        }
コード例 #2
0
        public ActionResult update(int Id)
        {
            Item_manager sub_fk = new Item_manager();

            ViewBag.fk = sub_fk.getfk();
            Concreate.Irepostory <Item> item = new Item_manager();
            var x = item.Get_Item(Id);

            return(View(x));
        }
コード例 #3
0
        public ActionResult update(Item items)
        {
            Item_manager sub_fk = new Item_manager();

            ViewBag.fk = sub_fk.getfk();
            if (ModelState.IsValid)
            {
                Concreate.Irepostory <Item> item = new Item_manager();
                item.Update_Item(items);
            }
            return(View());
        }
コード例 #4
0
        public ActionResult Index(string sershed_text)
        {
            Item_manager sub_fk = new Item_manager();

            ViewBag.fk = sub_fk.getfk();



            Concreate.Irepostory <Item> item = new Item_manager();

            var All_Item = item.GetAll();

            if (!string.IsNullOrWhiteSpace(sershed_text))
            {
                var serched = All_Item.Where(m => m.item_name.Contains(sershed_text));
                return(View(serched));
            }
            return(View(All_Item));
        }
コード例 #5
0
 public ActionResult delete(Item items)
 {
     Concreate.Irepostory <Item> item = new Item_manager();
     item.delete_ITeem(items);
     return(RedirectToAction("index"));
 }