private void ShowReportAllEmployee() { if (allEmployee == null) { allEmployee = new AllEmployeeDetails(); allEmployee.MdiParent = this; allEmployee.FormClosed += AllEmployee_FormClosed; allEmployee.Show(); } else { allEmployee.Activate(); } }
// Set form instance to null on form close private void AllEmployee_FormClosed(object sender, FormClosedEventArgs e) { allEmployee = null; }