예제 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ValveSectionErrorLevel valvesectionerrorlevel = db.ValveSectionErrorLevels.Find(id);

            db.ValveSectionErrorLevels.Remove(valvesectionerrorlevel);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
예제 #2
0
        //
        // GET: /ValveSectionErrorLevel/Delete/5

        public ActionResult Delete(int id = 0)
        {
            ValveSectionErrorLevel valvesectionerrorlevel = db.ValveSectionErrorLevels.Find(id);

            if (valvesectionerrorlevel == null)
            {
                return(HttpNotFound());
            }
            return(View(valvesectionerrorlevel));
        }
예제 #3
0
 public ActionResult Edit(ValveSectionErrorLevel valvesectionerrorlevel)
 {
     if (ModelState.IsValid)
     {
         db.Entry(valvesectionerrorlevel).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(valvesectionerrorlevel));
 }
예제 #4
0
        public ActionResult Create(ValveSectionErrorLevel valvesectionerrorlevel)
        {
            if (ModelState.IsValid)
            {
                db.ValveSectionErrorLevels.Add(valvesectionerrorlevel);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(valvesectionerrorlevel));
        }