コード例 #1
0
        /// <summary>
        /// 获取用户基本信息
        /// </summary>
        /// <param name="deptId">部门id</param>
        /// <returns></returns>
        public List <AccountBaseDto> GetAccountsBaseInfo(int?deptId, string key = "")
        {
            var param = new AccountSearchParam
            {
                IsStrict = true
            };

            if (deptId.HasValue)
            {
                param.Dept = (int)deptId;
            }
            if (!string.IsNullOrWhiteSpace(key))
            {
                param.Key = key;
            }
            return(_db.Fetch <AccountBaseDto>(param.ToSearchUtil(), "Base_Account", "Id,Name,DeptId").ToList());
        }
コード例 #2
0
        /// <summary>
        /// 获取分页列表
        /// </summary>
        /// <param name="input"></param>
        /// <param name="pageIndex"></param>
        /// <param name="pageSize"></param>
        /// <returns></returns>
        public PageList <AccountListDto> PageList(AccountSearchParam input, int pageIndex, int pageSize)
        {
            var util = input.ToSearchUtil();

            return(_db.Query <AccountListDto>(util, pageIndex, pageSize, "AccountView"));
        }