private void LnkNewRecord_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e) { using (var frm = new PatientInfoDialog()) { if (frm.ShowDialog(this) != DialogResult.OK) { return; } SelectedPatient = frm.PatientItem; DialogResult = DialogResult.OK; } }
private void BtnAdd_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; var newItem = new Core.Patient(); using (var frm = new PatientInfoDialog()) { frm.PatientItem = newItem; if (frm.ShowDialog(this) != DialogResult.OK) { return; } DisplayToGridRow(newItem, Grid.Rows[Grid.Rows.Add()]); } }
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 BtnEdit_Click(object sender, EventArgs e) { Cursor.Current = Cursors.WaitCursor; var item = (Core.Patient)Grid.CurrentRow?.Tag; if (item == null) { return; } using (var frm = new PatientInfoDialog()) { frm.PatientItem = item; if (frm.ShowDialog(this) != DialogResult.OK) { return; } DisplayToGridRow(item, Grid.CurrentRow); } }