This commit is contained in:
2010-03-31 16:48:15 +00:00
parent 8d946d1f26
commit bf33f71a1a
4 changed files with 326 additions and 82 deletions

View File

@@ -34,7 +34,7 @@ namespace DataLoader
get { return System.Diagnostics.Process.GetCurrentProcess().HandleCount; }
}
private bool RunWithDB2K = false;
private Item MigrateProcedure(OleDbConnection cn, DataRow dr, Item FromItem, string pth, DocVersion docver, bool convertProcedures)
private Item MigrateProcedure(OleDbConnection cn, DataRow dr, Item FromItem, string pth, DocVersion docver, bool convertProcedures, FormatInfo activeFormat)
{
dicOldStepSequence = new Dictionary<object, string>();
Stack<int> SubSectLevels = new Stack<int>(); // levels of subsections
@@ -146,8 +146,8 @@ namespace DataLoader
EditSectId = 0;
// See if no caret convert...
FormatInfo docverFormat = docver.MyDocVersionInfo.ActiveFormat;
bool do_cvt = docverFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
//FormatInfo docverFormat = docver.MyDocVersionInfo.ActiveFormat;
bool do_cvt = activeFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;//docverFormat.PlantFormat.FormatData.SectData.ConvertCaretToDelta;
// pass in a 0 on MakeContent for type of procedure, i.e. procedure = 0 (on type field)
// can we save itm.ItemID in a dictionary of outside trans? ex: otrans("vehlp\procs\0POP05-EO00",itm.ItemID)?
@@ -223,7 +223,7 @@ namespace DataLoader
{
//if (ProcNumber == "016-001") //"017-001") //"082-002AB")
// Console.WriteLine("016-001"); //("017-001"); //"082-002AB");
SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver);
SectItm = MigrateSection(parentitem, ProcNumber, cn, drw, ds.Tables["Steps"], SectItm, dicSecCount.Count > 0 ? true : false, pth, docver, activeFormat);
// if no children, add first child (cont)
if (addpart)
{
@@ -289,7 +289,7 @@ namespace DataLoader
return false;
}
private Item MigrateProcedures(OleDbConnection cn, string pth, DocVersion docver, bool convertProcedures)
private Item MigrateProcedures(OleDbConnection cn, string pth, DocVersion docver, bool convertProcedures, FormatInfo activeFormat)
{
Item FirstItm = null;
// Loop through Set File for each Procedure
@@ -307,7 +307,7 @@ namespace DataLoader
{
if (OKtoProcessDBF(dr)) // look for duplicate SET file info - jsj 2/11/10
{
FrItm = MigrateProcedure(cn, dr, FrItm, pth, docver, convertProcedures);
FrItm = MigrateProcedure(cn, dr, FrItm, pth, docver, convertProcedures, activeFormat);
if (FirstItm == null) FirstItm = FrItm;
}
}