<%@ Page Language="C#"  MasterPageFile="~/Admin/MasterPage.master" AutoEventWireup="true"  Title="成绩排名" Inherits="Kesion.Net.WebExam.Admin.Exam.KS_UserScore" Codebehind="KS.UserScore.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%">

<style type="text/css">
     @media print { 
          .noprint{display: none; }                
    }  
</style>
       <div id="manage_top " class="message noprint">       
       &nbsp;&nbsp;<a href="KS.JSToatl.aspx"><strong>返 回</strong></a>
            <strong>搜索班级：</strong>
         <asp:DropDownList ID="DropDownList3" runat="server" OnSelectedIndexChanged="DropDownList3_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList>       
         <asp:DropDownList ID="DropDownList4" runat="server" OnSelectedIndexChanged="DropDownList4_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList> 
         <asp:DropDownList ID="DropDownList5" runat="server" OnSelectedIndexChanged="DropDownList5_SelectedIndexChanged" AutoPostBack="true"></asp:DropDownList> 
      </div>
<div class="content-area">          
        <div style="text-align:center" class="message">
         试卷标题：<asp:Label ID="Label2" runat="server" ></asp:Label>   
      </div>  
    <div>
     <div class="myTitle">
     成绩排名
	<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>
        <KS:KSGV ID="ListView" runat="server" AutoGenerateColumns="False" DataKeyNames="FieldID" GridLines="None"
            OnRowDataBound="FieldListView_RowDataBound"  Width="99%" EnableTheming="True" OnRowCommand="FieldListView_RowCommand" CssClass="CTable" 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:TemplateField HeaderText="学校班级">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                    <%# Kesion.Exam.Grades.GradeSchoolName(Utils.StrToInt(Eval("schoolid")),"name")%><%# Kesion.Exam.Grades.GradeNianJiName(Utils.StrToInt(Eval("njid")),"name")%><%# Kesion.Exam.Grades.GradeName(Utils.StrToInt(Eval("classid")),"name")%>
                </itemtemplate>
              </asp:TemplateField>      
                 
              <asp:TemplateField HeaderText="成绩">
               <itemstyle horizontalalign="Center" />
                <itemtemplate>
                 <a  href='/jingsai/explained.aspx?scoreid=<%# Eval("ScoreID") %>' title="查看作答详情" target="_blank"><%# Convert.ToInt16(Eval("ispg")) == 0 && Convert.ToInt16(Eval("realtest")) == 1 ? "---" : "<span style='font-weight:bold;font-size:20px'><font style='color:Red'>" + Eval("score") + "</font>分</span>"%></a>
                </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">
        
            &nbsp;&nbsp;
            
            <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>