public ActionResult DeleteConfirmed(int id) { ShowPelicula showPelicula = db.ShowPeliculas.Find(id); db.ShowPeliculas.Remove(showPelicula); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "ShowPeliculaID,CinesID,PeliculasID,ShowInicio,ShowFin")] ShowPelicula showPelicula) { if (ModelState.IsValid) { db.Entry(showPelicula).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.CinesID = new SelectList(db.Cines, "CinesID", "Nombre", showPelicula.CinesID); ViewBag.PeliculasID = new SelectList(db.Peliculas, "PeliculasID", "Nombre", showPelicula.PeliculasID); return(View(showPelicula)); }
// GET: ShowPeliculas/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ShowPelicula showPelicula = db.ShowPeliculas.Find(id); if (showPelicula == null) { return(HttpNotFound()); } return(View(showPelicula)); }
// GET: ShowPeliculas/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } ShowPelicula showPelicula = db.ShowPeliculas.Find(id); if (showPelicula == null) { return(HttpNotFound()); } ViewBag.CinesID = new SelectList(db.Cines, "CinesID", "Nombre", showPelicula.CinesID); ViewBag.PeliculasID = new SelectList(db.Peliculas, "PeliculasID", "Nombre", showPelicula.PeliculasID); return(View(showPelicula)); }