Merge gh20preview2 branch (revisions 70670:71411)
[mono.git] / mcs / class / Mainsoft.Web / Mainsoft.Web.AspnetConfig / aspnetconfig / CreateRole.aspx
1 <%--\r
2 // Mainsoft.Web.AspnetConfig - Site administration utility\r
3 // Authors:\r
4 //  Klain Yoni <yonik@mainsoft.com>\r
5 //\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
15 // \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
18 // \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="CreateRole.aspx.cs" Inherits="Mainsoft.Web.AspnetConfig.CreateRole" %>\r
27 <%@ Register TagPrefix="custom" Assembly="Mainsoft.Web.AspnetConfig" Namespace="Mainsoft.Web.AspnetConfig" %>\r
28 \r
29 <asp:Content ID="Main" ContentPlaceHolderID="Main" runat="server">\r
30     <asp:MultiView runat="server" ID="mv" ActiveViewIndex="0">\r
31     <asp:View runat="server" id="grid">\r
32     <table class="maintable">\r
33         <tr>\r
34             <td colspan="2" width="100%" style="height: 21px">\r
35                 You can optionally add roles, or groups, that enable you to allow or deny groups of users access to specific folders in your Web site. For example, you might create roles such as "managers," "sales," or "members," each with different access to specific folders.  <br /> <br />\r
36             </td>\r
37         </tr>\r
38         <tr>\r
39             <td width= "100%" valign="top">\r
40                 <table width="100%" class="innertable" >\r
41                     <tr>\r
42                         <td width="100%" class="controlheader">\r
43                             Create New Role\r
44                         </td>\r
45                     </tr>\r
46                     <tr>\r
47                         <td>\r
48                             New role name:  &nbsp; &nbsp; \r
49                             <asp:TextBox ID="roleName_txb" runat="server" /> &nbsp; &nbsp;\r
50                             <asp:Button  ID="roleName_bt"  runat="server" Text="Add role" OnClick="roleName_bt_Click" />\r
51                         </td>\r
52                     </tr>\r
53                     <tr>\r
54                         <td>\r
55                             <asp:Label ID="error_lb" runat="server" ForeColor="Red" />\r
56                             <br /> <br />\r
57                         </td>\r
58                     </tr>\r
59                 </table>\r
60             </td> \r
61         </tr>\r
62         <tr>\r
63             <td width= "100%" valign="top" datakeynames="Role;">\r
64                 <asp:GridView ID="Roles_gv" runat="server" CellPadding="4" DataSourceID="ObjectDataSource1" ForeColor="#333333" GridLines="None" Width="100%" AutoGenerateColumns="False" DataKeyNames="Role">\r
65                     <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />\r
66                     <Columns>\r
67                         <asp:BoundField DataField="Role" HeaderText="Role Name" >\r
68                             <HeaderStyle HorizontalAlign="Left" />\r
69                         </asp:BoundField>\r
70                         <asp:HyperLinkField DataNavigateUrlFields="Role" DataNavigateUrlFormatString="ManageRole.aspx?Role={0}"\r
71                             HeaderText="Add\Remove Role" Text="Manage" >\r
72                             <HeaderStyle HorizontalAlign="Left" />\r
73                         </asp:HyperLinkField>\r
74                         <asp:TemplateField>\r
75                             <ItemTemplate>\r
76                                   <custom:GridButton ID="grid_btn" runat="server" User='<%# Bind("Role") %>' OnClick="gridbtn_click"  >Delete</custom:GridButton>\r
77                             </ItemTemplate>\r
78                         </asp:TemplateField>\r
79                     </Columns>\r
80                     <RowStyle BackColor="#EFF3FB" />\r
81                     <EditRowStyle BackColor="#2461BF" />\r
82                     <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />\r
83                     <PagerStyle BackColor="#2461BF" ForeColor="White" HorizontalAlign="Center" />\r
84                     <HeaderStyle BackColor="#5D7B9D" BorderStyle="Solid" Font-Bold="True" Font-Size="0.9em"\r
85                         ForeColor="White" HorizontalAlign="Center" />\r
86                     <AlternatingRowStyle BackColor="White" />\r
87                 </asp:GridView>\r
88                 <asp:ObjectDataSource ID="ObjectDataSource1" runat="server" DeleteMethod="Delete"\r
89                     SelectMethod="Select" TypeName="Mainsoft.Web.AspnetConfig.RolesDS">\r
90                     <DeleteParameters>\r
91                         <asp:Parameter Name="Role" Type="String" />\r
92                     </DeleteParameters>\r
93                 </asp:ObjectDataSource>\r
94             </td>\r
95         </tr>\r
96     </table>\r
97     </asp:View>\r
98     <asp:View runat="server" ID="yesno" >\r
99     <table class="innertable" width="60%">\r
100         <tr>\r
101             <td style="height: 80px" valign="top">\r
102                 <br />\r
103                     <asp:Image runat="server" id="Img" /> &nbsp;\r
104                     Are you sure you want to delete the role: "<%= Role %>"?\r
105                 <br />\r
106             </td>\r
107         </tr>\r
108         <tr>\r
109             <td align="right" style="background-color:inactivecaptiontext" >\r
110                 <asp:Button ID="yes" runat="server" Text="Yes" style="width:50px" OnClick="Click_Yes" />\r
111                 <asp:Button ID="no" runat="server" Text="No" style="width:50px" OnClick="Click_No" />\r
112             </td>\r
113         </tr>\r
114     </table>\r
115     </asp:View>\r
116     </asp:MultiView>\r
117  </asp:Content>\r
118