示例#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;
 }