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:
parent
c2abe9214b
commit
368280d7ee
@ -170,6 +170,9 @@
|
||||
<setting name="AnnotateWhenShowingDifferentRO" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="HowMany" serializeAs="String">
|
||||
<value>0</value>
|
||||
</setting>
|
||||
</DataLoader.Properties.Settings>
|
||||
</userSettings>
|
||||
</configuration>
|
||||
|
@ -12,7 +12,7 @@ namespace DataLoader
|
||||
{
|
||||
public bool BuildApprovedRevision()
|
||||
{
|
||||
if(!frmMain.RunScript("PROMSApproveApprove.sql", frmMain.MySettings.DBName)) return false;
|
||||
if(!frmMain.RunScript("PROMSApproveApprove.sql", frmMain.DBName)) return false;
|
||||
bool rv = false;
|
||||
using (Stage myStage = GetApprovedStage())
|
||||
{
|
||||
@ -23,7 +23,7 @@ namespace DataLoader
|
||||
{
|
||||
if (dvi.Procedures.Count > 0)
|
||||
{
|
||||
if (!frmMain.MySettings.OnlyThisSet || frmMain.MySettings.ProcedureSetPath.ToUpper() == dvi.MyFolder.Title.ToUpper())
|
||||
if (!frmMain.MySettings.OnlyThisSet || frmMain.ProcedureSetPath.ToUpper() == dvi.MyFolder.Title.ToUpper())
|
||||
{
|
||||
string approvedFolder = dvi.MyFolder.Title + @"\APPROVED";
|
||||
//B2012-094 fix
|
||||
|
@ -263,6 +263,15 @@ namespace DataLoader
|
||||
get { return _Skip; }
|
||||
set { _Skip = value; }
|
||||
}
|
||||
private int _HowMany=0; // Skip specified procedures during load.
|
||||
[DisplayName("How Many Procedures should be converted")]
|
||||
[Category("Debugging")]
|
||||
[Description("Only process part of the set.")]
|
||||
public int HowMany
|
||||
{
|
||||
get { return _HowMany; }
|
||||
set { _HowMany = value; }
|
||||
}
|
||||
#endregion
|
||||
#region Accessory Pages
|
||||
private AccPageConversion _ConvertTo;
|
||||
|
@ -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);
|
||||
//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.
|
||||
|
Loading…
x
Reference in New Issue
Block a user