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