SysManageRole.aspx
上传用户:tiancihang
上传日期:2014-03-12
资源大小:21387k
文件大小:14k
源码类别:

.net编程

开发平台:

C#

  1. <%@ page language="C#" autoeventwireup="true" inherits="SysManage_SysManageRole, App_Web_2n6c6zuv" theme="Normal" %>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server">     <title>无标题页</title>      <link href="style/gridStyle.css" rel="stylesheet" type="text/css" />      <script>
  3.   
  4.     function modelesswin(url,mwidth,mheight)
  5.      {
  6.        if (document.all&&window.print)
  7.           var returnValue=window.showModalDialog(url,"","help:0;dialogWidth:'+mwidth+'px;dialogHeight:'+mheight+'px,location=no, status=no;");
  8. //          window.open(url,"","height="+mheight+",width="+mwidth+",top=159,left=262,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=no");
  9.           if (returnValue!=undefined && returnValue=='btok')
  10.           {
  11.             window.location.reload();
  12.           }
  13.      }
  14.      
  15.     </script>      <script type="text/javascript" language="javascript" src="../js/calendar.js"></script> </head> <body>     <form id="form1" runat="server">           <TABLE width="100%" height="100%" border="0" cellPadding="0" cellSpacing="0" >        <tr>           <td bgColor="#f7f7f7" style="height: 25px; width: 100%;">              <strong>&nbsp;&nbsp;角色管理 < ></strong>           </td>                        </tr>        <tr>          <td style="height: 5px; width: 100%;">  <img src="../Images/add.gif" height="15" align="absmiddle">
  16.     <a href="javascript: modelesswin('AddRole.aspx',500,450)">新建角色</a></td>              </tr>        <tr>          <td style="height: 10px; width: 100%;">                <asp:DropDownList ID="DDL_Condition" runat="server" Width="134px">                 <asp:ListItem Value="1" Text="角色名称"></asp:ListItem>                 <asp:ListItem Value="2" Text="创建者"></asp:ListItem>              </asp:DropDownList><asp:TextBox ID="TB_Condition" runat="server" Width="250px"></asp:TextBox><asp:CheckBox ID="CB_Blur" runat="server" Text="模糊查询" />
  17.     <asp:ImageButton ID="ImageButton1" runat="server" ImageUrl="~/Images/Search.gif" OnClick ="ImageButton1_Click"
  18.         Width="47px" Height="20px" /></td>         </tr>        <tr>         <td style="text-align: right; width: 100%;">              <%--<asp:GridView ID="GridView1" runat="server" Width ="100%" AutoGenerateColumns="false" DataKeyNames="RoleID" SkinID="GridViewSkin"                         HeaderStyle-ForeColor="black"    HeaderStyle-Font-Underline="false"   AllowPaging="True" AllowSorting="True"                         PageSize="6" OnRowEditing="GridView1_RowEditing" OnRowDeleting="GridView1_RowDeleting" OnPageIndexChanging="GridView1_PageIndexChanging">--%>                           <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="RoleID" BackColor="#CDCDCF" BorderWidth="0px"
  19.                             CssClass="Grid"  SelectedRowStyle-CssClass="SelectedRow" HeaderStyle-CssClass="GridHeader" RowStyle-CssClass="HeadingCellText" 
  20.                     FooterStyle-CssClass="GridFooter"  ShowFooter="true" CellSpacing="1" CellPadding="0" OnRowDataBound="GridView1_RowDataBound"  Width="100%" 
  21.                             OnRowDeleting="GridView1_RowDeleting"  OnRowEditing="GridView1_RowEditing"  
  22.                             HeaderStyle-ForeColor="black"   HeaderStyle-Font-Size="12px"  HeaderStyle-Font-Underline="false"   AllowPaging="True" AllowSorting="True"  OnPageIndexChanging="GridView1_PageIndexChanging">
  23.                            <AlternatingRowStyle BackColor="#F0F0F0" />
  24.             <RowStyle BackColor="#F9FAFC" CssClass="HeadingCellText" />                                <Columns>                                         <asp:BoundField DataField="RoleID" HeaderText="角色ID" Visible =false>                                            <HeaderStyle Width="15%"/>                                         </asp:BoundField>                                         <asp:BoundField DataField="RoleName" HeaderText="角色名称">                                            <HeaderStyle Width="15%"/>                                         </asp:BoundField>                                         <asp:BoundField DataField="CreateRole" HeaderText="创建者">                                             <HeaderStyle Width="15%"/>                                         </asp:BoundField>    <%--                                      <asp:BoundField DataField="UserRole" HeaderText="使用者">                                             <HeaderStyle Width="11%" />                                         </asp:BoundField>--%>                                         <asp:BoundField DataField="RoleDesc" HeaderText="角色描述">                                             <HeaderStyle Width="25%"/>                                         </asp:BoundField>                                          <asp:TemplateField HeaderText="操 作">                                              <ItemTemplate>                                             &nbsp; &nbsp; <asp:ImageButton ID="IB_Edit" ToolTip="编辑" runat="server" CommandName="edit" ImageUrl="~/images/s_edit.gif"/> &nbsp; &nbsp;                                                 <asp:ImageButton ToolTip="删除" ID="IB_Del" runat="server" CommandName="Delete" ImageUrl="~/images/s-del.gif"                                                     OnClientClick='<%#"return confirm("确认删除角色编号为『"+Eval("RoleID")+"』的记录吗?");" %>'/>                                                                                                                                                   </ItemTemplate>                                             <HeaderStyle Width="10%" HorizontalAlign="Left"/>                                             <ItemStyle HorizontalAlign="Left"  BorderWidth="0px"/>                                         </asp:TemplateField>                                     </Columns>                                    <FooterStyle CssClass="GridFooter" />
  25.                         <PagerStyle CssClass="GridPage" />
  26.                                     <PagerTemplate>
  27.                                         <asp:Label  ID="LabelCurrentPage" runat="server">当前页:<%# ((GridView)Container.NamingContainer).PageIndex + 1 %></asp:Label>&nbsp; &nbsp;
  28.                                         <asp:Label ID="LabelPageCount" runat="server" >总页数:<%# ((GridView)Container.NamingContainer).PageCount %></asp:Label>&nbsp; &nbsp;
  29.                                         <asp:LinkButton ID="LinkButtonFirstPage" runat="server" CommandArgument="First" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">首页</asp:LinkButton>&nbsp; &nbsp;
  30.                                         <asp:LinkButton ID="LinkButtonPreviousPage" runat="server" CommandArgument="Prev" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != 0 %>">上一页</asp:LinkButton>&nbsp; &nbsp;
  31.                                         <asp:LinkButton ID="LinkButtonNextPage" runat="server" CommandArgument="Next" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">下一页</asp:LinkButton>&nbsp; &nbsp;
  32.                                         <asp:LinkButton ID="LinkButtonLastPage" runat="server" CommandArgument="Last" CommandName="Page" Enable="<%# ((GridView)Container.NamingContainer).PageIndex != ((GridView)Container.NamingContainer).PageCount - 1 %>">尾页</asp:LinkButton>&nbsp; &nbsp;
  33.                                         转到第:<asp:TextBox ID="LinkTextBoxNewPage" runat="server" Width="20px" Text='<%# ((GridView)Container.Parent.Parent).PageIndex + 1 %>'></asp:TextBox>页&nbsp; &nbsp;
  34.                                         <asp:RangeValidator ID="RangeValidator1" runat="server" ErrorMessage="0-99999" ValidationGroup="goto" ControlToValidate="LinkTextBoxNewPage"
  35.                                          MaximumValue="99999" MinimumValue="0" Display="Dynamic" ></asp:RangeValidator>
  36.                                         <asp:linkbutton id="btnGo" runat="server" causesvalidation="False" commandargument="-1" commandname="Page" text="GO" ValidationGroup="goto" /> 
  37.                                     </PagerTemplate>
  38.                                                                       <EmptyDataTemplate>                                      <center class="EmpetyData"> 系统提示:无用户数据,您可以新增用户数据。</center>                                    </EmptyDataTemplate>                                               </asp:GridView>
  39.             
  40.             <%--<tr>
  41.                 <td style="width: 100%">
  42.                     <table border="0" cellpadding="0" cellspacing="0" class="tablestyle" width="100%">
  43.                         <tr class="head">
  44.                             <td style="height: 18px">
  45.                                 <strong>角色管理</strong></td>
  46.                         </tr>
  47.                         <tr class="headtwo">
  48.                             <td>
  49.                             </td>
  50.                         </tr>
  51.                         <tr>
  52.                             <td>
  53.              <asp:FormView runat="server" ID="FormView1" Width="100%" SkinID="FormViewSkin" DefaultMode="Insert" DataKeyNames="RoleID">
  54.                 <InsertItemTemplate>
  55.                      <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tablecontect">
  56.             <tr>
  57.                           <td class="spec" width="10%">角色名称</td>
  58.                           <td width="35%"><div align="left">
  59.                           <asp:TextBox ID="TB_sRole_Name" runat="server" CssClass="default" Text='<%# Bind("RoleName") %>'   Width="300px"></asp:TextBox>
  60.                             <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="必填" ControlToValidate="TB_sRole_Name" ValidationGroup="SaveButton" Display="Dynamic"></asp:RequiredFieldValidator>
  61.                             </div></td>
  62.               <td class="spec" width="10%">角色描述</td>
  63.                           <td><div align="left">
  64.                             <asp:TextBox ID="TB_sRole_Desc" runat="server" CssClass="default" Text='<%# Bind("RoleDesc") %>'
  65.                                                     Width="300px"></asp:TextBox>
  66.                             </div></td>
  67.                         </tr>
  68.             <tr>
  69.                           <td class="spec" width="10%">
  70.                               创建角色</td>
  71.                           <td width="35%" align="left">
  72.                                                    
  73.                              <asp:DropDownList ID="DDL_CreateRole" runat="server" Width="306px">
  74.                  </asp:DropDownList>
  75.                          
  76.                         </td>
  77.               <td class="spec" width="10%">
  78.                               使用角色</td>
  79.                           <td align="left">
  80.                                <asp:DropDownList ID="DDL_UserRole" runat="server" Width="306px">
  81.                    </asp:DropDownList>
  82.                             </td>
  83.                         </tr>
  84.                         
  85.                     </table>
  86.                 </InsertItemTemplate>
  87.                 <EditItemTemplate>
  88.                     <table width="100%" border="0" cellpadding="0" cellspacing="0" class="tablecontect">
  89.             <tr>
  90.                           <td class="spec" width="10%">角色名称</td>
  91.                           <td width="35%"><div align="left">
  92.                           <asp:TextBox ID="TB_sRole_Name" runat="server" CssClass="default" Text='<%# Bind("RoleName") %>'   Width="300px"></asp:TextBox>
  93.                             <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="必填" ControlToValidate="TB_sRole_Name" ValidationGroup="SaveButton" Display="Dynamic"></asp:RequiredFieldValidator>
  94.                             </div></td>
  95.               <td class="spec" width="10%">角色描述</td>
  96.                           <td><div align="left">
  97.                             <asp:TextBox ID="TB_sRole_Desc" runat="server" CssClass="default" Text='<%# Bind("RoleDesc") %>'
  98.                                                     Width="300px"></asp:TextBox>
  99.                             </div></td>
  100.                         </tr>
  101.             <tr>
  102.                           <td class="spec" width="10%">
  103.                               创建角色</td>
  104.                           <td width="35%" align="left">
  105.                                                    
  106.                              <asp:DropDownList ID="DDL_CreateRole" runat="server" Width="306px">
  107.                  </asp:DropDownList>
  108.                          
  109.                         </td>
  110.               <td class="spec" width="10%">
  111.                               使用角色</td>
  112.                           <td align="left">
  113.                                <asp:DropDownList ID="DDL_UserRole" runat="server" Width="306px">
  114.                    </asp:DropDownList>
  115.                             </td>
  116.                         </tr>
  117.                         
  118.                     </table>
  119.                 </EditItemTemplate>
  120.             </asp:FormView>
  121.                            </td>
  122.                         </tr>
  123.                         <tr height ="15px">
  124.                             <td style="height: 15px">
  125.                             </td>
  126.                         </tr>                                                  </table>         </tr>--%>  <%--      <tr>                <td align="center"><asp:ImageButton ID="ImageButton2" runat="server" ImageUrl="~/Images/queding.gif" OnClick="ImageButton2_Click" /></td>        </tr>--%>         </TABLE>     </form> </body> </html>