<%@ Page Language="c#" CodeBehind="SysLog.aspx.cs" AutoEventWireup="True" Inherits="SWTraining.Admin.SysLog"
    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 id="Head1" runat="server">
    <link id="linkStyle" runat="server" href="../Themes/Blue/css.css" rel="stylesheet"
        type="text/css" />
</head>
<body>
    <form id="Form1" method="post" runat="server">
    <div id="sw_content">
        <div class="divpanel">
            事件类型：<asp:DropDownList ID="ddlType" runat="server" AutoPostBack="True" OnSelectedIndexChanged="Type_SelectedIndexChanged">
                <asp:ListItem Value="0" Text="全部"></asp:ListItem>
                <asp:ListItem Value="1" Text="登录"></asp:ListItem>
                <asp:ListItem Value="2" Text="更新"></asp:ListItem>
                <asp:ListItem Value="3" Text="删除"></asp:ListItem>
                <asp:ListItem Value="4" Text="备份"></asp:ListItem>
            </asp:DropDownList>
        </div>
        <div class="divpanel">
            <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="SysLogID"
                CssClass="gridview" OnRowDeleting="GridView1_RowDeleting">
                <Columns>
                    <asp:BoundField DataField="SysLogID" HeaderText="编号" />
                    <asp:BoundField DataField="TrueName" HeaderText="姓名" />
                    <asp:TemplateField HeaderText="事件">
                        <ItemTemplate>
                            <%#Rs.Items.GetLogType(Eval("SysLogType")) %>
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="DateAndTime" HeaderText="时间" />
                    <asp:BoundField DataField="IP" HeaderText="IP" />
                    <asp:BoundField DataField="SchoolName" HeaderText="校区" />
                    <asp:BoundField DataField="SourceURL" HeaderText="来源" />
                    <asp:TemplateField HeaderText="删除">
                        <ItemTemplate>
                            <asp:LinkButton ID="btnDelete" runat="server" Text="删除" OnClientClick="<%# Rs.Messages.确定删除%>"
                                CommandName="Delete"></asp:LinkButton>
                        </ItemTemplate>
                    </asp:TemplateField>
                </Columns>
            </asp:GridView>
        </div>
        <div style="text-align: right">
            <asp:Button ID="btnDelete" runat="server" Text="删除全部" OnClientClick="return confirm('你是否确定删除全部日志记录？')"
                OnClick="btnDelete_Click"></asp:Button>
        </div>
        <div class="divpanel">
            <asp:Literal ID="litPagerButton" runat="server"></asp:Literal>
        </div>
    </div>
    </form>
</body>
</html>
