示例#1
0
        private void ButtonSelectSeat_Click(object sender, RoutedEventArgs e)
        {
            var show = Model.Show.ListOfShows[ComboBoxShow.SelectedIndex];

            var chooseSeat = new ChooseSeat(show);

            chooseSeat.ShowDialog();

            if (chooseSeat.ChoosenSeat != null)
            {
                ButtonCreate.IsEnabled = true;
            }

            ChoosenSeat = chooseSeat.ChoosenSeat;
        }
示例#2
0
        private void ButtonSelectSeat_Click(object sender, RoutedEventArgs e)
        {
            var show = Model.Show.ListOfShows[ComboBoxShow.SelectedIndex];

            var chooseSeat = new ChooseSeat(show);

            chooseSeat.ShowDialog();
            var choosenSeat = chooseSeat.ChoosenSeat;

            CurrentCustomer.Show.ShowRoom.ListOfSeats.First(seat => seat == CurrentSeat).IsBooked[
                CurrentCustomer.Seat.IsBooked.IndexOf(new Tuple <Model.Show, bool>(CurrentCustomer.Show, true))] =
                new Tuple <Model.Show, bool>(CurrentCustomer.Show, false);

            CurrentSeat = choosenSeat;
        }