private void btnConfirm_Click_1(object sender, EventArgs e) { // Check the type of the booking and add it to the database if (cmbBooking.Text == "Tour Package") { DBConnect book = new DBConnect(); bool success = book.TourBooking(txtICPassport.Text, dateTimePicker1.Text, cmbBooking.Text, cmbLocation.Text); Successful(success); } else if (cmbBooking.Text == "Tour Package & Hotel") { DBConnect book = new DBConnect(); bool success = book.Booking(txtICPassport.Text, dateTimePicker1.Text, cmbBooking.Text, cmbLocation.Text, cmbHotel.Text, cmbRoom.Text, int.Parse(cmbNight.Text)); Successful(success); } else if (cmbBooking.Text == "Hotel") { DBConnect book = new DBConnect(); bool success = book.HotelBooking(txtICPassport.Text, dateTimePicker1.Text, cmbBooking.Text, cmbHotel.Text, cmbRoom.Text, int.Parse(cmbNight.Text)); Successful(success); } }