private void btn_addPatient_Click(object sender, EventArgs e) { // Get the values from the input/selection fields patient.FirstName = txtbx_patientFName.Text; patient.LastName = txtbx_patientLName.Text; patient.ContactNo = txtbx_patientContact.Text; patient.Dob = dtp_patientDOB.Text; patient.Sex = cmb_patientSex.Text; patient.BloodType = cmb_patientBloodType.Text; patient.Address = txtbx_patientAddress.Text; // Insert data into database bool success = patient.Insert(patient); if (success) { // Successfully inserted MessageBox.Show("Patient added successfully."); // Call the clear method Clear(); } else { // Failed to add patient MessageBox.Show("Failed to add new patient. Try again."); } // Call the method to load DataGrid view LoadPatientDgvData(); }