Esempio n. 1
0
 public ControllerClass(CinemaContext db)
 {
     hallDAO   = new HallDAO(db);
     movieDAO  = new MovieDAO(db);
     seanceDAO = new SeanceDAO(db);
     ticketDAO = new TicketDAO(db);
     view      = new ViewClass(hallDAO.GetHalls(), hallDAO.GetSeats());
 }
Esempio n. 2
0
        // GET: Reservations/ReservationsAdd
        public ActionResult ReservationsAdd()
        {
            //send to reservationAdd form
            var clients = ClientDAO.GetClients();
            var halls   = HallDAO.GetHalls();

            return(View());
        }
Esempio n. 3
0
 public ControllerClass()
 {
     hallDAO        = new HallDAO();
     movieDAO       = new MovieDAO();
     seanceDAO      = new SeanceDAO();
     ticketDAO      = new TicketDAO();
     fullTextSearch = new FullTextSearch();
     view           = new ViewClass(hallDAO.GetHalls(), hallDAO.GetSeats());
 }
Esempio n. 4
0
        private void AddOperation()
        {
            switch (view.entity)
            {
            case Entity.Movie:
                Movie m = view.MovieAddOrUpdateEnter();
                movieDAO.Create(m);
                break;

            case Entity.Seance:
                Seance s = view.SeanceAddOrUpdateEnter(movieDAO.GetList(), hallDAO.GetHalls());
                seanceDAO.Create(s);
                break;

            case Entity.Ticket:
                Ticket t       = view.TicketAddOrUpdateGetSeance(seanceDAO.GetList());
                long   hall_id = seanceDAO.Get(t.Seance_id).Hall_id;
                t = view.TicketAddOrUpdateGetSeat(hallDAO.GetSeatsInHall(hall_id), t);
                ticketDAO.Create(t);
                break;
            }
        }
Esempio n. 5
0
        public ActionResult HallList()
        {
            var halls = HallDAO.GetHalls();

            return(View(halls));
        }
Esempio n. 6
0
 public IEnumerable <Hall> GetClients()
 {
     return(HallDAO.GetHalls());
 }