<%@ Page Language="c#" CodeBehind="UserGroup.aspx.cs" AutoEventWireup="True" Inherits="SWTraining.Admin.UserGroup"
    Title="系统设置-用户组设置" %>

<%@ Import Namespace="SWTraining" %>
<!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 media="all" type="text/css">
        .Hidden
        {
            display: none;
            visibility: hidden;
        }
    </style>
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div class="tool_Search">
        用户组名：<asp:TextBox ID="UserGroupName" runat="server"></asp:TextBox>
        <label class="lab_buttom">
<asp:Button ID="btnAdd" runat="server" Text="增加" OnClick="btnAdd_Click"></asp:Button>
</label>
    </div>
    <div class="both">
    </div>
    <div class="divpanel">
        <asp:GridView ID="GridView1" runat="server" CssClass="gridview" AutoGenerateColumns="False"
            DataKeyNames="UserGroupID" OnRowCommand="GridView1_RowCommand" OnRowCreated="GridView1_RowCreated"
            OnRowDeleting="GridView1_RowDeleting" OnRowDataBound="GridView1_RowDataBound">
            <Columns>
                <asp:BoundField DataField="UserGroupID" ReadOnly="True" HeaderText="组号" />
                <asp:TemplateField HeaderText="用户组名">
                    <ItemTemplate>
                        <%#ShowUserGroup(Eval("UserGroupID"), Eval("UserGroupName") + "(" + Eval("UserCount") + ")", Eval("SysRole"), string.Format("PostUserGroup.aspx?UserGroupID={0}&GetURL={1}", Eval("UserGroupID"), swq.Web.PathAndQuery()))%>
                        <%--                            <asp:HyperLink ID="hlkEdit" runat="server" Text='<%# Eval("UserGroupName") + "("+Eval("UserCount")+")" %>'
                                NavigateUrl='<%# string.Format("PostUserGroup.aspx?UserGroupID={0}&GetURL={1}",Eval("UserGroupID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>--%>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="说明">
                    <ItemTemplate>
                        <%# Eval("Remark") %>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="排序">
                    <ItemTemplate>
                        <asp:LinkButton ID="btnUp" runat="server" CommandName="Up" Text="↑"></asp:LinkButton>
                        <asp:LinkButton ID="btnDo" runat="server" CommandName="Do" Text="↓"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="编辑">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlkEdit2" runat="server" Text="编辑" NavigateUrl='<%# string.Format("PostUserGroup.aspx?UserGroupID={0}&GetURL={1}",Eval("UserGroupID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="删除">
                    <ItemTemplate>
                        <asp:LinkButton ID="lbnDelete" runat="server" Text="删除" CommandName="delete" OnClientClick="<%# Rs.Messages.确定删除%>"></asp:LinkButton>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="权限">
                    <ItemTemplate>
                        <asp:HyperLink ID="hlkPurview" runat="server" Text="权限" NavigateUrl='<%# string.Format("Purview.aspx?UserGroupID={0}&GetURL={1}",Eval("UserGroupID"),swq.Web.PathAndQuery()) %>'></asp:HyperLink>
                    </ItemTemplate>
                </asp:TemplateField>
            </Columns>
        </asp:GridView>
    </div>
    <div id="sw_pagercontrol">
        <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
    </div>
    </div>
    </form>
</body>
</html>
