<%@ Page Language="c#" CodeBehind="Purview.aspx.cs" AutoEventWireup="True" Inherits="MTCUN.Admin.Purview"
    Title="组权限设置-系统" %>

<%@ Import Namespace="MTCUN" %>
<!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 runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
    <style type="text/css">
        .CheckBox label
        {
            width: 180px;
        }
        .style1
        {
            width: 100%;
        }
        .style2
        {
            width: 74px;
        }
    </style>
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="divpanel">
        <table cellspacing="0" class="table">
            <tr>
                <th>
                    用户组权限
                </th>
            </tr>
            <tr>
                <td>
                    组名：<asp:Label ID="labUserGroupName" runat="server"></asp:Label>
                </td>
            </tr>
            <tr>
                <td>
                    <table cellpadding="0" cellspacing="0" class="style1">
                        <tr>
                            <td class="style2">
                                系统角色：
                            </td>
                            <td>
                                <asp:DropDownList ID="ddlSysRole" runat="server">
                                    <asp:ListItem Value="0">无</asp:ListItem>
                                    <asp:ListItem Value="1">超级管理员</asp:ListItem>
                                    <asp:ListItem Value="2">顾问</asp:ListItem>
                                    <asp:ListItem Value="3">教师</asp:ListItem>
                                </asp:DropDownList>

                            </td>
                        </tr>
                    </table>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Repeater ID="repGroup" runat="server" OnItemDataBound="repGroup_ItemDataBound">
                        <ItemTemplate>
                            <div id="class1" runat="server">
                                <div style="font-weight: bold">
                                    <%#Eval("PurviewGroupName")%>模块权限</div>
                                <asp:Repeater ID="repRole" runat="server" DataSource='<%#pd.GetRole((int)Eval("PurviewGroupID")) %>' OnItemDataBound="repRole_ItemDataBound">
                                    <ItemTemplate>
                                        <div class="bgc5 borderc2" style="border-width: 1px; margin: 4px; padding: 4px" id="class2" runat="server">
                                            <div style="float: left; width: 120px; vertical-align: middle; text-align: center">
                                                <%#Eval("RoleName")%></div>
                                            <div style="float: left;">
                                                <asp:CheckBoxList ID="cblPurview" runat="server" DataSource='<%#pd.GetPurview(0,(int)Eval("RoleID")) %>' OnDataBound="cblPurview_DataBound"
                                                    DataValueField="PurviewID" DataTextField="PurviewName" RepeatDirection="Horizontal"
                                                    RepeatColumns="3" CssClass="CheckBox">
                                                </asp:CheckBoxList>
                                            </div>
                                            <div style="clear: both">
                                            </div>
                                        </div>
                                    </ItemTemplate>
                                </asp:Repeater>
                            </div>
                        </ItemTemplate>
                    </asp:Repeater>
                </td>
            </tr>
            <tr>
                <td>
                    <label class="lab_button">
                        <asp:Button ID="btnAllSelect" runat="server" Text="全选" OnClick="btnAllSelect_Click">
                        </asp:Button>
                    </label>
                    <label class="lab_button">
                        <asp:Button ID="btnSave" runat="server" Text="保存" OnClick="btnSave_Click"></asp:Button>
                    </label>
                </td>
            </tr>
        </table>
    </div>
    <div class="backpanel">
        <label class="lab_button" id="__mt_labBack" runat="server">
            <input causesvalidation="false" type="button" runat="server" onclick="back(this)" value="返回" />
        </label>
    </div>
    </form>
</body>
</html>
