<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" CodeBehind="KS.CosLearnRecordStats.aspx.cs" Inherits="Kesion.NET.WebSite.Admin.Course.KS_CosLearnRecordStats" %>

<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="Kesion.APPCode" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">
    <asp:Panel ID="ListPanel" runat="server" Width="100%">
        <div id="manage_top" class="menu_top_fixed">
            <ul>
                <li>
                    <asp:LinkButton ID="LinkButton1" runat="server" OnClick="LinkButton1_Click" CssClass="fr button mr20">导出Excel</asp:LinkButton>
                </li>
            </ul>
        </div>
        <div class="menu_top_fixed_height"></div>
        <div class="content-area">
            <div class="tabs_header longTabs">
                <ul class="tabs">
                    <li <%=KSCMS.S("showtype")==""?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?paystatus=<%=KSCMS.S("paystatus")%>">所有</a></li>
                    <li <%=KSCMS.S("showtype")=="1"?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?showtype=1&paystatus=<%=KSCMS.S("paystatus")%>">已学完</a></li>
                    <li <%=KSCMS.S("showtype")=="2"?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?showtype=2&paystatus=<%=KSCMS.S("paystatus")%>">未学完</a></li>
                </ul>
            </div>
            <div class="quickSearch clearfix">
                <div class="SearchBox fl">
                    <asp:DropDownList ID="DrpSearchType" runat="server" Style="margin-right: 8px;">
                        <asp:ListItem Value="1">课程名称</asp:ListItem>
                        <asp:ListItem Value="2">学员名称</asp:ListItem>
                    </asp:DropDownList>
                    <asp:TextBox Style="color: #ccc" CssClass="textbox" ID="KeyWord" runat="server" Width="180px"></asp:TextBox>
                    <b class="link-color" onclick="SetDate()">日期范围？</b>
                    <asp:Button ID="Button1" runat="server" Text="搜索" CssClass="button" OnClick="Button1_Click" />
                </div>
                <div class="property">
                    <div class="name button ml15">筛选</div>
                    <div class="propertyBox">
                        <ul class="clearfix">
                            <span class="screen fl">类型查看：</span>
                            <li <%=KSCMS.S("paystatus")==""?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?showtype=<%=KSCMS.S("showtype")%>"><span>所有</span></a></li>
                            <li <%=KSCMS.S("paystatus")=="4"?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?paystatus=4&showtype=<%=KSCMS.S("showtype")%>"><span>学习卡</span></a></li>
                            <li <%=KSCMS.S("paystatus")=="2"?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?paystatus=2&showtype=<%=KSCMS.S("showtype")%>"><span>VIP免费</span></a></li>
                            <li <%=KSCMS.S("paystatus")=="5"?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?paystatus=5&showtype=<%=KSCMS.S("showtype")%>"><span>用户组免费</span></a></li>
                            <li <%=KSCMS.S("paystatus")=="7"?" class='active'":string.Empty %>><a href="KS.CosLearnRecordStats.aspx?paystatus=7&showtype=<%=KSCMS.S("showtype")%>"><span>全免费</span></a></li>
                        </ul>
                    </div>
                </div>
            </div>
            <asp:Repeater ID="LearmRecordRepeater" runat="server">
                <HeaderTemplate>
                    <table width="99%" border="0" cellpadding="2" cellspacing="1" class="CTable">
                        <tr align="center" class="CTitle">
                            <td width="20%" align="center"><b>课程名称</b></td>
                            <td width="5%" align="center"><b>课程类型</b></td>
                            <td width="6%" align="center"><b>学员名称  </b></td>
                            <td width="7%" align="center"><b>学习进度</b></td>
                            <td width="10%" align="center"><b>完成日期</b></td>
                            <td width="10%" align="center"><b>IP地址</b></td>
                            <td width="10%" align="center"><b>课学习设备</b></td>
                            <td width="6%" align="center" nowrap><b>详情</b></td>
                        </tr>
                </HeaderTemplate>
                <ItemTemplate>
                    <tr class="tdbg">
                        <td align="left"><a href="<%#GetUrl(Utils.StrToInt(Eval("TeachWay").ToString()),Utils.StrToInt(Eval("courseID").ToString())) %>" target="_blank"><%# Eval("name") %></a></td>
                        <td align="center"><%# Eval("TeachWay").ToString()=="2"?"组合":Eval("TeachWay").ToString()=="5"?"直播":"点播" %> </td>
                        <td align="center"><%# Eval("username") %> </td>
                        <td align="center"><%# GetLearnProcess(Utils.StrToInt(Eval("UserID").ToString()),Utils.StrToInt(Eval("courseID").ToString())) %></td>
                        <td align="center"><%# GetFinishTime(Utils.StrToInt(Eval("UserID").ToString()),Utils.StrToInt(Eval("courseID").ToString())) %></td>
                        <td align="center"><%# Eval("LastLearnIP") %></td>
                        <td align="center"><%# Utils.OrderDeviceName(Utils.StrToInt(Eval("LastLearnDevice").ToString())) %></td>
                        <td><a href="KS.CosLearnRecord.aspx?type=0&CosType=<%#Eval("TeachWay").ToString()=="2"?2:1 %>&courseid=<%#Eval("courseid").ToString() %>&teacherid=<%#Eval("TCID") %>">查看</a></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <tr class="tdbg" style="display: <%# bool.Parse((LearmRecordRepeater.Items.Count==0).ToString())?"":"none"%>">
                        <td class="Ctd" style="text-align: center" colspan="9">
                            <div class="empty">没有任何学习进度</div>
                        </td>
                    </tr>
                    </table>
                </FooterTemplate>
            </asp:Repeater>

            <KS:Page ID="Page1" runat="server" />
        </div>
        <script>
            $(function () {
                //获取进度百分比
                $(".schedule").each(function () {
                    var a = $(this).find(".linebg").text() / $(this).find("em").text() * 100;
                    $(this).find(".linebg").animate({ width: "" + a + "%" }, 300);
                });
            });
        </script>
    </asp:Panel>

</asp:Content>

