<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Exam.Admin_SJTotal" Title= "成绩统计排名管理" Codebehind="KS.SJTotal.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<!--<KS:TopNav ID="TopNav1" runat="server" Text="成绩统计排名及分析统计" />-->
<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 class="curr"><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"></div>      
<style>
.categorynav{line-height:25px;width:97%;margin:0 auto;margin-bottom:10px;border:1px solid #DEEFFA;background-color:#F7FBFE;padding:5px 0px 5px 10px; height:100%; overflow:hidden;}
.categorynav li{width:160px;float:left;}
</style>
<div class="content-area">
    <div class="myTitle" style="display:none">
        <!--当前位置：<asp:Label ID="LabNav" runat="server"></asp:Label>-->
    </div>
    <div class="quickSearch clearfix">   
        <div class="SearchBox fl">
            <asp:DropDownList ID="DrpClassID" runat="server" onchange="location.href='?classid='+this.value;" style="width:130px;margin-right:8px;">
                <asp:ListItem Value="0">--按分类查看--</asp:ListItem>
            </asp:DropDownList>
            <asp:TextBox runat="server" ID="TxtKeyWord" CssClass="textbox" /> 
            <asp:Button ID="BtnSearch" runat="server" CssClass="button" Text="开始搜索" onclick="BtnSearch_Click"/>
        </div>
        <div class="property">
            <div class="name button ml15">筛选</div>
            <div class="propertyBox">
            	<ul class="tabs">
                    <span class="screen fl">统计类型：</span>
                    <li class="active"><a href="KS.SJTotal.aspx"><span>模拟试卷统计</span></a></li>
                    <li ><a href="KS.ZGSJTotal.aspx"><span>正规试卷统计</span></a></li>
                </ul>
            </div>
        </div>
    </div>       
	<KS:ksgv id="list" cssclass="CTable" runat="server" AutoGenerateColumns="False" 
            EmptyDataText="没有可批改的试卷!" PagerType="CustomNumeric" Width="99%" 
            HorizontalAlign="Center" GridLines="None" OnRowCommand="List_RowCommand" 
            OnRowCreated="List_RowCreated" onrowdatabound="list_RowDataBound">
        <Columns>

            <asp:BoundField HeaderText="试卷ID" DataField="ID" >
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>
            
            <asp:TemplateField HeaderText="试卷名称">
                <itemtemplate>
                <span style="margin-right:8px;">[<%# MyCache.GetCacheSJCategory(Convert.ToInt32(Eval("classid")),1) %>]</span><a href="<%# Kesion.HtmlTags.BasicField.GetRewriteUrl("examview",Convert.ToInt32(Eval("id").ToString())) %>" target="_blank"><%# Utils.CutStr(Convert.ToString(Eval("title")),40) %></a>
                
                </itemtemplate>
            </asp:TemplateField>
           
            <asp:TemplateField HeaderText="总分">
                <itemstyle horizontalalign="Center" Width="80"/>
                <itemtemplate>
               		<%# Eval("score") %>分
                </itemtemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="时间">
                <itemstyle horizontalalign="Center" Width="80"/>
                <itemtemplate>
               		<%# Eval("KSSJ") %>分钟
                </itemtemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="参加人数/次数">
                <itemstyle horizontalalign="Center" />
                <itemtemplate>
               <span class="greenFont"><%# GetEnterExamRS(Convert.ToInt16(Eval("id")))%></span>人/ <span class="greenFont"><%# GetEnterExamNum(Convert.ToInt16(Eval("id"))) %></span>次
                </itemtemplate>
            </asp:TemplateField>
            
            <asp:TemplateField HeaderText="平均得分人数/次数">
                <itemstyle horizontalalign="Center" />
                <itemtemplate>
                <span><font class="redFont"><%# GetAgvScore(Convert.ToInt16(Eval("id")),1)%></font> 分/<font class="redFont"><%# GetAgvScore(Convert.ToInt16(Eval("id")),2)%></font> 分</span>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="按部门排名统计">
                <itemstyle horizontalalign="Center" />
                <itemtemplate>
                  	<a href="#" class="greenFont" onclick="parent.openWin('按部门查看试卷[<%# Eval("Title") %>]考试排名统计','Exam/KS.SJDepartMentTotal.aspx?sjID=<%# Eval("id") %>&rnd='+Math.random() ,false,933,460);return false;">查看</a>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="按用户组排名统计">
                <itemstyle horizontalalign="Center" />
                <itemtemplate>
                 	<a href="#" class="greenFont" onclick="parent.openWin('按用户组查看试卷[<%# Eval("Title") %>]考试排名统计','Exam/KS.SJUserGroupTotal.aspx?sjID=<%# Eval("id") %>&rnd='+Math.random() ,false,860,460);return false;">查看</a>
                </itemtemplate>
            </asp:TemplateField>
            <asp:TemplateField HeaderText="按用户排名统计">
                <itemstyle horizontalalign="Center" />
                <itemtemplate>
             		<a class="greenFont" href="KS.SJTotalItem.Aspx?sjid=<%#Eval("id") %>">查看</a>
                </itemtemplate>
            </asp:TemplateField>

             <asp:TemplateField HeaderText="按知识点分析">
                <itemstyle horizontalalign="Center" />
                <itemtemplate>
                	<%# Eval("Dtfs").ToString() == "2" ? "<span class='tips'>---</span>" : @"<a class='greenFont' href='KS.SJKnowledgeAnalysis.aspx?sjID=" + Eval("id") + @"' target='_blank'>查看</a>"%>
                </itemtemplate>
            </asp:TemplateField>

            <asp:TemplateField HeaderText="卷面分析">
                <itemstyle horizontalalign="Center" />
             <itemtemplate>
              <%# Eval("Dtfs").ToString() == "2" ? "<span class='tips'>---</span>" : "<a class='greenFont' href='KS.SJPaperAnalysis.Aspx?sjid=" + Eval("id") + "' target='_blank'>查看</a>"%>
           </itemtemplate>
            </asp:TemplateField>

                  <asp:TemplateField HeaderText="导出Excel">
                <itemstyle horizontalalign="Center" />
             <itemtemplate>
                <a class="greenFont" href="KS.SJTotal.aspx?action=excel&sjid=<%# Eval("id")%>" target="_blank">导出</a>
           </itemtemplate>
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
    </KS:ksgv>
    
 	<KS:Page ID="Page1" runat="server" />
    <div class="listedit">
         <ul>
    		<input type="button" class="button" value="打印" onclick="window.print()" /> <asp:Button ID="BtnSubmit" Text="导出Excel" runat="server" CssClass="button" onclick="BtnSubmit_Click" />
		 </ul>
    </div>
	<script type="text/javascript">
        showtips('<span class="state"><strong>操作说明：</strong><br /></span>1、前台随机组卷的试卷不支持知识点分析及卷面分析。<br/>2、平均得分按次数=取所有考试分数的总和/总加参的次数,平均得分按人数=取每个用户最高分的总和/总参加人数');
    </script>
     
</div>   
</asp:Content>
