public ActionResult DeleteConfirmed(int id) { WaterInjectorQuality waterInjectorQuality = db.WaterInjectorQuality.Find(id); db.WaterInjectorQuality.Remove(waterInjectorQuality); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Id,IndicatorDate,SWLPumpInlet,PH,ParticlesUpstream,ParticlesDownStream,Remark,ReportDate,UploadTime,TimeStamp,DayOftheWeek")] WaterInjectorQuality waterInjectorQuality) { if (ModelState.IsValid) { db.Entry(waterInjectorQuality).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(waterInjectorQuality)); }
// GET: WaterInjectorQualities/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } WaterInjectorQuality waterInjectorQuality = db.WaterInjectorQuality.Find(id); if (waterInjectorQuality == null) { return(HttpNotFound()); } return(View(waterInjectorQuality)); }