public ActionResult DeleteConfirmed(int id) { theatre theatre = db.theatres.Find(id); db.theatres.Remove(theatre); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "Th_Id,Th_name,Th_loc,dist,movieMv_Id")] theatre theatre) { if (ModelState.IsValid) { db.Entry(theatre).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.movieMv_Id = new SelectList(db.movies, "Mv_Id", "Mv_Name", theatre.movieMv_Id); return(View(theatre)); }
public ActionResult Create([Bind(Include = "Th_Id,Th_name,Th_loc,dist,movieMv_Id")] theatre theatre) { if (ModelState.IsValid) { db.theatres.Add(theatre); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.movieMv_Id = new SelectList(db.movies, "Mv_Id", "Mv_Name", theatre.movieMv_Id); return(View(theatre)); }
// GET: theatres/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } theatre theatre = db.theatres.Find(id); if (theatre == null) { return(HttpNotFound()); } return(View(theatre)); }
// GET: theatres/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } theatre theatre = db.theatres.Find(id); if (theatre == null) { return(HttpNotFound()); } ViewBag.movieMv_Id = new SelectList(db.movies, "Mv_Id", "Mv_Name", theatre.movieMv_Id); return(View(theatre)); }