Exemple #1
0
        /// <summary>
        /// 查找某个岗位下某个指定模块的禁用功能。
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        private EntityList GetBy(OperationAC_GetDenyListCriteria c)
        {
            var opId = c.OrgPositionId;

            var moduleAC   = RF.Concrete <ModuleACRepository>().GetById(c.ModuleACId);
            var operations = this.DoGetByParent(moduleAC);

            //把所有已经禁用的功能都加入到列表中去。并把这个返回
            var list     = this.NewList();
            var op       = RF.Concrete <OrgPositionRepository>().GetById(opId) as OrgPosition;
            var denyList = op.OrgPositionOperationDenyList;

            list.AddRange(operations.Cast <OperationAC>().Where(item =>
            {
                foreach (var deny in denyList)
                {
                    if (item.IsSame(deny))
                    {
                        return(true);
                    }
                }

                return(false);
            }));
            return(list);
        }
Exemple #2
0
        /// <summary>
        /// 查找某个岗位下某个指定模块的禁用功能。
        /// </summary>
        /// <param name="c"></param>
        /// <returns></returns>
        private EntityList GetBy(OperationAC_GetDenyListCriteria c)
        {
            var opId = c.OrgPositionId;

            var moduleAC = RF.Concrete<ModuleACRepository>().GetById(c.ModuleACId);
            var operations = this.DoGetByParent(moduleAC);

            //把所有已经禁用的功能都加入到列表中去。并把这个返回
            var list = this.NewList();
            var op = RF.Concrete<OrgPositionRepository>().GetById(opId) as OrgPosition;
            var denyList = op.OrgPositionOperationDenyList;
            list.AddRange(operations.Cast<OperationAC>().Where(item =>
            {
                foreach (var deny in denyList)
                {
                    if (item.IsSame(deny))
                    {
                        return true;
                    }
                }

                return false;
            }));
            return list;
        }