Update related lists when related value changes.
This commit is contained in:
@@ -236,9 +236,27 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(Assignment tmp)
|
||||
{
|
||||
_GID = tmp.GID;
|
||||
_RID = tmp.RID;
|
||||
_FolderID = tmp.FolderID;
|
||||
if (_GID != tmp.GID)
|
||||
{
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_DTS = tmp.DTS;
|
||||
@@ -257,8 +275,20 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(FolderAssignment tmp)
|
||||
{
|
||||
_GID = tmp.GID;
|
||||
_RID = tmp.RID;
|
||||
if (_GID != tmp.GID)
|
||||
{
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_DTS = tmp.DTS;
|
||||
@@ -277,8 +307,20 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(GroupAssignment tmp)
|
||||
{
|
||||
_RID = tmp.RID;
|
||||
_FolderID = tmp.FolderID;
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_DTS = tmp.DTS;
|
||||
@@ -297,8 +339,20 @@ namespace VEPROMS.CSLA.Library
|
||||
}
|
||||
private void RefreshFields(RoleAssignment tmp)
|
||||
{
|
||||
_GID = tmp.GID;
|
||||
_FolderID = tmp.FolderID;
|
||||
if (_GID != tmp.GID)
|
||||
{
|
||||
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;
|
||||
_EndDate = tmp.EndDate;
|
||||
_DTS = tmp.DTS;
|
||||
|
Reference in New Issue
Block a user