void csbe_FormClosed(object sender, FormClosedEventArgs e) { csbe = null; }
private void Workerpayroll_RunWorkerCompleted(object sender, RunWorkerCompletedEventArgs e) { if (csbe == null) { csbe = new CheckSalaryBonusEmployee((List<Payroll>)e.Result); csbe.MdiParent = this; csbe.FormClosed += csbe_FormClosed; csbe.Show(); toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "Salary And Bonus Information Load Done"; } else { toolStripProgressBar1.Visible = false; toolStripStatusLabel1.Text = "Salary And Bonus Information Load Done"; csbe.Activate(); } }