Exemplo n.º 1
0
        public async Task <IEnumerable <Credit> > GetCustomerCredits(int accountId, int tenantId,
                                                                     int?siteId, int?masterCatalogId, int?startIndex, int?pageSize, string sortBy = null, string filter = null)
        {
            _apiContext = new ApiContext(tenantId, siteId, masterCatalogId);

            var customerCreditResource = new CreditResource(_apiContext);
            var credits = await customerCreditResource.GetCreditsAsync(startIndex, pageSize,
                                                                       sortBy, filter, null);

            return(credits.Items);
        }
Exemplo n.º 2
0
        protected override async Task <bool> GetDataAsync()
        {
            var resource = new CreditResource(Context);

            _results = await resource.GetCreditsAsync(startIndex : StartIndex, pageSize : PageSize, sortBy : SortBy, filter : Filter, responseFields : ResponseFields);

            TotalCount = _results.TotalCount;
            PageCount  = _results.PageCount;
            PageSize   = _results.PageSize;
            return(_results.Items != null && _results.Items.Count > 0);
        }