B2017-079, B2017-053, B2017-049, improved the speed and logic of updating ROs. The Refresh ROs logic is now merged into the Update ROs logic. Also annotations are added when ROs are updated. The Refresh ROs options were removed from the tool list.

Better feedback when updating RO values, also save list of updated ROs in text file in Documents\VEPROMS
Save the date/time of the last successfully completed RO Values Update
Add annotations for updated RO values, better logic in updating RO figures so they are needlessly updated, better logic in determining if an RO needs to be updated
Logic to save the date/time of the last successfully completed RO Update
Better logic to determine if an RO value needs updated.
This commit is contained in:
2017-06-20 16:26:04 +00:00
parent b7bffda9de
commit f5dbfa12fb
6 changed files with 190 additions and 216 deletions

View File

@@ -16,6 +16,7 @@ using Csla.Data;
using System.Collections.Generic;
using System.IO;
using System.Threading;
using System.Xml;
//using VEPROMS.Properties;
namespace VEPROMS.CSLA.Library
@@ -65,6 +66,27 @@ namespace VEPROMS.CSLA.Library
return ROFstInfoList.ROFstDiffBySize(rofstPath, rdi.RODbID, (int)fiRofst.Length);
}
}
public bool ROfstLastCompleted
{
get
{
if (DocVersionAssociations == null || DocVersionAssociationCount == 0) return true; // no ROs associated this will turn off the update ROs button
if (LastCompleted(DocVersionAssociations[0]) == string.Empty) return false;
return true;
}
}
// return the date/time of the last time the RO Update was done and ran all the way through completion
private string LastCompleted(DocVersionAssociation dva)
{
XmlDocument xd = new XmlDocument();
if (dva.Config == null || dva.Config.Length == 0) return string.Empty;
xd.LoadXml(dva.Config);
XmlNode xn = xd.DocumentElement.SelectSingleNode("//ROUpdate");
if (xn == null) return string.Empty;
XmlAttribute att = xn.Attributes["LastCompleted"];
if (att == null) return string.Empty;
return att.InnerText;
}
#region VersionType
public VersionTypeEnum eVersionType
{
@@ -233,7 +255,21 @@ namespace VEPROMS.CSLA.Library
return AddToRoFstLookup(key, ROFstInfoList.ROFstDiffBySize(rofstPath, rdi.RODbID, (int)fiRofst.Length));
}
}
public bool ROfstLastCompleted
{
get
{
if (DocVersionAssociations == null || DocVersionAssociationCount == 0) return true; // no ROs associated this will turn off the update ROs button
if (LastCompleted(DocVersionAssociations[0]) == string.Empty) return false; // the AssociatinoConfig does not have completed date for update ROs - this will turn on the update ROs button
return true;
}
}
// return the date/time of the last time the RO Update was done and ran all the way through completion
private string LastCompleted(AssociationInfo associationInfo)
{
AssociationConfig ac = new AssociationConfig(associationInfo);
return ac.ROUpdate_LastCompleted;
}
#region SearchPaths
public string _SearchDVPath;
public string SearchDVPath