public ActionResult DeleteConfirmed(int id) { UnPlannedMaintenanceReport unPlannedMaintenanceReport = db.UnPlannedMaintenanceReports.Find(id); db.UnPlannedMaintenanceReports.Remove(unPlannedMaintenanceReport); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Report,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] UnPlannedMaintenanceReport unPlannedMaintenanceReport) { if (ModelState.IsValid) { db.Entry(unPlannedMaintenanceReport).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(unPlannedMaintenanceReport)); }
public ActionResult Create([Bind(Include = "Id,Report,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] UnPlannedMaintenanceReport unPlannedMaintenanceReport) { if (ModelState.IsValid) { db.UnPlannedMaintenanceReports.Add(unPlannedMaintenanceReport); db.SaveChanges(); return(RedirectToAction("Index")); } return(View(unPlannedMaintenanceReport)); }
// GET: UnPlannedMaintenanceReports/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } UnPlannedMaintenanceReport unPlannedMaintenanceReport = db.UnPlannedMaintenanceReports.Find(id); if (unPlannedMaintenanceReport == null) { return(HttpNotFound()); } return(View(unPlannedMaintenanceReport)); }