Added HowMany setting Property to limit the number of procedures converted.

Use Command Line Parameters ass override for settings.
Add logic to support partial processing of procedure sets (appending to a previously processed set.
This commit is contained in:
Rich
2014-12-08 20:22:33 +00:00
parent c2abe9214b
commit 368280d7ee
4 changed files with 24 additions and 4 deletions

View File

@@ -40,6 +40,12 @@ namespace DataLoader
long lTime = DateTime.Now.Ticks;
string pth = docver.Title;
// if the Title is empty, return because this docversion has already been migrated.
bool appending = false;
if (frmMain.Automatic && !frmMain.PurgeExistingData)
{
pth = frmMain.ProcedureSetPath;
appending = true;
}
if (pth == null || pth == "" || pth == "Title") return TimeSpan.FromTicks(0);
MultiUnitCount = docver.DocVersionConfig.Unit_Count;
if (MultiUnitCount > 0)
@@ -64,11 +70,13 @@ namespace DataLoader
DeleteINFFiles(pth);
_OutTran = new OutsideTransition(cn);
frmMain.AddInfo("Before MigrateROFST{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll);
MigrateROFST(pth, docver);
//if(!appending)
MigrateROFST(pth, docver);
GC.Collect();
frmMain.AddInfo("After MigrateROFST{0}\r\n{1}", GC.GetTotalMemory(true), VEPROMS.CSLA.Library.CSLACache.UsageAll);
// Migrate library documents
MigrateLibDocs(cn, pth);
//if(!appending)
MigrateLibDocs(cn, pth, appending);
// if migrating bge, save the 'unit' number. This unit number is used in pagelist items and is
// based on the path/directory name of the procedure set.