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