private void btnAddPatient_Click(object sender, EventArgs e) { frmAddEditPatient frm = new frmAddEditPatient(null, MethodType.Add); frm.ShowDialog(); this.PatientBindingSource.DataSource = new UnitOfWork().PatientsRepo.Get(); }
private void accordionControlElement3_Click(object sender, EventArgs e) { var patient = PatientGrid.GetFocusedRow() as Patients; if (patient == null) { return; } frmAddEditPatient frm = new frmAddEditPatient(patient.Id, MethodType.Edit); frm.ShowDialog(); this.PatientBindingSource.DataSource = new UnitOfWork().PatientsRepo.Get(); }