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