<%@ Control Language="C#" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.User.UserLearnProgressControl" CodeBehind="UserLearnProgressControl.ascx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.BLL" %>

<%
    if (KSCMS.S("from") == "listuserdetail")
    { %>
<div class="content-area">
    <script>
        $(function () {
            //获取进度百分比
            $(".schedule").each(function () {
                var a = $(this).find(".linebg").text() / $(this).find("em").text() * 100;
                $(this).find(".linebg").animate({ width: "" + a + "%" }, 300);
            });
        });
    </script>
    <div class="tabs_header">
        <ul class="tabs">
            <li><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,0)"><span>基本信息</span></a></li>
            <% if (BaseFun.CheckModulePower("mall"))
                {%>
            <li><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,3,1)"><span>订单记录</span></a></li>
            <%} %>
            <li><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,1,1)"><span>登录记录</span></a></li>
            <li><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,2,1)"><span>手机绑定记录</span></a></li>
            <li class='active'><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,4,1)"><span>学习进度</span></a></li>
            <li><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,5,1)"><span>课程记录</span></a></li>
        </ul>
    </div>
    <%} %>

    <asp:Repeater ID="LearnList" runat="server">
        <HeaderTemplate>
            <table width="99%" class="CTable nTable" border="0" cellpadding="1" cellspacing="1">
                <tr class="CTitle">
                    <td align="center"><b>课程名称</b></td>
                    <td align="center"><b>课程类型</b></td>
                    <td align="center"><b>购买日期</b></td>
                    <td align="center"><b>学习进度</b></td>
                    <td align="center"><b>最后学习IP</b></td>
                    <td align="center"><b>最后学习设备</b></td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr onmouseover="this.className='CtrMouseOver'" onmouseout="this.className='CtrMouseOut'">
                <td class="Ctd" style="text-align: center; width: 20%"><a href="<%#GetUrl(Utils.StrToInt(Eval("OrderType")),Utils.StrToInt(Eval("CourseID")),Utils.StrToInt(Eval("IsBundleSale"))) %>" target="_blank"><%# Eval("Cname") %> </td>
                <td class="Ctd" style="text-align: center; widty: 20%"><%# GetCosType(Utils.StrToInt(Eval("OrderType")),Utils.StrToInt(Eval("IsBundleSale"))) %> </td>
                <td class="Ctd" style="text-align: center;widty:20%"><%# Eval("InputTime") %></td>
                <td class="Ctd" style="text-align: center; height: 40px"><%# GetSchedule(Utils.StrToInt(Eval("UserID")), Utils.StrToInt(Eval("CourseID"))) %></td>
                <td class="Ctd" style="text-align: center"><%# Kesion.Course.CourseLearnRecordCache.GetUserLearnJsonNodeValue(Utils.StrToInt(Eval("UserID")),"lastlearnip", Utils.StrToInt(Eval("CourseID"))) %></td>
                <td class="Ctd" style="text-align: center"><%# Utils.OrderDeviceName(Utils.StrToInt(Kesion.Course.CourseLearnRecordCache.GetUserLearnJsonNodeValue(Utils.StrToInt(Eval("UserID")),"lastlearndevice", Utils.StrToInt(Eval("CourseID"))))) %></td>
            </tr>
        </ItemTemplate>
        <FooterTemplate>
            <tr class="tdbg emptycss" style="display: <%# bool.Parse((LearnList.Items.Count==0).ToString())?"":"none"%>">
                <td class="Ctd" style="text-align: center" colspan="4">还没有任何的学习记录！</td>
            </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <asp:Label ID="LabPage" runat="server"></asp:Label>
</div>
