public async Task <IActionResult> Edit(int id, [Bind("ID,ID_CinemaHall,ID_Movie,Date,StartingTime,ID_Cinema")] Seance seance) { if (id != seance.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(seance); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!SeanceExists(seance.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(seance)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Title,Genre,Type,Rating,ImgPath,ID_Cinema")] Movie movie) { if (id != movie.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(movie); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!MovieExists(movie.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(movie)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,Name,NumberOfSeats,ID_Cinema")] CinemaHall cinemaHall) { if (id != cinemaHall.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(cinemaHall); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!CinemaHallExists(cinemaHall.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(cinemaHall)); }
public async Task <IActionResult> Edit(int id, [Bind("ID,ID_Seance,ID_Klient,SeatNumber,ID_Cinema")] Reservation reservation) { if (id != reservation.ID) { return(NotFound()); } if (ModelState.IsValid) { try { _context.Update(reservation); await _context.SaveChangesAsync(); } catch (DbUpdateConcurrencyException) { if (!ReservationExists(reservation.ID)) { return(NotFound()); } else { throw; } } return(RedirectToAction(nameof(Index))); } return(View(reservation)); }