Exemple #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            ResidentDailyReport residentDailyReport = db.ResidentDailyReports.Find(id);

            db.ResidentDailyReports.Remove(residentDailyReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Exemple #2
0
 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));
 }
Exemple #3
0
        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));
        }
Exemple #4
0
        // 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));
        }