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