public BookingsManager(BookingTab parent, string facilityName, DateTime bookingDate) { InitializeComponent(); // Reference parent this.parent = parent; // Initialize DB context context = new ElevenAlphaEntities(); // Initialize Window Size this.Size = new Size(1000, (int)(Screen.PrimaryScreen.Bounds.Height * 0.75)); // Initialize values based on slot selected FacilityTypeComboBox.Text = facilityName; BookingDateTimePicker.Value = bookingDate; // Initialize watermark FirstNameTextBox_TextChanged(FirstNameTextBox, new EventArgs()); LastNameTextBox_TextChanged(LastNameTextBox, new EventArgs()); // Initialize comboBox Collection InitializeFacilityTypeComboBox(); // Initialize dataGrid LoadBookingDataGrid(); }
public MainScreen() { InitializeComponent(); // Initialize Bookings Tab bookingTab = new BookingTab(this); bookingsTabPage.Controls.Add(bookingTab); // Initialize Members Tab membersUserControl = new MembersTab(); membersTabPage.Controls.Add(membersUserControl); // Initialize Facilities Tab facilitiesTab = new FacilitiesTab(this); facilitiesTabPage.Controls.Add(facilitiesTab); // Initialize Reports Tab reportsTab = new ReportsTab(); reportsTabPage.Controls.Add(reportsTab); }