コード例 #1
0
        public PassengerPage()
        {
            this.InitializeComponent();

            Passengers = new List <Seat>();
            Passengers = BookingViewModel.GetSeats().FindAll(seat => seat.IsBooked);

            if (Passengers.Count == 0)
            {
                Passengers.Add(new Seat()
                {
                    FirstName = "There are no Seats booked yet."
                });
            }

            PassengersListView.ItemsSource = Passengers;
        }
コード例 #2
0
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this.AllSeats = new List <Seat>();
     this.AllSeats.AddRange(BookingViewModel.GetSeats());
     CalculateAvailableSeats();
 }
コード例 #3
0
 public SeatsPage()
 {
     this.InitializeComponent();
     SeatsList = BookingViewModel.GetSeats();
 }