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