private void butCreate_Click(object sender, System.EventArgs e) { if (textExcludeLessThan.errorProvider1.GetError(textExcludeLessThan) != "" || textLastStatement.errorProvider1.GetError(textLastStatement) != "" ) { MessageBox.Show(Lan.g(this, "Please fix data entry errors first.")); return; } DateTime lastStatement = PIn.PDate(textLastStatement.Text); string getAge = ""; if (radio30.Checked) { getAge = "30"; } else if (radio60.Checked) { getAge = "60"; } else if (radio90.Checked) { getAge = "90"; } int[] billingIndices = new int[listBillType.SelectedIndices.Count]; for (int i = 0; i < billingIndices.Length; i++) { billingIndices[i] = listBillType.SelectedIndices[i]; } Cursor = Cursors.WaitCursor; FormBilling FormB = new FormBilling(); FormB.AgingList = Patients.GetAgingList(getAge, lastStatement, billingIndices, checkBadAddress.Checked , checkExcludeNegative.Checked, PIn.PDouble(textExcludeLessThan.Text) , checkExcludeInactive.Checked, checkIncludeChanged.Checked); FormB.GeneralNote = textNote.Text; Cursor = Cursors.Default; FormB.ShowDialog(); DialogResult = DialogResult.OK; }