private void butPrint_Click(object sender, System.EventArgs e) { if (gridBill.SelectedIndices.Length == 0) { MessageBox.Show(Lan.g(this, "Please select items first.")); return; } if (!MsgBox.Show(this, true, "Please be prepared to wait up to ten minutes while all the bills get processed. Continue?")) { return; } Cursor = Cursors.WaitCursor; int[] guarNums = new int[gridBill.SelectedIndices.Length]; for (int i = 0; i < gridBill.SelectedIndices.Length; i++) { guarNums[i] = AgingList[gridBill.SelectedIndices[i]].PatNum; } FormRpStatement FormS = new FormRpStatement(); FormS.LoadAndPrint(guarNums, GeneralNote); Cursor = Cursors.Default; #if DEBUG FormS.ShowDialog(); #endif MsgBox.Show(this, "Printing Statements Complete"); DialogResult = DialogResult.OK; }
private void butPrint_Click(object sender, System.EventArgs e) { if (gridBill.SelectedIndices.Length == 0) { MessageBox.Show(Lan.g(this, "Please select items first.")); return; } if (!MsgBox.Show(this, true, "Please be prepared to wait up to ten minutes while all the bills get processed. Continue?")) { return; } Cursor = Cursors.WaitCursor; int[] guarNums = new int[gridBill.SelectedIndices.Length]; for (int i = 0; i < gridBill.SelectedIndices.Length; i++) { guarNums[i] = AgingList[gridBill.SelectedIndices[i]].PatNum; } FormRpStatement FormS = new FormRpStatement(); FormS.LoadAndPrint(guarNums, GeneralNote); Cursor = Cursors.Default; #if DEBUG FormS.ShowDialog(); #endif if (MsgBox.Show(this, true, "Printing Statements Complete. OK to make Commlog entries?")) { Commlog commlog; for (int i = 0; i < guarNums.Length; i++) { commlog = new Commlog(); commlog.CommDateTime = DateTime.Now; commlog.CommType = 0; commlog.SentOrReceived = CommSentOrReceived.Sent; commlog.Mode_ = CommItemMode.Mail; commlog.IsStatementSent = true; commlog.PatNum = guarNums[i]; //uaually the guarantor Commlogs.Insert(commlog); } } DialogResult = DialogResult.OK; }