private void rbnBtnDelPat_Click(object sender, EventArgs e) { try { frmPatiantControl frmPat = new frmPatiantControl(DBC, "Delete"); frmPat.ShowDialog(); } catch (Exception ex) { MessageBox.Show( ex.Message, "Error Starting Deletion Process", MessageBoxButtons.OK, MessageBoxIcon.Error); } }
private void rbnBtnAddPat_Click(object sender, EventArgs e) { try { frmPatiantControl frmPat = new frmPatiantControl(DBC, "Insert"); if (frmPat.ShowDialog() == DialogResult.OK) { int sel = rbnCboPatiant.Items.Add(frmPat.insertedPatiant.ID + '\t' + frmPat.insertedPatiant.Name); rbnCboPatiant.SelectedIndex = sel; } } catch (Exception ex) { MessageBox.Show( ex.Message, "Error Starting Patiant Insertion Process", MessageBoxButtons.OK, MessageBoxIcon.Error); } }