Added Error Log if Word File Could not be created

Select section node after it is created
Don't allow an empty procedure to be printed
This commit is contained in:
Rich
2012-04-05 20:57:44 +00:00
parent ee66befc6a
commit 8cb0c78730
3 changed files with 7 additions and 2 deletions

View File

@@ -321,6 +321,11 @@ namespace Volian.Print.Library
OnStatusChanged("Before NewPage", PromsPrinterStatusType.Before);
cb.PdfDocument.NewPage(); // Start of print
OnStatusChanged("After NewPage", PromsPrinterStatusType.NewPage);
if (myProcedure.Sections == null)
{
MessageBox.Show("This procedure has no content and will not be printed.", "Empty Procedure", MessageBoxButtons.OK, MessageBoxIcon.Information);
return null;
}
OnStatusChanged(myProcedure.DisplayNumber, PromsPrinterStatusType.ProgressSetup, myProcedure.Sections.Count);
int progress = 0;
int finalMessageSectionID = GetFinalMessageSectionID(myProcedure, doingFoldout);