private void button3_Click(object sender, EventArgs e) //btnBook
        {                                                      //if Book Ticket button is clicked
            try
            {                                                  //first validate and check if the class and payment methods are selected
                if ((cmbClass.Text == "") || (cmbPmt.Text == ""))
                {
                    MessageBox.Show("Please make sure you choose a Payment Method and Flight Class", "Select Payment and Class", MessageBoxButtons.OK, MessageBoxIcon.Exclamation);
                }
                else
                {//then save all to booking table
                    //assigning the form detalis into class variable to store in database
                    bookClass            = new BookingClass();
                    bookClass.FlightID   = txtFlight.Text;
                    bookClass.CustomerID = txtCustomer.Text;
                    bookClass.From       = lblFrom.Text;
                    bookClass.To         = lblTo.Text;
                    bookClass.PmtMetd    = cmbPmt.Text;
                    bookClass.NumSeats   = Convert.ToInt32(lblSeat.Text);

                    bookClass.TotalFare = Convert.ToDouble(txtFare.Text) * Convert.ToDouble(lblRate.Text);
                    txtTotFare.Text     = Convert.ToString(bookClass.TotalFare);
                    bookClass.addBooking();



                    char seatRow;
                    int  seatNum;
                    int  rowNumber;
                    //update seatRecords in database
                    seatClass seatObj = new seatClass();
                    seatObj.loadSeats(Convert.ToInt32(bookClass.FlightID));
                    for (int i = 0; i < seatObj.seatCount; i++)
                    {
                        //get row and number from seat class and assign here
                        seatRow = seatObj.seatObject[i].SeatRow;
                        seatNum = seatObj.seatObject[i].SeatNumber;

                        rowNumber = (int)seatRow - 64;         //take seatrow above and subtract from 64 coz we added before to get ascii here we subtract

                        if (seatStat[seatNum, rowNumber] == 2) //seatStat is just the array variable assigned top
                        {                                      //send to update seat class, which turns seat==2 into seat ==1 i.e.booked
                            seatObj.updateSeat(Convert.ToInt32(bookClass.FlightID), seatRow, seatNum, Convert.ToInt32(bookClass.BookingID));
                        }
                    }

                    MessageBox.Show("Data added successfully! Booking Completed", "Success", MessageBoxButtons.OK, MessageBoxIcon.Information);
                    this.Close();
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("Error: " + ex, "Exception Error");
            }
        }