private PagingInfoEntity PagingInfoToPagingInfoEntity(ECCentral.QueryFilter.Common.PagingInfo info)
        {
            PagingInfoEntity entity = new PagingInfoEntity();

            entity.SortField     = info.SortBy;
            entity.MaximumRows   = info.PageSize;
            entity.StartRowIndex = info.PageIndex * info.PageSize;
            return(entity);
        }
Exemple #2
0
        /// <summary>
        /// 构造PagingInfo对象
        /// </summary>
        /// <param name="pageInfo"></param>
        /// <returns></returns>
        private PagingInfoEntity CreatePagingInfo(ECCentral.QueryFilter.Common.PagingInfo pageInfo)
        {
            var pagingInfo = new PagingInfoEntity();

            if (pageInfo != null)
            {
                pagingInfo.MaximumRows   = pageInfo.PageSize;
                pagingInfo.StartRowIndex = pageInfo.PageIndex * pageInfo.PageSize;
                pagingInfo.SortField     = pageInfo.SortBy;
            }
            return(pagingInfo);
        }