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:
@@ -792,8 +792,9 @@ namespace VEPROMS.CSLA.Library
|
||||
ROFSTLookup.rochild roch = lookup.GetRoChild(rousage.ROID);
|
||||
itemInfo.MyContent.FixContentText(rousage, roval, roch.type, rofstinfo, itemInfo);
|
||||
string newText = itemInfo.MyContent.Text;
|
||||
if (newText != oldText)
|
||||
if (DifferentROtext(newText,oldText))
|
||||
{
|
||||
//ShowDifference(oldText, newText); // debug - display in Visual Studio Output window
|
||||
ROFixCount++;
|
||||
Content content = Content.Get(itemInfo.MyContent.ContentID);
|
||||
if (roval == "?")
|
||||
@@ -807,13 +808,48 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
content.FixContentText(rousage, roval, roch.type, rofstinfo);
|
||||
}
|
||||
content.UserID = Volian.Base.Library.VlnSettings.UserID;
|
||||
content.DTS = DateTime.Now;
|
||||
content.Save();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool DifferentROtext(string newText, string oldText)
|
||||
{
|
||||
string nt = newText.Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
|
||||
string ot = oldText.Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
|
||||
if (nt.Equals(ot))
|
||||
return false;
|
||||
|
||||
return true;
|
||||
}
|
||||
#region debug
|
||||
//private static void ShowDifference(string oldText, string newText)
|
||||
//{
|
||||
// string nt = newText.Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
|
||||
// string ot = oldText.Replace(@"\u8209?", "-").Replace(@"\u160?", " ").Replace("\xA0", " ");
|
||||
// ShowText("OldText", ot);
|
||||
// ShowText("NewText", nt);
|
||||
//}
|
||||
//private static void ShowText(string title, string newText)
|
||||
//{
|
||||
// StringBuilder sb = new StringBuilder();
|
||||
// foreach (char c in newText)
|
||||
// {
|
||||
// if(c<' ' || c> '\x7F')
|
||||
// sb.Append(string.Format("\\x{0:X2}",((int) c)));
|
||||
// else
|
||||
// sb.Append(c);
|
||||
// }
|
||||
// Console.WriteLine("{0}='{1}'",title,sb.ToString());
|
||||
//}
|
||||
#endregion // debug
|
||||
internal static void SetParentSectionAndDocVersionPageNum(ItemInfo itemInfo, IVEDrillDownReadOnly itemParent, SectionInfo sectionInfo, ProcedureInfo procInfo, DocVersionInfo docVersionInfo, TransitionLookup tranLookup)
|
||||
{
|
||||
if (itemInfo.MyContent.ContentPartCount > 0)
|
||||
|
Reference in New Issue
Block a user