<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_SJTrainingRecord" Title="练习记录管理" Codebehind="KS.SJTrainingRecord.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <asp:Panel ID="ListPanel" runat="server" Width="100%">
       <% if (Utils.StrToInt(KSCMS.S("sjid"))==0) 
            {%>
            <div id="manage_top" class="menu_top_fixed">
               <ul class="titleTab">
                  <li><a href="KS.SJScore.aspx">成绩管理</a></li>
                  <li><a href="KS.ZGSJPG.aspx">试卷批改</a></li>
                  <li><a href="KS.ZGMonitor.aspx">实时监控</a></li>
                  <li><a href="KS.SJTotal.aspx">成绩排名/分析</a></li>
                  <li class="curr"><a href="KS.SJTrainingRecord.aspx">随机练习记录</a></li>
                  <li><a href="KS.ExamCtbs.aspx">错题记录</a></li>
                  <li><a href="KS.SJReviews.aspx">考后心得</a></li>
               </ul>
            </div> 
            <div class="menu_top_fixed_height"></div>         
       <%}%>      
	<div class="content-area">
		<div class="quickSearch clearfix">
            <div class="SearchBox fl">
                <asp:DropDownList ID="DrpType" runat="server" style="margin-right:10px;">
                <asp:ListItem Value="0">练习名称</asp:ListItem>
                <asp:ListItem Value="1">会员名称</asp:ListItem>
                </asp:DropDownList><asp:TextBox CssClass="textbox" ID="TxtKeyWord" runat="server"></asp:TextBox><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="tabs">
                        <span class="screen fl">统计类型：</span>
                        <li<%=KSCMS.S("showType")==""?" class='active'":string.Empty %>><a href='KS.SJTrainingRecord.Aspx'><span>所有记录</span></a></li>
                        <li<%=KSCMS.S("showType")=="1"?" class='active'":string.Empty %>><a  href='KS.SJTrainingRecord.Aspx?showType=1'><span>已做完的记录</span></a></li>
                        <li<%=KSCMS.S("showType")=="0"?" class='active'":string.Empty %>><a  href='KS.SJTrainingRecord.Aspx?showType=0'><span>未做完的记录</span></a></li>
                    </ul>
                </div>
            </div>
        </div>
    <KS:ksgv id="List" cssclass="CTable" runat="server" AutoGenerateColumns="False" EmptyDataText="没有考试会员练习记录!"  Width="99%"  GridLines="None" OnRowDataBound="List_RowDataBound" OnRowCommand="List_RowCommand" OnRowCreated="List_RowCreated">
        <Columns>
         <asp:TemplateField HeaderText="选择">
         		
                <itemstyle horizontalalign="Center" width="30px" />
                <itemtemplate>
                <input type="checkbox"  name="ids" id="ids" value="<%#Eval("id") %>" />
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="ID" DataField="ID" Visible="false" >
                <itemstyle width="40px" horizontalalign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="练习名称">
                <itemtemplate>
                <%# Utils.CutStr(Convert.ToString(Eval("title")),40) %>
                
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="总时间">
                <itemstyle  horizontalalign="Center" />
                <itemtemplate>
                <%# Convert.ToString(Eval("istj"))=="0"?""+Eval("limittime")+" 分钟":""%>
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="练习者" DataField="UserName" >
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="状态">
                <itemstyle  horizontalalign="Center" />
                <itemtemplate>
                <%# Convert.ToString(Eval("istj"))=="0"?"<span class='redFont'><i>未完成</i></span>":"<span><i>已完成</i></span>"%>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="总分">
                <itemstyle  horizontalalign="Center" />
                <itemtemplate>
                <font><%# Convert.ToString(Eval("sysscore"))%></font> 分
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="得分">
                <itemstyle  horizontalalign="Center" />
                <itemtemplate>
                <font><%#Utils.StrToFloat(Eval("score").ToString()).ToString("f2")%></font> 分
                </itemtemplate>
            </asp:TemplateField>
           	<asp:BoundField HeaderText="练习时间" DataField="AddDate" >
                <itemstyle  horizontalalign="Center" />
            </asp:BoundField>
            
			<asp:TemplateField HeaderText="已用时间">
                <itemstyle  horizontalalign="Center" />
                <itemtemplate>
                <%# Convert.ToString(Eval("istj"))=="0"?""+ Convert.ToString(Eval("hasusetime")).Replace(":","分钟")+"秒":""%>
                </itemtemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="操作">
                <itemstyle Width="150px" horizontalalign="Center" /><itemtemplate>
                    <a class="greenFont" <%# Convert.ToString(Eval("istj"))=="0"?" disabled":""%> href='<%# Kesion.BLL.BaseFun.GetRewriteUrl("exam","do-trainingplained/id-"+Convert.ToInt32(Eval("ID").ToString())) %>' target="_blank">查看</a>&nbsp;&nbsp;&nbsp;
                    <asp:LinkButton runat="server" id="delete" commandargument=<%#Eval("id") %> commandname="del" CssClass="greenFont">删除</asp:LinkButton>
				</itemtemplate>
           
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
    </KS:ksgv>
    
    <asp:Panel ID="Panel2" runat="server" Height="30px" Width="741px">
       <div class="listedit">
         	<ul>
                <input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);"/><label for="chkall">全选</label>
                <input type="button" value="删除记录" class="button" onclick="if (GetIDS('del')){this.form.action='?action=del';this.form.submit()}" />
                <asp:Button ID="BtnSubmit" Text="导出Excel" runat="server" CssClass="button" onclick="BtnSubmit_Click" />
           	</ul>
        </div>
    </asp:Panel>
    
     <KS:Page ID="Page1" runat="server" />
        <asp:Panel ID="Panel1" runat="server" Height="30px" Width="100%">
        <script type="text/javascript">
			showtips('<span class="state"><strong>操作说明：</strong><br /></span>所有试卷的考试记录管理，如果限制了考生考试次数，这里的记录不能删除，否则限制次数无效。');
		</script>
    </asp:Panel>
</asp:Panel>
</div>
</asp:Content>
