private void btnAdd_Click(object sender, EventArgs e) { try { PatientConsultation patientConsultation = new PatientConsultation(patient.Id); PatientConsultationForm form = new PatientConsultationForm(patientConsultation, patient); if (form.ShowDialog() == DialogResult.OK) { DataRow newRow = dataTable.NewRow(); dataTable.Rows.Add(newRow); UpdateRow(newRow, patientConsultation); } } catch (Exception ex) { Log.Exception(ex); } }
private void Open() { try { PatientConsultation patientConsultation = GetPatientConsultation(); if (patientConsultation != null) { PatientConsultationForm form = new PatientConsultationForm(patientConsultation, patient); if (form.ShowDialog() == DialogResult.OK) { UpdateRow(SelectedRow, patientConsultation); } } } catch (Exception ex) { Log.Exception(ex); } }