<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="RoleAuthorizedPage.aspx.cs"
    Inherits="RedGlovePermission.Web.Admin.Modubles.SysConfig.RoleAuthorizedPage" %>

<!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="../../../Inc/Style/default/css/indexControl.css" rel="stylesheet" type="text/css" />
    <link href="../../../Inc/Style/default/css/GridView.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <div id="divToolBar" class="topBar">
        <div class="toolBar">
        </div>
        <div class="moduleName">
            角色授权</div>
    </div>
    <asp:UpdatePanel ID="CustomPanel1" runat="server">
        <ContentTemplate>
            <div class="gv">
                <div style="float: left;">
                    <asp:DropDownList ID="GroupList" runat="server" AutoPostBack="True" OnSelectedIndexChanged="GroupList_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:Label ID="Rid" runat="server" Text="" Style="display: none;"></asp:Label>
                    <br />
                    <asp:GridView ID="RoleView" Width="100px" runat="server" DataKeyNames="RoleID" AllowSorting="True"
                        OnRowCommand="RoleView_RowCommand" AutoGenerateColumns="False" ShowHeader="False"
                        GridLines="None">
                        <Columns>
                            <asp:BoundField DataField="RoleID" HeaderText="编号" Visible="false">
                                <ItemStyle HorizontalAlign="Center" Wrap="false" />
                            </asp:BoundField>
                            <asp:TemplateField HeaderText="名称">
                                <ItemTemplate>
                                    <asp:LinkButton ID="lbtn_name" CommandArgument='<%# Eval("RoleID")%>' CommandName="EditView"
                                        runat="server" Text='<%# Eval("RoleName") %>' ToolTip='<%# Eval("RoleDescription") %>'></asp:LinkButton>
                                </ItemTemplate>
                                <ItemStyle HorizontalAlign="Left" Width="100px" Height="24px" />
                            </asp:TemplateField>
                        </Columns>
                    </asp:GridView>
                    <div id="GridViewMsg1" style="padding: 5px;" runat="server">
                    </div>
                </div>
                <div style="float: left; margin-left: 10px;">
                    <asp:DropDownList ID="ModuleTypeList" runat="server" Enabled="false" AutoPostBack="True"
                        OnSelectedIndexChanged="ModuleTypeList_SelectedIndexChanged">
                    </asp:DropDownList>
                    <asp:Button ID="btn_AllSave" runat="server" class="button" Text=" 保存全部 " 
                        onclick="btn_AllSave_Click" />
                    <br />
                    <asp:GridView ID="ModuleView" Width="100px" runat="server" DataKeyNames="ModuleID"
                        CssClass="Grid" AllowSorting="True" AutoGenerateColumns="False"
                        OnRowDataBound="ModuleView_RowDataBound" 
                        onselectedindexchanging="ModuleView_SelectedIndexChanging">
                        <FooterStyle CssClass="GridFooter" />
                        <RowStyle CssClass="Row" />
                        <Columns>
                            <asp:TemplateField HeaderText="模块名称">
                                <ItemTemplate>
                                    <asp:Label ID="lab_ID" runat="server" Text='<%# Eval("ModuleID")%>' Style="display: none"></asp:Label>
                                    <asp:LinkButton ID="lbtn_name" CommandArgument='<%# Eval("ModuleID")%>' CommandName="EditView"
                                        runat="server" Text='<%# Eval("ModuleName") %>' ToolTip='<%# Eval("ModuleDescription") %>'></asp:LinkButton>
                                    <asp:Label ID="lab_Verify" runat="server" Text="" Style="display: none"></asp:Label>
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                                <ItemStyle HorizontalAlign="Left" Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="权限列表">
                                <ItemTemplate>
                                    <asp:CheckBoxList ID="AuthorityList" runat="server" RepeatDirection="Horizontal"
                                        RepeatLayout="Flow">
                                    </asp:CheckBoxList>
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                                <ItemStyle Wrap="False" />
                            </asp:TemplateField>
                            <asp:TemplateField HeaderText="">
                                <ItemTemplate>
                                    <asp:LinkButton ID="btn_update" runat="server" CommandArgument='<%# Eval("ModuleID")%>' CausesValidation="False" CommandName="Select"
                                        Text="更新"></asp:LinkButton>
                                </ItemTemplate>
                                <HeaderStyle Wrap="False" />
                                <ItemStyle Wrap="False" />
                            </asp:TemplateField>
                        </Columns>
                        <HeaderStyle CssClass="HeadingCell" />
                        <AlternatingRowStyle BorderStyle="None" CssClass="AlternatingRow" />
                    </asp:GridView>
                    <div id="GridViewMsg2" style="padding: 5px;" runat="server">
                    </div>
                </div>
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
    </form>
</body>
</html>
