示例#1
0
        public ActionResult DeleteConfirmed(int id)
        {
            DredgInformationModels dredginformationmodels = db.DredgInformations.Find(id);

            db.DredgInformations.Remove(dredginformationmodels);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
示例#2
0
 public ActionResult Edit([Bind(Include = "Id,DateTime,Density,Velocity,Production,DredgerId")] DredgInformationModels dredginformationmodels)
 {
     if (ModelState.IsValid)
     {
         db.Entry(dredginformationmodels).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(dredginformationmodels));
 }
示例#3
0
        public ActionResult Create([Bind(Include = "Id,DateTime,Density,Velocity,Production,DredgerId")] DredgInformationModels dredginformationmodels)
        {
            if (ModelState.IsValid)
            {
                db.DredgInformations.Add(dredginformationmodels);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(dredginformationmodels));
        }
示例#4
0
        // GET: /Dredge/Details/5
        public ActionResult Details(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            DredgInformationModels dredginformationmodels = db.DredgInformations.Find(id);

            if (dredginformationmodels == null)
            {
                return(HttpNotFound());
            }
            return(View(dredginformationmodels));
        }