Пример #1
0
        //*******************************************************
        //
        // The AddRole_Click server event handler is used to add
        // a new security role for this portal
        //
        //*******************************************************

        private void AddRole_Click(Object Sender, EventArgs e)
        {
            // Obtain PortalSettings from Current Context
            PortalSettings portalSettings = (PortalSettings)Context.Items["PortalSettings"];

            // Add a new role to the database
            AdminDB admin = new AdminDB();

            admin.AddRole(portalSettings.PortalId, "New Role");

            // set the edit item index to the last item
            rolesList.EditItemIndex = rolesList.Items.Count;

            // Rebind list
            BindData();
        }