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")); }
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)); }
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)); }
// 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)); }