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:
@@ -186,6 +186,44 @@ namespace VEPROMS.CSLA.Library
|
||||
return _DocPdf;
|
||||
}
|
||||
}
|
||||
private int _DocumentDROUsageCount = 0;
|
||||
/// <summary>
|
||||
/// Count of DocumentDROUsages for this Document
|
||||
/// </summary>
|
||||
public int DocumentDROUsageCount
|
||||
{
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("DocumentDROUsageCount", true);
|
||||
if (_DocumentDROUsageCount < 0)
|
||||
_DocumentDROUsageCount = DocumentDROUsages.Count;
|
||||
return _DocumentDROUsageCount;
|
||||
}
|
||||
}
|
||||
private DROUsageInfoList _DocumentDROUsages = null;
|
||||
[TypeConverter(typeof(DROUsageInfoListConverter))]
|
||||
public DROUsageInfoList DocumentDROUsages
|
||||
{
|
||||
[System.Runtime.CompilerServices.MethodImpl(System.Runtime.CompilerServices.MethodImplOptions.NoInlining)]
|
||||
get
|
||||
{
|
||||
CanReadProperty("DocumentDROUsages", true);
|
||||
if (_DocumentDROUsageCount < 0 || (_DocumentDROUsageCount > 0 && _DocumentDROUsages == null))
|
||||
_DocumentDROUsages = DROUsageInfoList.GetByDocID(_DocID);
|
||||
if (_DocumentDROUsageCount < 0)
|
||||
_DocumentDROUsageCount = _DocumentDROUsages.Count;
|
||||
return _DocumentDROUsages;
|
||||
}
|
||||
}
|
||||
public void RefreshDocumentDROUsages()
|
||||
{
|
||||
_DocumentDROUsageCount = -1;
|
||||
ConvertListToDictionary();
|
||||
if (_CacheByPrimaryKey.ContainsKey(_DocID.ToString()))
|
||||
foreach (DocumentInfo tmp in _CacheByPrimaryKey[_DocID.ToString()])
|
||||
tmp._DocumentDROUsageCount = -1; // This will cause the data to be requeried
|
||||
}
|
||||
private int _DocumentEntryCount = 0;
|
||||
/// <summary>
|
||||
/// Count of DocumentEntries for this Document
|
||||
@@ -352,6 +390,7 @@ namespace VEPROMS.CSLA.Library
|
||||
_UserID = dr.GetString("UserID");
|
||||
_FileExtension = dr.GetString("FileExtension");
|
||||
_DocPdf = (byte[])dr.GetValue("DocPdf");
|
||||
_DocumentDROUsageCount = dr.GetInt32("DROUsageCount");
|
||||
_DocumentEntryCount = dr.GetInt32("EntryCount");
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
Reference in New Issue
Block a user