private async System.Threading.Tasks.Task SelectProjectRefs() { if (SelectedProject != null) { try { List <ProjectUser> projectUserList = await adminService.ReadAllProjectUsersInProjectAsync(SelectedProject); ProjectUsers.Clear(); projectUserList.ForEach(ProjectUsers.Add); List <User> users = await adminService.ReadAllUsersForCompanyAsync(globalModel.CurrentUser.CompanyId); AllCompanyUsers.Clear(); users.ForEach(u => { if (projectUserList.All(pu => pu.UserId != u.UserId)) { AllCompanyUsers.Add(u); } }); IsProjectSelected = true; } catch (TimeoutException timeoutEx) { _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx); } } else { IsProjectSelected = false; } }
public async System.Threading.Tasks.Task LoadProjects() { try { Projects = await adminService.ReadAdminProjectsForUserAsync(globalModel.CurrentUser); ProjectUsers.Clear(); AllCompanyUsers.Clear(); } catch (TimeoutException timeoutEx) { _eventAggregator.GetEvent <TimeoutErrorEvent>().Publish(timeoutEx); } }