Added checkbox to limit data loading to Format.

This commit is contained in:
Rich
2009-09-16 16:12:11 +00:00
parent 5c4e13caec
commit da310f2436
2 changed files with 120 additions and 102 deletions

View File

@@ -116,8 +116,8 @@ namespace DataLoader
return;
}
DocVersion v = ((DocVersionInfo)o).Get();
Item itm = ldr.MigrateDocVersion(v);
if (itm != null)
ldr.MigrateDocVersion(v);
if (v.MyItem != null)
{
tn.Checked = true;
}
@@ -138,8 +138,8 @@ namespace DataLoader
return;
}
DocVersion v = (DocVersion)o;
Item itm = ldr.MigrateDocVersion(v);
if (itm != null)
ldr.MigrateDocVersion(v);
if (v.MyItem != null)
{
tn.Checked = true;
}
@@ -195,10 +195,15 @@ namespace DataLoader
ldr.ClearData();
success = ldr.LoadFolders(tbVePromsPath.Text);
if (success) success = ldr.LoadSecurity(tbVesamPath.Text, tbVePromsPath.Text);
if (cbFormatsOnly.Checked)
{
MessageBox.Show("Formats Loaded");
return;
}
}
if (success)
{
DateTime tstart = DateTime.Now;
TimeSpan ts = new TimeSpan();
DocVersionInfoList vl = DocVersionInfoList.Get();
DocVersion v = null;
foreach (DocVersionInfo vi in vl)
@@ -206,14 +211,14 @@ namespace DataLoader
if (vi.Title.ToUpper() == tbSource.Text.ToUpper()) // is this the procedure set we want to convert?
{
v = DocVersion.Get(vi.VersionID);
Item itm = ldr.MigrateDocVersion(v, true);
ts+=ldr.MigrateDocVersion(v, true);
}
//v = DocVersion.Get(vi.VersionID);
//bool convertProcedures = (vi.Title.ToUpper() == tbSource.Text.ToUpper());
//Item itm = ldr.MigrateDocVersion(v, convertProcedures);
}
MessageBox.Show(string.Format("{0} seconds", TimeSpan.FromTicks(DateTime.Now.Ticks - tstart.Ticks).TotalSeconds));
MessageBox.Show(string.Format("{0} seconds", ts.TotalSeconds));
}
}
public void UpdateLabels(int incPrc, int incSec, int incStp)