<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="rolemanage.aspx.cs" Inherits="FangPage.Admin.rolemanage" %>

<%@ Register TagPrefix="cc1" Namespace="FangPage.Control" Assembly="FangPage.Control" %>
<%@ Register Src="UserControls/PageInfo.ascx" TagName="PageInfo" TagPrefix="uc1" %>
<!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">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>系统角色管理</title>
    <link href="styles/datagrid.css" type="text/css" rel="stylesheet" />
    <link href="styles/bmsmanager.css" type="text/css" rel="stylesheet" />

    <script type="text/javascript" src="js/common.js"></script>

    <script type="text/javascript" src="js/modalpopup.js"></script>

</head>
<body>
    <form id="form1" runat="server">

    <script type="text/javascript">showhint(0, '提示：请勿随意更改系统角色，系统角色和已使用中的用户角色不能删除。');</script>

    <div class="Navbutton" style="width: 98%;">
        <table cellspacing="1" cellpadding="4" align="left" class="table1">
            <tr>
                <td align="left">
                    <input title="选中/取消选中 本页所有Case" onclick="CheckAll(this.form)" type="checkbox" name="chkall"
                        id="chkall" />全选/取消全选 &nbsp;
                    <cc1:Button ID="DelRec" runat="server" Text=" 删 除 " 
                        ButtonImgUrl="images/dell.gif" onclick="DelRec_Click">
                    </cc1:Button>&nbsp;
                    <button type="button" class="ManagerButton" onclick="javascript:window.location.href='roleadd.aspx';">
                        <img src="images/add.gif" />
                        新 建
                    </button>
                </td>
            </tr>
        </table>
    </div>
    <cc1:DataGrid ID="DataGrid1" runat="server" AllowPaging="false">
        <Columns>
           <asp:TemplateColumn HeaderText="选择">
                <ItemTemplate>
                    <input id="selid" onclick="javascript:SH_SelectOne(this)" type="checkbox" value="<%# DataBinder.Eval(Container, "DataItem.roleid").ToString() %>"
                        name="selid" />
                    <%# DataGrid1.LoadSelectedCheckBox(DataBinder.Eval(Container, "DataItem.roleid").ToString())%>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="roleid" HeaderText="roleid" Visible="false"></asp:BoundColumn>
            <asp:BoundColumn DataField="roleid" HeaderText="角色ID"></asp:BoundColumn>
            <asp:TemplateColumn ItemStyle-HorizontalAlign="Left" HeaderText="角色名称">
                <ItemTemplate>
                    <%# RoleStr(DataBinder.Eval(Container, "DataItem.roleid").ToString())%>
                    <%# DataBinder.Eval(Container, "DataItem.rolename").ToString()%>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:BoundColumn DataField="note" HeaderText="描述"></asp:BoundColumn>
            <asp:TemplateColumn HeaderText="级别">
               <ItemTemplate>
                    <%# GetSystemName(DataBinder.Eval(Container, "DataItem.system").ToString().Trim())%>
                </ItemTemplate>
            </asp:TemplateColumn>
            <asp:TemplateColumn HeaderText="操作">
                <ItemTemplate>
                    <a href="roleedit.aspx?id=<%# DataBinder.Eval(Container, "DataItem.roleid").ToString()%>">
                        编辑</a>
                </ItemTemplate>
            </asp:TemplateColumn>
        </Columns>
    </cc1:DataGrid>
    </form>
</body>
</html>
