private void refreshTeamDataGrid() { try { TeamProxy currentRecord = selectedTeamRecord ?? null; ProjectProxy currentProjectProxy = (ProjectCombo.SelectedItem != null) ? (ProjectProxy)ProjectCombo.SelectedItem : Globals.AllProjects; Globals.ProjectStatusFilter statusFilter = Globals.SelectedStatusFilter; string projectRoleCode = Globals.SelectedProjectRole.RoleCode; Globals.TeamTimeFilter timeFilter = Globals.SelectedTeamTimeFilter; bool success = ProjectFunctions.SetTeamsGridList(statusFilter, projectRoleCode, timeFilter, currentProjectProxy.ProjectID, nameLike, exactName); if (success) { TeamDataGrid.ItemsSource = ProjectFunctions.TeamsGridList; if (currentRecord != null && ProjectFunctions.TeamsGridList.Exists(tgl => tgl.ID == currentRecord.ID)) { TeamDataGrid.SelectedItem = ProjectFunctions.TeamsGridList.First(tgl => tgl.ID == currentRecord.ID); } else if (ProjectFunctions.TeamsGridList.Count == 1) { TeamDataGrid.SelectedItem = ProjectFunctions.TeamsGridList.ElementAt(0); } } } catch (Exception generalException) { MessageFunctions.Error("Error populating project team grid data", generalException); } }
private void teamTimeChanged(Globals.TeamTimeFilter option) { Globals.SelectedTeamTimeFilter = option; refreshTeamDataGrid(); }