Added public properties MultiUnitCount, Old2NewApple and New2OldApple to Loader class
Added relating slave index to specific unit
This commit is contained in:
parent
03d49ce2df
commit
81a2ad1267
@ -31,6 +31,9 @@ namespace DataLoader
|
|||||||
}
|
}
|
||||||
|
|
||||||
private OutsideTransition _OutTran;
|
private OutsideTransition _OutTran;
|
||||||
|
public int MultiUnitCount = 0;
|
||||||
|
public Dictionary<int, int> Old2NewApple;
|
||||||
|
public Dictionary<int, int> New2OldApple;
|
||||||
|
|
||||||
public TimeSpan MigrateDocVersion(DocVersion docver, bool convertProcedures)
|
public TimeSpan MigrateDocVersion(DocVersion docver, bool convertProcedures)
|
||||||
{
|
{
|
||||||
@ -38,6 +41,19 @@ namespace DataLoader
|
|||||||
string pth = docver.Title;
|
string pth = docver.Title;
|
||||||
// if the Title is empty, return because this docversion has already been migrated.
|
// if the Title is empty, return because this docversion has already been migrated.
|
||||||
if (pth == null || pth == "") return TimeSpan.FromTicks(lTime);
|
if (pth == null || pth == "") return TimeSpan.FromTicks(lTime);
|
||||||
|
MultiUnitCount = docver.DocVersionConfig.Unit_Count;
|
||||||
|
if (MultiUnitCount > 0)
|
||||||
|
{
|
||||||
|
Old2NewApple = new Dictionary<int, int>();
|
||||||
|
New2OldApple = new Dictionary<int, int>();
|
||||||
|
for (int i = 1; i <= MultiUnitCount; i++)
|
||||||
|
{
|
||||||
|
docver.DocVersionConfig.SelectedSlave = i;
|
||||||
|
int oldindex = int.Parse(docver.DocVersionConfig.Old_Index);
|
||||||
|
Old2NewApple.Add(oldindex, i);
|
||||||
|
New2OldApple.Add(i, oldindex);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return new TimeSpan(); // Open connection
|
if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return new TimeSpan(); // Open connection
|
||||||
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
|
OleDbConnection cn = new OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" + pth + ";Extended Properties=dBase III;Persist Security Info=False");
|
||||||
if (convertProcedures)
|
if (convertProcedures)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user