From 40a0cd2d24f797bfd70e35fcdb19a07270049f2b Mon Sep 17 00:00:00 2001 From: Kathy Date: Thu, 22 Jul 2010 14:18:04 +0000 Subject: [PATCH] --- PROMS/DataLoader/Documents.cs | 2 -- PROMS/DataLoader/Sections.cs | 12 ++++++++++-- PROMS/DataLoader/frmLoader.cs | 1 + 3 files changed, 11 insertions(+), 4 deletions(-) diff --git a/PROMS/DataLoader/Documents.cs b/PROMS/DataLoader/Documents.cs index 8f47b6b3..ca91b6a7 100644 --- a/PROMS/DataLoader/Documents.cs +++ b/PROMS/DataLoader/Documents.cs @@ -303,10 +303,8 @@ namespace DataLoader if (File.Exists(docfile)) File.Delete(docfile); FileInfo doctmpFile = tmpFile.CopyTo(docfile); doc.DocAscii = ascii; - //doc.UpdateDocAscii(docfile); doc.Save(); File.Delete(docfile); - DocumentInfo di = DocumentInfo.Get(doc.DocID); return doc.DocID; } // for an io exception, keep trying diff --git a/PROMS/DataLoader/Sections.cs b/PROMS/DataLoader/Sections.cs index 8ddb6031..9a6387db 100644 --- a/PROMS/DataLoader/Sections.cs +++ b/PROMS/DataLoader/Sections.cs @@ -91,7 +91,6 @@ namespace DataLoader entry.MyDocument = Document.Get(Documentid); entry.DTS = Dts; entry.UserID = Userid; - //entry = Entry.MakeEntry(cont.ContentID, Document.Get(Documentid), Dts, Userid); } cont.MyZContent.OldStepSequence = ProcNumber + "|" + stpseq; Item itm = null; @@ -476,7 +475,16 @@ namespace DataLoader cont.Save(); } thesectid = secitem.ItemID; - + using (ItemInfo seciteminfo = ItemInfo.Get(thesectid)) + { + if (seciteminfo.MyContent.ContentEntryCount != 0) + { + using (DocumentInfo di = DocumentInfo.Get(secitem.MyContent.MyEntry.DocID)) + { + MSWordToPDF.UpdateDocPdf(di, Color.Red); + } + } + } // if the editsectid hasn't been set yet, set it to this section id, i.e. the first // one processed. Then if this section has the original edit section flag (sequence[2]) // save the id. The first step is necessary in case there is no original edit section diff --git a/PROMS/DataLoader/frmLoader.cs b/PROMS/DataLoader/frmLoader.cs index 997a2e6b..d3131669 100644 --- a/PROMS/DataLoader/frmLoader.cs +++ b/PROMS/DataLoader/frmLoader.cs @@ -106,6 +106,7 @@ namespace DataLoader { ldr = new Loader(_MyLog, this); InitializeComponent(); + MSWordToPDF.FormForPlotGraphics = this; lblTime.Tag = DateTime.Now; switch (SystemInformation.ComputerName.ToUpper()) {