private void EditBooking() { //Try to... try { //Call the EditBooking method from the Bookings Class and pass across the data. int rowsAffected = Bookings.EditBooking(Convert.ToInt32(txtBookingID.Text), cbClassID.Text); if (rowsAffected > 0) { //If the Booking has been edited successfully display the message below. MessageBox.Show("Booking edited successfully."); //Call the Reset button. Reset(); } } //Catch any exception which may occur and display an error message. catch (Exception ex) { MessageBox.Show(ex.Message); } }