public async Task<OrderSearchResult> GetOrdersAsync( string storeId, string customerId, string query, int skip, int take) { var response = await this._orderClient.GetCustomerOrdersAsync(storeId, customerId, query, skip, take); return response; }
public void LoadSlice(int from, int? to) { var pageSize = to == null ? 5 : to - from; var customerService = new CustomerService(); var orderSearchResult = Task.Run(() => customerService.GetOrdersAsync( SiteContext.Current.StoreId, Id, null, from, pageSize.Value)).Result; var orders = orderSearchResult.CustomerOrders.Select(o => o.AsWebModel()); var ordersCollection = new ItemCollection<CustomerOrder>(orders) { TotalCount = orderSearchResult.TotalCount }; Orders = ordersCollection; }