protected override void OnAsyncQueryCompleted(IAsyncResult result) { App.Current.Dispatcher.Invoke((Action) delegate { var orders = new List <AdventureWorksService.SalesOrderHeader>(); foreach (var item in _query.EndExecute(result)) { orders.Add((AdventureWorksService.SalesOrderHeader)item); } ProxyServiceQuery.AddData(_query.ToString(), orders); OnCompleteSource(orders); }); }
public void RefreshData() { ProxyServiceQuery.ClearData(_query.ToString()); GetData(); }
private void GetData() { this.IsLoading = true; ProxyServiceQuery.ProcessQuery(this, _query, OnAsyncQueryCompleted); }