Esempio n. 1
0
        public ActionResult DeleteConfirmed(int id)
        {
            RollerBaseLocation rollerBaseLocation = db.RollerBaseLocations.Find(id);

            db.RollerBaseLocations.Remove(rollerBaseLocation);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Esempio n. 2
0
 public ActionResult Edit([Bind(Include = "RollerBaseLocationID,Location")] RollerBaseLocation rollerBaseLocation)
 {
     if (ModelState.IsValid)
     {
         db.Entry(rollerBaseLocation).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(rollerBaseLocation));
 }
Esempio n. 3
0
        public ActionResult Create([Bind(Include = "RollerBaseLocationID,Location")] RollerBaseLocation rollerBaseLocation)
        {
            if (ModelState.IsValid)
            {
                db.RollerBaseLocations.Add(rollerBaseLocation);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(rollerBaseLocation));
        }
Esempio n. 4
0
        // GET: RollerBaseLocations/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            RollerBaseLocation rollerBaseLocation = db.RollerBaseLocations.Find(id);

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