예제 #1
0
파일: Booking.cs 프로젝트: Kortz/OOSD
 /// <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>();
 }
예제 #2
0
 public MainWindow()
 {
     InitializeComponent();
     show = new Show("Les Miserables");
     bookings = new ObservableCollection<Booking>();
     DataContext = show;
     lstBookings.ItemsSource = bookings;
 }