private void printRo(PrinterSettings settings, RO ro) { PrintDocument printDoc; printDoc = new RoPrint(ro); printDoc.PrinterSettings = settings; printDoc.DocumentName = "RO #" + ro.getId(); printDoc.Print(); if (cbSignPage.Checked) { printDoc = new SigningDocumentPrint(ro); printDoc.PrinterSettings = settings; printDoc.DocumentName = "Sign RO #" + ro.getId(); printDoc.Print(); } }
//===========================Utility private void btOk_Click(object sender, EventArgs e) { if (validateRO()) { if (!generateRo()) { return; } if (cbPrintSigningPage.Checked) { SigningDocumentPrint doc = new SigningDocumentPrint(ro); doc.Print(); } Close(); Dispose(); } }