void FindWorkersCompleted(object sender, FindWorkersCompletedEventArgs e) { if (e.Error == null) { Workers = e.Result; if (SelectedUser != null) { SelectedWorker = (selectedUser.WorkerID != null ? Workers.FirstOrDefault(c => c.ID == selectedUser.WorkerID) : null); } } else { ErrorProvider.ShowError(e.Error, Navigator); } dataClient.FindWorkersCompleted -= FindWorkersCompleted; Busy = false; }
void FindWorkersCompleted(object sender, FindWorkersCompletedEventArgs e) { if (e.Error == null) { Workers = e.Result; } else { ErrorProvider.ShowError(e.Error, Navigator); } dataClient.FindWorkersCompleted -= FindWorkersCompleted; if (busyCount == 0) { Busy = false; } else { busyCount--; } }