Added logic so that the code works even if the location in the data is not specified.
This commit is contained in:
parent
52c6e61b6a
commit
7f923ff0c5
@ -905,8 +905,16 @@ namespace VEPROMS.CSLA.Library
|
|||||||
private static void ROWarning(ItemInfo myItemInfo, string format, params object[] args)
|
private static void ROWarning(ItemInfo myItemInfo, string format, params object[] args)
|
||||||
{
|
{
|
||||||
int key = 0;
|
int key = 0;
|
||||||
if(myItemInfo.MyDocVersion != null) key = myItemInfo.MyDocVersion.VersionID;
|
if(myItemInfo != null && myItemInfo.MyDocVersion != null) key = myItemInfo.MyDocVersion.VersionID;
|
||||||
if (!DocVersionsNeedingROUpdate.Contains(key))
|
if (!DocVersionsNeedingROUpdate.Contains(key))
|
||||||
|
{
|
||||||
|
if (myItemInfo == null)
|
||||||
|
{
|
||||||
|
string prefix = string.Format("\r\nNeed to Update RO Values\r\n");
|
||||||
|
_MyLog.WarnFormat(prefix + format, args);
|
||||||
|
DocVersionsNeedingROUpdate.Add(key);
|
||||||
|
}
|
||||||
|
else
|
||||||
{
|
{
|
||||||
string prefix = string.Format("\r\nNeed to Update RO Values for {0}\r\nProcedure {1}\r\n", myItemInfo.SearchDVPath, myItemInfo.MyProcedure.DisplayNumber);
|
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);
|
_MyLog.WarnFormat(prefix + format, args);
|
||||||
@ -914,6 +922,7 @@ namespace VEPROMS.CSLA.Library
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
public class ROFstInfoROTableUpdateEventArgs
|
public class ROFstInfoROTableUpdateEventArgs
|
||||||
{
|
{
|
||||||
private string _ROText;
|
private string _ROText;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user