Example #1
0
        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();
        }
Example #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();
        }