private void editPatientAction() { Patient selectedRecord = patientsList.SelectedRows[0].DataBoundItem as Patient; PatientInfoForm pif = new PatientInfoForm(selectedRecord.Id); pif.ShowDialog(); if (pif.Result != null) { selectedRecord.CopyPatient(pif.Result); patientsList.Refresh(); } }
private void patientsTable_CellDoubleClick(object sender, DataGridViewCellEventArgs e) { Patient selectedRecord = patientsTable.SelectedRows[0].DataBoundItem as Patient; PatientInfoForm pif = new PatientInfoForm(selectedRecord.Id); pif.ShowDialog(); if (pif.Result != null) { selectedRecord.CopyPatient(pif.Result); patientsTable.Refresh(); } }
private void addPatientButton_Click(object sender, EventArgs e) { PatientInfoForm pf = new PatientInfoForm(); pf.ShowDialog(); if (pf.Result != null) { allPatientsList.Add(pf.Result); filteredPatientList.Add(pf.Result); patientsList.Refresh(); } }