diff --git a/PROMS/DataLoader/Documents.cs b/PROMS/DataLoader/Documents.cs index b94e7147..28d142cd 100644 --- a/PROMS/DataLoader/Documents.cs +++ b/PROMS/DataLoader/Documents.cs @@ -109,8 +109,13 @@ namespace DataLoader int nBytesRead = fs.Read(ByteArray, 0, (int)len); fs.Close(); string t1 = (title == null || title == "") ? null : title; - Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString(), DateTime.Now, "Migration"); - return doc.DocID; + Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString(), DateTime.Now, "Migration", ".Doc"); + FileInfo tmpFile = new FileInfo(temppath); + FileInfo doctmpFile = tmpFile.CopyTo(temppath.Substring(0,temppath.LastIndexOf(".")) + @".doc"); + doc.UpdateDocAscii(temppath.Substring(0, temppath.LastIndexOf(".")) + @".doc"); + doc.Save(); + DocumentInfo di = DocumentInfo.Get(doc.DocID); + return doc.DocID; } // for an io exception, keep trying catch (IOException) diff --git a/PROMS/DataLoader/RefObjs.cs b/PROMS/DataLoader/RefObjs.cs index 12b84e1c..54e872ed 100644 --- a/PROMS/DataLoader/RefObjs.cs +++ b/PROMS/DataLoader/RefObjs.cs @@ -65,8 +65,10 @@ namespace DataLoader try { string rov = rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()); - string results = string.Format(@"{0}{1}\v #Link:ReferencedObject:{2} {3} {4}\v0", - '\x15', rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID, rodb.RODbID); + //string results = string.Format(@"{0}{1}\v #Link:ReferencedObject:{2} {3} {4}\v0", + // '\x15', rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID, rodb.RODbID); + string results = string.Format(@"\v \v0 ", + rofstinfo.ROFSTLookup.GetRoValue(ROID.Substring(0, 12).ToUpper()), ro.ROUsageID, ROID, rodb.RODbID); rotxt.Append(results); } catch (Exception ex) diff --git a/PROMS/DataLoader/Transitions.cs b/PROMS/DataLoader/Transitions.cs index 46f8611a..1892385a 100644 --- a/PROMS/DataLoader/Transitions.cs +++ b/PROMS/DataLoader/Transitions.cs @@ -160,9 +160,9 @@ namespace DataLoader } string results = null; if (toItem.ItemID == toItem2.ItemID) - results = string.Format(@"(Resolved Transition Text)\v #Link:Transition:{0} {1} {2}\v0", tr.TranType, tr.TransitionID, tr.ToID); + results = string.Format(@"\v \v0 ", tr.TranType, tr.TransitionID, tr.ToID); else - results = string.Format(@"(Resolved Transition Text)\v #Link:TransitionRange:{0} {1} {2} {3}\v0", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID); + results = string.Format(@"\v \v0 ", tr.TranType, tr.TransitionID, tr.ToID, tr.RangeID); return results; } @@ -228,7 +228,7 @@ namespace DataLoader } else rectxt = AddTrans(cn, content, dr, null, pth); - trtxt.Append(textm[tok]); + //trtxt.Append(textm[tok]); trtxt.Append(rectxt); } instance++;