private void BtnOpenPatientInfo_Click(object sender, System.EventArgs e) { Cursor.Current = Cursors.WaitCursor; using (var frm = new PatientSearchDialog()) { if (frm.ShowDialog(this) != DialogResult.OK) { return; } using (var patientForm = new PatientInfoDialog()) { patientForm.PatientItem = frm.SelectedPatient; patientForm.ShowDialog(this); } } }
private void BtnSearch_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; lnkHistory.Enabled = false; using (var frm = new PatientSearchDialog()) { if (frm.ShowDialog(this) != DialogResult.OK) { return; } _selectedPatient = frm.SelectedPatient; DisplayPatientInfo(); lnkHistory.Enabled = true; if (_historyDialog != null && _historyDialog.Visible) { _selectedPatient.LoadTreatmentHistory(); _historyDialog.Show(); _historyDialog.RefreshData(_selectedPatient.TreatmentHistoryItems); } } }