Esempio n. 1
0
        void ShowButton_Click(object sender, EventArgs e, int showId)
        {
            Program     app         = Program.GetInstance();
            ShowService showService = app.GetService <ShowService>("shows");

            // Get show
            Show show = showService.GetShowById(showId);

            // Redirect to screen
            ReservationCreate reservationScreen = app.GetScreen <ReservationCreate>("reservationCreate");

            reservationScreen.SetShow(show);
            app.ShowScreen(reservationScreen);
        }
        void ShowButton_Click(object sender, EventArgs e, string showId)
        {
            Program           app               = Program.GetInstance();
            ShowService       showService       = app.GetService <ShowService>("shows");
            ReservationCreate reservationScreen = app.GetScreen <ReservationCreate>("reservationCreate");

            // Get show and redirect to screen
            List <Show> shows = showService.GetShowsByMovie(movie);
            List <Show> list  = shows.Where(i => i.startTime > DateTime.Now).OrderBy(i => i.startTime).ToList();
            Show        show  = list[int.Parse(showId)];

            reservationScreen.SetShow(show);
            app.ShowScreen(reservationScreen);
        }