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()); }
// GET: Reservations/ReservationsAdd public ActionResult ReservationsAdd() { //send to reservationAdd form var clients = ClientDAO.GetClients(); var halls = HallDAO.GetHalls(); return(View()); }
public ControllerClass() { hallDAO = new HallDAO(); movieDAO = new MovieDAO(); seanceDAO = new SeanceDAO(); ticketDAO = new TicketDAO(); fullTextSearch = new FullTextSearch(); view = new ViewClass(hallDAO.GetHalls(), hallDAO.GetSeats()); }
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; } }
public ActionResult HallList() { var halls = HallDAO.GetHalls(); return(View(halls)); }
public IEnumerable <Hall> GetClients() { return(HallDAO.GetHalls()); }