Exemplo n.º 1
0
 /// <summary>
 /// 输出模型
 /// </summary>
 /// <param name="OrderManageDto"></param>
 /// <param name="OrderManageInfo"></param>
 public OrderManageOut(PagedResultDto <OrderManage> OrderManageDto, OrderManageIn OrderManageInfo)
 {
     Items          = OrderManageDto.Items.Select(t => new OrderManageDetail(t)).ToList();
     TotalCount     = OrderManageDto.TotalCount;
     TotalPage      = OrderManageDto.TotalCount / OrderManageInfo.MaxResultCount;
     SkipCount      = OrderManageInfo.SkipCount;
     MaxResultCount = OrderManageInfo.MaxResultCount;
 }
Exemplo n.º 2
0
        public async Task <PagedResultDto <OrderManage> > OrderManagePage(OrderManageIn OrderManageInfo)
        {
            //初步过滤
            var query = _repository.GetAll().OrderByDescending(a => a.CreatedOn).Where(OrderManageInfo.Expression);
            //获取总数
            var tasksCount = query.Count();
            //获取总数
            var totalpage       = tasksCount / OrderManageInfo.MaxResultCount;
            var OrderManageList = await query.PageBy(OrderManageInfo.SkipTotal, OrderManageInfo.MaxResultCount).ToListAsync();

            return(new PagedResultDto <OrderManage>(tasksCount, OrderManageList.MapTo <List <OrderManage> >()));
        }
Exemplo n.º 3
0
        public async Task <IList <OrderManage> > OrderManageList(OrderManageIn OrderManageInfo)
        {
            var OrderManages = await _repository.GetAllListAsync(OrderManageInfo.Expression);

            return(OrderManages.ToList());
        }