Update related lists when related value changes.
This commit is contained in:
1 parent
26de18fb28
commit
1973b9646c
20 files changed
+561
-87
No files matched your search
@@ -224,8 +224,20 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(Membership tmp)
|
||||
{
|
||||
_UID = tmp.UID;
|
||||
_GID = tmp.GID;
|
||||
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
|
||||
}
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_Config = tmp.Config;
|
||||
@@ -244,7 +256,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_Config = tmp.Config;
|
||||
@@ -263,7 +281,13 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_Config = tmp.Config;
|
||||
|
||||
Reference in new issue
Block a user