Update related lists when related value changes.

This commit is contained in:
Rich 2008-05-01 11:01:21 +00:00
parent 26de18fb28
commit 1973b9646c
20 changed files with 561 additions and 87 deletions

View File

@ -224,8 +224,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Annotation tmp) private void RefreshFields(Annotation tmp)
{ {
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
_TypeID = tmp.TypeID; {
MyItem.RefreshItemAnnotations(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemAnnotations(); // Update List for new value
}
if (_TypeID != tmp.TypeID)
{
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for old value
_TypeID = tmp.TypeID; // Update the value
_MyAnnotationType = null; // Reset list so that the next line gets a new list
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for new value
}
_RtfText = tmp.RtfText; _RtfText = tmp.RtfText;
_SearchText = tmp.SearchText; _SearchText = tmp.SearchText;
_Config = tmp.Config; _Config = tmp.Config;
@ -244,7 +256,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(AnnotationTypeAnnotation tmp) private void RefreshFields(AnnotationTypeAnnotation tmp)
{ {
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
{
MyItem.RefreshItemAnnotations(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemAnnotations(); // Update List for new value
}
_RtfText = tmp.RtfText; _RtfText = tmp.RtfText;
_SearchText = tmp.SearchText; _SearchText = tmp.SearchText;
_Config = tmp.Config; _Config = tmp.Config;
@ -263,7 +281,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ItemAnnotation tmp) private void RefreshFields(ItemAnnotation tmp)
{ {
_TypeID = tmp.TypeID; if (_TypeID != tmp.TypeID)
{
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for old value
_TypeID = tmp.TypeID; // Update the value
_MyAnnotationType = null; // Reset list so that the next line gets a new list
MyAnnotationType.RefreshAnnotationTypeAnnotations(); // Update List for new value
}
_RtfText = tmp.RtfText; _RtfText = tmp.RtfText;
_SearchText = tmp.SearchText; _SearchText = tmp.SearchText;
_Config = tmp.Config; _Config = tmp.Config;

View File

@ -150,11 +150,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("AnnotationTypeAnnotations",true); CanReadProperty("AnnotationTypeAnnotations",true);
if (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null) if (_AnnotationTypeAnnotationCount < 0 || (_AnnotationTypeAnnotationCount > 0 && _AnnotationTypeAnnotations == null))
_AnnotationTypeAnnotations = AnnotationInfoList.GetByTypeID(_TypeID); _AnnotationTypeAnnotations = AnnotationInfoList.GetByTypeID(_TypeID);
if (_AnnotationTypeAnnotationCount < 0)
_AnnotationTypeAnnotationCount = _AnnotationTypeAnnotations.Count;
return _AnnotationTypeAnnotations; return _AnnotationTypeAnnotations;
} }
} }
internal void RefreshAnnotationTypeAnnotations()
{
_AnnotationTypeAnnotationCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base AnnotationTypeInfo.ToString function as necessary // TODO: Replace base AnnotationTypeInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString

View File

@ -236,9 +236,27 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Assignment tmp) private void RefreshFields(Assignment tmp)
{ {
_GID = tmp.GID; if (_GID != tmp.GID)
_RID = tmp.RID; {
_FolderID = tmp.FolderID; MyGroup.RefreshGroupAssignments(); // Update List for old value
_GID = tmp.GID; // Update the value
_MyGroup = null; // Reset list so that the next line gets a new list
MyGroup.RefreshGroupAssignments(); // Update List for new value
}
if (_RID != tmp.RID)
{
MyRole.RefreshRoleAssignments(); // Update List for old value
_RID = tmp.RID; // Update the value
_MyRole = null; // Reset list so that the next line gets a new list
MyRole.RefreshRoleAssignments(); // Update List for new value
}
if (_FolderID != tmp.FolderID)
{
MyFolder.RefreshFolderAssignments(); // Update List for old value
_FolderID = tmp.FolderID; // Update the value
_MyFolder = null; // Reset list so that the next line gets a new list
MyFolder.RefreshFolderAssignments(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -257,8 +275,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(FolderAssignment tmp) private void RefreshFields(FolderAssignment tmp)
{ {
_GID = tmp.GID; if (_GID != tmp.GID)
_RID = tmp.RID; {
MyGroup.RefreshGroupAssignments(); // Update List for old value
_GID = tmp.GID; // Update the value
_MyGroup = null; // Reset list so that the next line gets a new list
MyGroup.RefreshGroupAssignments(); // Update List for new value
}
if (_RID != tmp.RID)
{
MyRole.RefreshRoleAssignments(); // Update List for old value
_RID = tmp.RID; // Update the value
_MyRole = null; // Reset list so that the next line gets a new list
MyRole.RefreshRoleAssignments(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -277,8 +307,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(GroupAssignment tmp) private void RefreshFields(GroupAssignment tmp)
{ {
_RID = tmp.RID; if (_RID != tmp.RID)
_FolderID = tmp.FolderID; {
MyRole.RefreshRoleAssignments(); // Update List for old value
_RID = tmp.RID; // Update the value
_MyRole = null; // Reset list so that the next line gets a new list
MyRole.RefreshRoleAssignments(); // Update List for new value
}
if (_FolderID != tmp.FolderID)
{
MyFolder.RefreshFolderAssignments(); // Update List for old value
_FolderID = tmp.FolderID; // Update the value
_MyFolder = null; // Reset list so that the next line gets a new list
MyFolder.RefreshFolderAssignments(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -297,8 +339,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(RoleAssignment tmp) private void RefreshFields(RoleAssignment tmp)
{ {
_GID = tmp.GID; if (_GID != tmp.GID)
_FolderID = tmp.FolderID; {
MyGroup.RefreshGroupAssignments(); // Update List for old value
_GID = tmp.GID; // Update the value
_MyGroup = null; // Reset list so that the next line gets a new list
MyGroup.RefreshGroupAssignments(); // Update List for new value
}
if (_FolderID != tmp.FolderID)
{
MyFolder.RefreshFolderAssignments(); // Update List for old value
_FolderID = tmp.FolderID; // Update the value
_MyFolder = null; // Reset list so that the next line gets a new list
MyFolder.RefreshFolderAssignments(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_DTS = tmp.DTS; _DTS = tmp.DTS;

View File

@ -183,11 +183,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ConnectionFolders",true); CanReadProperty("ConnectionFolders",true);
if (_ConnectionFolderCount > 0 && _ConnectionFolders == null) if (_ConnectionFolderCount < 0 || (_ConnectionFolderCount > 0 && _ConnectionFolders == null))
_ConnectionFolders = FolderInfoList.GetByDBID(_DBID); _ConnectionFolders = FolderInfoList.GetByDBID(_DBID);
if (_ConnectionFolderCount < 0)
_ConnectionFolderCount = _ConnectionFolders.Count;
return _ConnectionFolders; return _ConnectionFolders;
} }
} }
internal void RefreshConnectionFolders()
{
_ConnectionFolderCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base ConnectionInfo.ToString function as necessary // TODO: Replace base ConnectionInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString

View File

@ -195,11 +195,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ContentDetails",true); CanReadProperty("ContentDetails",true);
if (_ContentDetailCount > 0 && _ContentDetails == null) if (_ContentDetailCount < 0 || (_ContentDetailCount > 0 && _ContentDetails == null))
_ContentDetails = DetailInfoList.GetByContentID(_ContentID); _ContentDetails = DetailInfoList.GetByContentID(_ContentID);
if (_ContentDetailCount < 0)
_ContentDetailCount = _ContentDetails.Count;
return _ContentDetails; return _ContentDetails;
} }
} }
internal void RefreshContentDetails()
{
_ContentDetailCount = -1; // This will cause the data to be requeried
}
private int _ContentEntryCount = 0; private int _ContentEntryCount = 0;
/// <summary> /// <summary>
/// Count of ContentEntries for this Content /// Count of ContentEntries for this Content
@ -247,11 +253,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ContentItems",true); CanReadProperty("ContentItems",true);
if (_ContentItemCount > 0 && _ContentItems == null) if (_ContentItemCount < 0 || (_ContentItemCount > 0 && _ContentItems == null))
_ContentItems = ItemInfoList.GetByContentID(_ContentID); _ContentItems = ItemInfoList.GetByContentID(_ContentID);
if (_ContentItemCount < 0)
_ContentItemCount = _ContentItems.Count;
return _ContentItems; return _ContentItems;
} }
} }
internal void RefreshContentItems()
{
_ContentItemCount = -1; // This will cause the data to be requeried
}
private int _ContentPartCount = 0; private int _ContentPartCount = 0;
/// <summary> /// <summary>
/// Count of ContentParts for this Content /// Count of ContentParts for this Content
@ -273,11 +285,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ContentParts",true); CanReadProperty("ContentParts",true);
if (_ContentPartCount > 0 && _ContentParts == null) if (_ContentPartCount < 0 || (_ContentPartCount > 0 && _ContentParts == null))
_ContentParts = PartInfoList.GetByContentID(_ContentID); _ContentParts = PartInfoList.GetByContentID(_ContentID);
if (_ContentPartCount < 0)
_ContentPartCount = _ContentParts.Count;
return _ContentParts; return _ContentParts;
} }
} }
internal void RefreshContentParts()
{
_ContentPartCount = -1; // This will cause the data to be requeried
}
private int _ContentRoUsageCount = 0; private int _ContentRoUsageCount = 0;
/// <summary> /// <summary>
/// Count of ContentRoUsages for this Content /// Count of ContentRoUsages for this Content
@ -299,11 +317,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ContentRoUsages",true); CanReadProperty("ContentRoUsages",true);
if (_ContentRoUsageCount > 0 && _ContentRoUsages == null) if (_ContentRoUsageCount < 0 || (_ContentRoUsageCount > 0 && _ContentRoUsages == null))
_ContentRoUsages = RoUsageInfoList.GetByContentID(_ContentID); _ContentRoUsages = RoUsageInfoList.GetByContentID(_ContentID);
if (_ContentRoUsageCount < 0)
_ContentRoUsageCount = _ContentRoUsages.Count;
return _ContentRoUsages; return _ContentRoUsages;
} }
} }
internal void RefreshContentRoUsages()
{
_ContentRoUsageCount = -1; // This will cause the data to be requeried
}
private int _ContentTransitionCount = 0; private int _ContentTransitionCount = 0;
/// <summary> /// <summary>
/// Count of ContentTransitions for this Content /// Count of ContentTransitions for this Content
@ -325,11 +349,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ContentTransitions",true); CanReadProperty("ContentTransitions",true);
if (_ContentTransitionCount > 0 && _ContentTransitions == null) if (_ContentTransitionCount < 0 || (_ContentTransitionCount > 0 && _ContentTransitions == null))
_ContentTransitions = TransitionInfoList.GetByFromID(_ContentID); _ContentTransitions = TransitionInfoList.GetByFromID(_ContentID);
if (_ContentTransitionCount < 0)
_ContentTransitionCount = _ContentTransitions.Count;
return _ContentTransitions; return _ContentTransitions;
} }
} }
internal void RefreshContentTransitions()
{
_ContentTransitionCount = -1; // This will cause the data to be requeried
}
private int _ContentZContentCount = 0; private int _ContentZContentCount = 0;
/// <summary> /// <summary>
/// Count of ContentZContents for this Content /// Count of ContentZContents for this Content
@ -400,14 +430,20 @@ namespace VEPROMS.CSLA.Library
_Number = tmp.Number; _Number = tmp.Number;
_Text = tmp.Text; _Text = tmp.Text;
_Type = tmp.Type; _Type = tmp.Type;
_FormatID = tmp.FormatID; if (_FormatID != tmp.FormatID)
{
MyFormat.RefreshFormatContents(); // Update List for old value
_FormatID = tmp.FormatID; // Update the value
_MyFormat = null; // Reset list so that the next line gets a new list
MyFormat.RefreshFormatContents(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
_ContentInfoExtension.Refresh(this); _ContentInfoExtension.Refresh(this);
_MyFormat = null; _MyFormat = null;
_MyEntry = null; _MyEntry = null;//
_MyZContent = null; _MyZContent = null;//
OnChange();// raise an event OnChange();// raise an event
} }
public static void Refresh(FormatContent tmp) public static void Refresh(FormatContent tmp)
@ -426,8 +462,8 @@ namespace VEPROMS.CSLA.Library
_UserID = tmp.UserID; _UserID = tmp.UserID;
_ContentInfoExtension.Refresh(this); _ContentInfoExtension.Refresh(this);
_MyFormat = null; _MyFormat = null;
_MyEntry = null; _MyEntry = null;//
_MyZContent = null; _MyZContent = null;//
OnChange();// raise an event OnChange();// raise an event
} }
public static ContentInfo Get(int contentID) public static ContentInfo Get(int contentID)

