private void btnNewOrg_Click(object sender, EventArgs e) { FrmOrgInfo.wOrganisation = null; Form frmNewOrg = new FrmOrgInfo(); if (frmNewOrg.ShowDialog() == System.Windows.Forms.DialogResult.OK) { fillLstOrganisations(); } }
private void orgEditForm() { try { if (wSelectedIndex == -1) { return; } else { FrmOrgInfo.wOrganisation = _Dh.myOrganisations[wSelectedIndex]; var frmUsrInfo = new FrmOrgInfo(); frmUsrInfo.ShowDialog(); } } catch (Exception ex) { MessageBox.Show(ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); } }