コード例 #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            WaterInjectorQuality waterInjectorQuality = db.WaterInjectorQuality.Find(id);

            db.WaterInjectorQuality.Remove(waterInjectorQuality);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
コード例 #2
0
 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));
 }
コード例 #3
0
        // 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));
        }