public ActionResult AddMilling(MillingCutter milling) { if (ModelState.IsValid) { db.MillingCutters.Add(milling); db.SaveChanges(); return(RedirectToAction("MillingForm")); } else { return(View()); } }
public ActionResult EditMilling(MillingCutter milling) { if (ModelState.IsValid) { db.Entry(milling).State = System.Data.Entity.EntityState.Modified; db.SaveChanges(); return(RedirectToAction("MillingForm")); } else { return(View()); } }
public ActionResult DeleteMilling(int?id) { welcomInscription(); if (id == null) { return(HttpNotFound()); } MillingCutter b = db.MillingCutters.Find(id); if (b == null) { return(HttpNotFound()); } return(View(b)); }
public ActionResult EditMilling(int?id) { welcomInscription(); if (id == null) { return(HttpNotFound()); } MillingCutter milling = db.MillingCutters.Find(id); if (milling == null) { return(HttpNotFound()); } ViewBag.Id = milling.Id; return(View(milling)); }
public ActionResult DeleteConfirmed(int?id) { if (id == null) { return(HttpNotFound()); } MillingCutter b = db.MillingCutters.Find(id); if (b == null) { return(HttpNotFound()); } db.MillingCutters.Remove(b); db.SaveChanges(); return(RedirectToAction("MillingForm")); }