<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Exam.Admin_ZGSJTotalItem" Title="成绩排名" Codebehind="KS.ZGSJTotalItem.Aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <asp:Panel ID="listPanel" runat="server" Width="100%">
      <div id="manage_top" class="noprint toptitle menu_top_fixed">
        
       &nbsp;&nbsp;<a href="KS.ZGSJTotal.aspx"><strong>返 回</strong></a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;试卷[<span style="color:Red"><%=dr!=null?dr["title"].ToString():String.Empty %></span>]成绩排行   
       &nbsp;限制时间：<%=dr!=null?dr["kssj"].ToString():string.Empty %>分钟 
      </div>     

    <div>
    <div class="menu_top_fixed_height"></div>   
<div class="content-area">  
    <div class="myTitle">
    <span style="font-size:12px">
        <strong>整体统计情况：</strong> 
        试卷总分：<%=dr != null ? dr["score"].ToString() : string.Empty%>分&nbsp;
        参加人数：<%=Kesion.NET.WebSite.Admin.Exam.Admin_ZGSJTotal.GetEnterExamNum(SJID)%>人 已批改：<%=Kesion.NET.WebSite.Admin.Exam.Admin_ZGSJTotal.GetExamPGNum(SJID)%>份 平均得分：<%=Kesion.NET.WebSite.Admin.Exam.Admin_ZGSJTotal.GetAgvScore(SJID)%>分
        
        <%=TJQK%>
    </span>    
    <div class="quickSearch">
            搜索考生：
             <asp:DropDownList ID="DrpTJ" runat="server">
              <asp:ListItem Value="a.username">用户名 </asp:ListItem>
              <asp:ListItem Value="realname">姓名</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>
    <%=tabStr%>
        <KS:KSGV ID="ListView" runat="server" AutoGenerateColumns="False" DataKeyNames="FieldID" GridLines="None"
            OnRowDataBound="FieldListView_RowDataBound" cssClass="CTable"  Width="99%" EnableTheming="True" OnRowCommand="FieldListView_RowCommand" HorizontalAlign="Center" EmptyDataText="没有已批改的试卷!">
            <Columns>
            <asp:BoundField DataField="scoreid"  HeaderText="排名">
                <itemstyle width="70px" Height="32px" Font-Bold="true"  horizontalalign="Center" />
                </asp:BoundField>
                

              <asp:TemplateField HeaderText="头像">
                 <itemstyle width="55px" horizontalalign="Center" />
                <itemtemplate>
                  <img style="border:1px solid #ccc;padding:1px;" onerror="this.src='<%=MyCache.GetCacheConfig(5)+MyCache.GetCacheConfig(0) %>SysImg/face/<%# Convert.ToString(Eval("Sex"))=="男"?"boy.jpg":"girl.jpg"%>';" src="<%# Convert.ToString(Eval("userface")).ToLower().IndexOf("http")==-1?MyCache.GetCacheConfig(5):"" %><%#Eval("userface")%>" width="30" height="32" />
                </itemtemplate>
              </asp:TemplateField>


              <asp:BoundField DataField="username"  HeaderText="用户名">
                <itemstyle width="70px" horizontalalign="Center" />
                </asp:BoundField>
            
              <asp:BoundField DataField="realname"  HeaderText="姓名">
              <itemstyle HorizontalAlign="Center"/>
                </asp:BoundField>
            
              <asp:BoundField DataField="sex"  HeaderText="性别">
                 <itemstyle HorizontalAlign="Center"/>
                </asp:BoundField>
              <asp:BoundField DataField="KSSJ"  HeaderText="用时">
                 <itemstyle HorizontalAlign="Center"/>
                </asp:BoundField>
              <asp:TemplateField HeaderText="总题目数">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                 <span style="color:Green;font-size:14px"><%# Eval("totaltms") %></span> 题
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="没做完题数">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                 <span style="color:red;font-size:14px"><%# Eval("nofinishtms") %></span> 题
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="成绩">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                 <a  href='<%# Kesion.HtmlTags.BasicField.GetRewriteUrl("examexplained",Convert.ToInt32(Eval("scoreid").ToString())) %>' title="查看作答详情" target="_blank"><%# Convert.ToInt16(Eval("ispg")) == 0 && Convert.ToInt16(Eval("realtest")) == 1 ? "---" : "<span style='font-size:14px'><font style='color:Red'>" + Eval("score") + "</font>分</span>"%></a>
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="成绩等级">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                <%# GetScoreRank(Utils.StrToFloat(Eval("score")))%>
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="状态">
               <itemstyle width="40px" horizontalalign="Center" />
                <itemtemplate>
                 <%# Convert.ToInt16(Eval("ispg"))==1?"<span style='color:green'>已批改</span>":"<span style='color:red'>未批改</span>" %>
                </itemtemplate>
              </asp:TemplateField>
             

            </Columns>
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>
        <div class="noprint">  
        <asp:Panel ID="Panel1" runat="server" Height="30px" Width="739px">
        
            <input type="button" class="button" value="打印本页" onclick="window.print()" /> <asp:Button ID="BtnExportExcel" Text="导出Excel" runat="server" CssClass="button" 
                onclick="BtnExportExcel_Click" /></asp:Panel>
       
         <KS:Page ID="Page1" runat="server" />
            
                 </asp:Panel>
    	</div>
    
	</div>
</asp:Content>