Beispiel #1
0
        /// <summary>
        /// 获取指定渠道有权限的用户列表
        /// </summary>
        /// <param name="softId"></param>
        /// <param name="channelRight"></param>
        /// <returns></returns>
        public List <int> GetUserIds(int softId, ChannelRight channelRight)
        {
            loginService.HaveAdminRight(DACommonHelper.REPORT_SYS_ID);

            if (loginService.LoginUser.AccountType == UserTypeOptions.ProductAdmin &&
                !loginService.AvailableSofts.Exists(a => a.ID == softId))
            {
                throw new NotRightException();
            }

            return(DAChannelsHelper.GetUserIds(softId, channelRight));
        }
        /// <summary>
        /// 根据账号或姓名模糊查找,并分页返回用户信息列表
        /// </summary>
        /// <param name="sysId"></param>
        /// <param name="status"></param>
        /// <param name="accountType"></param>
        /// <param name="keyword"></param>
        /// <param name="onlyWhiteUser"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <param name="recordCount"></param>
        /// <returns></returns>
        public List <User> GetUsers(int sysId, StatusOptions status, UserTypeOptions accountType, string keyword, bool onlyWhiteUser, int pageIndex, int pageSize, ref int recordCount)
        {
            //权限判断
            loginService.HaveAdminRight(sysId, true);

            //if (loginService.LoginUser.AccountType == UserTypeOptions.ProductAdmin)
            //{
            //    return DABasicInfoHelper.GetUsers(sysId, status, accountType, keyword, onlyWhiteUser, pageIndex, pageSize, ref recordCount);
            //}
            return(DABasicInfoHelper.GetUsers(sysId, status, accountType, keyword, onlyWhiteUser, pageIndex, pageSize, ref recordCount));
        }