private void bAdd_Click(object sender, EventArgs e) { AddEditRole role = new AddEditRole(); role.ShowInTaskbar = false; role.FormClosing += Role_FormClosing; role.ShowDialog(); }
private void bEdit_Click(object sender, EventArgs e) { if (code != null) { AddEditRole role = new AddEditRole(code); role.ShowInTaskbar = false; role.FormClosing += Role_FormClosing; role.ShowDialog(); } else { MessageBox.Show("Требуется выбрать строку в таблице", "Ошибка"); } }