DataLoader changes during development
This commit is contained in:
@@ -20,13 +20,13 @@ using System.Xml;
|
||||
using System.IO;
|
||||
using System.Text;
|
||||
using Volian.MSWord;
|
||||
using Volian.CSLA.Library;
|
||||
using VEPROMS.CSLA.Library;
|
||||
|
||||
namespace DataLoader
|
||||
{
|
||||
public partial class frmLoader : Form
|
||||
public partial class Loader
|
||||
{
|
||||
private void SaveSectionDocument(string fname, string stpseq, ref byte ctype, ref int cid)
|
||||
private void SaveSectionDocument(string fname, string stpseq, ref int cid)
|
||||
{
|
||||
int docid = SaveWordDoc(fname);
|
||||
switch (docid)
|
||||
@@ -40,7 +40,6 @@ namespace DataLoader
|
||||
log.ErrorFormat("Could not complete save of word document, oldstepsequence = {0}", stpseq);
|
||||
break;
|
||||
default:
|
||||
ctype = 2;
|
||||
cid = docid;
|
||||
break;
|
||||
}
|
||||
@@ -50,7 +49,7 @@ namespace DataLoader
|
||||
int docid = 0;
|
||||
if (System.IO.File.Exists(fname))
|
||||
{
|
||||
if (cbSaveDoc.Checked)
|
||||
if (frmMain.cbSaveDocChecked)
|
||||
{
|
||||
WordDoc d = new WordDoc(fname);
|
||||
string temppath = Path.GetTempFileName();
|
||||
@@ -62,10 +61,12 @@ namespace DataLoader
|
||||
}
|
||||
else
|
||||
{
|
||||
if (cbSaveRTF.Checked)
|
||||
if (frmMain.cbSaveRTFChecked)
|
||||
docid = SaveDoc(fname, title, ci);
|
||||
}
|
||||
}
|
||||
else
|
||||
log.ErrorFormat("Missing rtf file: {0}", fname);
|
||||
return docid;
|
||||
}
|
||||
private int SaveWordDoc(string temppath)
|
||||
@@ -81,8 +82,8 @@ namespace DataLoader
|
||||
byte[] ByteArray = new byte[len];
|
||||
int nBytesRead = fs.Read(ByteArray, 0, (int)len);
|
||||
fs.Close();
|
||||
string t1 = (title == null || title == "") ? "notitle" : title;
|
||||
Document doc = Document.MakeDocument(t1, ByteArray, null, ci == null ? null : ci.ToString());
|
||||
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;
|
||||
}
|
||||
// for an io exception, keep trying
|
||||
@@ -110,5 +111,5 @@ namespace DataLoader
|
||||
}
|
||||
return done;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user