<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin_SJScore" Title="考生成绩管理" Codebehind="KS.SJScore.aspx.cs" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<% if (Utils.StrToInt(KSCMS.S("sjid"))==0) 
            {%>
<div id="manage_top" class="menu_top_fixed">
   <ul class="titleTab">
      <li class="curr"><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><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" style=" height:51px;"></div>
<%}%>  
<asp:Panel ID="ListPanel" runat="server" Width="100%"> 
    <div class="content-area mt20">                    
        <asp:Panel ID="sjpannel" runat="server" Width="100%">  
            <div class="myTitle clearfix">
                <a href="KS.SjScoreExport.aspx" class="fr mr20 button button_on">Excel导出</a>     
                考试成绩管理
            </div>
            <div class="quickSearch clearfix">
                <div class="SearchBox fl">
                    <asp:DropDownList ID="DrpGroupId" runat="server" Style="margin-right:8px;">
                        <asp:ListItem Value="0">-用户组不限制-</asp:ListItem>
                    </asp:DropDownList>
                    <asp:DropDownList ID="DrpDepartId" runat="server" Style="margin-right:8px;">
                        <asp:ListItem Value="0">-部门不限制-</asp:ListItem>
                    </asp:DropDownList>    
                    <asp:DropDownList ID="DrpType" runat="server" Style="margin-right:12px;">
                    <asp:ListItem Value="0">试卷名称</asp:ListItem>
                    <asp:ListItem Value="1">考试者</asp:ListItem>
                    </asp:DropDownList><asp:TextBox CssClass="textbox" ID="TxtKeyWord" runat="server" Style="margin-right:12px;"></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 clearfix">
                            <span class="screen fl">考试类型：</span>
                            <li<%=KSCMS.S("iszg")==""?" class='active'":string.Empty %>><a href='KS.SJScore.Aspx?sjid=<%=Utils.StrToInt(KSCMS.S("sjid")) %>'><span>所有记录</span></a></li>
                            <%if (sjid==0) { %>
                                <li<%=KSCMS.S("iszg")=="0"?" class='active'":string.Empty %>><a href='KS.SJScore.Aspx?iszg=0'><span>模拟考试</span></a></li>
                                <li<%=KSCMS.S("iszg")=="1"?" class='active'":string.Empty %>><a href='KS.SJScore.Aspx?iszg=1'><span>正规考试成绩</span></a></li>
                            <%} %>
                        </ul>
                        <ul class="tabs clearfix">
                            <span class="screen fl">考试状态：</span>
                            <li<%=KSCMS.S("showType")=="0"?" class='active'":string.Empty %>><a href='KS.SJScore.Aspx?showType=0&amp;iszg=<%=Utils.StrToInt(KSCMS.S("iszg")) %>'><span>已做完的记录</span></a></li>
                            <li<%=KSCMS.S("showType")=="1"?" class='active'":string.Empty %>><a href='KS.SJScore.Aspx?showType=1&amp;iszg=<%=Utils.StrToInt(KSCMS.S("iszg")) %>'><span>未做完的记录</span></a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </asp:Panel>           
        <asp:Panel ID="PanelShow" runat="server" Width="100%" Visible="false"> 
            
            <div class="courseInfo">
             <%if (dt.Rows.Count>0) { %>
                    <style>
                    .info{ font-size:12px;}
                    .info span{ margin-right:20px;}
                    </style>
                    <div class="myTitle">
                        <div class="info fr">
                            <span>发布者：<em title="系统"><%=dt.Rows[0]["Inputer"].ToString() %></em></span>
                            <span>时间：<%=dt.Rows[0]["AddDate"].ToString() %></span><span>类型：<%=Kesion.NET.WebExam.Admin.Exam.Admin_SJ.GetSJDtfs(Utils.StrToInt(dt.Rows[0]["dtfs"].ToString())) %></span>                          
                            <span>考试时长：<%=dt.Rows[0]["KSSJ"].ToString() %></span>
                            <span>总分：<%=dt.Rows[0]["Score"].ToString() %></span>
                            <span>考试人数：<%=dt.Rows[0]["TestHits"].ToString() %></span>
                        </div>
                        <a href="<%=Kesion.HtmlTags.BasicField.GetRewriteUrl("examview",Convert.ToInt32(dt.Rows[0]["id"].ToString())) %>" title="前台页" target="_blank"><%=dt.Rows[0]["title"].ToString() %></a>
                    </div>
              <%} %>
            </div>
            <div class="TabTitle md20">
              	<span class="active"><a href="KS.SJScore.Aspx?sjid=<%=sjid %>">考试成绩</a></span>
                <span><a href="KS.SJReviews.Aspx?sjid=<%=sjid %>">考试心得</a></span>
            </div>
        </asp:Panel>   
        <KS:ksgv id="List" cssclass="CTable" runat="server" AutoGenerateColumns="False" EmptyDataText="没有考试成绩记录!" PagerType="CustomNumeric" 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("scoreid") %>" />
                    </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="ID" DataField="ScoreID" Visible="false" >
                    <itemstyle width="40px" horizontalalign="Center" />
                </asp:BoundField>
                <asp:TemplateField HeaderText="试卷名称">
                    <itemtemplate>
                        <a href="<%#Kesion.HtmlTags.BasicField.GetRewriteUrl("examview",Convert.ToInt32(Eval("sjid").ToString())) %>" target="_blank"><%# Utils.CutStr(Convert.ToString(Eval("title")),40) %></a>
                    </itemtemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="总时间">
                    <itemstyle  horizontalalign="Center" Width="100"/>
                    <itemtemplate>
                        <%# Convert.ToString(Eval("istj"))=="1"?""+Eval("totaltime")+"分钟":"0分钟"%>
                    </itemtemplate>
                </asp:TemplateField>
                
                <asp:BoundField HeaderText="测试者" DataField="UserName" >
                    <itemstyle horizontalalign="Center" Width="150"/>
                </asp:BoundField>
                
                <asp:TemplateField HeaderText="状态">
                    <itemstyle horizontalalign="Center" Width="80"/>
                    <itemtemplate>
                        <%# Convert.ToString(Eval("istj"))=="1"?"<span class='redFont'>未完成</span>":"<span>已完成</span>"%>
                    </itemtemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="得分">
                    <itemstyle  horizontalalign="Center" />
                    <itemtemplate>
                        <%# Convert.ToString(Utils.StrToFloat(Eval("score")).ToString("f2"))%> 分
                    </itemtemplate>
                </asp:TemplateField>
                <asp:BoundField HeaderText="考试时间" DataField="AddDate" >
                    <itemstyle  horizontalalign="Center" Width="150" />
                </asp:BoundField>
                
                <asp:TemplateField HeaderText="已用时间">
                    <itemstyle  horizontalalign="Center" Width="150"/>
                    <itemtemplate>
                        <%# Convert.ToString(Eval("istj"))=="1"?""+ Convert.ToString(Eval("hasusetime")).Replace(":","分钟")+"秒":""%>
                    </itemtemplate>
                </asp:TemplateField>
                
                <asp:TemplateField HeaderText="操作">
                     <itemstyle Width="150px" horizontalalign="Center" />
                     <itemtemplate>
                     
                     <a <%# Convert.ToString(Eval("istj"))=="1"?" disabled":""%> href='<%# Kesion.BLL.BaseFun.GetRewriteUrl("exam","do-explained/scoreid-"+Convert.ToInt32(Eval("scoreid").ToString()))%>' target="_blank" class="greenFont">查看</a>&nbsp;&nbsp;&nbsp;
                     <asp:LinkButton runat="server" id="delete" commandargument=<%#Eval("scoreid") %> 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">
            <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()}" />
                    <input type="button" class="button" value="打印" onclick="window.print()" />
                </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>
    </div>
</asp:Panel>
  

</asp:Content>
