public ActionResult DeleteConfirmed(decimal id) { DM_DVT dm_dvt = db.DM_DVT.Find(id); db.DM_DVT.Remove(dm_dvt); db.SaveChanges(); return(RedirectToAction("Index")); }
// // GET: /DVT/Delete/5 public ActionResult Delete(decimal id = 0) { DM_DVT dm_dvt = db.DM_DVT.Find(id); if (dm_dvt == null) { return(HttpNotFound()); } return(View(dm_dvt)); }
public ActionResult Edit(DM_DVT dm_dvt) { if (ModelState.IsValid) { db.Entry(dm_dvt).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dm_dvt)); }
public ActionResult Create(DM_DVT dm_dvt) { if (ModelState.IsValid) { db.DM_DVT.Add(dm_dvt); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(dm_dvt)); }