<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="True" Inherits="Kesion.NET.WebSite.Course.Admin_Course_KS_CsZlLog" CodeBehind="KS.CsZlLog.aspx.cs" %>

<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>

<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="Server">

    <script>
        function SetDate() {
            var today = new Date();
            if ($("#showdate").is(":hidden")) {
                $("#showdate").show();
                $('#<%=TxtBeginDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-01');
             $('#<%=TxtEndDate.ClientID%>').val(today.getFullYear() + '-' + (today.getMonth() + 1) + '-' + today.getDate());
         }
         else {
             $("#showdate").hide();
             $('#<%=TxtBeginDate.ClientID%>').val('');
             $('#<%=TxtEndDate.ClientID%>').val('');
         }
     }
     function keyWordFocus() {
         if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '请输入关键字！') {
             jQuery("#<%=this.KeyWord.ClientID %>").val('');
         }
     }
     function keyWordBlur() {
         if (jQuery("#<%=this.KeyWord.ClientID %>").val() == '') {
        jQuery("#<%=this.KeyWord.ClientID %>").val('请输入关键字！');
    }
}
    </script>
    <asp:Panel ID="ListPanel" runat="server" Width="100%">
          <!--<KS:TopNav ID="TopNav1" runat="server" Text="资料管理" />-->
<div class="content-area mt20">
        <div class="myTitle">学员资料下载记录<!--<asp:Label ID="LabNav" runat="server" ></asp:Label>--></div>
        <div class="quickSearch clearfix">
            <div class="SearchBox fl">
                <%--资料名称：<asp:TextBox CssClass="textbox" ID="TextBox1" runat="server"></asp:TextBox>
                下载用户：<asp:TextBox CssClass="textbox" ID="TxtKeyWord" runat="server"></asp:TextBox>--%>
        
                <asp:DropDownList ID="Condition" runat="server" style="margin-right:8px;">
                    <asp:ListItem Value="1">资料名称</asp:ListItem>
                    <asp:ListItem Value="2">课程名称</asp:ListItem>
                    <asp:ListItem Value="3">下载用户</asp:ListItem>
                    <asp:ListItem Value="4">下载次数</asp:ListItem>
        
                </asp:DropDownList>
                <asp:TextBox onfocus="keyWordFocus();" onblur="keyWordBlur();" Style="color: #ccc" Text="请输入关键字！" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
        
                <b onclick="SetDate()" class="link-color">日期范围？</b>
                <span id="showdate" <%if (this.TxtBeginDate.Text == "")
                                      { %>
                    style="display: none" <%} %>>
                    <asp:TextBox ID="TxtBeginDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>至
                   <asp:TextBox ID="TxtEndDate" placeholder="格式：YYYY-MM-DD" Width="150px" runat="server" onclick="WdatePicker({dateFmt:&#39;yyyy-MM-dd&#39;});" CssClass="textbox Wdate"></asp:TextBox>
                </span>
                <asp:Button ID="Button1" runat="server" Text="开始搜索" CssClass="button" OnClick="Button1_Click" />
            </div>
        </div>
        <asp:Repeater ID="Repeater1" runat="server">
            <HeaderTemplate>
                <table width="99%" border="0" cellpadding="1" cellspacing="1" class="CTable">
                    <tr class="CTitle">
                        <td width="7%"><b>序号</b></td>
                        <td width="25%"><b>资料名称</b></td>
                        <td ><b>课程名称</b></td>
                        <td width="10%"><b>下载用户</b></td>
                        <td width="7%"><b>下载次数</b></td>
                        <td width="12%"><b>下载时间</b></td>
                        <% if (BaseFun.CheckModulePower("school"))
                           {%>
                        <td width="10%"><b>上传者</b></td>
                        <%} %>
                    </tr>
            </HeaderTemplate>
            <ItemTemplate>

                <tr height="35" class="tdbg">
                    <td style="text-align: center">
                        <%# Container.ItemIndex + 1%>
                    </td>
                    <td>
                        <%# Eval("ZLName") %>               
                    </td>
                    <td>
                        <%# Eval("coursename") %>               
                    </td>
                    <td style="text-align: center">
                        <%# Eval("UserName") %>
                    </td>
                    <td style="text-align: center">
                        <%# Eval("times")%> 
                    </td>
                    <td style="text-align: center">
                        <%# Eval("adddate") %>
                    </td>
                    <% if (BaseFun.CheckModulePower("school"))
                       {%>
                    <td style="text-align: center">
                        <%# Eval("inputer") %>
                    </td>
                    <%} %>
                </tr>
            </ItemTemplate>
            <FooterTemplate>
                <tr class="tdbg" style="display: <%# bool.Parse((Repeater1.Items.Count==0).ToString())?"":"none"%>">
                    <td class="Ctd" style="height: 40px; line-height: 40px; text-align: center" colspan="7">没有学员下载记录!                  
                    </td>
                </tr>
                </table>
            </FooterTemplate>
        </asp:Repeater>
        <br />
        <KS:Page ID="Page1" runat="server" />
    </asp:Panel>
 </div>   
</asp:Content>
