public ActionResult DeleteConfirmed(int id) { LpoStatus lpoStatus = db.LpoStatus.Find(id); db.LpoStatus.Remove(lpoStatus); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "LpoStatusId,Name")] LpoStatus lpoStatus) { if (ModelState.IsValid) { db.Entry(lpoStatus).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lpoStatus)); }
public ActionResult Create([Bind(Include = "LpoStatusId,Name")] LpoStatus lpoStatus) { if (ModelState.IsValid) { db.LpoStatus.Add(lpoStatus); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lpoStatus)); }
// GET: LpoStatus/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LpoStatus lpoStatus = db.LpoStatus.Find(id); if (lpoStatus == null) { return(HttpNotFound()); } return(View(lpoStatus)); }