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

<%
    if (KSCMS.S("from") == "listuserdetail")
    { %>
<div class="content-area">
    <script>
        $(function () { $(".bar").each(function () { $(this).animate({ "width": $(this).attr("per") + "%" }, 'slow'); }); });
    </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><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,4,1)"><span>学习进度</span></a></li>
            <li class='active'><a href="javascript:;" onclick="loadUserDetail(<%=Utils.StrToInt(KSCMS.S("userid")) %>,5,1)"><span>课程记录</span></a></li>
        </ul>
    </div>
    <%} %>

    <asp:Repeater ID="CourseList" 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>返现时间</b></td>
                    <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>总价(元)</b></td>
                </tr>
        </HeaderTemplate>
        <ItemTemplate>
            <tr onmouseover="this.className='CtrMouseOver'" onmouseout="this.className='CtrMouseOut'">
                <td class="splittd" align="left">
                    <img onerror="this.src='<%=Kesion.Cache.MyCache.GetCacheShopConfig(9) %>';" src="<%#Eval("photourl") %>" width='50' height='50' align='left' />
                    <a href="<%#GetUrl(Utils.StrToInt(Eval("OrderType")),Utils.StrToInt(Eval("CourseID")),Utils.StrToInt(Eval("IsBundleSale"))) %>" target="_blank">《<%# Eval("Cname") %>》</a><br />
                    <span <%# Utils.StrToInt(Eval("ordertype"))== 1 ?"style='color:red'":"style='display:none'" %>>课时时限<%#Eval("shixian") %>天</span>
                </td>
                <td align="center" class="splittd" style="width: 250px; text-align: center"><%# GetCosType(Utils.StrToInt(Eval("OrderType")),Utils.StrToInt(Eval("IsBundleSale"))) %></td>
                <td align="center" class="splittd" style="width: 100px; text-align: center"><%#Eval("business").ToString() %></td>
                <td align="center" class="splittd" style="width: 100px;"><%# Kesion.APPCode.Public.ReturnShopPrice(Utils.StrToDecimal(Eval("PayDiscountMoney").ToString()))%></td>
                <td align="center" class="splittd" style="width: 100px;"><%# Eval("EffectiveDay")%>天</td>
                <td align="center" class="splittd" style="width: 100px;"><%#  Kesion.APPCode.Public.ReturnShopPrice(Convert.ToString(Eval("price")))%></td>
                <td align="center" class="splittd"><%# Kesion.APPCode.Public.ReturnShopPrice(Convert.ToString(Eval("OrderTotalPrice")))%></td>
                <td align="center" class="splittd"><%# Kesion.APPCode.Public.ReturnShopPrice(Eval("NotePrice"))%></td>
                <td align="center" class="splittd"><%# Kesion.APPCode.Public.ReturnShopPrice(Eval("TaxPrice"))%></td>
                <td align="center" class="splittd"><%# Kesion.APPCode.Public.ReturnShopPrice(Convert.ToString(Eval("TotalPrice")))%></td>
            </tr>
            <%#(Eval("IsBundleSale").ToString()=="1"?GetItem(Eval("orderid").ToString()):"") %>
        </ItemTemplate>
        <FooterTemplate>
            <tr class="tdbg emptycss" style="display: <%# bool.Parse((CourseList.Items.Count==0).ToString())?"":"none"%>">
                <td class="Ctd" style="text-align: center" colspan="10">还没有报名任何的课程！</td>
            </tr>
            </table>
        </FooterTemplate>
    </asp:Repeater>
    <asp:Label ID="LabPage" runat="server"></asp:Label>
</div>
