<%@ Page Language="C#" AutoEventWireup="true" MasterPageFile="~/Admin/MasterPage.master" Inherits="Kesion.NET.WebSite.Course.Admin.Course.KS_CosClassHWSJ" Codebehind="KS.CosClassHWSJ.aspx.cs" %>
<%@ Import Namespace="Kesion.BLL" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="Kesion.Course" %>
<%@ Import Namespace="Kesion.Publics" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.HtmlTags" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
<style>
.nopicList{ box-sizing:border-box; border-bottom:0;}
</style>
 <div class="content-area mt20">  
              
 	<asp:Panel ID="sjpannel" runat="server" Width="100%">  
       <div class="myTitle">
            <a href="KS.CosClassHomeWork.aspx?roomid=<%=roomid %>" class="fr button mr20">返回作业列表</a>
            考试成绩管理   
       </div>
       <div class="quickSearch clearfix">
            <div class="SearchBox fl">
                <asp:DropDownList Visible="false" ID="DrpGroupId" runat="server" style="margin-right:8px;">
                    <asp:ListItem Value="0">-用户组不限制-</asp:ListItem>
                </asp:DropDownList>
                <asp:DropDownList Visible="false" 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:8px;">
                <%--<asp:ListItem Value="0">试卷名称</asp:ListItem>--%>
                <asp:ListItem Value="1">考试者</asp:ListItem>
                </asp:DropDownList>
                <asp:TextBox CssClass="textbox" ID="TxtKeyWord" runat="server"></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">
                        <span class="screen fl">记录状态：</span>
                        <li <%=KSCMS.S("showType")==""?" class='active'":string.Empty %>>
                            <a href='KS.CosClassHWSJ.Aspx?roomid=<%=roomid %>&sjid=<%=Utils.StrToInt(KSCMS.S("sjid")) %>'><span>所有记录</span></a></li>
                        <li <%=KSCMS.S("showType")=="0"?" class='active'":string.Empty %>>
                            <a href='KS.CosClassHWSJ.Aspx?roomid=<%=roomid %>&sjid=<%=sjid %>&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.CosClassHWSJ.Aspx?roomid=<%=roomid %>&sjid=<%=sjid %>&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%" > 
      <div class="courseInfoTop nopicList">
          <div class="courseInfo">
                 <%if (dt.Rows.Count>0) { %>
                        <div class="title"><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 class="blank10"></div>
                        <div class="info grayFont">
                        	<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>
                    <%} %>
          </div>
       </div>
  </asp:Panel>    
  <asp:Panel ID="ListPanel" runat="server" Width="100%">
    <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"><span class="doc_1"></span></a>
                <%# Utils.CutStr(Convert.ToString(Eval("title")),40) %>
                 <%# Convert.ToString(Eval("istj"))=="1"?"<span class='tips'><i>未完成</i></span><br/><div style='color:#888;padding-left:20px;'>总时间："+Eval("totaltime")+" 分钟 已用时间："+ Convert.ToString(Eval("hasusetime")).Replace(":","分钟")+"秒</div>":""%>
                </itemtemplate>
            </asp:TemplateField>
            <asp:BoundField HeaderText="测试者" DataField="UserName" >
                <itemstyle horizontalalign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="得分">
                <itemstyle  horizontalalign="Center" />
                <itemtemplate>
                <font color=red><%# Convert.ToString(Utils.StrToInt(Eval("score")).ToString("f1"))%></font> 分
                </itemtemplate>
            </asp:TemplateField>
           <asp:BoundField HeaderText="考试时间" DataField="AddDate" >
                <itemstyle  horizontalalign="Center" />
            </asp:BoundField>
            <asp:TemplateField HeaderText="操作">
                <itemstyle Width="150px" horizontalalign="Center" />
                <itemtemplate>
                    <asp:LinkButton runat="server" id="delete" commandargument=<%#Eval("scoreid") %> commandname="del" CssClass="greenFont">删除</asp:LinkButton>&nbsp;&nbsp;&nbsp;
                    <%--<a class="link-color" href='?action=comment&roomid=<%=roomid %>&scoreid=<%#Eval("scoreid") %> '><i class="iconfont">&#xe63f;</i>评语</a>--%>
                    <a class="greenFont" href='../exam/KS.ZGPGScore.Aspx?&roomid=<%=roomid %>&scoreid=<%#Eval("scoreid") %>&sjid=<%=sjid %>&member=tc'>批阅</a></span>
                </itemtemplate>
           
            </asp:TemplateField>
        </Columns>
        <HeaderStyle CssClass="CTitle" />
        <EmptyDataRowStyle CssClass="emptycss" />
    </KS:ksgv>
    
    <asp:Panel ID="Panel2" runat="server" Height="30px">
        <div class="listedit">
          <input type="checkbox" name="chkall" id="chkall" onclick="CheckAll(this.form);"/><label for="chkall">全选</label>
          <input type="button" value="删除记录" onmouseover="this.className='button_on';" onmouseout="this.className='button';" class="button" onclick="if (GetIDS('del')) { this.form.action = '?action=del'; this.form.submit() }" />
          <asp:Button ID="BtnSubmit" Text="导出Excel" runat="server" CssClass="button" onclick="BtnSubmit_Click" />
          <input type="button" class="button" value="打印" onclick="window.print()" />
        </div>
      </asp:Panel>
   </div> 
     <KS:Page ID="Page1" runat="server" />
             
</asp:Panel>

  <asp:Panel ID="AddPanel" runat="server" Visible="false" Height="30px" Width="100%">
     <form name="myform" action="?action=save" method="post" id="myforms" >
  <input name="roomid" type="text" value="<%=roomid %>" style="display:none" />
    <input name="scoreid" type="text" value="<%=scoreid %>" style="display:none" />
  <input name="sjid" type="text" value="<%=GetParam("sjid") %>" style="display:none" />

		   <table width="100%" align="center" border="0" cellpadding="0" cellspacing="0" class="CTable"> 
		   <tr>
		   <td align="right" class="lefttd" height="30" ><strong>学员名称：</strong></td>
		    <td class="tag_left"><%=GetParam("UserName") %></td>
		   </tr>
		    <tr>
			 <td align="right" class="lefttd" height="30" ><strong>评语内容：</strong></td>
			 <td class="tag_left">
			 <textarea name="TxtIntro" rows="2" cols="20" id="TxtIntro" style="height:200px;width:90%;"><%=GetParam("TcComment") %></textarea>
			    <%Kesion.APPCode.EditorAPI.EchoHead(); %>
				<% Kesion.APPCode.EditorAPI.EchoEditor("editor", "TxtIntro", "Basic");%>
			 </td>
		 </tr>
		   </table>
	
		
	   </form>

	    <KS:Foot ID="Foot1" runat="server" OnSubmit="Foot1_Submit"  />
            </asp:Panel>
    
  <script>
  	function CheckForm() {
  		$("#myforms").submit();
  	}

  </script>

</asp:Content>
