Added UpdateDRoUsages to Update DROUsages when a Document is Saved
Added a list of ROIDs as a parameter to the code that walks through the MSWORD Document text and replaces ROs with their values Fixed search string in FindRO Added code to call GetAffectedDROUsages when an RO changes. This adds annotations to show the changes to RO Values. Added DROUsages table to capture ROUsages in Documents
This commit is contained in:
@@ -169,6 +169,44 @@ namespace VEPROMS.CSLA.Library
|
||||
return _UserID;
|
||||
}
|
||||
}
|
||||
private int _RODbDROUsageCount = 0;
|
||||
/// <summary>
|
||||
/// Count of RODbDROUsages for this RODb
|
||||
/// </summary>
|
||||
public int RODbDROUsageCount
|
||||
{
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("RODbDROUsageCount", true);
|
||||
if (_RODbDROUsageCount < 0)
|
||||
_RODbDROUsageCount = RODbDROUsages.Count;
|
||||
return _RODbDROUsageCount;
|
||||
}
|
||||
}
|
||||
private DROUsageInfoList _RODbDROUsages = null;
|
||||
[TypeConverter(typeof(DROUsageInfoListConverter))]
|
||||
public DROUsageInfoList RODbDROUsages
|
||||
{
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("RODbDROUsages", true);
|
||||
if (_RODbDROUsageCount < 0 || (_RODbDROUsageCount > 0 && _RODbDROUsages == null))
|
||||
_RODbDROUsages = DROUsageInfoList.GetByRODbID(_RODbID);
|
||||
if (_RODbDROUsageCount < 0)
|
||||
_RODbDROUsageCount = _RODbDROUsages.Count;
|
||||
return _RODbDROUsages;
|
||||
}
|
||||
}
|
||||
public void RefreshRODbDROUsages()
|
||||
{
|
||||
_RODbDROUsageCount = -1;
|
||||
ConvertListToDictionary();
|
||||
if (_CacheByPrimaryKey.ContainsKey(_RODbID.ToString()))
|
||||
foreach (RODbInfo tmp in _CacheByPrimaryKey[_RODbID.ToString()])
|
||||
tmp._RODbDROUsageCount = -1; // This will cause the data to be requeried
|
||||
}
|
||||
private int _RODbROFstCount = 0;
|
||||
/// <summary>
|
||||
/// Count of RODbROFsts for this RODb
|
||||
@@ -407,6 +445,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_Config = dr.GetString("Config");
|
||||
_DTS = dr.GetDateTime("DTS");
|
||||
_UserID = dr.GetString("UserID");
|
||||
_RODbDROUsageCount = dr.GetInt32("DROUsageCount");
|
||||
_RODbROFstCount = dr.GetInt32("ROFstCount");
|
||||
_RODbROImageCount = dr.GetInt32("ROImageCount");
|
||||
_RODbRoUsageCount = dr.GetInt32("RoUsageCount");
|
||||
|
Reference in New Issue
Block a user