Exemplo n.º 1
0
        public async Task <IActionResult> Create([Bind("ID,ID_CinemaHall,ID_Movie,Date,StartingTime,ID_Cinema")] Seance seance)
        {
            if (ModelState.IsValid)
            {
                _context.Add(seance);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(seance));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Create([Bind("ID,Title,Genre,Type,Rating,ImgPath,ID_Cinema")] Movie movie)
        {
            if (ModelState.IsValid)
            {
                _context.Add(movie);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(movie));
        }
Exemplo n.º 3
0
        public async Task <IActionResult> Create([Bind("ID,Name,NumberOfSeats,ID_Cinema")] CinemaHall cinemaHall)
        {
            if (ModelState.IsValid)
            {
                _context.Add(cinemaHall);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(cinemaHall));
        }
Exemplo n.º 4
0
        public async Task <IActionResult> Create([Bind("ID,ID_Seance,ID_Klient,SeatNumber,ID_Cinema")] Reservation reservation)
        {
            if (ModelState.IsValid)
            {
                _context.Add(reservation);
                await _context.SaveChangesAsync();

                return(RedirectToAction(nameof(Index)));
            }
            return(View(reservation));
        }