<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ResultExam2.aspx.cs" Inherits="RM.Web.jiabi.ResultExam2" %>


<!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>
    
    <script type="text/javascript">

        var wzInfo = "", bzInfo = "", cbInfo="",bzprop="";
        window.onload = function () {
            var reStr = '<%=resultObj %>';
            if (reStr != "" && reStr != undefined && reStr != 'null' && reStr != '[]') {
                rjson = eval(<%=resultObj %>);
                $("#txtzbNum").val(rjson.ZbNum);
                $("#txtjbNum2").val(rjson.JbNum);
                $("#txtexamNum").val(rjson.ExamNum);                
                $("#txtjbNum").val(rjson.JbNumStr);
                $("#txtwzNum").val(rjson.WzNumStr);                
                wzInfo = rjson.WzInfo;
                bzInfo = rjson.BzInfo;
                cbInfo = rjson.CbInfo;
                bzprop = rjson.BzProp;                
                addCurProp("addwzb","1");                

            } else {
                alert("试卷异常！");
                window.location.href="/jiabi/jbResult.aspx";
            }
        }

        
        //假币的特征和方式
        function addCurProp(actionStr,typeid){
            $.ajax({
                url: "/jiabi/AddQuestions.aspx",
                type: "post",
                data: { action: actionStr,tid:typeid , a: Math.random() },
                dataType: "json",
                success: function (data) {
                    var qjson = data;
                    if (qjson != "" && qjson != undefined && qjson != null && qjson != '[]') {
                    if(typeid=="1"){jsontohtml(eval(qjson),"quehtml");}                    
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert("网络异常" + XMLHttpRequest.status.toString());
                }
            });
        }


        //添加伪造币
        function addwzb() {
            $.ajax({
                url: "/jiabi/AddQuestions.aspx",
                type: "post",
                data: { "action": "addwzb", a: Math.random() },
                dataType: "json",
                success: function (data) {
                    var qjson = data;
                    if (qjson != "" && qjson != undefined && qjson != null && qjson != '[]') {
                        jsontohtml(eval(qjson));
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    alert("网络异常" + XMLHttpRequest.status.toString());
                }
            });
        }

        var queNum = 0;
        //将JSON转成html
        function jsontohtml(data,htmlstr) {
            if (data.length > 0) {
            /*
                var quehtml = "";
                //if(htmlstr=="quehtml"){quehtml = "<strong>伪造币特征</strong><font color=\"red\">(选5项,前2项必选)</font><br/>";}
                for (var i = 0; i < data.length; i++) {
//                jbtable
                    quehtml += "<ul data=\"" + data[i].feat_id + "\" ><li style=\"width:100px;text-align:right;\">" + data[i].feat_Name+"</li>";
                    if (data[i].option.length > 0) {
                        for (var j = 0; j < data[i].option.length; j++) {
                            if(htmlstr=="quehtml"){
                                if (wzInfo!=null && wzInfo.indexOf(data[i].option[j]) >= 0) {
                                    quehtml += "<li><input type=\"checkbox\" checked=\"checked\" disabled=\"disabled\" data=\"" + data[i].option[j] + "\" name=\"sss_" + queNum + "\"/>" + data[i].option[j] + "</li>";
                                } else {
                                    quehtml += "<li><input type=\"checkbox\" disabled=\"disabled\" data=\"" + data[i].option[j] + "\" name=\"sss_" + queNum + "\"/>" + data[i].option[j] + "</li>";
                                }
                            }
                        }
                        queNum++;
                    }
                    quehtml += "</ul><br/>";
                }
                quehtml += "</div>";
                $("#"+htmlstr).html(quehtml);
                */
                var quehtml="";
                for (var i = 0; i < data.length; i++) {               
                quehtml+="<tr><td style=\"text-align:center;\">" + data[i].feat_Name+"</td>";
                 quehtml += "<td colspan=\"5\"><ul data=\"" + data[i].feat_id + "\" ><li style=\"width:100px;text-align:right;\"></li>";

                 if (data[i].option.length > 0) {
                        for (var j = 0; j < data[i].option.length; j++) {
                            if(htmlstr=="quehtml"){
                                if (wzInfo!=null && wzInfo.indexOf(data[i].option[j]) >= 0) {
                                    quehtml += "<li><input type=\"checkbox\" checked=\"checked\" disabled=\"disabled\" data=\"" + data[i].option[j] + "\" name=\"sss_" + queNum + "\"/>" + data[i].option[j] + "</li>";
                                } else {
                                    quehtml += "<li><input type=\"checkbox\" disabled=\"disabled\" data=\"" + data[i].option[j] + "\" name=\"sss_" + queNum + "\"/>" + data[i].option[j] + "</li>";
                                }
                            }
                        }
                        queNum++;
                    }
                    quehtml=quehtml+"</td></tr>";
                    }
                   //alert( quehtml);
                $("#jbtable").append(quehtml);
            }
        }
                
    </script>
    
    <style type="text/css">        
        *{ font-size:12px; }
    li{ list-style: none; padding-left:20px; float:left; }
    table{border-top:1px solid #ccc;border-left:1px solid #ccc;}
    table td,th{ border-bottom: 1px solid #ccc; border-right: 1px solid #ccc;padding:5px; }
    .txt_hid{ overflow:hidden; }
    .txt{ width:180px; }
    </style>

</head>
<body  style="overflow:scroll;" >

    <form id="form1" runat="server">
    <div class="btnbartitle">
        <div>
            考试记录
        </div>
    </div>

    <div style="width:70%; padding:5px;">
    
    <div style="width:100%; padding:5px 5px 15px 5px; text-align:center; font-size:18px ; font-weight:bold; ">反假货币实操考试记录    
    </div>

    <table style="width:100%;" cellpadding="0" cellspacing="0" id="jbtable">
    <tr  style="text-align:center;" >
    <td>姓名</td><td><label id="lbluname" runat="server" ></label></td>
    <td>身份证号码</td><td><label id="lblcarno" runat="server" >&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;</label></td>
    <td>单位名称</td><td><label id="lbldwmc" runat="server">&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;　&nbsp;</label></td>
    </tr>
    <tr>
    <td style="text-align:center;">考试编号</td><td colspan="2"><input type="text" id="txtexamNum"  disabled="disabled" class="txt"  /></td>
    <td rowspan="3" style="text-align:center;">假币冠字号码</td><td colspan="2" rowspan="3">
        <asp:TextBox ID="txtjbNum" runat="server" TextMode="MultiLine" Height="70px" 
            Width="180px" CssClas="txt_hid" disabled="disabled"></asp:TextBox>
            <br /> <font color="red" size="2" >多张假币冠字号码需换行</font>
    </td>
    </tr>
    
    <tr>
    <td style="text-align:center;">假币张数</td><td colspan="2"><input type="text" id="txtjbNum2" maxlength="2" disabled="disabled" class="txt" /></td>
    </tr>

    <tr>
    
    <td style="text-align:center;">真币张数</td><td colspan="2"><input disabled="disabled"  type="text" id="txtzbNum" maxlength="2" class="txt"/></td>
    </tr>

    <tr>
    <td style="text-align:center;">伪造币冠字号码</td><td colspan="5"><input type="text" id="txtwzNum" runat="server" maxlength="10" disabled="disabled" class="txt" />　<font color="red" size="2" >从挑出的假币中任意挑选一张,伪造币号码填写</font>
    </td>
    </tr>
    <tr>
    <th>特征项</th><td colspan="5" style="text-align:center;" > 所选伪造币的特征描述（选5项）</td>
    </tr>

    <tr style="display:none;">
    <td colspan="6" id="quehtml" valign="top"  style="padding-left:20px;" ></td>    
    </tr>

    </table>

    </div>
    </form>
</body>
</html>
