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