Пример #1
0
        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();
            }
        }