Пример #1
0
        public ActionResult DeleteConfirmed(string id)
        {
            SPA_Salas sPA_Salas = db.SPA_Salas.Find(id);

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

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

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