Changed logic to find ROs or XY Plots. VEPROMS_BGE/OI-34 has the text
<<<--Isolators-->>> which was being identified as an XY Plot and then as an RO. Add location information to the error log for RO Image problems Reduce duplicated error log messages for RO Value update
This commit is contained in:
@@ -881,12 +881,12 @@ namespace VEPROMS.CSLA.Library
|
||||
throw new DbCslaException("ROFstInfo.DataPortal_Fetch", ex);
|
||||
}
|
||||
}
|
||||
public ROImageInfo GetROImageByFilename(string filename)
|
||||
public ROImageInfo GetROImageByFilename(string filename, ItemInfo myItemInfo)
|
||||
{
|
||||
ROImageInfoList images = ROImageInfoList.GetByRODbIDFilename(RODbID, filename);
|
||||
if (images == null || images.Count == 0)
|
||||
{
|
||||
_MyLog.WarnFormat("\r\nReferenced Object Image {0} Missing\r\nNeed to Update RO Values",filename);
|
||||
ROWarning(myItemInfo,"Referenced Object Image {0} Missing", filename);
|
||||
return null;
|
||||
}
|
||||
ROImageInfo retval = null;
|
||||
@@ -896,11 +896,23 @@ namespace VEPROMS.CSLA.Library
|
||||
retval = image;
|
||||
}
|
||||
if(retval.DTS > DTS)
|
||||
_MyLog.WarnFormat("\r\nReferenced Object Image {0} newer {1} than RO.FST {2}\r\nNeed to Update RO Values",filename,retval.DTS.ToShortDateString(),DTS.ToShortDateString());
|
||||
ROWarning(myItemInfo, "Referenced Object Image {0} newer {1} than RO.FST {2}", filename, retval.DTS.ToShortDateString(), DTS.ToShortDateString());
|
||||
else
|
||||
_MyLog.WarnFormat("Referenced Object Image {0} older {1} then RO.FST {2}\r\nNeed to Update RO Values",filename,retval.DTS.ToShortDateString(),DTS.ToShortDateString());
|
||||
ROWarning(myItemInfo, "Referenced Object Image {0} older {1} then RO.FST {2}", filename, retval.DTS.ToShortDateString(), DTS.ToShortDateString());
|
||||
return retval;
|
||||
}
|
||||
private static List<int> DocVersionsNeedingROUpdate = new List<int>();
|
||||
private static void ROWarning(ItemInfo myItemInfo, string format, params object[] args)
|
||||
{
|
||||
int key = 0;
|
||||
if(myItemInfo.MyDocVersion != null) key = myItemInfo.MyDocVersion.VersionID;
|
||||
if (!DocVersionsNeedingROUpdate.Contains(key))
|
||||
{
|
||||
string prefix = string.Format("\r\nNeed to Update RO Values for {0}\r\nProcedure {1}\r\n" , myItemInfo.SearchDVPath ,myItemInfo.MyProcedure.DisplayNumber);
|
||||
_MyLog.WarnFormat(prefix + format, args);
|
||||
DocVersionsNeedingROUpdate.Add(key);
|
||||
}
|
||||
}
|
||||
}
|
||||
public class ROFstInfoROTableUpdateEventArgs
|
||||
{
|
||||
|
Reference in New Issue
Block a user