Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            BPartMenu bpartmenu = db.BPartMenus.Find(id);

            db.BPartMenus.Remove(bpartmenu);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit(BPartMenu bpartmenu)
 {
     if (ModelState.IsValid)
     {
         db.Entry(bpartmenu).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(bpartmenu));
 }
Пример #3
0
        //
        // GET: /BPartMenu/Edit/5

        public ActionResult Edit(int id = 0)
        {
            BPartMenu bpartmenu = db.BPartMenus.Find(id);

            if (bpartmenu == null)
            {
                return(HttpNotFound());
            }
            return(View(bpartmenu));
        }
Пример #4
0
        public ActionResult Create(BPartMenu bpartmenu)
        {
            if (ModelState.IsValid)
            {
                db.BPartMenus.Add(bpartmenu);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(bpartmenu));
        }