Esempio n. 1
0
        /// <summary>
        /// 根据部门id获取用户
        /// </summary>
        /// <param name="ids"></param>
        /// <param name="pageSize"></param>
        /// <param name="pageIndex"></param>
        /// <param name="totalCount"></param>
        /// <returns></returns>
        public List <User> GetUserByDepartmenId(Guid[] ids, int pageSize, int pageIndex, out int totalCount)
        {
            var users = dal.GetUserByDepartmenId(ids);

            totalCount = users.Count();
            var userData = users
                           .Skip((pageIndex - 1) * pageSize)
                           .Take(pageSize);

            return(userData.ToList());
        }