Changed MigrateDocVersion to return TimeSpan
This commit is contained in:
parent
4c008aaea0
commit
5c4e13caec
@ -25,17 +25,18 @@ namespace DataLoader
|
||||
{
|
||||
public partial class Loader
|
||||
{
|
||||
public Item MigrateDocVersion(DocVersion docver)
|
||||
public TimeSpan MigrateDocVersion(DocVersion docver)
|
||||
{
|
||||
return MigrateDocVersion(docver, true);
|
||||
}
|
||||
|
||||
private OutsideTransition _OutTran;
|
||||
|
||||
public Item MigrateDocVersion(DocVersion docver, bool convertProcedures)
|
||||
public TimeSpan MigrateDocVersion(DocVersion docver, bool convertProcedures)
|
||||
{
|
||||
long lTime = DateTime.Now.Ticks;
|
||||
string pth = docver.Title;
|
||||
if (!File.Exists(pth + @"\set.dbf") || !File.Exists(pth + @"\curset.dat")) return null; // 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");
|
||||
if (convertProcedures)
|
||||
{
|
||||
@ -58,10 +59,12 @@ namespace DataLoader
|
||||
if (convertProcedures || docver.VersionType == (int)VEPROMS.CSLA.Library.VersionTypeEnum.WorkingDraft)
|
||||
itm = MigrateProcedures(cn, pth, docver, convertProcedures);
|
||||
// Show any Missing Transtitons (i.e. Transitions which have not been processed)
|
||||
lTime = DateTime.Now.Ticks - lTime;
|
||||
if (convertProcedures)
|
||||
{
|
||||
ShowMissingTransitions();
|
||||
log.InfoFormat("Completed Migration of {0}", pth);
|
||||
|
||||
MessageBox.Show("Completed Migration of " + pth);
|
||||
if (rofstinfo != null) rofstinfo.ROFSTLookup.Close();
|
||||
dicTrans_ItemDone.Clear();
|
||||
@ -75,7 +78,7 @@ namespace DataLoader
|
||||
if (!docver.IsSavable) ErrorRpt.ErrorReport(docver);
|
||||
docver.Save();
|
||||
}
|
||||
return itm;
|
||||
return TimeSpan.FromTicks(lTime);
|
||||
}
|
||||
private VEPROMS.CSLA.Library.VersionTypeEnum DocVersionType(string s)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user