private void buttonNew_Click(object sender, EventArgs e) { this.Hide(); using (addNewFunctionFrm myform = new addNewFunctionFrm(mdept, mEmployee, mAccount, mPermission)) { myform.ShowDialog(); } this.Close(); }
private void bttnNewJobINDept_Click(object sender, EventArgs e) { if (dataGridView1.SelectedRows.Count > 0) { using (addNewFunctionFrm frm = new addNewFunctionFrm(nwDeptList[dataGridView1.SelectedRows[0].Index], mEmployee, mAccount, mPermission)) { frm.ShowDialog(); } } else { MessageBox.Show("الرجاء تحديد القسم أولا"); } }