Exemplo n.º 1
0
 /// <summary>
 ///  Constructor for Booking, creates a booking with a unique bookingID, adds the booking to the specified show and creates a new list of tickets for the booking.
 /// </summary>
 /// <param name="show">The show the booking is created for.</param>
 public Booking(Show show)
 {
     this.BookingID = BookingIDSequence.Instance.NextID;
     this.show = show;
     show.AddBooking(this);
     this.tickets = new List<ITicket>();
 }
Exemplo n.º 2
0
 public MainWindow()
 {
     InitializeComponent();
     show = new Show("Les Miserables");
     bookings = new ObservableCollection<Booking>();
     DataContext = show;
     lstBookings.ItemsSource = bookings;
 }