예제 #1
0
        /// <summary>
        /// 权限绑定操作筛选
        /// </summary>
        /// <param name="filter">筛选信息</param>
        /// <returns></returns>
        IQuery CreateAuthorityOperationQueryObject(AuthorityBindOperationFilterDto filter)
        {
            if (filter == null)
            {
                return(null);
            }
            IQuery query = CreateAuthorityOperationQueryObject(filter, true) ?? QueryManager.Create <AuthorityOperationQuery>();

            #region 权限筛选

            if (filter.AuthorityFilter != null)
            {
                IQuery authorityQuery = CreateAuthorityQueryObject(filter.AuthorityFilter);
                if (authorityQuery != null && !authorityQuery.Criterias.IsNullOrEmpty())
                {
                    //权限和操作绑定
                    IQuery authBindOperationQuery = QueryManager.Create <AuthorityBindOperationQuery>();
                    authBindOperationQuery.EqualInnerJoin(authorityQuery);
                    query.EqualInnerJoin(authBindOperationQuery);
                }
            }

            #endregion

            return(query);
        }
예제 #2
0
        /// <summary>
        /// 权限绑定操作筛选
        /// </summary>
        /// <param name="filter">筛选信息</param>
        /// <returns></returns>
        IQuery CreateAuthorityOperationQueryObject(AuthorityBindOperationFilterDto filter)
        {
            if (filter == null)
            {
                return(null);
            }
            IQuery query = CreateAuthorityOperationQueryObject(filter, true) ?? QueryFactory.Create <AuthorityOperationQuery>();

            #region 权限筛选

            if (filter.AuthorityFilter != null)
            {
                IQuery authorityQuery = CreateAuthorityQueryObject(filter.AuthorityFilter);
                if (authorityQuery != null && authorityQuery.Criterias.Count > 0)
                {
                    authorityQuery.AddQueryFields <AuthorityQuery>(c => c.Code);
                    IQuery authBindOperationQuery = QueryFactory.Create <AuthorityBindOperationQuery>();
                    authBindOperationQuery.And <AuthorityBindOperationQuery>(c => c.AuthorityCode, CriteriaOperator.In, authorityQuery);
                    authBindOperationQuery.AddQueryFields <AuthorityBindOperationQuery>(c => c.AuthorithOperation);
                    query.And <AuthorityOperationQuery>(c => c.SysNo, CriteriaOperator.In, authBindOperationQuery);
                }
            }

            #endregion

            return(query);
        }
예제 #3
0
 public ActionResult SearchAuthorityBindOperation(AuthorityBindOperationFilterDto filter)
 {
     filter.LoadGroup = true;
     return(SearchAuthorityOperation(filter));
 }