// // GET: /StoreManager/Edit/5 public ActionResult Edit(int id) { TourPackages package = db.TourPackage.Find(id); ViewBag.GenreId = new SelectList(db.Airline, "GenreId", "Name", package.AirLinesId); ViewBag.ArtistId = new SelectList(db.Hotel, "ArtistId", "Name", package.HotelsId); return(View(package)); }
public ActionResult DeleteConfirmed(int id) { TourPackages package = db.TourPackage.Find(id); db.TourPackage.Remove(package); db.SaveChanges(); return(RedirectToAction("Index")); }
public ActionResult Edit(TourPackages package) { if (ModelState.IsValid) { db.Entry(package).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GenreId = new SelectList(db.Airline, "AirLinesId", "Name", package.AirLinesId); ViewBag.ArtistId = new SelectList(db.Hotel, "HotelsId", "Name", package.HotelsId); return(View(package)); }
public ActionResult Create(TourPackages package) { if (ModelState.IsValid) { db.TourPackage.Add(package); db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GenreId = new SelectList(db.Airline, "AirlineId", "Name", package.AirLinesId); ViewBag.ArtistId = new SelectList(db.Hotel, "ArtistId", "Name", package.HotelsId); return(View(package)); }
// // GET: /StoreManager/Delete/5 public ActionResult Delete(int id) { TourPackages package = db.TourPackage.Find(id); return(View(package)); }
// // GET: /PackageManager/Details/5 public ViewResult Details(int id) { TourPackages package = db.TourPackage.Find(id); return(View(package)); }