public SingleBooking(DateTime dateTime, int roomID, DailySchedule.TimeSlot timeSlot, Booking booking)
 {
     dateTime_ = dateTime;
     roomID_ = roomID;
     timeSlot_ = timeSlot;
     booking_ = booking;
 }
Esempio n. 2
0
 public Booking(Booking mBooking)
 {
     booked_ = mBooking.booked_;
     type_ = mBooking.type_;
     bookedBy_ = mBooking.bookedBy_;
     title_ = mBooking.title_;
     description_ = mBooking.description_;
 }
 //===============================================================================
 // Constructors and Destructors
 //===============================================================================
 public DailySchedule()
 {
     timeBooking_ = new Booking[MaxBookings];
     for(int i = 0; i < MaxBookings; ++i)
     {
         timeBooking_[i] = new Booking();
     }
 }
 public WeeklyBooking(Calendar.Semester semester, DayOfWeek dayOfWeek, int roomID, DailySchedule.TimeSlot timeSlot, Booking booking)
 {
     semester_ = semester;
     roomID_ = roomID;
     dayOfWeek_ = dayOfWeek;
     timeSlot_ = timeSlot;
     booking_ = booking;
 }
 //===============================================================================
 // Public Methods
 //===============================================================================
 public bool AddBooking(Booking newBooking, TimeSlot timeSlot)
 {
     if (CheckBooking(timeSlot))
     {
         return false;
     }
     else
     {
         timeBooking_[(int)timeSlot] = newBooking;
         return true;
     }
 }
Esempio n. 6
0
        public InfoBox(Booking booking)
        {
            InitializeComponent();
            textbox.Location = new System.Drawing.Point(10, 10);
            textbox.AutoWordSelection = true;
            textbox.ScrollBars = RichTextBoxScrollBars.ForcedVertical;
            textbox.Size = new System.Drawing.Size(this.ClientSize.Width - 20, this.ClientSize.Height - 20);
            textbox.Text = "Name: " + booking.Title +
                "\nDescription: " + booking.Description +
                "\nOwner of Booking: " + booking.BookedBy;
            this.Controls.Add(this.textbox);

        }