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;
        }
 protected override void OnNavigatedTo(NavigationEventArgs e)
 {
     this.AllSeats = new List <Seat>();
     this.AllSeats.AddRange(BookingViewModel.GetSeats());
     CalculateAvailableSeats();
 }
Example #3
0
 public SeatsPage()
 {
     this.InitializeComponent();
     SeatsList = BookingViewModel.GetSeats();
 }