private void BtnAddPatient_Click(object sender, EventArgs e) { var patientForm = new D_PatientForm(PatientDAO, p => { txtSearch.Text = ""; PatientDAO.Add(p); // TODO: Validate LoadPatients(); }); patientForm.ShowDialog(this); }
private void LstPatients_DoubleClick(object sender, EventArgs e) { if (lstPatients.SelectedIndices.Count < 1) { return; } var patient = patients[lstPatients.SelectedIndices[0]]; var patientForm = new D_PatientForm(PatientDAO, p => { txtSearch.Text = ""; PatientDAO.Update(p); // TODO: Validate LoadPatients(); }, patient); patientForm.ShowDialog(this); }