diff --git a/PROMS/DataLoader/Procedures.cs b/PROMS/DataLoader/Procedures.cs index 85e1096b..8ff86def 100644 --- a/PROMS/DataLoader/Procedures.cs +++ b/PROMS/DataLoader/Procedures.cs @@ -190,7 +190,7 @@ namespace DataLoader { dicTrans_ItemDone[dicNumber] = itm; // will be null if only doing procs & no sections, etc. LoadSection(ds, da, dr["entry"].ToString()); - da.SelectCommand.CommandText = "select * from [" + dr["entry"] + "] where step not like ' ' and step not like '%~'"; + da.SelectCommand.CommandText = "select * from [" + dr["entry"] + "] where step not like ' ' and sequence not like ' %'"; da.Fill(ds, "Steps"); dt = ds.Tables["Steps"]; dt.CaseSensitive = true; @@ -235,6 +235,14 @@ namespace DataLoader { //if (ProcNumber == "016-001") //"017-001") //"082-002AB") // Console.WriteLine("016-001"); //("017-001"); //"082-002AB"); + + // If there is a '~' in step[1] and the sequence number is blank, the this record + // is a multiline section title. Skip it from processing the section. This record + // will get read in the section code to get the section title. + string sequence = drw["CSequence"].ToString().PadRight(10); + string step = drw["CStep"].ToString(); + if (step[1]=='~' && sequence[1]==' ') break; + SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver, activeFormat, addpart ? cont : null); addpart = false; // if no children, add first child (cont)