private void viewEmployeeRecordToolStripMenuItem_Click(object sender, EventArgs e) { if (objViewEmpdByDeptForm == null) { objViewEmpdByDeptForm = new ViewEmpByDept(); objViewEmpdByDeptForm.MdiParent = this; objViewEmpdByDeptForm.FormClosed += ObjViewEmpdByDeptForm_FormClosed; objViewEmpdByDeptForm.Show(); } else { objViewEmpdByDeptForm.Activate(); } }
private void ObjViewEmpdByDeptForm_FormClosed(object sender, FormClosedEventArgs e) { //throw new NotImplementedException(); objViewEmpdByDeptForm = null; }