This commit is contained in:
2008-11-19 13:53:59 +00:00
parent f4daddd0d4
commit dd571890fc
5 changed files with 49 additions and 19 deletions

View File

@@ -70,7 +70,7 @@ namespace DataLoader
string thenum = num.ToString("d2");
fname = string.Format("{0}\\rtffiles\\{1}.A{2}", pth, ProcFileName, thenum);
Application.DoEvents();
SaveSectionDocument(fname, stpseq, ref Documentid);
SaveSectionDocument(fname, stpseq, SecType, ref Documentid);
if (Documentid == 0)
{
if (MissingDocument==null) MissingDocument = Document.MakeDocument("MISSING FILE IN CONVERSION", null, null, null);
@@ -330,8 +330,10 @@ namespace DataLoader
DateTime dts = GetDTS(dr["Date"].ToString(), dr["Time"].ToString());
ConfigInfo ci = null;
ConfigInfo ci = new ConfigInfo(null);
ci.AddItem("Section", "OldType", stype);
// for steps sections...
// Step Section Header Format:
// A0 1X2S51 &Y
@@ -357,19 +359,16 @@ namespace DataLoader
// set pagination, continuous, separate. If blank, don't create attribute - uses format default.
if (sequence.Substring(4, 1) == "T")
{
if(ci==null) ci = new ConfigInfo(null);
ci.AddItem("Section", "Pagination", "C");
}
else if (sequence.Substring(4, 1) == "S")
{
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("Section", "Pagination", "S");
}
// Step: linked to enhanced (!exist = N)
if (sequence.Substring(7, 1) == "1")
{
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("Step", "LnkEnh", "Y");
}
char cbittst = sequence.PadRight(10)[8];
@@ -380,14 +379,12 @@ namespace DataLoader
// determine if TOC element (!exist = N)
if ((cbittst & TOC) > 1)
{
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("Section", "TOC", "Y");
}
// determine if autogenerated section (!exist = N)
if ((cbittst & AUTOGEN) > 1)
{
isautogen = true;
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("Section", "AutoGen", "Y");
}
}
@@ -399,14 +396,12 @@ namespace DataLoader
// Subsection: editable (!exist = Y)
if ((cbittst & EDDATA) > 0)
{
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("SubSection", "Edit", "N");
}
// Subsection: print section headers (!exist = Y)
if ((cbittst & PH) > 0)
{
if (ci == null) ci = new ConfigInfo(null);
didsub = true;
ci.AddItem("SubSection", "PH", "N");
}
@@ -414,13 +409,11 @@ namespace DataLoader
// Subsection: autoindent (!exist = Y)
if ((cbittst & AUTOIND) > 0)
{
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("SubSection", "AutoIndent", "N");
}
}
if (!didsub && sequence.Substring(4, 1) == "N")
{
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("SubSection", "PH", "N");
}
}
@@ -434,7 +427,6 @@ namespace DataLoader
// || `--- Position within the procedure
// |`----- Acc. page type (A,I, or F)
// `------ Internal section number (starts at A)
if (ci == null) ci = new ConfigInfo(null);
ci.AddItem("Section", "NumPages", sequence.Substring(3, 1));
// see if it's a libdoc too