private void RefreshTaskGroupSystemRoleLookupList()
        {
            foreach (var systemRoleDto in TaskGroupSystemRoleLookupList.SourceCollection.OfType <SystemRoleDto> ())
            {
                systemRoleDto.IsSelectable = true;
                systemRoleDto.IsSelected   = false;
                if (SystemRoleDto.GrantedSystemRoles != null &&
                    SystemRoleDto.GrantedSystemRoles.Any(grantedSystemRoleDto => systemRoleDto.Key == grantedSystemRoleDto.Key))
                {
                    systemRoleDto.IsSelectable = false;
                    systemRoleDto.IsSelected   = true;
                }
            }

            TaskGroupSystemRoleLookupList.Filter = (p => (p as SystemRoleDto).IsSelectable);
            TaskGroupSystemRoleLookupList.Refresh();
        }
Exemple #2
0
        private void RefreshTaskGroupSystemRoeLookupList()
        {
            foreach (var systemRoleDto in TaskGroupSystemRoleLookupList.SourceCollection.OfType <SystemRoleDto> ())
            {
                systemRoleDto.IsSelectable = true;
                systemRoleDto.IsSelected   = false;
                foreach (var staffSystemRoleDto in EditingDto.SystemRoles.TaskGroupRoles)
                {
                    if (systemRoleDto.Key == staffSystemRoleDto.SystemRole.Key)
                    {
                        systemRoleDto.IsSelectable = false;
                        systemRoleDto.IsSelected   = true;
                        break;
                    }
                }
            }

            TaskGroupSystemRoleLookupList.Filter = (p => (p as SystemRoleDto).IsSelectable);
            TaskGroupSystemRoleLookupList.Refresh();
        }