示例#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));
        }
示例#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));
        }
示例#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));
        }
示例#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));
        }