Esempio n. 1
0
        public async Task<List<PriceSendErrorModelResponseDto>> GetPriceSendErrorHistory(
            PriceSendErrorModelRequestDto model)
        {
            var request = DtoConverter.ConvertPriceSendErrorModelRequest(model);
            var res = await Task.Run(() => this._priceRepository.GetSendErrorHistory(request));

            var result = new List<PriceSendErrorModelResponseDto>();
            foreach (var re in res)
            {
                result.Add(DtoConverter.ConvertPriceSendHistoryErrorModelResponseDto(re));
            }
            return result;
        }
Esempio n. 2
0
        public static PriceSendErrorModelRequest ConvertPriceSendErrorModelRequest(PriceSendErrorModelRequestDto request)
        {
            if (request.Sort != null)
            {
                var items = new List <SortItem>();

                foreach (var dto in request.Sort)
                {
                    items.Add(ConvertSortItem(dto));
                }
                return(new PriceSendErrorModelRequest()
                {
                    Sort = items, PageSize = request.PageSize, Page = request.Page, Skip = request.Skip, Take = request.Take
                });
            }
            return(new PriceSendErrorModelRequest()
            {
                Sort = null, PageSize = request.PageSize, Page = request.Page, Skip = request.Skip, Take = request.Take
            });
        }
Esempio n. 3
0
 public async Task <List <PriceSendErrorModelResponseDto> > GetPriceSendErrorHistory(
     PriceSendErrorModelRequestDto model)
 {
     return(await this.PostData <List <PriceSendErrorModelResponseDto> >("filters/getPriceErrorSendHistory", model));
 }