<%@ page language="C#" masterpagefile="~/HL_Admin/AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_AdminGroup, HoWaveVGO" title="权限组管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
    <asp:ScriptManager id="ScriptManager1" runat="server" EnablePartialRendering="true">
    </asp:ScriptManager>
    <table class="adminheading">
        <tr>
            <th align="left" class="user">
                管理员管理</th>
            <td align="right">
                <div style="width: 500px; text-align: right;"  >
                   <a href="Admin_Administrator.aspx">管理员管理</a>&nbsp;|&nbsp;
                   <asp:LinkButton ID="LinkButton1" runat="server" PostBackUrl="Admin_AddAdminGroup.aspx">新增权限组</asp:LinkButton><br />
                </div>
            </td>           
        </tr>
    </table>
    <asp:ObjectDataSource ID="ObjectDataSource2" runat="server"
       SelectMethod="GetAllAdminGroup" TypeName="AdminGroupBill">
    </asp:ObjectDataSource>

        <asp:UpdatePanel id="UpdatePanel2" runat="server">
            <contenttemplate>
                <asp:ObjectDataSource id="ObjectDataSource1" runat="server" SelectMethod="GetAllAdminGroup" TypeName="AdminGroupBill"/>
                <asp:GridView id="GridView1" runat="server" CssClass="adminlist" EnableViewState="False" OnRowDataBound="GridView1_RowDataBound" DataSourceID="ObjectDataSource1" DataKeyNames="AdminGourpID" AutoGenerateColumns="False" Width="100%"><Columns>
                <asp:BoundField ReadOnly="True" DataField="AdminGourpID" InsertVisible="False" SortExpression="Admin_ID" HeaderText="组ID"/>
                <asp:BoundField DataField="AdminGroupName" SortExpression="UserName" HeaderText="组名称"/>
                <asp:TemplateField  HeaderText="类型">
                <ItemTemplate>
                <asp:Literal ID="ShopRecommend" Text='<%# (Convert.ToInt32(Eval("Access"))==1)?"超级管理员组":"普通管理员组" %>' runat="server" />
                 </ItemTemplate>
                 <HeaderStyle Width="15%" />
                 </asp:TemplateField>
                 <asp:BoundField DataField="remark" HeaderText="备注"/>
                <asp:HyperLinkField HeaderText="操作" DataTextField="AdminGourpID" DataTextFormatString="修改" DataNavigateUrlFormatString="Admin_AddAdminGroup.aspx?AdminGroupID={0}" DataNavigateUrlFields="AdminGourpID"/>
                <asp:TemplateField HeaderText="删除">
                <ItemTemplate>
                   <asp:LinkButton id="btnDelete" runat="server" OnCommand="DeleteAdminGroup" Text="删除" CommandName='<%# Eval("AdminGourpID") %>' OnClientClick="return confirm('您真的要删除?')"/> 
                </ItemTemplate>
                </asp:TemplateField>
                </Columns>
                <EmptyDataTemplate>
                       <tr>
				         <th scope="col">组ID</th><th scope="col">组名称</th><th scope="col" style="width:15%;">类型</th><th scope="col">备注</th><th scope="col">操作</th><th scope="col">删除</th>
			           </tr>
			           <tr>
			             <td colspan="6">暂无记录</td>
			           </tr>
                       </EmptyDataTemplate>
                </asp:GridView> 
            </contenttemplate>
        </asp:UpdatePanel>
    
</asp:Content>

