<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="HL_Admin_Admin_Administrator, WebApp_deploy" title="管理员管理" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
 <table class="adminheading">
   <tr>
      <th  class="user" align="left">管理员管理</th>   
      <td align="right">
          <div style="width:500px; text-align:right">
             <a href="Admin_AdminGroup.aspx">权限组管理</a>&nbsp;|&nbsp;
             <asp:LinkButton ID="LinkButton3" runat="server" PostBackUrl="Admin_AddAdmin.aspx">新增管理员</asp:LinkButton>
          </div>
      </td>                    
   </tr>
</table>

    <asp:GridView ID="GridView1" CssClass="adminlist" runat="server" AutoGenerateColumns="False" DataKeyNames="Admin_ID" OnRowDataBound="GridView1_RowDataBound"  EnableViewState="false">
        <Columns>
            <asp:BoundField DataField="Admin_ID" HeaderText="ID" InsertVisible="False" ReadOnly="True"
                SortExpression="Admin_ID"/>                               
                 <asp:BoundField DataField="UserName" HeaderText="管理员名" SortExpression="UserName"/>                              
                <asp:TemplateField  HeaderText="类型">
                <ItemTemplate>
                <asp:Literal ID="type" Text='<%# (Convert.ToInt32(Eval("Access"))==1)?"超级管理员":"普通管理员" %>' runat="server" />
                 </ItemTemplate>
                 <HeaderStyle   />
                 </asp:TemplateField>   
                  <asp:TemplateField  HeaderText="状态">
                <ItemTemplate>
                <asp:Literal ID="Disable" Text='<%# (Convert.ToInt32(Eval("Disable"))==1)?"禁用":"启用" %>' runat="server" />
                 </ItemTemplate>
                 <HeaderStyle   />
                 </asp:TemplateField>   
                  <asp:BoundField DataField="EndDate" HeaderText="结束日期" 　/>                                
                 <asp:BoundField DataField="LoginTimes" HeaderText="登录次数" SortExpression="LoginTimes"/>                                
                 <asp:BoundField DataField="LastLogin" HeaderText="最后登录时间" SortExpression="LastLogin"/>                               
                 <asp:BoundField DataField="LastLoginIP" HeaderText="最后登录IP" SortExpression="LastLoginIP"/>                               
                 <asp:BoundField DataField="AcceptIP" HeaderText="允许登录IP" SortExpression="AcceptIP"/>                                                      
                 <asp:TemplateField HeaderText="操作">                                             
                    <ItemTemplate>
                       <asp:HyperLink ID="modifybtn" NavigateUrl='<%#"Admin_AddAdmin.aspx?AdminID="+Eval("Admin_ID")%>' runat="server" Text="修改" />  
                       <asp:LinkButton id="btnDelete" runat="server" OnClientClick ="return confirm('您真的要删除?')" CommandName='<%# Eval("Admin_ID") %>' Text="删除" OnCommand="DeleteAdmin"/> 
                   </ItemTemplate> 
                 </asp:TemplateField>  
         </Columns>
       <EmptyDataTemplate>
       <tr>
         <th scope="col">管理员ID</th><th scope="col">管理员名</th><th scope="col">类型</th><th scope="col">类型</th><th scope="col">结束日期</th><th scope="col">登录次数</th><th scope="col">最后登录时间</th><th scope="col">最后登录IP</th><th scope="col">允许登录IP</th><th scope="col">操作</th><th scope="col">删除</th>
       </tr>
       <tr>
         <td colspan="11">暂无记录</td>
       </tr>
       </EmptyDataTemplate>
                     <RowStyle HorizontalAlign="Center" />
 </asp:GridView>
</asp:Content>

