private void btnConfirm_Click(object sender, EventArgs e) { FillEntity(); bool b = patientRepo.PatientUpdate(patient); if (b == true) { MessageBox.Show("Update done"); UcPatientProfile ucPatientProfile = new UcPatientProfile(); ucPatientProfile.Refresh(); } else { MessageBox.Show("Update failed"); } }