Added logic so that the code works even if the location in the data is not specified.
This commit is contained in:
		@@ -905,12 +905,21 @@ namespace VEPROMS.CSLA.Library
 | 
			
		||||
		private static void ROWarning(ItemInfo myItemInfo, string format, params object[] args)
 | 
			
		||||
		{
 | 
			
		||||
			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))
 | 
			
		||||
			{
 | 
			
		||||
				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);
 | 
			
		||||
				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);
 | 
			
		||||
					_MyLog.WarnFormat(prefix + format, args);
 | 
			
		||||
					DocVersionsNeedingROUpdate.Add(key);
 | 
			
		||||
				}
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
	}
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user