<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true" Inherits="Kesion.NET.WebSite.Admin.Exam.Admin_SJTotalItem" Title="成绩排名" Codebehind="KS.SJTotalItem.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 class="content-area mt20">
  	<div class="myTitle">
        <span style="font-size:12px;">
             整体统计情况：
             试卷[<span style="color:Red"><%=dr!=null?dr["title"].ToString():String.Empty %></span>]&nbsp;成绩排行   
       &nbsp;限制时间：<%=dr!=null?dr["kssj"].ToString():string.Empty %>分钟 &nbsp;
            试卷总分：<%=dr != null ? dr["score"].ToString() : string.Empty%>分&nbsp;
            参加人数：<%=Kesion.NET.WebSite.Admin.Exam.Admin_SJTotal.GetEnterExamRS(SJID)%>人 参加次数：<%=Kesion.NET.WebSite.Admin.Exam.Admin_SJTotal.GetEnterExamNum(SJID)%>次 已批改：<%=Kesion.NET.WebSite.Admin.Exam.Admin_ZGSJTotal.GetExamPGNum(SJID)%>份 平均得分：<%=Kesion.NET.WebSite.Admin.Exam.Admin_ZGSJTotal.GetAgvScore(SJID)%>分 
            
            <%=TJQK%>
            
         </span>   
    
    </div>   
    <div class="quickSearch clearfix">
        <a href="KS.SJTotal.aspx" class="fr button">返回</a>
        <div class="SearchBox fl">
            <asp:DropDownList ID="DrpTJ" runat="server" style=" margin-right:8px;">
            <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:TemplateField HeaderText="排名">
                 <itemstyle width="55px" horizontalalign="Center" />
                <itemtemplate>
              第  <%# Convert.ToString(Eval("tt"))%>名
                </itemtemplate>
              </asp:TemplateField>

              <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"><%# Utils.StrToInt(Eval("totaltms")) %></span> 题

                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="没做完题数">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                 <span style="color:red;font-size:14px"><%# Utils.StrToInt(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'>" + Utils.StrToFloat(Eval("score").ToString()).ToString("0.00") + "</font>分</span>"%></a>
                </itemtemplate>
              </asp:TemplateField>
              <asp:TemplateField HeaderText="成绩等级">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                <%# GetScoreRank(Utils.StrToFloat(Eval("score")))%>
                </itemtemplate>

              </asp:TemplateField>

             <asp:BoundField DataField="score"  HeaderText="成绩" Visible="false">
                <itemstyle width="70px" Height="32px" Font-Bold="true"  horizontalalign="Center" />
              </asp:BoundField>

            </Columns>
            <HeaderStyle CssClass="CTitle" />
            <EmptyDataRowStyle CssClass="emptycss" />
        </KS:KSGV>
        
            <asp:Panel ID="Panel1" runat="server" Height="30px" Width="739px">
            <div class="listedit">  
                <ul>
                    <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" />
                </ul>
            </div>
            </asp:Panel>
        
    
</div>
</asp:Content>