private void EndGetAgencies(IAsyncResult result) { try { Agencies = new ObservableCollection <AgencyViewModel>(AgencyService.EndGetAgencies(result).Select(x => new AgencyViewModel(x))); } catch (SecurityAccessDeniedException ex) { LogService.BeginLogError(ex.Message, null, null); } }
public void EndGetStandardTags(IAsyncResult result) { try { StandardTags = new ObservableCollection <TagViewModel>(TagService.EndGetStandardTags(result).Select(x => new TagViewModel(x))); } catch (SecurityAccessDeniedException ex) { LogService.BeginLogError(ex.Message, null, null); } catch (CommunicationException ex) { LogService.BeginLogError(ex.Message, null, null); } }
private void EndGetCustomersProfile(IAsyncResult result) { if (result.IsCompleted) { try { var profiles = ProfileService.EndGetCustomerProfiles(result); if (profiles != null) { Profiles = new ObservableCollection <CustomerProfileViewModel>(profiles.Select(x => new CustomerProfileViewModel(x))); } } catch (SecurityAccessDeniedException ex) { LogService.BeginLogError(ex.Message, null, null); } } }