Use "GetItemAndChildren" to assure that the latest data is used.
Fixed logic if trying to create a PDF while a previous PDF is open.
This commit is contained in:
@@ -393,11 +393,14 @@ namespace VEPROMS
|
||||
pbPDFsStatus.Text = string.Format("Creating PDF for {0} ({1} of {2})", myProc.DisplayNumber, ++i, n);
|
||||
pbPDFsStatus.Value = i;
|
||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left,Bottom-50));
|
||||
frmStatus.CloseWhenDone = true;
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
using (ProcedureInfo pi = ProcedureInfo.GetItemAndChildren(myProc.ItemID))
|
||||
{
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(pi, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50));
|
||||
frmStatus.CloseWhenDone = true;
|
||||
frmStatus.CancelStop = true;
|
||||
frmStatus.ShowDialog();
|
||||
if (frmStatus.CancelPrinting) break;
|
||||
}
|
||||
}
|
||||
}
|
||||
pbPDFsStatus.Visible = false;
|
||||
@@ -429,8 +432,11 @@ namespace VEPROMS
|
||||
// Also check that format allows override.
|
||||
ChangeBarDefinition cbd = DetermineChangeBarSettings();
|
||||
// RHM 20120925 Overlay the bottom of the dialog so that cancel button is covered.
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(MyProcedure, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50));
|
||||
frmStatus.ShowDialog();
|
||||
using (ProcedureInfo pi = ProcedureInfo.GetItemAndChildren(MyProcedure.ItemID))
|
||||
{
|
||||
frmPDFStatusForm frmStatus = new frmPDFStatusForm(pi, RevNum, pw.ToString(), cbxDebug.Checked, cbxOrPgBrk.Checked, cbxOpenAfterCreate2.Checked, cbxOverwritePDF2.Checked, PDFPath, cbd, txbPDFName.Text, new Point(Left, Bottom - 50));
|
||||
frmStatus.ShowDialog();
|
||||
}
|
||||
this.Close();
|
||||
ShowDebugFiles();
|
||||
}
|
||||
|
Reference in New Issue
Block a user