<%@ page language="C#" autoeventwireup="true" validaterequest="false" inherits="QuestionLoadInEFRM, App_Web_83cyu5ij" stylesheettheme="Themes" theme="Themes" %>

<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="cc1" %>
<!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">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title></title>

     <script type="text/javascript" src="../Js/jquery.js"></script>

    <script type="text/javascript" src="../Js/jquery.pngFix.pack.js"></script>

    <script type="text/javascript" src="../Js/WebValidator.js"></script>

    <script type="text/javascript" src="../Js/InterfaceContrl.js"></script>
    <script src="../js/artDialog3/artDialog.min.js"></script>
      <script>          (function($) { var d = $.dialog.defaults; d.skin = ['chrome']; })(art);</script>
</head>
<body>
    <form id="form1" runat="server">
    <table cellpadding="0" cellspacing="0" class="table_box">
        <tr>
            <td class="right_bg">
                <span class="right_title">
                    <img src="../Images/homen.gif" class="img_style" />
                    您的当前位置：试题和考试管理 &gt; 试题库维护 &gt; 导入试题</span>
            </td>
        </tr>
        <tr>
            <td class="r_top_box">
                <table cellspacing="0" cellpadding="5" class="r_top_title_box">
                    <tr>
                        <td align="right">
                            <table width="100%" cellpadding="5" cellspacing="0" bgcolor="white">
                                <tr>
                                    <td align="right">
                                        <asp:DropDownList ID="ddlCourseType" runat="server" Width="80px" Visible="False">
                                            <asp:ListItem>EXCEL</asp:ListItem>
                                        </asp:DropDownList>
                                        课程名称：
                                    </td>
                                    <td style="width: 80px" align="right">
                                        <asp:DropDownList ID="ddlSubject" runat="server" AppendDataBoundItems="True" Width="180px">
                                            <asp:ListItem></asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td style="width: 80px" align="right">
                                        导入题型：
                                    </td>
                                    <td style="width: 80px" align="right">
                                        <asp:DropDownList ID="ddlType" runat="server" AppendDataBoundItems="True" Width="80px"
                                            AutoPostBack="True" OnSelectedIndexChanged="ddlType_SelectedIndexChanged">
                                            <asp:ListItem Value="0">请选择</asp:ListItem>
                                            <asp:ListItem Value="1">单选</asp:ListItem>
                                            <asp:ListItem Value="2">多选</asp:ListItem>
                                            <asp:ListItem Value="3">判断</asp:ListItem>
                                            <asp:ListItem Value="4">问答</asp:ListItem>
                                            <asp:ListItem Value="5">填空</asp:ListItem>
                                        </asp:DropDownList>
                                    </td>
                                    <td align="right">
                                        试题保存位置：
                                    </td>
                                    <td align="left">
                                        <asp:FileUpload ID="FileUpload1" runat="server" />
                                    </td>
                                </tr>
                            </table>
                            <table width="100%" cellpadding="5" cellspacing="0" bgcolor="white">
                                <tr>
                                    <td style="width: 160px;" align="left">
                                        <%--<asp:HyperLink ID="HyperLink1" runat="server" 
                         NavigateUrl="~/Exam/Question/试题导入模板.xls">下载Excel导入模板</asp:HyperLink>--%><div class="warning"
                             style="width: 350px; padding: 10px 0px;">
                             <font>请严格按照各题型模板导入试题，模板格式不要改动！</font></div>
                                        &nbsp;&nbsp;&nbsp;<asp:Label ID="lblMsg" runat="server" Font-Bold="True" ForeColor="Red"></asp:Label>
                                    </td>
                                    <td align="left">
                                        <asp:Button ID="btnDownLoad" SkinID="big_btn" runat="server" OnClick="btnDownLoad_Click"
                                            Text="下载Excel导入模板" Visible="True" />
                                        &nbsp;<asp:Button ID="btnSearch" runat="server" Text="导入预览" OnClick="btnSearch_Click" />
                                        &nbsp;<asp:Button ID="btnExcel" runat="server" Text="导入试题" Enabled="False" OnClick="btnExcel_Click" />
            &nbsp;<asp:Button ID="btnReturn" runat="server" OnClick="btnReturn_Click" Text="返 回" />
                                    </td>
                                </tr>
                            </table>
                        </td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="PanelCheck" runat="server">
                    <asp:GridView ID="gvExamQuestion" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        OnRowDataBound="gvExamQuestion_RowDataBound" UseAccessibleHeader="False" Width="100%">
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField DataField="Name" HeaderText="课程">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Question" HeaderText="问题">
                                <HeaderStyle Width="300px" />
                                <ItemStyle Width="300px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Type" HeaderText="问题类型">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Answer" HeaderText="答案">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Difficulty" HeaderText="试题难度">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Mark" HeaderText="题目分数">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Parse" HeaderText="试题解析">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Remark" HeaderText="备注">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="A" HeaderText="答案A">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="B" HeaderText="答案B">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="C" HeaderText="答案C">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="D" HeaderText="答案D">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="E" HeaderText="答案E">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="F" HeaderText="答案F">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="G" HeaderText="答案G">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="H" HeaderText="答案H">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:Label ID="lblEmpty" runat="server" Text="没有符合条件的数据！"></asp:Label>
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle HorizontalAlign="Center" />
                    </asp:GridView>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="PanelPD" runat="server">
                    <asp:GridView ID="GVPanDuan" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        UseAccessibleHeader="False" Width="100%" OnRowDataBound="GVPanDuan_RowDataBound">
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField DataField="Name" HeaderText="课程">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Question" HeaderText="问题">
                                <HeaderStyle Width="300px" />
                                <ItemStyle Width="300px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Type" HeaderText="问题类型">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Answer" HeaderText="答案">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Difficulty" HeaderText="试题难度">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Mark" HeaderText="题目分数">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Parse" HeaderText="试题解析">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Remark" HeaderText="备注">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </asp:BoundField>
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:Label ID="lblEmpty" runat="server" Text="没有符合条件的数据！"></asp:Label>
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle HorizontalAlign="Center" />
                    </asp:GridView>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="PanelAnswer" runat="server">
                    <asp:GridView ID="GVAnswer" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        UseAccessibleHeader="False" Width="100%" OnRowDataBound="GVAnswer_RowDataBound">
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField DataField="Name" HeaderText="课程">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Question" HeaderText="问题">
                                <HeaderStyle Width="300px" />
                                <ItemStyle Width="300px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Type" HeaderText="问题类型">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Answer" HeaderText="答案">
                                <HeaderStyle Width="50px" />
                                <ItemStyle Width="50px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Difficulty" HeaderText="试题难度">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Mark" HeaderText="题目分数">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Parse" HeaderText="试题解析">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Remark" HeaderText="备注">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </asp:BoundField>
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:Label ID="lblEmpty" runat="server" Text="没有符合条件的数据！"></asp:Label>
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle HorizontalAlign="Center" />
                    </asp:GridView>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td>
                <asp:Panel ID="PanelCloze" runat="server">
                    <asp:GridView ID="gvCloze" runat="server" AllowPaging="True" AutoGenerateColumns="False"
                        OnRowDataBound="gvCloze_RowDataBound" UseAccessibleHeader="False" Width="100%">
                        <PagerSettings Visible="False" />
                        <Columns>
                            <asp:BoundField DataField="Name" HeaderText="课程">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Question" HeaderText="问题">
                                <HeaderStyle Width="300px" />
                                <ItemStyle Width="300px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Type" HeaderText="问题类型">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Difficulty" HeaderText="试题难度">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Mark" HeaderText="题目分数">
                                <HeaderStyle Width="70px" />
                                <ItemStyle Width="70px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Parse" HeaderText="试题解析">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="Remark" HeaderText="备注">
                                <HeaderStyle Width="100px" />
                                <ItemStyle Width="100px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="A" HeaderText="答案A">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="B" HeaderText="答案B">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="C" HeaderText="答案C">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="D" HeaderText="答案D">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="E" HeaderText="答案E">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="F" HeaderText="答案F">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="G" HeaderText="答案G">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                            <asp:BoundField DataField="H" HeaderText="答案H">
                                <HeaderStyle Width="200px" />
                                <ItemStyle Width="200px" />
                            </asp:BoundField>
                        </Columns>
                        <EmptyDataTemplate>
                            <asp:Label ID="lblEmpty" runat="server" Text="没有符合条件的数据！"></asp:Label>
                        </EmptyDataTemplate>
                        <EmptyDataRowStyle HorizontalAlign="Center" />
                    </asp:GridView>
                </asp:Panel>
            </td>
        </tr>
        <tr>
            <td class="page_bg_left">
               <cc1:AspNetPager ID="myAspNetPager" runat="server" AlwaysShow="True" CssClass="cut_pager" PageSize="10"
                                FirstPageText="首页&nbsp;&nbsp;" HorizontalAlign="Right" InputBoxStyle="width:20px;" 
                                LastPageText="尾页" NextPageText="&nbsp;&nbsp;下一页&nbsp;&nbsp;" NumericButtonTextFormatString="  {0}"
                                OnPageChanging="AspNetPager1_PageChanging" PrevPageText="上一页"  ShowCustomInfoSection="Left" CustomInfoTextAlign="Left"
                                ShowInputBox="Always">
                            </cc1:AspNetPager>
            </td>
        </tr>
        <tr>
            <td align="center">
                &nbsp;</td>
        </tr>
    </table>
    </form>
</body>

<script type="text/javascript">
    $(document).ready(function() {
        Validator();
    });
    function Validator() {
        $('#<%= btnSearch.ClientID %>').bind('click', function() {
            ValidateDropdownList($("#<%=ddlSubject.ClientID%>"), "课程名称");
            ValidateDropdownList($("#<%=ddlType.ClientID%>"), "试题类型");
            return GetValidatorMessage();
        });
    }
    function CheckAll() {
        var cked = false;
        cked = document.getElementById("chkSelAll").checked;
        for (var i = 0; i < document.getElementsByTagName("*").length; i++) {
            var e = document.getElementsByTagName("*")[i];
            try {
                if (e.name.substring(e.name.length - 6, e.name.length) == "chkSel") {
                    e.checked = cked;
                }
            }
            catch (exception) {
            }
        }
    }
</script>

</html>
