2 // Mainsoft.Web.AspnetConfig - Site administration utility
\r
4 // Klain Yoni <yonik@mainsoft.com>
\r
6 // Mainsoft.Web.AspnetConfig - Site administration utility
\r
7 // (C) 2006 Mainsoft Corporation (http://www.mainsoft.com)
\r
8 // Permission is hereby granted, free of charge, to any person obtaining
\r
9 // a copy of this software and associated documentation files (the
\r
10 // "Software"), to deal in the Software without restriction, including
\r
11 // without limitation the rights to use, copy, modify, merge, publish,
\r
12 // distribute, sublicense, and/or sell copies of the Software, and to
\r
13 // permit persons to whom the Software is furnished to do so, subject to
\r
14 // the following conditions:
\r
16 // The above copyright notice and this permission notice shall be
\r
17 // included in all copies or substantial portions of the Software.
\r
19 // THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
\r
20 // EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
\r
21 // MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
\r
22 // NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
\r
23 // LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
\r
24 // OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
\r
25 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. --%>
\r
26 <%@ Page Language="C#" AutoEventWireup="true" EnableTheming="false" MasterPageFile="~/aspnetconfig/Util.Master" CodeBehind="ManageRole.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.MenageRole" %>
\r
27 <%@ Register tagprefix="custom" namespace="Mainsoft.Web.AspnetConfig" Assembly="Mainsoft.Web.AspnetConfig" %>
\r
28 <asp:Content ID="Content1" ContentPlaceHolderID="SiteMapLinks" runat="server">
\r
29 <td><a class="SiteMap" href="Default.aspx" title="Home page" runat="server">Home</a></td>
\r
31 <td style="color: #284E98;"><a class="SiteMap" href="CreateRole.aspx" title="Create\Manage roles" runat="server">Create\Manage roles</a></td>
\r
33 <td style="color: #333333">Manage roles</td>
\r
36 <asp:Content runat="server" ID="main" ContentPlaceHolderID="Main">
\r
37 <table class="maintable">
\r
39 <td colspan="2" width="100%" style="height: 21px">
\r
40 Use this page to manage the members in the specified role. To add a user to the role, search for the user name and then select the User Is In Role check box for that user.
\r
43 <asp:Label ID="role_lbl" runat="server" /> <br />
\r
47 <td width= "100%" valign="top">
\r
48 <table width="100%" class="innertable" >
\r
50 <td width="100%" class="controlheader">
\r
56 Search for Users
\r
57 <asp:DropDownList ID="searchBy_dl" runat="server">
\r
58 <asp:ListItem Selected="True" Value="Name">User Name</asp:ListItem>
\r
59 <asp:ListItem Value="Mail">E-Mail</asp:ListItem>
\r
60 </asp:DropDownList> <asp:TextBox ID="user_txt" runat="server"></asp:TextBox>
\r
62 <asp:Button ID="searchUser_bt" runat="server" Text="Search" /> <br />
\r
63 Wildcard characters * and ? are permitted. <br /><br />
\r
67 <td width= "100%" valign="top" datakeynames="Role;">
\r
68 <asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" AllowPaging="True" PageSize="5">
\r
69 <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
\r
71 <asp:BoundField DataField="User" HeaderText="User Name" />
\r
72 <asp:TemplateField HeaderText="User Is In Role">
\r
74 <custom:GridCheckBox ID="Check" runat="server" AutoPostBack="true" Checked='<%# Bind("InRole") %>'
\r
75 User='<%# Bind("User") %>' OnCheckedChanged="CheckBox_CheckedChanged" />
\r
77 </asp:TemplateField>
\r
79 <RowStyle BackColor="#EFF3FB" />
\r
80 <EditRowStyle BackColor="#2461BF" />
\r
81 <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
\r
82 <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />
\r
83 <HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"
\r
84 ForeColor="White" HorizontalAlign="Left" />
\r
85 <AlternatingRowStyle BackColor="White" />
\r
87 <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"
\r
88 SelectMethod="CreateManageRoleTable" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">
\r
90 <asp:Parameter Name="Role" Type="String" />
\r
93 <asp:QueryStringParameter Name="role" QueryStringField="Role" Type="String" />
\r
94 <asp:ControlParameter ControlID="user_txt" Name="searchtag" PropertyName="Text"
\r
95 Type="String" DefaultValue="""" />
\r
96 <asp:ControlParameter ControlID="searchBy_dl" Name="searchby" PropertyName="SelectedValue"
\r
99 </asp:ObjectDataSource>
\r