<%@ Page Language="C#" MasterPageFile="~/Admin/MasterPage.master" ValidateRequest="false" EnableEventValidation="false" Inherits="Kesion.NET.WebSite.Admin_InportFromExcel" Title="试卷管理" Codebehind="KS.InportFromExcel.aspx.cs" %>
<%@ Import Namespace="Kesion.Cache" %>
<%@ Import Namespace="Kesion.Publics" %>
<asp:Content ID="Content1" ContentPlaceHolderID="KSContent" Runat="Server">
    <asp:Panel ID="AddPanel" runat="server"  Width="100%" >
        <!--<KS:TopNav ID="TopNav1" runat="server" Text="从Excel导入试题" />-->
        <div class="content-area mt20">
            <div class="tab-page" id="sjfromexcel">
                <script type="text/javascript">
                     var tabPane1 = new WebFXTabPane(document.getElementById("sjfromexcel"), 1)
                </script>
                <div class="tab-page" id="tab0">
                    <h2 class="tab">基本信息</h2>
                    <script type="text/javascript">
                        tabPane1.addTabPage(document.getElementById("tab0"));
                    </script>
            
                    <table width="100%" border="0" cellpadding="1" cellspacing="1" class="CTable no-borderTable"> 
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px"><strong>试题分类：</strong></td>
                            <td class="righttd">
                                <asp:DropDownList ID="DrpClassID" runat="server" AutoPostBack="true"  OnSelectedIndexChanged="DrpClassID_SelectedIndexChanged">
                                    <asp:ListItem Value="0">--选择试题分类--</asp:ListItem>
                                </asp:DropDownList>
                             
                              </td>
                        </tr>
                        <tr>
                            <td class="lefttd" height="30" align="right"><b>所属章节：</b></td>
                            <td class="righttd">
                                <asp:DropDownList ID="drpSJtypeClass" runat="server" >
                                <asp:ListItem Value="0">-选择题目属性-</asp:ListItem>
                                </asp:DropDownList> 该题目不属于任何章节可不选             
                               </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px"><strong>所属知识点：</strong></td>
                            <td class="righttd">
                                <asp:DropDownList ID="DrpKnowLedge" runat="server">
                                    <asp:ListItem Value="0">--选择知识点--</asp:ListItem>
                                </asp:DropDownList>
                             
                              </td>
                        </tr>
                        <tr>
                            <td class="lefttd" height="30" align="right"><b>题目类型：</b></td>
                            <td class="righttd">
                                <asp:DropDownList ID="DrpTMType" runat="server">
                                <asp:ListItem Value="0">-选择题目类型-</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                           <tr>
                            <td class="lefttd" height="30" align="right"><b>自定义题目：</b></td>
                            <td class="righttd">
                                <asp:DropDownList ID="DrpTMZDYType" runat="server">
                                <asp:ListItem Value="0">-选择题目类型-</asp:ListItem>
                                </asp:DropDownList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px"><strong>试题设置：</strong></td>
                            <td class="righttd">
                
                                每题分数：<asp:TextBox ID="txtTMScore" value="1" runat="server" Width="50px" style="text-align:center" CssClass="textbox"></asp:TextBox>分
                                题目难度：<asp:DropDownList ID="DrpDifficulty" runat="server">
                                   <asp:ListItem Value="0">易</asp:ListItem>
                                   <asp:ListItem Value="1">中</asp:ListItem>
                                   <asp:ListItem Value="2">难</asp:ListItem>
                                </asp:DropDownList>
                
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px"><strong>试题是否随机：</strong></td>
                            <td class="righttd">
                                <asp:CheckBoxList ID="ISprotocolShow" runat="server" 
                                    RepeatDirection="Horizontal" RepeatColumns="6" RepeatLayout="Flow">
                                    <asp:ListItem Value="1">是</asp:ListItem>
                                </asp:CheckBoxList>
                            </td>
                        </tr>
                        <tr>
                            <td align="right" class="lefttd" height="30" style="width: 102px"><strong>选择Excel文件：</strong></td>
                            <td class="righttd">
                               <asp:FileUpload CssClass="textbox" Width="300px" ID="fileId" runat="server" />    
                        		下载Excel模板： <a href="../../admin/exam/Excel导入示例.xls" class="greenFont" target="_blank">下载Excel示例文件</a>
                            </td>
                        </tr>
                    </table>
                </div>
            </div>
            <div style="clear:both;text-align:center">
                <KS:Foot ID="Foot1" runat="server" OnSubmit="Button1_Click" SubmitButtonText="开始导入(O)" />
            </div>
            <script>
                  function CheckForm() {
                      if (jQuery("#<%=this.DrpClassID.ClientID %> option:selected").val() == "0") {
                          KesionJS.Alert("请选择要导入的分类！", "");
                          return false;
                      }
                      if (jQuery("#<%=this.DrpTMType.ClientID %> option:selected").val() == "0") {
                          KesionJS.Alert("请选择题目类型！", "");
                          return false;
                      }
                      return true;
                  }
                  function getKnowLedge(classid) {
                      jQuery.get("KS.SjAjax.ashx", { action: "getknowledge", classid: classid }, function (v) {
                          jQuery("#<%=this.DrpKnowLedge.ClientID %>").empty().append("<option value='0'>--选择知识点--</option>").append(v);
                      });
                  }
             </script>
        </div> 
    </asp:Panel>
</asp:Content>
