protected override async Task<bool> GetDataAsync()
        {
            var resource = new CustomerAccountResource(Context);
            _results = await resource.GetAccountsAsync(startIndex: StartIndex, pageSize: PageSize, sortBy: SortBy, filter: Filter, q: Q, qLimit: QLimit, responseFields:ResponseFields);

            TotalCount = _results.TotalCount;
            PageCount = _results.PageCount;
            PageSize = _results.PageSize;
            return _results.Items != null && _results.Items.Count > 0;
        }
        protected async override Task<bool> GetDataAsync()
        {
            var resource = new CustomerAccountResource(Context);
            _results =await resource.GetCustomersPurchaseOrderAccountsAsync(startIndex: StartIndex, pageSize: PageSize, sortBy: SortBy, responseFields: ResponseFields);

            TotalCount = _results.TotalCount;
            PageCount = _results.PageCount;
            PageSize = _results.PageSize;
            return _results.Items != null && _results.Items.Count > 0;
        }
Пример #3
0
        private void btnGetCustomers_Click(object sender, EventArgs e)
        {
            btnGetCustomers.Text = "Getting Customers...";
            var customerResource = new CustomerAccountResource(_apiContext);
            CustomerAccountCollection customers = customerResource.GetAccounts();

            if (customers != null && customers.Items.Count > 0)
                dataGridViewCustomers.DataSource = customers.Items;
            btnGetCustomers.Text = "Refresh Customer List";
        }