public void GetRoles() { DotNetNuke.Security.Roles.RoleController rc = new DotNetNuke.Security.Roles.RoleController(); var myRoles = rc.GetRoles(this.PortalId); ddlRoles.DataSource = myRoles; ddlRoles.DataBind(); // ADD FIRST (NULL) ITEM ListItem item = new ListItem(); item.Text = "-- Select Role to Assign --"; item.Value = ""; ddlRoles.Items.Insert(0, item); // REMOVE DEFAULT ROLES ddlRoles.Items.Remove("Administrators"); ddlRoles.Items.Remove("Registered Users"); ddlRoles.Items.Remove("Subscribers"); ddlManageUserRole.DataSource = myRoles; ddlManageUserRole.DataBind(); // ADD FIRST (NULL) ITEM ListItem item1 = new ListItem(); item1.Text = "-- Select Role to Assign --"; item1.Value = ""; ddlManageUserRole.Items.Insert(0, item); // REMOVE DEFAULT ROLES ddlManageUserRole.Items.Remove("Administrators"); ddlManageUserRole.Items.Remove("Registered Users"); ddlManageUserRole.Items.Remove("Subscribers"); // GET FOLDERS //var folderInfos = FolderManager.Instance.GetFolders(folder.PortalID).Where(f => f.FolderPath != string.Empty && f.FolderPath.StartsWith(folder.FolderPath)).ToList(); var folderInfos = FolderManager.Instance.GetFolders(this.PortalId); //ddlPdfFilesFolder //asp:DropDownList ID="ddlPdfFilesFolder" runat="server" DataTextField="FolderPath" DataValueField="FolderPath" /> ddlPdfFilesFolder.DataSource = folderInfos; ddlPdfFilesFolder.DataBind(); // ADD FIRST (NULL) ITEM ListItem itemFolder = new ListItem(); itemFolder.Text = "-- Select Folder --"; itemFolder.Value = ""; ddlPdfFilesFolder.Items.Insert(0, itemFolder); }
public void GetRoles() { DotNetNuke.Security.Roles.RoleController rc = new DotNetNuke.Security.Roles.RoleController(); var myRoles = rc.GetRoles(this.PortalId); ddlClientManagerUserRole.DataSource = myRoles; ddlClientManagerUserRole.DataBind(); ddlClientManagerDeleteRole.DataSource = myRoles; ddlClientManagerDeleteRole.DataBind(); // ADD FIRST (NULL) ITEM ListItem item = new ListItem(); item.Text = "-- Select Role to Assign --"; item.Value = ""; ddlClientManagerUserRole.Items.Insert(0, item); // REMOVE DEFAULT ROLES ddlClientManagerUserRole.Items.Remove("Administrators"); ddlClientManagerUserRole.Items.Remove("Registered Users"); ddlClientManagerUserRole.Items.Remove("Subscribers"); ddlClientManagerDeleteRole.Items.Insert(0, item); // REMOVE DEFAULT ROLES ddlClientManagerDeleteRole.Items.Remove("Administrators"); ddlClientManagerDeleteRole.Items.Remove("Registered Users"); ddlClientManagerDeleteRole.Items.Remove("Subscribers"); for (int i = 0; i < 30; i++) { ddlDaysToValidVisit.Items.Insert(i, new ListItem((i + 1).ToString(), (i + 1).ToString())); } }
public void GetRoles() { // ArrayList myRoles = new ArrayList(); DotNetNuke.Security.Roles.RoleController rc = new DotNetNuke.Security.Roles.RoleController(); var myRoles = rc.GetRoles(this.PortalId); ddlAgentRole.DataTextField = "RoleName"; ddlAgentRole.DataValueField = "RoleName"; ddlAgentRole.DataSource = myRoles; ddlAgentRole.DataBind(); // ADD FIRST (NULL) ITEM ListItem item = new ListItem(); item.Text = "-- Select Role for Agents --"; item.Value = ""; ddlAgentRole.Items.Insert(0, item); // REMOVE DEFAULT ROLES ddlAgentRole.Items.Remove("Administrators"); ddlAgentRole.Items.Remove("Registered Users"); ddlAgentRole.Items.Remove("Subscribers"); }