public ActionResult DeleteConfirmed(int id) { LastAvialableWellTest lastAvialableWellTest = db.LastAvialableWellTests.Find(id); db.LastAvialableWellTests.Remove(lastAvialableWellTest); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Well,GrossLiquid,Oil,Gas,Water,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] LastAvialableWellTest lastAvialableWellTest) { if (ModelState.IsValid) { db.Entry(lastAvialableWellTest).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(lastAvialableWellTest)); }
// GET: LastAvialableWellTests/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } LastAvialableWellTest lastAvialableWellTest = db.LastAvialableWellTests.Find(id); if (lastAvialableWellTest == null) { return(HttpNotFound()); } return(View(lastAvialableWellTest)); }