//Method to call the instance of insertPatient from the PatientDB. //This method will be attached to the button 'Insert' command. private void InsertPatient() { try { rowsAffected = PatientDB.insertPatient(SelectedPatient); Patients.Clear(); DisplayAllPatients(); if (rowsAffected != 0) { MessageBox.Show("Patient Added"); } else { MessageBox.Show("Insert Failed"); } } catch (Exception e) { throw e; } }