public ActionResult DeleteConfirmed(int id) { theme_areas theme_areas = db.theme_areas.Find(id); db.theme_areas.Remove(theme_areas); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit([Bind(Include = "theme_area_id,theme_area_name,theme_area_description,theme_area_pictures,theme_park_id")] theme_areas theme_areas) { if (ModelState.IsValid) { db.Entry(theme_areas).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.theme_park_id = new SelectList(db.theme_park, "theme_park_id", "theme_park_name", theme_areas.theme_park_id); return(View(theme_areas)); }
// GET: ThemeAreaAdmin/Details/5 public ActionResult Details(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } theme_areas theme_areas = db.theme_areas.Find(id); if (theme_areas == null) { return(HttpNotFound()); } return(View(theme_areas)); }
// GET: ThemeAreaAdmin/Edit/5 public ActionResult Edit(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } theme_areas theme_areas = db.theme_areas.Find(id); if (theme_areas == null) { return(HttpNotFound()); } ViewBag.theme_park_id = new SelectList(db.theme_park, "theme_park_id", "theme_park_name", theme_areas.theme_park_id); return(View(theme_areas)); }
// GET: Sections public ActionResult Index(int?id) { if (id == null) { return(new HttpStatusCodeResult(HttpStatusCode.BadRequest)); } theme_areas theme_areas = db.theme_areas.Find(id); if (theme_areas == null) { return(HttpNotFound()); } List <String> imageList = new List <String>(); imageList = theme_areas.getImagePaths(); ViewBag.firstImage = imageList.ElementAt(0); imageList.RemoveAt(0); ViewBag.ImageList = imageList; return(View(theme_areas)); }