//******************************************************* // // The BindData helper method is used to update the tab's // layout panes with the current configuration information // //******************************************************* private void BindData() { // Obtain PortalSettings from Current Context PortalSettings portalSettings = (PortalSettings)Context.Items["PortalSettings"]; TabSettings tab = portalSettings.ActiveTab; // Populate Tab Names, etc. tabName.Text = tab.TabName; mobileTabName.Text = tab.MobileTabName; showMobile.Checked = tab.ShowMobile; // Populate checkbox list with all security roles for this portal // and "check" the ones already configured for this tab AdminDB admin = new AdminDB(); IDataReader roles = admin.GetPortalRoles(portalSettings.PortalId); // Clear existing items in checkboxlist authRoles.Items.Clear(); ListItem allItem = new ListItem(); allItem.Text = "All Users"; if (tab.AuthorizedRoles.LastIndexOf("All Users") > -1) { allItem.Selected = true; } authRoles.Items.Add(allItem); while (roles.Read()) { ListItem item = new ListItem(); item.Text = (String)roles["rolename"]; item.Value = roles["roleid"].ToString(); if ((tab.AuthorizedRoles.LastIndexOf(item.Text)) > -1) { item.Selected = true; } authRoles.Items.Add(item); } // Populate the "Add Module" Data moduleType.DataSource = admin.GetModuleDefinitions(portalSettings.PortalId); moduleType.DataBind(); // Populate Right Hand Module Data rightList = GetModules("RightPane"); rightPane.DataBind(); // Populate Content Pane Module Data contentList = GetModules("ContentPane"); contentPane.DataBind(); // Populate Left Hand Pane Module Data leftList = GetModules("LeftPane"); leftPane.DataBind(); }
//******************************************************* // // The BindData helper method is used to bind the list of // module definitions for this portal to an asp:datalist server control // //******************************************************* void BindData() { // Obtain PortalSettings from Current Context PortalSettings portalSettings = (PortalSettings)Context.Items["PortalSettings"]; // Get the portal's defs from the database AdminDB admin = new AdminDB(); defsList.DataSource = admin.GetModuleDefinitions(portalSettings.PortalId); defsList.DataBind(); }