<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomExam_DataStatistics.aspx.cs"
    Inherits="RM.Web.Training.DataStatistics.CustomExam_DataStatistics" EnableEventValidation="false"  %>

<%@ Register Src="~/UserControl/PageControl.ascx" TagName="PageControl" TagPrefix="uc1" %>
<%@ Register Src="~/UserControl/LoadButton.ascx" TagName="LoadButton" TagPrefix="uc2" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>
        <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_list_Title")%></title>
    <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <link href="../../Themes/Scripts/artDialog/skins/opera.css" rel="stylesheet" type="text/css" />
    <script src="../../Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
    <style type="text/css">
        .specialStyle { background-color: #fcf1fb !important; }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_list_Title")%>
        </div>
    </div>
    <div class="btnbarcontetn">
        <div style="float: left;">
            <span style="float:left; margin-top:5px;"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ExamPlan_kaoshijihuaName")%>:</span>
            <select id="Cus" class="Searchwhere" onchange ="ExamAll();" runat="server"  >
            </select>
            <span style="float:left; margin-top:5px;"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("MyExamPlan-sjm")%>:</span>
            <select id="Exam" class="Searchwhere" onchange ="txtExamAll();" runat="server">
            </select>

            <input type="text" style="display:none;" id="txtCus" runat="server" />
            <input type="text" style="display:none;" id="txtExam" runat="server" />

            <asp:LinkButton ID="lbtSearch" runat="server" class="button green" OnClick="lbtSearch_Click"><span class="icon-botton"
            style="background: url('/Themes/images/Search.png') no-repeat scroll 0px 4px;">
        </span><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("GetButton")%></asp:LinkButton>
        </div>
        <div style="text-align: right; display:none;">
            <uc2:LoadButton ID="LoadButton1" runat="server"  />
        </div>
    </div>
    <div class="div-body" id="div-body">
        <%=TableHtml%>
    </div>
    <uc1:PageControl ID="PageControl1" runat="server" />
    </form>
    <script src="/Themes/Scripts/LodopFuncs.js" type="text/javascript"></script>
    <object id="LODOP_OB" classid="clsid:2105C259-1E0C-4534-8141-A753534CB4CA" width="0"
        height="0">
        <embed id="LODOP_EM" type="application/x-print-lodop" width="0" height="0"></embed>
    </object>
    <script type="text/javascript">
        $(function () {
            //把分页定位到屏幕下面
            divresize(90);
            FixedTableHeader("#table1", $(window).height() - 121);
            CusAll();
               $("#table1 tr th:eq(0)").hide();
               $("#table1 tr td:nth-child(1)").hide();
             });

     //查询所有自定义考试
    function CusAll()
    {
     getAjax("/Training/DataStatistics/GetCustomExamData.ashx","action=CusAll",function(rs){
      if (rs!=0) {
 var json= eval('(' + rs + ')');
 $.each(json, function(idx, obj) {$("#Cus").append("<option value='"+obj.CustomExam_ID+"'>"+obj.CustomName+"</option>");});
                   }
      });
    }
    //查询考试
    function ExamAll(){
        var all= $("#Cus").val();
        $("#txtCus").val(all);
        getAjax("/Training/DataStatistics/GetCustomExamData.ashx","action=ExamAll&&key="+all,function(rs){
            if (rs!=0) {
                var json= eval('(' + rs + ')');
                $.each(json, function(idx, obj) {$("#Exam").append("<option value='"+obj.Examination_EpId+"'>"+obj.Examination_Name+"</option>");});
            }
         txtExamAll();
      });
    }

   function txtExamAll(){ var all= $("#Exam").val();$("#txtExam").val(all); }

        var LODOP; //声明为全局变量 
        function printer() {
            //alert(document.getElementById("div-body").innerHTML);
            LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'));
            LODOP.PRINT_INIT("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CorrectExam_list_Title")%>");
            var strBodyStyle = "<style>table{width:100%;border: 1 solid #000000;border-collapse:collapse }td {border: 1 solid #000000;border-collapse:collapse }</style>";
            LODOP.ADD_PRINT_TABLE(0, 0, "100%", '100%', strBodyStyle + document.getElementById("div-body").innerHTML);
            LODOP.PREVIEW();
        }

    </script>
</body>
</html>
