<%@ page language="C#" masterpagefile="AdminIndexMaster.master" autoeventwireup="true" inherits="Admin_Admin_Log, mallz" title="系统日志管理" enableEventValidation="false" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">
<script src="Js/Function.js" type="text/javascript"></script>
    <table class="adminheading">
        <tr>
            <th align="left" class="user">管理员操作日志管理</th>
            <td align="right">
                <div style="width: 500px; text-align: right;" >
                </div>
            </td>           
        </tr>
    </table>
    
    <asp:GridView id="GridView1" runat="server" CssClass="adminlist" OnRowDataBound="GridView1_RowDataBound" DataKeyNames="LogID" AutoGenerateColumns="False" >
        <Columns>
        <asp:TemplateField>
            <HeaderTemplate>
                <input type="checkbox" id="selectall" onclick="SelectAllCheckboxes(this,'IDs')" />
            </HeaderTemplate>
            <ItemTemplate>
                <input type="checkbox" name="IDs" id="IDs" value="<%# Eval("LogID") %>" />
            </ItemTemplate>
        </asp:TemplateField>
        <asp:BoundField DataField="OperaTime" HeaderText="时间" />
        <asp:BoundField DataField="Operator" HeaderText="操作人" />
        <asp:BoundField DataField="OperatorIP" HeaderText="IP" />
        <asp:TemplateField  HeaderText="类型">
             <ItemTemplate>
                <asp:Literal ID="LitLogType" Text='<%# Eval("LogType") %>' runat="server" />
             </ItemTemplate>
             <HeaderStyle Width="15%" />
        </asp:TemplateField>
        <asp:BoundField DataField="AppModule" HeaderText="模块"/>
        <asp:BoundField DataField="OperatObject" HeaderText="描述"/>
        <asp:TemplateField HeaderText="操作">
            <ItemTemplate>
               <asp:LinkButton id="btnDelete" runat="server" OnCommand="btnDelete_OnCommand" Text="删除" CommandArgument='<%# Eval("LogID") %>' OnClientClick="return confirm('确定删除吗?')"/> 
            </ItemTemplate>
        </asp:TemplateField>
        </Columns>
        <EmptyDataTemplate>
            暂无记录
        </EmptyDataTemplate>
    </asp:GridView>
    <div class="page"><asp:Label ID="PagePanel" runat="server" /></div>
    
    <div style="text-align:center; margin:5px;">
        <asp:Button ID="Button1" runat="server" Text="批量删除" OnClick="DeleteAllLog" OnClientClick="return confirm('系统自动保留1天内的数据！确定删除吗？')"/>
        
        删除<asp:TextBox ID="Days" runat="server" Width="40px" />天前记录<asp:Button ID="Button2" OnCommand="DeleteLogByDate" runat="server" Text=" 确 定 " OnClientClick="return confirm('系统自动保留一天内数据！确定删除吗？')" />
    </div>
    
    <div style="text-align:left; margin:5px;">
    注：系统默认保留1天内的数据。
    </div>
    
</asp:Content>

