<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="extexampapertypemanager.aspx.cs" Inherits="Us.Web.Extend.admin.extexam.extexampapertypemanager" %>


<!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">
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE8,chrome=1" />
    <title>题型管理管理</title>
    <asp:Literal ID="litregscript" runat="server" Text=""></asp:Literal>
    <link href="../style/default/style.css" rel="stylesheet" type="text/css" />
    <%=ImportScriptStr %>
    <script language="javascript" type="text/javascript">
        KindEditor.ready(function (K) {
            K.create('#txtEPTInfo');
        });
    </script>
     <script src="../js/jquery/jquery.js" type="text/javascript"></script>
       <script language="javascript" type="text/javascript">

           $(document).ready(function () {
               $("#drpTID").change(function () { getAjaxFront(); });
               getAjaxFront();

               $("#txtEPTCount,#txtEPTScore").change(function () { checkInput(); });
           });


           function checkInput()
           {
               var txtEPTCount, txtEPTScore, txtEPTAllCount, txtEPTSumScore;
               txtEPTCount = $("#txtEPTCount").val();
               txtEPTScore = $("#txtEPTScore").val();
               txtEPTAllCount = $("#txtEPTAllCount").val();

               if (parseFloat(txtEPTCount) > parseFloat(txtEPTAllCount))
               {
                   txtEPTCount = txtEPTAllCount;
                   $("#txtEPTCount").val(txtEPTCount);
               }

               var p = txtEPTCount * txtEPTScore
               $("#txtEPTSumScore").val(p);

           }


           function getAjaxFront()
           {
               var EPID = $("#txtEPID").val();
               var TID = $("#drpTID").val();
               getAjaxData(EPID, TID);
           }

           function getAjaxData(EPID,TID) {
               var data = "?keyid=11&EPID=" + EPID + "&TID=" + TID;
               //alert(data);
               $.ajax({
                   type: "POST",
                   url: "extexamsorttreeajax.aspx" + data,
                   cache: false,
                  
                   success: function (msg) {
                       //alert(msg);

                       $("#txtEPTAllCount").val(msg);
                   },
                   error: function (XMLHttpRequest, textStatus, errorThrown) {
                       //alert(errorThrown);
                   }
               });
           }
    </script>
    
</head>
<body onload="win_onLoad();">
    <form id="form1" runat="server">

        <div id="tbMain">
            <div class="divTbg">
                <div class="divTbgL">
                </div>
                <div class="divTbgInfo">
                    <div class="divTbgTitle">
                        题型管理管理
                    </div>
                </div>
            </div>
            <div class="divTbgF">
            </div>
            <div class="divTNavBG" id="topURL">
                <ul id="topURLul">
                    <li class="divURLed" id="div1">
                        <div>
                            <img src="../style/default/images/mini_icons_046.gif" width="10" height="10" />
                            基本信息
                        </div>
                    </li>
                </ul>
            </div>
            <div id="mypanel">
                <div class="divInfoContext">
                    <div class="divInfo">
                        <div class="divInfoblack">
                            <div class="divInfoTopList">
                                <div class="listLeft">
                                    <div class="navtitle">
                                        题型管理管理
                                    </div>
                                </div>
                            </div>
                        </div>
                    </div>
                    <div class="divInfo">
                        <table width="100%" border="0" cellpadding="0" cellspacing="1" class="tablist" id="mainlist" onmouseover="changeto()" onmouseout="changeback()">
                            <tr class="tablisttr">
                                <td class="tablisttitle">试题类型</td>
                                <td class="tabmanagertr">
                                    <asp:DropDownList runat="server" ID="drpTID" ToolTip="试题类型">
                                        <asp:ListItem Value="CodeYesNo" Text="code"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td class="tablisttitle">&nbsp;</td>
                                <td class="tabmanagertr">
                                    &nbsp;</td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">题型标题<span class="fStar">*</span></td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtEPTName" runat="server" ToolTip="题型标题" Text="" CssClass="1" Width="95%">试题标题</asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr" style="display:none;" >
                                <td class="tablisttitle">试卷编号</td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEPID" runat="server" ToolTip="试卷编号" Text="" ReadOnly="True"></asp:TextBox>
                                </td>
                                <td class="tablisttitle">子表编号</td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEPTID" runat="server" ToolTip="试卷子表编号" Text="" ></asp:TextBox>
                                </td>
                            </tr>
                            
                            <tr class="tablisttr">
                                <td class="tablisttitle">试题数量<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEPTCount" runat="server" ToolTip="试题数量" Text="0" CssClass="2"></asp:TextBox>
                                </td>
                                <td class="tablisttitle">题库总量</td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEPTAllCount" runat="server" ToolTip="试题数量" Text="100" CssClass="2" ReadOnly="True"></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">每题分数<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEPTScore" runat="server" ToolTip="每题分数" Text="2" ></asp:TextBox>
                                </td>
                                <td class="tablisttitle">试题总分<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtEPTSumScore" runat="server" ToolTip="试题总分" Text="0" ></asp:TextBox>
                                </td>
                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">出题方式</td>
                                <td class="tabmanagertr">
                                    <asp:DropDownList runat="server" ID="drpEPCType" ToolTip="出题方式" CssClass="1" Enabled="false">
                                        <asp:ListItem Value="PCType" Text="codeno"></asp:ListItem>
                                    </asp:DropDownList>
                                </td>
                                <td class="tablisttitle">显示顺序<span class="fStar">*</span></td>
                                <td class="tabmanagertr">
                                    <asp:TextBox ID="txtShowID" runat="server" ToolTip="显示顺序" Text="1" CssClass="2"></asp:TextBox>
                                </td>

                            </tr>
                            <tr class="tablisttr">
                                <td class="tablisttitle">题型说明</td>
                                <td class="tabmanagertr" colspan="3">
                                    <asp:TextBox ID="txtEPTInfo" runat="server" ToolTip="题型说明" Text="" 
                                        TextMode="MultiLine" Height="200px" Width="100%"></asp:TextBox>
                                </td>

                            </tr>
                        </table>




                        <div class="divSave">
                            <asp:Button ID="btnSubmit" runat="server" Text="保存(S)"
                                CssClass="SkyButtonFocus" OnClick="btnSubmit_Click" />
                            <asp:Button ID="btnExit" runat="server" Text="取消(C)" CssClass="SkyButtonFocus"
                                OnClick="btnSubmit_Click" />
                        </div>
                    </div>
                </div>
            </div>
        </div>
        <div class="divInfo">
            <span class="usHelpMessage">* 注意事项： 1、试题类型提交后不可修改；2、题库总量根据你选择的题库自动计算；3、超过题库总量系统会提示；4、题型标题请自己输入;例如：第一部分 常识判断  </span>
        </div>
    </form>
</body>
</html>
