logic to save word sections with resolved RO values for exporting the approved procedure

logic to create an export file with unlinked RO and Transition
Commented out debug statements to help evaluate memory usage
This commit is contained in:
2016-02-18 15:29:25 +00:00
parent 6ae1fcda1a
commit 8cd75c0c14
7 changed files with 820 additions and 734 deletions

View File

@@ -1103,6 +1103,7 @@ namespace VEPROMS
frmPDFStatusForm frm = new frmPDFStatusForm(pi, ap.RevNumAndDate, /* revdate change: ap.RevDate.ToString("MM/dd/yyyy") ,*/ waterMark, false, false, ViewPDF, true, VlnSettings.TemporaryFolder, new ChangeBarDefinition(pi.MyDocVersion.MyConfig as DocVersionConfig, pi.ActiveFormat), pdfTmp, location, pi.MyDocVersion.DocVersionConfig.Print_AddBlankPagesWhenUsingDuplexFoldouts, true,"",false,false);
frm.AllowAllWatermarks = true;
frm.CloseWhenDone = !ViewPDF;
frm.DocReplace = new Dictionary<int, byte[]>(); // will hold the Word Attachments with resolved ROs
frm.ShowDialog();
//if (ap.ProcInfo.MyDocVersion.DocVersionConfig.SelectedSlave > 0)
//{
@@ -1139,9 +1140,11 @@ namespace VEPROMS
pi.MyDocVersion.DocVersionConfig.SelectedSlave = 0;
if (si.IsApproved == 1)
{
dlgExportImport dlg = new dlgExportImport("Export", pi);
dlgExportImport dlg = new dlgExportImport("Export", pi); // "true tell export to convert ROs and Transitions to text
dlg.DocReplace = frm.DocReplace; // this tells approval to prepare an export file with resolved transitions and ROs, word sections are saved with resolved ROs during approval PDF creation and saved in DocReplace
System.Xml.XmlDocument xd = new System.Xml.XmlDocument();
dlg.ExportItem(xd, pi, "procedure");
frm.DocReplace = dlg.DocReplace = null;
version.ApprovedXML = xd.OuterXml;
version.Save();
dlg.Dispose();