public ActionResult DeleteConfirmed(decimal id) { ODATIPI odatipi = db.ODATIPI.Find(id); db.ODATIPI.Remove(odatipi); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Delete(decimal id = 0) { ODATIPI odatipi = db.ODATIPI.Find(id); if (odatipi == null) { return(HttpNotFound()); } return(View(odatipi)); }
public ActionResult Edit(ODATIPI odatipi) { if (ModelState.IsValid) { db.Entry(odatipi).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(odatipi)); }
public ActionResult Create(ODATIPI odatipi) { if (ModelState.IsValid) { db.ODATIPI.Add(odatipi); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(odatipi)); }