private void btnView_Click(object sender, EventArgs e) { Boolean blYesNo = false; FormCollection fc = Application.OpenForms; foreach (Form frm in fc) { if (frm.Name == "DebtorsRecoveryList") { blYesNo = true; break; } } if (blYesNo == false) { DebtorsRecoveryList myDebtorsRecoveryList = new DebtorsRecoveryList(cmbDivision.Text.Trim(), cmbYear.Text.Trim(), cmbMonth.SelectedValue.ToString(), "", ""); myDebtorsRecoveryList.Show(); } else { DebtorsRecoveryList myDebtorsRecoveryList = new DebtorsRecoveryList(cmbDivision.Text.Trim(), cmbYear.Text.Trim(), cmbMonth.SelectedValue.ToString(), "", ""); myDebtorsRecoveryList.Close(); } }
public EmployeeSearch(DebtorsRecoveryList frmObj, Int32 intRow, String strDiv, Boolean bl) { myDebtorList = frmObj; intMyRow = intRow; strDivision = strDiv; blYesNo = bl; InitializeComponent(); }