public ActionResult DeleteConfirmed(int id) { CFBWaterInjector cFBWaterInjector = db.CFBWaterInjectors.Find(id); db.CFBWaterInjectors.Remove(cFBWaterInjector); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,WaterInjector,Choke,D_Time,THP,FLP,VolumeInjected,Remarks,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] CFBWaterInjector cFBWaterInjector) { if (ModelState.IsValid) { db.Entry(cFBWaterInjector).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(cFBWaterInjector)); }
// GET: CFBWaterInjectors/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } CFBWaterInjector cFBWaterInjector = db.CFBWaterInjectors.Find(id); if (cFBWaterInjector == null) { return(HttpNotFound()); } return(View(cFBWaterInjector)); }