protected void updatePanelWithTeamDetails(WBTeam team) { TeamName.Text = team.Name; TeamGUID.Text = team.Id.ToString(); TeamAcronym.Text = team.Acronym; UseAllFunctionalAreas.Checked = team.UseAllFunctionalAreas; TeamFunctionalAreas.Text = team.FunctionalAreaUIControlValue; if (TeamFunctionalAreas.Text == "") { InheritedFunctionalAreas.Text = team.FunctionalArea(functionalAreas).Names(); } else { InheritedFunctionalAreas.Text = ""; } TeamsSiteURL.Text = team.TeamSiteUrl; TeamsSiteGUID.Text = team.TeamSiteGuidString; WBLogging.Debug("In TeamManagement.updatePanelWithTeamDetails(): OwnersGroupName = " + team.OwnersGroupName); WBLogging.Debug("In TeamManagement.updatePanelWithTeamDetails(): MembersGroupName = " + team.MembersGroupName); InformationAssetOwner.WBxInitialise(team.InformationAssetOwner(SPContext.Current.Web)); TeamManager.WBxInitialise(team.Manager(SPContext.Current.Web)); //TeamOwnersSharePointUserGroup.CommaSeparatedAccounts = ""; //TeamOwnersSharePointUserGroup.ResolvedEntities.Clear(); //TeamOwnersSharePointUserGroup.Entities.Clear(); TeamOwnersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(team.OwnersGroupName)); //TeamMembersSharePointUserGroup.CommaSeparatedAccounts = ""; //TeamMembersSharePointUserGroup.ResolvedEntities.Clear(); //TeamMembersSharePointUserGroup.Entities.Clear(); TeamMembersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(team.MembersGroupName)); //TeamPublishersSharePointUserGroup.CommaSeparatedAccounts = ""; TeamPublishersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(team.PublishersGroupName)); RecordsTypesListUrl.Text = team.RecordsTypesListUrl; CommonActivitiesListUrl.Text = team.CommonActivitiesListUrl; FunctionalActivitiesListUrl.Text = team.FunctionalActivitiesListUrl; }
protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { SPSite site = SPContext.Current.Site; SPWeb web = SPContext.Current.Web; WBTaxonomy teams = WBTaxonomy.GetTeams(site); WBTaxonomy functionalAreas = WBTaxonomy.GetFunctionalAreas(teams); teams.InitialiseTaxonomyControl(TeamTerm, "Select Team Term", false); teams.InitialiseTaxonomyControl(ParentTeamTerm, "Select the Parent Team Term", false); functionalAreas.InitialiseTaxonomyControl(TeamFunctionalAreas, "Select the functional area", true); TeamName.Text = web.Title; WBTeam team = WBTeam.GetFromTeamSite(teams, web); if (team != null) { TeamTerm.Text = team.UIControlValue; TeamAcronym.Text = team.Acronym; TeamFunctionalAreas.Text = team.FunctionalAreaUIControlValue; UseAllFunctionalAreas.Checked = team.UseAllFunctionalAreas; if (TeamFunctionalAreas.Text == "") { InheritedFunctionalAreas.Text = team.FunctionalArea(functionalAreas).Names(); } else { InheritedFunctionalAreas.Text = ""; } InformationAssetOwner.WBxInitialise(team.InformationAssetOwner(web)); TeamManager.WBxInitialise(team.Manager(web)); TeamOwnersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(team.OwnersGroupName)); TeamMembersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(team.MembersGroupName)); TeamPublishersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(team.PublishersGroupName)); TeamTerm.Enabled = false; ParentTeamTerm.Enabled = false; TeamOwnersSharePointUserGroup.Enabled = false; TeamMembersSharePointUserGroup.Enabled = false; RecordsTypesListUrl.Text = team.RecordsTypesListUrl; } else { TeamTerm.Text = ""; SPWeb parentWeb = web.ParentWeb; WBTeam parentTeam = WBTeam.GetFromTeamSite(teams, parentWeb); if (parentTeam != null) { ParentTeamTerm.Text = parentTeam.UIControlValue; InheritedFunctionalAreas.Text = parentTeam.FunctionalArea(functionalAreas).Names(); RecordsTypesListUrl.Text = parentTeam.RecordsTypesListUrl; } TeamOwnersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(web.Title + " - Owners")); TeamMembersSharePointUserGroup.UpdateEntities(WBUtils.CreateEntitiesArrayList(web.Title + " - Members")); } } }