public ActionResult Edit([Bind(Include = "CategoryName,CategoryDescription,CategoryPhotoLink")] tourCategory tourCategory) { if (ModelState.IsValid) { db.Entry(tourCategory).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } return(View(tourCategory)); }
public ActionResult Edit([Bind(Include = "TourName,CategoryID,MainPhotoLink,TourDescription")] Tour tour) { if (ModelState.IsValid) { dbContext.Entry(tour).State = EntityState.Modified; dbContext.SaveChanges(); return(RedirectToAction("index")); } return(View(tour)); }
public async Task <ActionResult> Edit([Bind(Include = "Id_Tour,DepartureDate,ReturnDate,Route")] Tour tour) { if (ModelState.IsValid) { db.Entry(tour).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(tour)); }
public ActionResult Edit([Bind(Include = "PhotoID,FileName,GalleryID")] tourPhoto tourPhoto) { if (ModelState.IsValid) { db.Entry(tourPhoto).State = EntityState.Modified; db.SaveChanges(); return(RedirectToAction("Index")); } ViewBag.GalleryID = new SelectList(db.tourGalleries, "GalleryID", "GalleryName", tourPhoto.GalleryID); return(View(tourPhoto)); }
public async Task <ActionResult> Edit([Bind(Include = "Id_Passenger,LastName,Name,Age,Id_Tour")] Passenger passenger) { if (ModelState.IsValid) { db.Entry(passenger).State = EntityState.Modified; await db.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewBag.Id_Tour = new SelectList(db.Tour, "Id_Tour", "Route", passenger.Id_Tour); return(View(passenger)); }