<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Course.KS_CheckPackageUserItem" Codebehind="KS.CheckPackageUserItem.aspx.cs" %>
<%@ Import Namespace="System.Text" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.BLL" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" runat="server">

    
<asp:Panel ID="PanelList" runat="server">
    <div class="content-area mt20">
        <div class="myTitle clearfix">
            <span class="fr">
                <a href="KS.CheckPackage.aspx"  class="button button_on mr15">返回</a>
            </span>
            考核学员管理
        </div>

        <div class="quickSearch">
            <asp:TextBox runat="server" ID="TxtKeyWord" CssClass="textbox" />
            <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="开始搜索"  OnClick="BtnSearch_Click" />
        </div>

           <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable">
                    <tr class="CTitle">
                      
                        <td>学生ID</td>
                        <td>学生用户名</td>
                        <td>考核进度</td>
                        <td>加入时间</td> 
                        <td>管理</td> 
                    </tr>
        <asp:Repeater ID="RepeaterList" runat="server"> 
            <ItemTemplate>
                    <tr onmouseover="this.className=&#39;CtrMouseOver&#39;" onmouseout="this.className=&#39;CtrMouseOut&#39;" onclick="chk(this)">
                      
                        <td style="text-align:center"><%# Eval("userid") %></td>
                        <td style="text-align:center"><%# Eval("username") %></td>
                        <td style="text-align:center"><%#  GetCheckProgress(Utils.StrToInt(Eval("packid")),Eval("StudyCourse").ToString(),Eval("StudySj").ToString()) %></td>
                        <td style="text-align:center"><%# Eval("addtime") %></td> 
                        <td style="text-align:center"><a href="javascript:;" onclick="showDetail('<%# Eval("userid") %>','<%# Eval("packid") %>')">查看</a></td> 
                    </tr>
            </ItemTemplate>
            <FooterTemplate>
                 <tr style="display:<%=bool.Parse((RepeaterList.Items.Count==0).ToString())?"":"none"%>">
                    <td align="center" colspan="6" >
                        <div class="empty" >
                                没有查询到记录
                        </div>
                    </td>
                </tr>
            </FooterTemplate>
        </asp:Repeater>
                </table>
            <KS:Page ID="Page1" runat="server" />
    </div>
</asp:Panel>

    
<asp:Panel ID="PanelInfo" runat="server" Visible="false">
    <div class="content-area mt20">
        <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable">
            <tr class="CTitle">
                <td>课程序号</td>
                <td>课时名</td>
                <td>上次学习时间</td>
                <td>IP地址</td>
                <td>学习终端</td>
                <td>课时时长</td>
                <td>已学习时长</td>
                <td>完成率</td>
            </tr>
            <asp:Repeater ID="RepeaterCourseInfo" runat="server">
                <ItemTemplate>
                    <tr onmouseover="this.className='CtrMouseOver'" onmouseout="this.className='CtrMouseOut'">
                        <td class="Ctd" style="text-align: center"><%# Eval("CourseID") %></td>
                        <td class="Ctd" style="text-align: center"><%# GetPName(Eval("PeriodID").ToString()) %></td>
                        <td class="Ctd" style="text-align: center"><%# Eval("LastDate").ToString() %></td>
                        <td class="Ctd" style="text-align: center"><%# Eval("LastLearnIP").ToString() %></td>
                        <td class="Ctd" style="text-align: center"><%# Utils.OrderDeviceName(Utils.StrToInt(Eval("LastLearnDevice").ToString())) %></td>
                        <td class="Ctd" style="text-align: center"><%# Utils.FormatSecondToTime(Utils.StrToInt(Eval("TimeCount").ToString()))%></td>
                        <td class="Ctd" style="text-align: center"><%# Utils.FormatSecondToTime(Utils.StrToInt(Eval("MaxLearnCount").ToString()))%></td>
                        <td class="Ctd" style="text-align: center"><%# CalPercent(Kesion.Publics.Utils.StrToInt(Eval("PeriodID").ToString()),Utils.StrToInt(Eval("CourseID")))%></td>
                    </tr>
                </ItemTemplate>
                <FooterTemplate>
                    <tr style="display: <%=bool.Parse((RepeaterList.Items.Count==0).ToString())?"":"none"%>">
                        <td align="center" colspan="8">
                            <div class="empty">
                                没有查询到记录
                            </div>
                        </td>
                    </tr>
                </FooterTemplate>
            </asp:Repeater>
        </table>
        <KS:Page ID="Page2" runat="server" />
    </div>
</asp:Panel>

    <script>
        /**
         * 查看学员课程完成情况
         * @param uid       用户id
         * @param packid    考核包id
         */
        function showDetail(uid, packid) {
            parent.openWin('学员课程完成情况', 'Course/KS.CheckPackageUserItem.aspx?action=learn&userid=' + uid + '&packid=' + packid, 900, 1120);
        } 
    </script>

</asp:Content>