Пример #1
0
        public ActionResult DeleteConfirmed(int id)
        {
            SALONES sALONES = db.SALONES.Find(id);

            db.SALONES.Remove(sALONES);
            db.SaveChanges();
            return(RedirectToAction("Index"));
        }
Пример #2
0
 public ActionResult Edit([Bind(Include = "ID,DESCRIPCION")] SALONES sALONES)
 {
     if (ModelState.IsValid)
     {
         db.Entry(sALONES).State = EntityState.Modified;
         db.SaveChanges();
         return(RedirectToAction("Index"));
     }
     return(View(sALONES));
 }
Пример #3
0
        public ActionResult Create([Bind(Include = "ID,DESCRIPCION")] SALONES sALONES)
        {
            if (ModelState.IsValid)
            {
                db.SALONES.Add(sALONES);
                db.SaveChanges();
                return(RedirectToAction("Index"));
            }

            return(View(sALONES));
        }
Пример #4
0
        // GET: SALONES/Delete/5
        public ActionResult Delete(int?id)
        {
            if (id == null)
            {
                return(new HttpStatusCodeResult(HttpStatusCode.BadRequest));
            }
            SALONES sALONES = db.SALONES.Find(id);

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