<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CorrectExam_Import.aspx.cs" Inherits="RM.Web.Training.Exam.CorrectExam_Import" %>


<!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>学生成绩导入</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>
    <script src="/Themes/Scripts/jQuery.lightMenu-1.0.0.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/jquery.form.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/ajaxfileupload.js" type="text/javascript"></script>
</head>
<body>
    <form id="myForm" runat="server">
    <div style="padding:10px;" >
    <input type="hidden" id="txtExamKey" runat="server" />
    <input type="hidden" id="txtpassmark" runat="server" />
    <a style=" color:Red;" href="Themes/stuscore.xls"><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ExamImport_muban")%></a><br /><br />
    <asp:FileUpload ID="FileUpload1"  runat="server" Style="width: 200px;" /><br /><br />
    <input type="button" value="上传Excel学员成绩" onclick="savaAndToExamEvent2()" />
    </div>
    </form>


    <script type="text/javascript">
        function savaAndToExamEvent2() {

            var file = $("#FileUpload1").val();
            if (file.length <= 0) {
                showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ExamImport_qxzsc")%>", 3000, 3);
                return;
            }           
            $.ajaxFileUpload({
                url: "/Training/Exam/CorrectExam_Import.aspx",
                secureuri: false,
                fileElementId: 'FileUpload1',
                data: {ExamKey:$("#txtExamKey").val(),EPKey:$("#txtEPKey").val()},
                dataType: 'text',
                type: 'POST',
                success: function (result, status) {                    
                    showTipsMsg("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("CG")%>", 3000, 4);
//                    window.location.href = "/Training/TrainingTest/ExaminationPaper_Manager.aspx";
                    /*
                    var date = eval(result);
                    if (date.examId || date.length > 0) {//试卷ID
                    if (pageType) {
                    var url = "/Training/QuesNaire/Questionnaire_Form.aspx?ExamKey=" + date.examId;
                    top.openDialog(url, "ExaminationPaper_Form", "问卷信息 - 添加 ", 750, 380, 50, 50); //录入试卷信息
                    } else {
                    var url = "/Training/TrainingTest/ExaminationPaper_Form.aspx?ExamKey=" + date.examId;
                    top.openDialog(url, "ExaminationPaper_Form", "试卷信息 - 添加 ", 750, 380, 50, 50); //录入试卷信息
                    }
                    return;
                    } else {
                    resultStr = "数据异常，请检查您的数据信息，或稍候刷新页面重新尝试";
                    showTipsMsg(resultStr, 3000, 5);
                    }*/
                },
                error: function (result, status, e) {
                    resultStr = "<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Abnormal network connection")%>" + result;
                    showTipsMsg(resultStr, 3000, 5);
                }
            });
        }

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