Ejemplo n.º 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            EHSSReport eHSSReport = db.EHSSReports.Find(id);

            db.EHSSReports.Remove(eHSSReport);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Ejemplo n.º 2
0
 public ActionResult Edit([Bind(Include = "Id,ReportCategory,ReportParameter,ReportValue,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] EHSSReport eHSSReport)
 {
     if (ModelState.IsValid)
     {
         db.Entry(eHSSReport).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(eHSSReport));
 }
Ejemplo n.º 3
0
        // GET: EHSSReports/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            EHSSReport eHSSReport = db.EHSSReports.Find(id);

            if (eHSSReport == null)
            {
                return(HttpNotFound());
            }
            return(View(eHSSReport));
        }