public ActionResult DeleteConfirmed(int id) { WellTestResult wellTestResult = db.WellTestResults.Find(id); db.WellTestResults.Remove(wellTestResult); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,Rsv,Well,TestDate,Choke,Hours,THP,FLP,BSW,API,GROSSLIQUID,OIL,GAS,WATER,GOR,GLR,Ps,Pwf,FREQ,NETOILPOTENTIAL,Comment,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] WellTestResult wellTestResult) { if (ModelState.IsValid) { db.Entry(wellTestResult).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(wellTestResult)); }
// GET: WellTestResults/Delete/5 public ActionResult Delete(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } WellTestResult wellTestResult = db.WellTestResults.Find(id); if (wellTestResult == null) { return(HttpNotFound()); } return(View(wellTestResult)); }