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

<!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 runat="server">
     <title><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Bulk_import")%></title>
    <script src="/Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>
    <script src="/Themes/Scripts/Validator/JValidator.js" type="text/javascript"></script>
    <%--<script src="../../Themes/Scripts/jquery-1.8.2.min.js" type="text/javascript"></script>--%>
    <script src="../../Themes/Scripts/artDialog/artDialog.js" type="text/javascript"></script>
    <script src="../../Themes/Scripts/artDialog/iframeTools.js" type="text/javascript"></script>
        <link href="/Themes/Styles/Site.css" rel="stylesheet" type="text/css" />
            <script src="/Themes/Scripts/FunctionJS.js" type="text/javascript"></script>
            <style>
        .file-box { position: relative; width: 400px; margin-top: 0px; }
        .txt { border: 1px solid #cdcdcd; width: 100px; }
        .btn { background-color: #FFF; border: 1px solid #CDCDCD; height: 24px; width: 100px; }
        .file { position: absolute; top: 0; left: 0; height: 24px; filter: alpha(opacity:0); opacity: 0; width: 210px; }
    </style>
</head>
<body onunload="bb()">
     <form id="form1" runat="server">
     <div>
         <asp:ScriptManager ID="ScriptManager1" runat="server">
         </asp:ScriptManager>
         <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
             <ContentTemplate>
                 <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Mylearn-jhm")%>:
                 <asp:DropDownList CssClass="txt" ID="Plan_Name" AutoPostBack="True" OnSelectedIndexChanged="ddlselplan_SelectedIndexChanged"
                     Style="width: 200px; height: 30px;" runat="server">
                 </asp:DropDownList>
                 <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("exam_name")%>:
                 <select id="Exam_Name" runat="server" maxlength="40" type="text" class="txt" datacol="yes"
                     err="试卷名称" checkexpession="NotNull" style="width: 200px; height: 30px;" clientidmode="Inherit">
                 </select>
             </ContentTemplate>
         </asp:UpdatePanel>
     </div>
    <div>
    <%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ImpTempDown")%>：<a href="../../Resources/CardReader/PeopleScore.xls" style="color:Blue">Excel<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("ImpurtPeopleScore")%></a><br /><br />    
    <p class="file-box">
        <input class="btn" type="button" value="<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("SelImpFile")%>">
        <input type='text' name="textfield2" id='textfield2' class='txt' />
        <input class="file" type="file" id="file" onchange="document.getElementById('textfield2').value=this.value" name="file" runat="server">                     
    </p>   
    <%--<P style="color:#f00">(导入之后错误记录会存入表内请点确定下载)</P> --%>
    </div>
        <div class="frmbottom">    
        <asp:LinkButton ID="Save" runat="server" class="l-btn" OnClientClick="return CheckValid();"
            OnClick="Save_Click"><span class="l-btn-left">
            <img src="/Themes/Images/disk.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Save")%></span></asp:LinkButton>        
        <a class="l-btn" href="javascript:void(0)" onclick="bb()"><span class="l-btn-left">
            <img src="/Themes/Images/cancel.png" alt="" /><%=RM.Common.DotNetConfig.LanguageHelper.GetKey("Close")%></span></a>
    </div>
    </form>
</body>
</html>
<script type="text/javascript">
    function CheckValid() {
        if (!CheckDataValid('#form1')){ return false;}                          
        var val = jQuery("#textfield2").val();
        var houzhui = val.substr(val.lastIndexOf(".") + 1);
        if (houzhui != "xls") {
            alert("<%=RM.Common.DotNetConfig.LanguageHelper.GetKey("UploadFile")%>");
            return false;
        }
        editor.sync(); 
        return true;
    }   
    
    function bb(){        
            top.main.windowload();                
            OpenClose();  
    }    
</script>
