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