MyDataSource.Clear();
Task.Factory.StartNew(() =>
{
GridViewIsBusy = true;
var response = _IndoorSampleCheckHttpProxy.GetSamplesIndoorStationsByStationQueryInformation(_StationQueryInformation);
foreach (var item in response)
{
item.Number = index.ToString();
if (item.AjustNumber != null)
{
if (item.AjustNumber.Contains(item.OldBoxNumber))
item.Flag = true;
}
index++;
}
Dispatcher.CurrentDispatcher.Invoke(DispatcherPriority.Send,new Action(delegate()
{
MyDataSource.AddRange(response);
}));
GridViewIsBusy = false;
});