예제 #1
0
        private GroupType GetGroupType(RolePropertiesSearchArguments searchArguments)
        {
            if (searchArguments == null || searchArguments.GroupHandle == null)
            {
                return(null);
            }

            using (SecurityFreeSection.Activate())
            {
                var group = searchArguments.GroupHandle.GetObject();
                return(group.GroupType);
            }
        }
예제 #2
0
        private IQueryable <Position> GetPositions(RolePropertiesSearchArguments defaultSearchArguments)
        {
            var positions = Position.FindAll();

            var groupType = GetGroupType(defaultSearchArguments);

            if (groupType == null)
            {
                return(positions);
            }

            return(positions.Where(p => p.GroupTypes.Any(gtp => gtp.GroupType == groupType)));
        }