public ActionResult Delete(string id) { COAReportType coaReportToDelete = context.Find(id); if (coaReportToDelete == null) { return(HttpNotFound()); } else { return(View(coaReportToDelete)); } }
public ActionResult Edit(string id) { COAReportType coaReport = context.Find(id); if (coaReport == null) { return(HttpNotFound()); } else { return(View(coaReport)); } }
public ActionResult Create(COAReportType coaReport) { if (!ModelState.IsValid) { return(View(coaReport)); } else { context.Insert(coaReport); 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() { COAReportType coaReport = new COAReportType(); return(View(coaReport)); }