public ActionResult Delete(string id) { COALevel coaLevelToDelete = context.Find(id); if (coaLevelToDelete == null) { return(HttpNotFound()); } else { return(View(coaLevelToDelete)); } }
public ActionResult Edit(string id) { COALevel coaLevel = context.Find(id); if (coaLevel == null) { return(HttpNotFound()); } else { return(View(coaLevel)); } }
public ActionResult Create(COALevel coaLevel) { if (!ModelState.IsValid) { return(View(coaLevel)); } else { context.Insert(coaLevel); context.Commit(); return(RedirectToAction("Index")); } }
public ActionResult Edit(COALevel coaLevel, string id) { COALevel coaLevelToEdit = context.Find(id); if (coaLevelToEdit == null) { return(HttpNotFound()); } else { if (!ModelState.IsValid) { return(View(coaLevel)); } coaLevelToEdit.Level = coaLevel.Level; context.Commit(); return(RedirectToAction("Index")); } }
public ActionResult Edit(COALevel coaAttachment, string id) { COAReportType coaReportToEdit = context.Find(id); if (coaReportToEdit == null) { return(HttpNotFound()); } else { if (!ModelState.IsValid) { return(View(coaReportToEdit)); } coaReportToEdit.ReportType = coaReportToEdit.ReportType; context.Commit(); return(RedirectToAction("Index")); } }
public ActionResult Create() { COALevel coaLevel = new COALevel(); return(View(coaLevel)); }