public async void LoadConsigns(bool isRefresh = false) { this.NeedShowBusy = true; var method = new GetConsignList() { PageIndex = this.PageIdx, PageSize = 20, NameOrNo = (Keyword ?? "").Trim()//nameOrNo }; var datas = await ApiClient.Execute(method); this.NeedShowBusy = false; if (datas != null) { if (this.Datas == null || isRefresh) { this.Datas = new ObservableCollection <ShortConsignDto>(datas.Items); } else { foreach (var d in datas.Items) { this.Datas.Add(d); } } if (datas.Items.Count() > 0) { this.PageIdx++; } } }
public async void LoadConsigns(bool isRefresh = false) { this.NeedShowBusy = true; var method = new GetConsignList() { PageIndex = this.PageIdx, PageSize = 20, NameOrNo = (Keyword ?? "").Trim()//nameOrNo }; var datas = await ApiClient.Execute(method); this.NeedShowBusy = false; if (datas != null) { if (this.Datas == null || isRefresh) this.Datas = new ObservableCollection<ShortConsignDto>(datas.Items); else foreach (var d in datas.Items) { this.Datas.Add(d); } if (datas.Items.Count() > 0) this.PageIdx++; } }