View File

@ -202,7 +202,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Detail tmp) private void RefreshFields(Detail tmp)
{ {
_ContentID = tmp.ContentID; if (_ContentID != tmp.ContentID)
{
MyContent.RefreshContentDetails(); // Update List for old value
_ContentID = tmp.ContentID; // Update the value
_MyContent = null; // Reset list so that the next line gets a new list
MyContent.RefreshContentDetails(); // Update List for new value
}
_ItemType = tmp.ItemType; _ItemType = tmp.ItemType;
_Text = tmp.Text; _Text = tmp.Text;
_Config = tmp.Config; _Config = tmp.Config;

View File

@ -259,12 +259,30 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(DocVersion tmp) private void RefreshFields(DocVersion tmp)
{ {
_FolderID = tmp.FolderID; if (_FolderID != tmp.FolderID)
{
MyFolder.RefreshFolderDocVersions(); // Update List for old value
_FolderID = tmp.FolderID; // Update the value
_MyFolder = null; // Reset list so that the next line gets a new list
MyFolder.RefreshFolderDocVersions(); // Update List for new value
}
_VersionType = tmp.VersionType; _VersionType = tmp.VersionType;
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
_FormatID = tmp.FormatID; {
MyItem.RefreshItemDocVersions(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemDocVersions(); // Update List for new value
}
if (_FormatID != tmp.FormatID)
{
MyFormat.RefreshFormatDocVersions(); // Update List for old value
_FormatID = tmp.FormatID; // Update the value
_MyFormat = null; // Reset list so that the next line gets a new list
MyFormat.RefreshFormatDocVersions(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
@ -285,8 +303,20 @@ namespace VEPROMS.CSLA.Library
_VersionType = tmp.VersionType; _VersionType = tmp.VersionType;
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
_FormatID = tmp.FormatID; {
MyItem.RefreshItemDocVersions(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemDocVersions(); // Update List for new value
}
if (_FormatID != tmp.FormatID)
{
MyFormat.RefreshFormatDocVersions(); // Update List for old value
_FormatID = tmp.FormatID; // Update the value
_MyFormat = null; // Reset list so that the next line gets a new list
MyFormat.RefreshFormatDocVersions(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
@ -304,11 +334,23 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(FormatDocVersion tmp) private void RefreshFields(FormatDocVersion tmp)
{ {
_FolderID = tmp.FolderID; if (_FolderID != tmp.FolderID)
{
MyFolder.RefreshFolderDocVersions(); // Update List for old value
_FolderID = tmp.FolderID; // Update the value
_MyFolder = null; // Reset list so that the next line gets a new list
MyFolder.RefreshFolderDocVersions(); // Update List for new value
}
_VersionType = tmp.VersionType; _VersionType = tmp.VersionType;
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
{
MyItem.RefreshItemDocVersions(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemDocVersions(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
@ -326,11 +368,23 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ItemDocVersion tmp) private void RefreshFields(ItemDocVersion tmp)
{ {
_FolderID = tmp.FolderID; if (_FolderID != tmp.FolderID)
{
MyFolder.RefreshFolderDocVersions(); // Update List for old value
_FolderID = tmp.FolderID; // Update the value
_MyFolder = null; // Reset list so that the next line gets a new list
MyFolder.RefreshFolderDocVersions(); // Update List for new value
}
_VersionType = tmp.VersionType; _VersionType = tmp.VersionType;
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_FormatID = tmp.FormatID; if (_FormatID != tmp.FormatID)
{
MyFormat.RefreshFormatDocVersions(); // Update List for old value
_FormatID = tmp.FormatID; // Update the value
_MyFormat = null; // Reset list so that the next line gets a new list
MyFormat.RefreshFormatDocVersions(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;

View File

@ -176,11 +176,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("DocumentEntries",true); CanReadProperty("DocumentEntries",true);
if (_DocumentEntryCount > 0 && _DocumentEntries == null) if (_DocumentEntryCount < 0 || (_DocumentEntryCount > 0 && _DocumentEntries == null))
_DocumentEntries = EntryInfoList.GetByDocID(_DocID); _DocumentEntries = EntryInfoList.GetByDocID(_DocID);
if (_DocumentEntryCount < 0)
_DocumentEntryCount = _DocumentEntries.Count;
return _DocumentEntries; return _DocumentEntries;
} }
} }
internal void RefreshDocumentEntries()
{
_DocumentEntryCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base DocumentInfo.ToString function as necessary // TODO: Replace base DocumentInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString

View File

@ -185,7 +185,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Entry tmp) private void RefreshFields(Entry tmp)
{ {
_DocID = tmp.DocID; if (_DocID != tmp.DocID)
{
MyDocument.RefreshDocumentEntries(); // Update List for old value
_DocID = tmp.DocID; // Update the value
_MyDocument = null; // Reset list so that the next line gets a new list
MyDocument.RefreshDocumentEntries(); // Update List for new value
}
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
_EntryInfoExtension.Refresh(this); _EntryInfoExtension.Refresh(this);

View File

@ -236,11 +236,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("FolderAssignments",true); CanReadProperty("FolderAssignments",true);
if (_FolderAssignmentCount > 0 && _FolderAssignments == null) if (_FolderAssignmentCount < 0 || (_FolderAssignmentCount > 0 && _FolderAssignments == null))
_FolderAssignments = AssignmentInfoList.GetByFolderID(_FolderID); _FolderAssignments = AssignmentInfoList.GetByFolderID(_FolderID);
if (_FolderAssignmentCount < 0)
_FolderAssignmentCount = _FolderAssignments.Count;
return _FolderAssignments; return _FolderAssignments;
} }
} }
internal void RefreshFolderAssignments()
{
_FolderAssignmentCount = -1; // This will cause the data to be requeried
}
private int _FolderDocVersionCount = 0; private int _FolderDocVersionCount = 0;
/// <summary> /// <summary>
/// Count of FolderDocVersions for this Folder /// Count of FolderDocVersions for this Folder
@ -262,11 +268,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("FolderDocVersions",true); CanReadProperty("FolderDocVersions",true);
if (_FolderDocVersionCount > 0 && _FolderDocVersions == null) if (_FolderDocVersionCount < 0 || (_FolderDocVersionCount > 0 && _FolderDocVersions == null))
_FolderDocVersions = DocVersionInfoList.GetByFolderID(_FolderID); _FolderDocVersions = DocVersionInfoList.GetByFolderID(_FolderID);
if (_FolderDocVersionCount < 0)
_FolderDocVersionCount = _FolderDocVersions.Count;
return _FolderDocVersions; return _FolderDocVersions;
} }
} }
internal void RefreshFolderDocVersions()
{
_FolderDocVersionCount = -1; // This will cause the data to be requeried
}
private int _ChildFolderCount = 0; private int _ChildFolderCount = 0;
/// <summary> /// <summary>
/// Count of ChildFolders for this Folder /// Count of ChildFolders for this Folder
@ -288,11 +300,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ChildFolders",true); CanReadProperty("ChildFolders",true);
if (_ChildFolderCount > 0 && _ChildFolders == null) if (_ChildFolderCount < 0 || (_ChildFolderCount > 0 && _ChildFolders == null))
_ChildFolders = FolderInfoList.GetChildren(_FolderID); _ChildFolders = FolderInfoList.GetChildren(_FolderID);
if (_ChildFolderCount < 0)
_ChildFolderCount = _ChildFolders.Count;
return _ChildFolders; return _ChildFolders;
} }
} }
internal void RefreshChildFolders()
{
_ChildFolderCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base FolderInfo.ToString function as necessary // TODO: Replace base FolderInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString
@ -334,12 +352,30 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Folder tmp) private void RefreshFields(Folder tmp)
{ {
_ParentID = tmp.ParentID; if (_ParentID != tmp.ParentID)
_DBID = tmp.DBID; {
MyParent.RefreshChildFolders(); // Update List for old value
_ParentID = tmp.ParentID; // Update the value
_MyParent = null; // Reset list so that the next line gets a new list
MyParent.RefreshChildFolders(); // Update List for new value
}
if (_DBID != tmp.DBID)
{
MyConnection.RefreshConnectionFolders(); // Update List for old value
_DBID = tmp.DBID; // Update the value
_MyConnection = null; // Reset list so that the next line gets a new list
MyConnection.RefreshConnectionFolders(); // Update List for new value
}
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_ShortName = tmp.ShortName; _ShortName = tmp.ShortName;
_FormatID = tmp.FormatID; if (_FormatID != tmp.FormatID)
{
MyFormat.RefreshFormatFolders(); // Update List for old value
_FormatID = tmp.FormatID; // Update the value
_MyFormat = null; // Reset list so that the next line gets a new list
MyFormat.RefreshFormatFolders(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UsrID = tmp.UsrID; _UsrID = tmp.UsrID;
@ -357,11 +393,23 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ConnectionFolder tmp) private void RefreshFields(ConnectionFolder tmp)
{ {
_ParentID = tmp.ParentID; if (_ParentID != tmp.ParentID)
{
MyParent.RefreshChildFolders(); // Update List for old value
_ParentID = tmp.ParentID; // Update the value
_MyParent = null; // Reset list so that the next line gets a new list
MyParent.RefreshChildFolders(); // Update List for new value
}
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_ShortName = tmp.ShortName; _ShortName = tmp.ShortName;
_FormatID = tmp.FormatID; if (_FormatID != tmp.FormatID)
{
MyFormat.RefreshFormatFolders(); // Update List for old value
_FormatID = tmp.FormatID; // Update the value
_MyFormat = null; // Reset list so that the next line gets a new list
MyFormat.RefreshFormatFolders(); // Update List for new value
}
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UsrID = tmp.UsrID; _UsrID = tmp.UsrID;
@ -379,8 +427,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(FormatFolder tmp) private void RefreshFields(FormatFolder tmp)
{ {
_ParentID = tmp.ParentID; if (_ParentID != tmp.ParentID)
_DBID = tmp.DBID; {
MyParent.RefreshChildFolders(); // Update List for old value
_ParentID = tmp.ParentID; // Update the value
_MyParent = null; // Reset list so that the next line gets a new list
MyParent.RefreshChildFolders(); // Update List for new value
}
if (_DBID != tmp.DBID)
{
MyConnection.RefreshConnectionFolders(); // Update List for old value
_DBID = tmp.DBID; // Update the value
_MyConnection = null; // Reset list so that the next line gets a new list
MyConnection.RefreshConnectionFolders(); // Update List for new value
}
_Name = tmp.Name; _Name = tmp.Name;
_Title = tmp.Title; _Title = tmp.Title;
_ShortName = tmp.ShortName; _ShortName = tmp.ShortName;

View File

@ -192,11 +192,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("FormatContents",true); CanReadProperty("FormatContents",true);
if (_FormatContentCount > 0 && _FormatContents == null) if (_FormatContentCount < 0 || (_FormatContentCount > 0 && _FormatContents == null))
_FormatContents = ContentInfoList.GetByFormatID(_FormatID); _FormatContents = ContentInfoList.GetByFormatID(_FormatID);
if (_FormatContentCount < 0)
_FormatContentCount = _FormatContents.Count;
return _FormatContents; return _FormatContents;
} }
} }
internal void RefreshFormatContents()
{
_FormatContentCount = -1; // This will cause the data to be requeried
}
private int _FormatDocVersionCount = 0; private int _FormatDocVersionCount = 0;
/// <summary> /// <summary>
/// Count of FormatDocVersions for this Format /// Count of FormatDocVersions for this Format
@ -218,11 +224,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("FormatDocVersions",true); CanReadProperty("FormatDocVersions",true);
if (_FormatDocVersionCount > 0 && _FormatDocVersions == null) if (_FormatDocVersionCount < 0 || (_FormatDocVersionCount > 0 && _FormatDocVersions == null))
_FormatDocVersions = DocVersionInfoList.GetByFormatID(_FormatID); _FormatDocVersions = DocVersionInfoList.GetByFormatID(_FormatID);
if (_FormatDocVersionCount < 0)
_FormatDocVersionCount = _FormatDocVersions.Count;
return _FormatDocVersions; return _FormatDocVersions;
} }
} }
internal void RefreshFormatDocVersions()
{
_FormatDocVersionCount = -1; // This will cause the data to be requeried
}
private int _FormatFolderCount = 0; private int _FormatFolderCount = 0;
/// <summary> /// <summary>
/// Count of FormatFolders for this Format /// Count of FormatFolders for this Format
@ -244,11 +256,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("FormatFolders",true); CanReadProperty("FormatFolders",true);
if (_FormatFolderCount > 0 && _FormatFolders == null) if (_FormatFolderCount < 0 || (_FormatFolderCount > 0 && _FormatFolders == null))
_FormatFolders = FolderInfoList.GetByFormatID(_FormatID); _FormatFolders = FolderInfoList.GetByFormatID(_FormatID);
if (_FormatFolderCount < 0)
_FormatFolderCount = _FormatFolders.Count;
return _FormatFolders; return _FormatFolders;
} }
} }
internal void RefreshFormatFolders()
{
_FormatFolderCount = -1; // This will cause the data to be requeried
}
private int _ChildFormatCount = 0; private int _ChildFormatCount = 0;
/// <summary> /// <summary>
/// Count of ChildFormats for this Format /// Count of ChildFormats for this Format
@ -270,11 +288,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ChildFormats",true); CanReadProperty("ChildFormats",true);
if (_ChildFormatCount > 0 && _ChildFormats == null) if (_ChildFormatCount < 0 || (_ChildFormatCount > 0 && _ChildFormats == null))
_ChildFormats = FormatInfoList.GetChildren(_FormatID); _ChildFormats = FormatInfoList.GetChildren(_FormatID);
if (_ChildFormatCount < 0)
_ChildFormatCount = _ChildFormats.Count;
return _ChildFormats; return _ChildFormats;
} }
} }
internal void RefreshChildFormats()
{
_ChildFormatCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base FormatInfo.ToString function as necessary // TODO: Replace base FormatInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString
@ -316,7 +340,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Format tmp) private void RefreshFields(Format tmp)
{ {
_ParentID = tmp.ParentID; if (_ParentID != tmp.ParentID)
{
MyParent.RefreshChildFormats(); // Update List for old value
_ParentID = tmp.ParentID; // Update the value
_MyParent = null; // Reset list so that the next line gets a new list
MyParent.RefreshChildFormats(); // Update List for new value
}
_Name = tmp.Name; _Name = tmp.Name;
_Description = tmp.Description; _Description = tmp.Description;
_Data = tmp.Data; _Data = tmp.Data;

View File

@ -160,11 +160,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("GroupAssignments",true); CanReadProperty("GroupAssignments",true);
if (_GroupAssignmentCount > 0 && _GroupAssignments == null) if (_GroupAssignmentCount < 0 || (_GroupAssignmentCount > 0 && _GroupAssignments == null))
_GroupAssignments = AssignmentInfoList.GetByGID(_GID); _GroupAssignments = AssignmentInfoList.GetByGID(_GID);
if (_GroupAssignmentCount < 0)
_GroupAssignmentCount = _GroupAssignments.Count;
return _GroupAssignments; return _GroupAssignments;
} }
} }
internal void RefreshGroupAssignments()
{
_GroupAssignmentCount = -1; // This will cause the data to be requeried
}
private int _GroupMembershipCount = 0; private int _GroupMembershipCount = 0;
/// <summary> /// <summary>
/// Count of GroupMemberships for this Group /// Count of GroupMemberships for this Group
@ -186,11 +192,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("GroupMemberships",true); CanReadProperty("GroupMemberships",true);
if (_GroupMembershipCount > 0 && _GroupMemberships == null) if (_GroupMembershipCount < 0 || (_GroupMembershipCount > 0 && _GroupMemberships == null))
_GroupMemberships = MembershipInfoList.GetByGID(_GID); _GroupMemberships = MembershipInfoList.GetByGID(_GID);
if (_GroupMembershipCount < 0)
_GroupMembershipCount = _GroupMemberships.Count;
return _GroupMemberships; return _GroupMemberships;
} }
} }
internal void RefreshGroupMemberships()
{
_GroupMembershipCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base GroupInfo.ToString function as necessary // TODO: Replace base GroupInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString

View File

@ -174,11 +174,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ItemAnnotations",true); CanReadProperty("ItemAnnotations",true);
if (_ItemAnnotationCount > 0 && _ItemAnnotations == null) if (_ItemAnnotationCount < 0 || (_ItemAnnotationCount > 0 && _ItemAnnotations == null))
_ItemAnnotations = AnnotationInfoList.GetByItemID(_ItemID); _ItemAnnotations = AnnotationInfoList.GetByItemID(_ItemID);
if (_ItemAnnotationCount < 0)
_ItemAnnotationCount = _ItemAnnotations.Count;
return _ItemAnnotations; return _ItemAnnotations;
} }
} }
internal void RefreshItemAnnotations()
{
_ItemAnnotationCount = -1; // This will cause the data to be requeried
}
private int _ItemDocVersionCount = 0; private int _ItemDocVersionCount = 0;
/// <summary> /// <summary>
/// Count of ItemDocVersions for this Item /// Count of ItemDocVersions for this Item
@ -200,11 +206,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ItemDocVersions",true); CanReadProperty("ItemDocVersions",true);
if (_ItemDocVersionCount > 0 && _ItemDocVersions == null) if (_ItemDocVersionCount < 0 || (_ItemDocVersionCount > 0 && _ItemDocVersions == null))
_ItemDocVersions = DocVersionInfoList.GetByItemID(_ItemID); _ItemDocVersions = DocVersionInfoList.GetByItemID(_ItemID);
if (_ItemDocVersionCount < 0)
_ItemDocVersionCount = _ItemDocVersions.Count;
return _ItemDocVersions; return _ItemDocVersions;
} }
} }
internal void RefreshItemDocVersions()
{
_ItemDocVersionCount = -1; // This will cause the data to be requeried
}
private int _NextItemCount = 0; private int _NextItemCount = 0;
/// <summary> /// <summary>
/// Count of NextItems for this Item /// Count of NextItems for this Item
@ -226,11 +238,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("NextItems",true); CanReadProperty("NextItems",true);
if (_NextItemCount > 0 && _NextItems == null) if (_NextItemCount < 0 || (_NextItemCount > 0 && _NextItems == null))
_NextItems = ItemInfoList.GetNext(_ItemID); _NextItems = ItemInfoList.GetNext(_ItemID);
if (_NextItemCount < 0)
_NextItemCount = _NextItems.Count;
return _NextItems; return _NextItems;
} }
} }
internal void RefreshNextItems()
{
_NextItemCount = -1; // This will cause the data to be requeried
}
private int _ItemPartCount = 0; private int _ItemPartCount = 0;
/// <summary> /// <summary>
/// Count of ItemParts for this Item /// Count of ItemParts for this Item
@ -252,11 +270,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ItemParts",true); CanReadProperty("ItemParts",true);
if (_ItemPartCount > 0 && _ItemParts == null) if (_ItemPartCount < 0 || (_ItemPartCount > 0 && _ItemParts == null))
_ItemParts = PartInfoList.GetByItemID(_ItemID); _ItemParts = PartInfoList.GetByItemID(_ItemID);
if (_ItemPartCount < 0)
_ItemPartCount = _ItemParts.Count;
return _ItemParts; return _ItemParts;
} }
} }
internal void RefreshItemParts()
{
_ItemPartCount = -1; // This will cause the data to be requeried
}
private int _ItemTransition_RangeIDCount = 0; private int _ItemTransition_RangeIDCount = 0;
/// <summary> /// <summary>
/// Count of ItemTransitions for this Item /// Count of ItemTransitions for this Item
@ -278,11 +302,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ItemTransitions_RangeID",true); CanReadProperty("ItemTransitions_RangeID",true);
if (_ItemTransition_RangeIDCount > 0 && _ItemTransitions_RangeID == null) if (_ItemTransition_RangeIDCount < 0 || (_ItemTransition_RangeIDCount > 0 && _ItemTransitions_RangeID == null))
_ItemTransitions_RangeID = TransitionInfoList.GetByRangeID(_ItemID); _ItemTransitions_RangeID = TransitionInfoList.GetByRangeID(_ItemID);
if (_ItemTransition_RangeIDCount < 0)
_ItemTransition_RangeIDCount = _ItemTransitions_RangeID.Count;
return _ItemTransitions_RangeID; return _ItemTransitions_RangeID;
} }
} }
internal void RefreshItemTransitions_RangeID()
{
_ItemTransition_RangeIDCount = -1; // This will cause the data to be requeried
}
private int _ItemTransition_ToIDCount = 0; private int _ItemTransition_ToIDCount = 0;
/// <summary> /// <summary>
/// Count of ItemTransitions for this Item /// Count of ItemTransitions for this Item
@ -304,11 +334,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("ItemTransitions_ToID",true); CanReadProperty("ItemTransitions_ToID",true);
if (_ItemTransition_ToIDCount > 0 && _ItemTransitions_ToID == null) if (_ItemTransition_ToIDCount < 0 || (_ItemTransition_ToIDCount > 0 && _ItemTransitions_ToID == null))
_ItemTransitions_ToID = TransitionInfoList.GetByToID(_ItemID); _ItemTransitions_ToID = TransitionInfoList.GetByToID(_ItemID);
if (_ItemTransition_ToIDCount < 0)
_ItemTransition_ToIDCount = _ItemTransitions_ToID.Count;
return _ItemTransitions_ToID; return _ItemTransitions_ToID;
} }
} }
internal void RefreshItemTransitions_ToID()
{
_ItemTransition_ToIDCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base ItemInfo.ToString function as necessary // TODO: Replace base ItemInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString
@ -350,8 +386,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Item tmp) private void RefreshFields(Item tmp)
{ {
_PreviousID = tmp.PreviousID; if (_PreviousID != tmp.PreviousID)
_ContentID = tmp.ContentID; {
MyPrevious.RefreshNextItems(); // Update List for old value
_PreviousID = tmp.PreviousID; // Update the value
_MyPrevious = null; // Reset list so that the next line gets a new list
MyPrevious.RefreshNextItems(); // Update List for new value
}
if (_ContentID != tmp.ContentID)
{
MyContent.RefreshContentItems(); // Update List for old value
_ContentID = tmp.ContentID; // Update the value
_MyContent = null; // Reset list so that the next line gets a new list
MyContent.RefreshContentItems(); // Update List for new value
}
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
_ItemInfoExtension.Refresh(this); _ItemInfoExtension.Refresh(this);
@ -367,7 +415,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ContentItem tmp) private void RefreshFields(ContentItem tmp)
{ {
_PreviousID = tmp.PreviousID; if (_PreviousID != tmp.PreviousID)
{
MyPrevious.RefreshNextItems(); // Update List for old value
_PreviousID = tmp.PreviousID; // Update the value
_MyPrevious = null; // Reset list so that the next line gets a new list
MyPrevious.RefreshNextItems(); // Update List for new value
}
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
_ItemInfoExtension.Refresh(this); _ItemInfoExtension.Refresh(this);

View File

@ -224,8 +224,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Membership tmp) private void RefreshFields(Membership tmp)
{ {
_UID = tmp.UID; if (_UID != tmp.UID)
_GID = tmp.GID; {
MyUser.RefreshUserMemberships(); // Update List for old value
_UID = tmp.UID; // Update the value
_MyUser = null; // Reset list so that the next line gets a new list
MyUser.RefreshUserMemberships(); // Update List for new value
}
if (_GID != tmp.GID)
{
MyGroup.RefreshGroupMemberships(); // Update List for old value
_GID = tmp.GID; // Update the value
_MyGroup = null; // Reset list so that the next line gets a new list
MyGroup.RefreshGroupMemberships(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_Config = tmp.Config; _Config = tmp.Config;
@ -244,7 +256,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(GroupMembership tmp) private void RefreshFields(GroupMembership tmp)
{ {
_UID = tmp.UID; if (_UID != tmp.UID)
{
MyUser.RefreshUserMemberships(); // Update List for old value
_UID = tmp.UID; // Update the value
_MyUser = null; // Reset list so that the next line gets a new list
MyUser.RefreshUserMemberships(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_Config = tmp.Config; _Config = tmp.Config;
@ -263,7 +281,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(UserMembership tmp) private void RefreshFields(UserMembership tmp)
{ {
_GID = tmp.GID; if (_GID != tmp.GID)
{
MyGroup.RefreshGroupMemberships(); // Update List for old value
_GID = tmp.GID; // Update the value
_MyGroup = null; // Reset list so that the next line gets a new list
MyGroup.RefreshGroupMemberships(); // Update List for new value
}
_StartDate = tmp.StartDate; _StartDate = tmp.StartDate;
_EndDate = tmp.EndDate; _EndDate = tmp.EndDate;
_Config = tmp.Config; _Config = tmp.Config;

View File

@ -196,7 +196,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Part tmp) private void RefreshFields(Part tmp)
{ {
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
{
MyItem.RefreshItemParts(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemParts(); // Update List for new value
}
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
_PartInfoExtension.Refresh(this); _PartInfoExtension.Refresh(this);
@ -212,7 +218,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ContentPart tmp) private void RefreshFields(ContentPart tmp)
{ {
_ItemID = tmp.ItemID; if (_ItemID != tmp.ItemID)
{
MyItem.RefreshItemParts(); // Update List for old value
_ItemID = tmp.ItemID; // Update the value
_MyItem = null; // Reset list so that the next line gets a new list
MyItem.RefreshItemParts(); // Update List for new value
}
_DTS = tmp.DTS; _DTS = tmp.DTS;
_UserID = tmp.UserID; _UserID = tmp.UserID;
_PartInfoExtension.Refresh(this); _PartInfoExtension.Refresh(this);

View File

@ -254,7 +254,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Permission tmp) private void RefreshFields(Permission tmp)
{ {
_RID = tmp.RID; if (_RID != tmp.RID)
{
MyRole.RefreshRolePermissions(); // Update List for old value
_RID = tmp.RID; // Update the value
_MyRole = null; // Reset list so that the next line gets a new list
MyRole.RefreshRolePermissions(); // Update List for new value
}
_PermLevel = tmp.PermLevel; _PermLevel = tmp.PermLevel;
_VersionType = tmp.VersionType; _VersionType = tmp.VersionType;
_PermValue = tmp.PermValue; _PermValue = tmp.PermValue;

View File

@ -192,7 +192,13 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(RoUsage tmp) private void RefreshFields(RoUsage tmp)
{ {
_ContentID = tmp.ContentID; if (_ContentID != tmp.ContentID)
{
MyContent.RefreshContentRoUsages(); // Update List for old value
_ContentID = tmp.ContentID; // Update the value
_MyContent = null; // Reset list so that the next line gets a new list
MyContent.RefreshContentRoUsages(); // Update List for new value
}
_ROID = tmp.ROID; _ROID = tmp.ROID;
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;

View File

@ -150,11 +150,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("RoleAssignments",true); CanReadProperty("RoleAssignments",true);
if (_RoleAssignmentCount > 0 && _RoleAssignments == null) if (_RoleAssignmentCount < 0 || (_RoleAssignmentCount > 0 && _RoleAssignments == null))
_RoleAssignments = AssignmentInfoList.GetByRID(_RID); _RoleAssignments = AssignmentInfoList.GetByRID(_RID);
if (_RoleAssignmentCount < 0)
_RoleAssignmentCount = _RoleAssignments.Count;
return _RoleAssignments; return _RoleAssignments;
} }
} }
internal void RefreshRoleAssignments()
{
_RoleAssignmentCount = -1; // This will cause the data to be requeried
}
private int _RolePermissionCount = 0; private int _RolePermissionCount = 0;
/// <summary> /// <summary>
/// Count of RolePermissions for this Role /// Count of RolePermissions for this Role
@ -176,11 +182,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("RolePermissions",true); CanReadProperty("RolePermissions",true);
if (_RolePermissionCount > 0 && _RolePermissions == null) if (_RolePermissionCount < 0 || (_RolePermissionCount > 0 && _RolePermissions == null))
_RolePermissions = PermissionInfoList.GetByRID(_RID); _RolePermissions = PermissionInfoList.GetByRID(_RID);
if (_RolePermissionCount < 0)
_RolePermissionCount = _RolePermissions.Count;
return _RolePermissions; return _RolePermissions;
} }
} }
internal void RefreshRolePermissions()
{
_RolePermissionCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base RoleInfo.ToString function as necessary // TODO: Replace base RoleInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString

View File

@ -265,9 +265,27 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(Transition tmp) private void RefreshFields(Transition tmp)
{ {
_FromID = tmp.FromID; if (_FromID != tmp.FromID)
_ToID = tmp.ToID; {
_RangeID = tmp.RangeID; MyContent.RefreshContentTransitions(); // Update List for old value
_FromID = tmp.FromID; // Update the value
_MyContent = null; // Reset list so that the next line gets a new list
MyContent.RefreshContentTransitions(); // Update List for new value
}
if (_ToID != tmp.ToID)
{
MyItemToID.RefreshItemTransitions_ToID(); // Update List for old value
_ToID = tmp.ToID; // Update the value
_MyItemToID = null; // Reset list so that the next line gets a new list
MyItemToID.RefreshItemTransitions_ToID(); // Update List for new value
}
if (_RangeID != tmp.RangeID)
{
MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for old value
_RangeID = tmp.RangeID; // Update the value
_MyItemRangeID = null; // Reset list so that the next line gets a new list
MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for new value
}
_TranType = tmp.TranType; _TranType = tmp.TranType;
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -276,7 +294,7 @@ namespace VEPROMS.CSLA.Library
_MyContent = null; _MyContent = null;
_MyItemToID = null; _MyItemToID = null;
_MyItemRangeID = null; _MyItemRangeID = null;
_MyZTransition = null; _MyZTransition = null;//
OnChange();// raise an event OnChange();// raise an event
} }
public static void Refresh(ContentTransition tmp) public static void Refresh(ContentTransition tmp)
@ -287,8 +305,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ContentTransition tmp) private void RefreshFields(ContentTransition tmp)
{ {
_ToID = tmp.ToID; if (_ToID != tmp.ToID)
_RangeID = tmp.RangeID; {
MyItemToID.RefreshItemTransitions_ToID(); // Update List for old value
_ToID = tmp.ToID; // Update the value
_MyItemToID = null; // Reset list so that the next line gets a new list
MyItemToID.RefreshItemTransitions_ToID(); // Update List for new value
}
if (_RangeID != tmp.RangeID)
{
MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for old value
_RangeID = tmp.RangeID; // Update the value
_MyItemRangeID = null; // Reset list so that the next line gets a new list
MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for new value
}
_TranType = tmp.TranType; _TranType = tmp.TranType;
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -297,7 +327,7 @@ namespace VEPROMS.CSLA.Library
_MyContent = null; _MyContent = null;
_MyItemToID = null; _MyItemToID = null;
_MyItemRangeID = null; _MyItemRangeID = null;
_MyZTransition = null; _MyZTransition = null;//
OnChange();// raise an event OnChange();// raise an event
} }
public static void Refresh(ItemTransition_RangeID tmp) public static void Refresh(ItemTransition_RangeID tmp)
@ -308,8 +338,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ItemTransition_RangeID tmp) private void RefreshFields(ItemTransition_RangeID tmp)
{ {
_FromID = tmp.FromID; if (_FromID != tmp.FromID)
_ToID = tmp.ToID; {
MyContent.RefreshContentTransitions(); // Update List for old value
_FromID = tmp.FromID; // Update the value
_MyContent = null; // Reset list so that the next line gets a new list
MyContent.RefreshContentTransitions(); // Update List for new value
}
if (_ToID != tmp.ToID)
{
MyItemToID.RefreshItemTransitions_ToID(); // Update List for old value
_ToID = tmp.ToID; // Update the value
_MyItemToID = null; // Reset list so that the next line gets a new list
MyItemToID.RefreshItemTransitions_ToID(); // Update List for new value
}
_TranType = tmp.TranType; _TranType = tmp.TranType;
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -318,7 +360,7 @@ namespace VEPROMS.CSLA.Library
_MyContent = null; _MyContent = null;
_MyItemToID = null; _MyItemToID = null;
_MyItemRangeID = null; _MyItemRangeID = null;
_MyZTransition = null; _MyZTransition = null;//
OnChange();// raise an event OnChange();// raise an event
} }
public static void Refresh(ItemTransition_ToID tmp) public static void Refresh(ItemTransition_ToID tmp)
@ -329,8 +371,20 @@ namespace VEPROMS.CSLA.Library
} }
private void RefreshFields(ItemTransition_ToID tmp) private void RefreshFields(ItemTransition_ToID tmp)
{ {
_FromID = tmp.FromID; if (_FromID != tmp.FromID)
_RangeID = tmp.RangeID; {
MyContent.RefreshContentTransitions(); // Update List for old value
_FromID = tmp.FromID; // Update the value
_MyContent = null; // Reset list so that the next line gets a new list
MyContent.RefreshContentTransitions(); // Update List for new value
}
if (_RangeID != tmp.RangeID)
{
MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for old value
_RangeID = tmp.RangeID; // Update the value
_MyItemRangeID = null; // Reset list so that the next line gets a new list
MyItemRangeID.RefreshItemTransitions_RangeID(); // Update List for new value
}
_TranType = tmp.TranType; _TranType = tmp.TranType;
_Config = tmp.Config; _Config = tmp.Config;
_DTS = tmp.DTS; _DTS = tmp.DTS;
@ -339,7 +393,7 @@ namespace VEPROMS.CSLA.Library
_MyContent = null; _MyContent = null;
_MyItemToID = null; _MyItemToID = null;
_MyItemRangeID = null; _MyItemRangeID = null;
_MyZTransition = null; _MyZTransition = null;//
OnChange();// raise an event OnChange();// raise an event
} }
public static TransitionInfo Get(int transitionID) public static TransitionInfo Get(int transitionID)

View File

@ -240,11 +240,17 @@ namespace VEPROMS.CSLA.Library
get get
{ {
CanReadProperty("UserMemberships",true); CanReadProperty("UserMemberships",true);
if (_UserMembershipCount > 0 && _UserMemberships == null) if (_UserMembershipCount < 0 || (_UserMembershipCount > 0 && _UserMemberships == null))
_UserMemberships = MembershipInfoList.GetByUID(_UID); _UserMemberships = MembershipInfoList.GetByUID(_UID);
if (_UserMembershipCount < 0)
_UserMembershipCount = _UserMemberships.Count;
return _UserMemberships; return _UserMemberships;
} }
} }
internal void RefreshUserMemberships()
{
_UserMembershipCount = -1; // This will cause the data to be requeried
}
// TODO: Replace base UserInfo.ToString function as necessary // TODO: Replace base UserInfo.ToString function as necessary
/// <summary> /// <summary>
/// Overrides Base ToString /// Overrides Base ToString