public async Task <IActionResult> Create([Bind("BookingId,cineplxId,customerName,movieId,numberOfAdults,numberOfConc,sessionId")] Booking booking) { if (ModelState.IsValid) { _context.Add(booking); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(booking)); }
public async Task <IActionResult> Create([Bind("SessionId,SeatsAvailable,SeatsTotal,SessionDateTime")] Session session) { if (ModelState.IsValid) { _context.Add(session); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(session)); }
public async Task <IActionResult> Create([Bind("CineplexId,ImageUrl,Location,LongDescription,ShortDescription")] Cineplex cineplex) { if (ModelState.IsValid) { _context.Add(cineplex); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(cineplex)); }
public async Task <IActionResult> Create([Bind("EnquiryId,Email,Message,EventDate")] Enquiry enquiry) { if (ModelState.IsValid) { _context.Add(enquiry); await _context.SaveChangesAsync(); return(RedirectToAction("Success")); } return(View(enquiry)); }
public async Task <IActionResult> Create([Bind("MovieId,ImageUrl,LongDescription,Price,ShortDescription,Title")] Movie movie) { if (ModelState.IsValid) { _context.Add(movie); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } return(View(movie)); }
public async Task <IActionResult> Create([Bind("CineplexId,MovieId")] CineplexMovie cineplexMovie) { if (ModelState.IsValid) { _context.Add(cineplexMovie); await _context.SaveChangesAsync(); return(RedirectToAction("Index")); } ViewData["CineplexId"] = new SelectList(_context.Cineplex, "CineplexId", "Location", cineplexMovie.CineplexId); ViewData["MovieId"] = new SelectList(_context.Movie, "MovieId", "LongDescription", cineplexMovie.MovieId); return(View(cineplexMovie)); }