//End constructor private void frmMakeReservation_Load(object sender, EventArgs e) { //Start instantiation movieController = new frmMovieController(this, gridMovie); reserveController = new frmReservationController(gridMovie, this); showController = new frmShowController(this, gridShow); seatController = new frmSeatController(this); //End instantiation //Display movie details in the grid movieController.displayGrid(); //Format movie grid //Does not allow changes to be made. gridMovie.ReadOnly = true; //Hides column movie id gridMovie.Columns[0].Visible = false; //Formats the date time picker. formatDTP(); //Disbale date time picker, button and combobox btnConfirmDateTime.Enabled = false; dtpDate.Enabled = false; cmbTime.Enabled = false; //Displays the first movie as being selected. lblSelectedMovie.Text = "Selected Movie: " + gridMovie.Rows[0].Cells[1].Value; }
//End variables //Constructor public frmReservationDetails(int reservationID) { InitializeComponent(); this.reservationID = reservationID; //Start instantiation reservationController = new frmReservationController(this, reservationID); ticketController = new frmTicketController(this, gridTicket, reservationID); showController = new frmShowController(this, gridShow, reservationID); seatController = new frmSeatController(this, reservationID); //End instantiation }
//End variables //Constructor public frmSelectSeat(int movieID, DateTime date, DateTime startTime, int showID) { InitializeComponent(); this.movieID = movieID; this.date = date; this.startTime = startTime; this.showID = showID; //Start instantiation seatController = new frmSeatController(this); showController = new frmShowController(this); //End instantiation }
//End variables //Constructor public frmReservationConfirmed(List<int> seatID, int customerID, int showID) { InitializeComponent(); this.seatID = seatID; this.customerID = customerID; this.showID = showID; //Start instantiations reservationController = new frmReservationController(this, customerID, seatID, showID); ticketController = new frmTicketController(this, seatID, showID, customerID, gridTicket); seatController = new frmSeatController(this, seatID, showID); showController = new frmShowController(this, showID); //End instantiations }
//End constructor private void frmReservationDetails_Load(object sender, EventArgs e) { //Displays details in the grids. reservationController.displayReservation(gridReservation); //reservation details ticketController.displayTickets(); // ticket details showController = new frmShowController(this, showController.getShowID2()); //Get show ID showController.displayShow(gridShow); //Show details //Make certain columns in the grids invisible gridShow.Columns[0].Visible = false; //Show ID gridShow.Columns[1].Visible = false; //Movie ID gridTicket.Columns[0].Visible = false; //Show ID gridTicket.Columns[2].DefaultCellStyle.Format = "£0.00#"; //Formats column "price" in the grid ticket. }