<%@ page autoeventwireup="true" debug="true" inherits="_tbl_paper_make, App_Web_wjux_2xt" language="C#" enableeventvalidation="false" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<%@ Register Assembly="AspNetPager" Namespace="Wuqi.Webdiyer" TagPrefix="webdiyer" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
<%@ Register Assembly="FredCK.FCKeditorV2" Namespace="FredCK.FCKeditorV2" TagPrefix="FCKeditorV2" %>
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>题型管理</title>
<link href="../css/StyleSheet.css" rel="stylesheet" type="text/css" />
<link href="../css/GridView.css" rel="stylesheet" />
<link href="../css/main.css" rel="stylesheet" type="text/css" />
  <link href="../css/pager.css" rel="stylesheet" type="text/css" />
<script src="../My97DatePicker/WdatePicker.js" type="text/javascript"></script>
<script src="../jquery-1.5.js" type="text/javascript"></script>
<link href="../window/_css/window.css" rel="stylesheet" type="text/css" />


    <script src="../js/ajaxdroplist.js" type="text/javascript"></script>
<script language="javascript" src="../window/message/jquery.message.js" type="text/javascript"></script>
<script language="javascript" src="../window/jquery/jquery.min.js" type="text/javascript"></script>
<script language="javascript" src="../window/jquery-ui/jquery-ui.min.js" type="text/javascript"></script>
<script language="javascript" src="../window/jquery.bgiframe.pack.js" type="text/javascript"></script>
<link href="../window/_css/jqueryui/blitzer/jquery-ui-1.8.12.custom.css" rel="stylesheet" type="text/css" />
<link href="../alert/jquery.alert.css" rel="stylesheet" type="text/css" />
<script src="../alert/jquery.easydrag.js" type="text/javascript"></script>
<script src="../alert/jquery.alert.js" type="text/javascript"></script>
<script language="javascript" type="text/javascript">   
function   isnum() 
{
if(event.keyCode <48   ||   event.keyCode> 57) 
{
event.keyCode=0;
}
}
$(function(){
$("#div_win").dialog({
autoOpen:false,
modal: false,
width:600,
height:500,
bigframe:true
});
$("#div1").dialog({
autoOpen:false,
modal: true,
width:550,
height:290,
bigframe:true
});
$("#div2").dialog({
autoOpen:false,
modal: false,
width:800,
height:600,
bigframe:true
});
$("#div_4").dialog({
autoOpen:false,
modal: true,
width:250,
height:300,
bigframe:true
});

$("#div_5").dialog({
autoOpen:false,
modal: true,
width:250,
height:300,
bigframe:true
});


$("#btnAdd").click(function(page){
$("#div_win").dialog({ title: '题型管理-添加' });
$("#div_win").dialog({ draggable: true,resizable:true });
$("#IsEdit").val("0");
});
$("#btnModify").click(function(page){
$("#div_win").dialog({ title: '题型管理-修改' });
$("#div_win").dialog({ draggable: true,resizable:true });
});
});
</script>
<script language="JavaScript" type="text/JavaScript">
//-----------------------------------------------------------------------------------
$("#chk_all").click(function() {
$("input[name='chk_list']").attr("checked", $(this).attr("checked"));
});
//全选 
function CheckedAll() {
$(':checkbox').attr('checked', 'checked');
}
//全不选 
function CheckedNo() {
$(':checkbox').attr('checked', '');
var GridView1= document.getElementById("<%=GridView1.ClientID %>");
for(i = 1;i < GridView1.rows.length; i++)
{
GridView1.rows[i].style.backgroundColor='#FFFFFF';
}
}
//反选 
function CheckedRev(objCheckBox, strId) {
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView1= document.getElementById("<%=GridView1.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "checkbox") {


var allInput = GridView1.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{}
else
{
allInput[i].checked = !allInput[i].checked;
if   ( allInput[i].checked)
{
GridView1.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView1.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;   
}
}
}
}
}
document.getElementById ("chk_all").checked=false;
}
function ChangeAllCheckStatus(objCheckBox, strId) //全选
{
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView1= document.getElementById("<%=GridView1.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "checkbox") {

var allInput = GridView1.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{
GridView1.rows[k].style.backgroundColor='#FFFFFF';
}
else
{
allInput[i].checked = objCheckBox.checked;
if(objCheckBox.checked)
{
GridView1.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView1.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;
}
}
document.getElementById ("cb3").checked=false;
}
}
}
}
//---------------------------------------------------------------------------------------------------- 
var prevselitem=null;
function selectx(row)
{
if(prevselitem!=null)
{
prevselitem.style.backgroundColor='#ffffff';
}
row.style.backgroundColor='PeachPuff';
prevselitem=row;
}

function l_out(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView1_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView1_ctl"+m+"_checkbox1");
}
p.style.background = m % 2 == 1 ? NormalColor : AlterColor; 
if (ck!=null)if (ck.checked==true)
{
p.style.backgroundColor = SelectColor;
}
else
{
p.style.backgroundColor = m % 2 == 1 ? NormalColor : AlterColor; 
}
}
function l_in(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView1_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView1_ctl"+m+"_checkbox1");
}
if (ck!=null)if (ck.checked==true)
{
p.style.backgroundColor = SelectColor;
}
else
{
p.style.backgroundColor = HoverColor; 
}
}
//--------------------------------------------------------------------------------------
function l_out2(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView2_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView2_ctl"+m+"_checkbox1");
}
p.style.background = m % 2 == 1 ? NormalColor : AlterColor; 
if (ck!=null)if (ck.checked==true)
{
p.style.backgroundColor = SelectColor;
}
else
{
p.style.backgroundColor = m % 2 == 1 ? NormalColor : AlterColor; 
}
}
function l_in2(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView2_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView2_ctl"+m+"_checkbox1");
}
if (ck!=null)if (ck.checked==true)
{
p.style.backgroundColor = SelectColor;
}
else
{
p.style.backgroundColor = HoverColor; 
}
}

function l_in3(p,m,NormalColor,AlterColor,HoverColor,SelectColor)
{
if (m<10)
{
var ck= document.getElementById("GridView2_ctl0"+m+"_checkbox1");
}
else
{
var ck= document.getElementById("GridView2_ctl"+m+"_checkbox1");
}

if (ck!=null)
{
ck.checked=true;
if (ck.checked==true)
{
//p.style.backgroundColor = SelectColor;
}
else
{
//p.style.backgroundColor = HoverColor; 
}

}
}
//---------------------------------------
//反选 
function CheckedRev2(objCheckBox, strId) {
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView2= document.getElementById("<%=GridView2.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "button") {


var allInput = GridView2.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{}
else
{
allInput[i].checked = !allInput[i].checked;
if   ( allInput[i].checked)
{
GridView2.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView2.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;   
}
}
}
}
}
//document.getElementById ("chk_all").checked=false;
}
function ChangeAllCheckStatus2(objCheckBox, strId) //全选
{
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView2= document.getElementById("<%=GridView2.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "button") {


var allInput =  GridView2.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{
GridView2.rows[k].style.backgroundColor='#FFFFFF';
}
else
{
allInput[i].checked = true;
if(allInput[i].checked)
{
GridView2.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView2.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;
}
}
//document.getElementById ("cb3").checked=false;
}
}
}
}


function clearChoose(objCheckBox, strId) //取消全选
{
var NormalColor = "#fff";
 var AlterColor = "#eee";
var SelectColor = "#ffff99";
var GridView2= document.getElementById("<%=GridView2.ClientID %>");
if (objCheckBox.tagName == "INPUT" && objCheckBox.type == "button") {


var allInput =  GridView2.getElementsByTagName("input");
var k=0;
for (var i = 0; i < allInput.length; i++) {
if (allInput[i].type == "checkbox" && allInput[i].id.indexOf(strId) >= 0) {
k=k+1;
if  (allInput[i].disabled==true)
{
GridView2.rows[k].style.backgroundColor='#FFFFFF';
}
else
{
allInput[i].checked = false;
if(allInput[i].checked)
{
GridView2.rows[k].style.backgroundColor='#ffff99';
}
else
{
GridView2.rows[k].style.backgroundColor = k % 2 == 0 ? NormalColor : AlterColor;
}
}
//document.getElementById ("cb3").checked=false;
}
}
}
}
//------------------------------------------
function easy_chk(p)
{

p.value=p.value.replace(/[^\d]/g,'') ;//正则判断数字
var t=document.getElementById ("h_easy");


    if (parseInt(p.value)>parseInt(t.value))
    {
   alert("抱歉，题目数量不够!!")
   p.value="0";
    }
}
function middle_chk(p)
{
p.value=p.value.replace(/[^\d]/g,'') ;//正则判断数字
var t=document.getElementById ("h_middle");
   if (parseInt(p.value)>parseInt(t.value))
    {
   alert("抱歉，题目数量不够!!")
   p.value="0";
    
    }
}
function high_chk(p)
{
p.value=p.value.replace(/[^\d]/g,'') ;//正则判断数字
var t=document.getElementById ("h_high");
     if (parseInt(p.value)>parseInt(t.value))
    {
   alert("抱歉，题目数量不够!!")
   p.value="0";
    
    }

}



function choose(s1,s2)
{

var t1=document.getElementById ("t_value");
var h1=document.getElementById ("h_value");
var t1_bk=document.getElementById ("t_value_bk");
t1_bk.value=s1;

t1.value=s1;
h1.value=s2;
//---------------------------------------------
Get_date();

$('#div_4').dialog('close');

}
function choose_1(k1,k2)
{


var t2=document.getElementById ("t_2");
var h2=document.getElementById ("h_2");



t2.value=k1;
h2.value=k2;
//---------------------------------------------


$('#div_5').dialog('close');

}

  function serch_clear()
  {
  var t2=document.getElementById ("t_2");
var h2=document.getElementById ("h_2");
t2.value="";
h2.value="0";
  
  
  }


</script>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="ScriptManager1" runat="server" />
<div class="title">
<asp:Label ID="lblList" runat="server" Text="题型管理"></asp:Label>
</div>

<div id="ctl_panel" runat="server" class="panel">
<asp:Button ID="btnAdd" runat="server" class="button_b" OnClick="btnAdd_Click" Text="添加" ToolTip="添加" />
<asp:Button ID="btnModify" runat="server" class="button_b" OnClick="btnModify_Click" Text="修改" ToolTip="修改" />
<asp:Button ID="btnDelete" runat="server" CssClass="button_r" OnClick="LinkButton6_Click" Text="删除" />
    <asp:Panel ID="chkpanel" runat="server" style="display:inline ;">


<input id="chk_all" name="chk_all" onclick="ChangeAllCheckStatus(this,'checkbox1')" type="checkbox" />全选
<input id="cb3" name="btnCheckedRev" onclick="CheckedRev(this,'checkbox1')" type="checkbox" value="反　选" />反 选

    </asp:Panel>
    <asp:Button ID="Button3" runat="server"  CssClass="button_b" Text="返 回" OnClick="Button3_Click" />
    <asp:HiddenField ID="h_chuti" runat="server" />
 
</div>
<asp:UpdatePanel ID="UpdatePanel1" runat="server">
<ContentTemplate>


<asp:GridView ID="GridView1"    runat="server" AllowSorting="true" OnSorting="GridView1_Sorting" AutoGenerateColumns="False" CssClass="gv" DataKeyNames="Tid" GridLines="Horizontal" OnRowCommand="GridView1_RowCommand" Width="100%">
<RowStyle CssClass="gvRow" />
<HeaderStyle CssClass="gvHeader" />
<AlternatingRowStyle CssClass="gvAlternatingRow" />
<Columns>
<asp:TemplateField HeaderText="选" ItemStyle-Height="20px" >
<HeaderStyle Width="50px"  HorizontalAlign ="Center" />
<ItemStyle Width="50px" HorizontalAlign ="Center"  Wrap="false"  />
<ItemTemplate    >
<asp:CheckBox ID="checkbox1" runat="server" />
<asp:HiddenField ID="Tid" runat="server" Value='<%# Eval("Tid") %>' />
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField DataField="Typ_name"   HeaderText="题型" ItemStyle-HorizontalAlign="Center"
    SortExpression="Typ_name" />
<asp:BoundField  SortExpression="TidTitle"   DataField="TidTitle" HeaderText="标题" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<%--<asp:BoundField  SortExpression="Tid_sTitle"   DataField="Tid_sTitle" HeaderText="副标题" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>--%>
<asp:BoundField  SortExpression="Tid_xuhao"   DataField="Tid_xuhao" HeaderText="序号" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>
<asp:BoundField SortExpression="Tid_Score"   DataField="Tid_Score" HeaderText="分数/题" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>

<%--
<asp:BoundField SortExpression="ct"    DataField="ct" HeaderText="题数" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>--%>
<asp:TemplateField  HeaderText ="题数">
<ItemTemplate >
    <asp:Label ID="Label2" runat="server" Text=""></asp:Label>

</ItemTemplate>
</asp:TemplateField>



<%--<asp:BoundField  SortExpression="Tid_Detail"   DataField="Tid_Detail" HeaderText="说明" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>--%>

<asp:TemplateField HeaderText="操作">
<ItemTemplate>

<table >
<tr>
<td >
    <asp:Button ID="btn_look_shiti" runat="server" CommandArgument='<%# Eval("Tid") %>'
        CommandName="look_shiti" CssClass="button_g_b"   BackColor="YellowGreen"    Text="查看试题"></asp:Button>
    
    
</td>
<td>
    <asp:Button ID="btn_add_shiti" runat="server" BackColor="YellowGreen" CommandArgument='<%# Eval("Tid") %>'
        CommandName="add_shiti" CssClass="button_g_b" Text="添加试题"></asp:Button>
</td>
<td>
    <asp:Button ID="btn_look_set" runat="server" BackColor="LightSkyBlue" CommandArgument='<%# Eval("Tid") %>'
        CommandName="look_set" CssClass="button_b_s" Text="查看"></asp:Button>
</td>
<td>
    <asp:Button ID="btn_modif" runat="server" BackColor="YellowGreen" CommandArgument='<%# Eval("Tid") %>'
        CommandName="modify_shiti" CssClass="button_g_s" Text="修改"></asp:Button>
</td>
<td>
    <asp:Button ID="btn_dell" runat="server" BackColor="Red" CommandArgument='<%# Eval("Tid") %>'
        CommandName="dell_shiti" CssClass="button_r_s" Text="删除"></asp:Button>
</td>
</tr>

</table>


</ItemTemplate>


</asp:TemplateField>
</Columns>
</asp:GridView>

<asp:Panel ID="Panel1" runat="server" Visible="false" Width="100%">
<div class="paginator">
<table border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="left">
<webdiyer:aspnetpager id="PagerButtom" runat="server" alwaysshow="True" bordercolor="Aqua"
cssclass="paginator" custominfoclass="" custominfohtml="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
custominfosectionwidth="" firstpagetext="首页" horizontalalign="Right" lastpagetext="尾页"
layouttype="Table" morebuttonsclass="" nextpagetext="下一页" numericbuttoncount="10"
onpagechanged="Pager_PageChanged" pageindexboxclass="cpb" pagesize="20" prevpagetext="上一页"
showcustominfosection="Right" showpageindexbox="Always">
</webdiyer:aspnetpager>
</td>
</tr>
</table>
</div>
</asp:Panel>
<asp:HiddenField ID="IsEdit" runat="server" />
<asp:HiddenField ID="modify" runat="server" />
</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnModify" />
<asp:AsyncPostBackTrigger ControlID="btnDelete" />
</Triggers>
</asp:UpdatePanel>
<div id="div_win" style="display: none">
<iframe frameborder="0" src="about:blank" style="position: absolute; z-index: -1; width: 100%; height: 100%; top: 0; left: 0;"></iframe>
<asp:UpdatePanel ID="UpdatePanel2"   runat="server">
<ContentTemplate>
<table border="0" cellpadding="0" cellspacing="0" class="table" width="100%">
<tr>
<td align="right" style="width: 130px" class="line">
题型：
</td>
<td align="left"  class="line" >
<%--<asp:TextBox ID="TidType" runat="server" Width="158"></asp:TextBox>--%>
    <asp:DropDownList ID="TidType" runat="server" Width="163">
    </asp:DropDownList>

</td>
</tr>
<tr>
<td align="right" style="width: 130px">
标题：
</td>
<td align="left">
<asp:TextBox ID="TidTitle" runat="server" CssClass="text1" Width="258"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" style="width: 130px" class="line">
副标题：
</td>
<td align="left"  class="line" >
    <FCKeditorV2:FCKeditor ID="Tid_sTitle" runat="server"  Value="" Height="150px" ToolbarSet="Custom1"
        Width="508">
    </FCKeditorV2:FCKeditor>

</td>
</tr>
<tr>
<td align="right" style="width: 130px">
排序序号：
</td>
<td align="left">
<asp:TextBox ID="Tid_xuhao" runat="server" CssClass="text1" Width="158"></asp:TextBox>
</td>
</tr>
<tr>
<td align="right" style="width: 130px" class="line">
分数/题：
</td>
<td align="left"  class="line" >
<asp:TextBox ID="Tid_Score" runat="server" CssClass="text1" onkeyup="value=value.replace(/[^\d]/g,'')"
    Width="158"></asp:TextBox>
</td>
</tr>
<tr runat="server"  id="suiji1">

<td align="right"  >
抽题领域：
</td>
   
<td  align="left">
    <asp:DropDownList ID="kemu" runat="server" onchange="" Visible="false" 
        Width="263">
    </asp:DropDownList>
    
    
    <asp:TextBox ID="t_value" runat="server" CssClass="text1" ReadOnly="true" Text=""></asp:TextBox>
    <asp:HiddenField ID="t_value_bk" runat="server" />
    <asp:HiddenField ID="h_value" runat="server" Value="0" />
    <img onclick="$('#div_4').dialog('open');$('#div_4').dialog({ title: '知识点-选择' });$('#div_4').dialog({ draggable: true,resizable:true });"
        src="../images/select.gif" style="cursor: pointer;" />
    
  
    

</td>
</tr>

    <tr id="suiji2" runat="server">
        <td align="right" class="line">
            难度分布：
        </td>
        <td align="left" class="line">
            
                低/<asp:TextBox ID="easy" runat="server" onkeyup="easy_chk(this)" CssClass="text1" Text="0" Width="50px"></asp:TextBox>/<asp:Label
                    ID="easy_num" runat="server" Font-Bold="true" ForeColor="red" Text="0"></asp:Label>
         
            <asp:HiddenField ID="h_easy" Value="0" runat="server" />
                    
                中/<asp:TextBox ID="middle" runat="server" CssClass="text1" onkeyup="middle_chk(this)"
                    Text="0" Width="50px"></asp:TextBox>/<asp:Label
                    ID="middle_num" runat="server" Font-Bold="true" ForeColor="red" Text="0"></asp:Label>
       
            <asp:HiddenField ID="h_middle" runat="server" Value="0" />
                高/<asp:TextBox ID="high" runat="server" CssClass="text1" onkeyup="high_chk(this)"
                    Text="0" Width="50px"></asp:TextBox>/<asp:Label
                    ID="high_num" runat="server" Font-Bold="true" ForeColor="red" Text="0"></asp:Label>
         
            <asp:HiddenField ID="h_high" runat="server" Value="0" />
        
        
        
        </td>
    </tr>




<%--<tr style="display :none ">
<td align="right" style="width: 130px">
题数：
</td>
<td align="left">
<asp:TextBox ID="Tid_Count" runat="server" CssClass="text1" Width="158" Text="0"></asp:TextBox>
</td>
</tr>--%>



<tr>
<td align="right" style="width: 130px" >
说明：
</td>
<td align="left"   >
<asp:TextBox ID="Tid_Detail" runat="server" CssClass="text1" Width="500" Rows="5"  TextMode="MultiLine" ></asp:TextBox>
</td>
</tr>
</table>





</ContentTemplate>
<Triggers>
<asp:AsyncPostBackTrigger ControlID="btnAdd" EventName="click" />
<asp:AsyncPostBackTrigger ControlID="Button1" EventName="Click" />
    <asp:AsyncPostBackTrigger ControlID="kemu" />

</Triggers> 
</asp:UpdatePanel>
<div class="panel" style="padding-left: 130px; width: 77%">
<asp:Button ID="Button1" runat="server" CssClass="button_r" OnClick="LinkButton1_Click" Text="确 定" />
<asp:Button ID="Button2" runat="server" CssClass="button_b" OnClick="LinkButton2_Click" Text="取 消" />
</div>
</div>
<div id="div1" style="display:none ">
    <iframe frameborder="0" src="about:blank" style="position: absolute; z-index: -1;
        width: 100%; height: 100%; top: 0; left: 0;"></iframe>
    <asp:UpdatePanel ID="UpdatePanel3" UpdateMode="Conditional"  runat="server">
    <ContentTemplate >
    
        <table border="0" cellpadding="0" cellspacing="0" class="table" width="100%">
            <tr>
                <td align="right" class="line" style="width: 130px; height:25px;">
                    题型：
                </td>
                <td align="left" class="line" style="height: 25px">
                
                    <asp:Label ID="l_type" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 130px; height: 25px;">
                    标题：
                </td>
                <td align="left" style="height: 25px">
                 
                    <asp:Label ID="l_title" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" class="line" style="width: 130px; height: 25px;">
                    副标题：
                </td>
                <td align="left" class="line" style="height: 25px">
                    <asp:Label ID="l_stitle" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" style="width: 130px; height: 25px;">
                    序号：
                </td>
                <td align="left" style="height: 25px">
                   
                    <asp:Label ID="l_xuhao" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" class="line" style="width: 130px; height: 25px;">
                    分数/题：
                </td>
                <td align="left" class="line" style="height: 25px">
                  
                    <asp:Label ID="l_score" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            
            
            <tr id="Detail_1" runat="server">
                <td align="right">
                    抽题领域：
                </td>
                <td align="left">
                    <asp:Label ID="l_chouti" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr id="Detail_2" runat="server">
                <td align="right" class="line">
                    难度分布：
                </td>
                <td align="left" class="line">
                    低/<asp:Label ID="l_easy" runat="server" Text=""></asp:Label>
                    中/<asp:Label ID="l_middle" runat="server" Text=""></asp:Label>
                    高/<asp:Label ID="l_high" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            
            
            
            <tr >
                <td align="right" style="width: 130px; height: 25px;">
                    题数：
                </td>
                <td align="left" style="height: 25px">
                    <asp:Label ID="l_tishu" runat="server" Text=""></asp:Label>
                </td>
            </tr>
            <tr>
                <td align="right" class="line" style="width: 130px; height: 25px;">
                    说明：
                </td>
                <td align="left"  class="line" style="height:25px" >
                    <asp:Label ID="l_detail" runat="server" Text=""></asp:Label>
                </td>
            </tr>
        </table>
    
    </ContentTemplate>
    <Triggers >
    <asp:AsyncPostBackTrigger ControlID="GridView1" />
    </Triggers>
    </asp:UpdatePanel>
</div>





    <div id="div2" style="display: none">
 
        <iframe frameborder="0" src="about:blank" style="position: absolute; z-index: -1;
            width: 100%; height: 100%; top: 0; left: 0;"></iframe>
            
            
            <div class="panel" style=" text-align:left ;">
        <%--    科目：<asp:DropDownList ID="d_kemu" AutoPostBack="true"  runat="server" OnSelectedIndexChanged="d_kemu_SelectedIndexChanged">
                </asp:DropDownList>
            
            
                <asp:UpdatePanel ID="UpdatePanel5" UpdateMode="Conditional"  RenderMode="Inline"  runat="server">
                <ContentTemplate >
                
               
            章节：<asp:DropDownList Width="118" ID="d_zhangjie"  runat="server">
                </asp:DropDownList>
                </ContentTemplate>
                    <Triggers>
                     <asp:AsyncPostBackTrigger ControlID="d_kemu"/></Triggers>
                </asp:UpdatePanel>--%>
                <asp:UpdatePanel ID="UpdatePanel5" runat="server" RenderMode="Inline" UpdateMode="Conditional">
                
                    <ContentTemplate>
             
                知识点：<asp:TextBox ID="t_2" runat="server" CssClass="text1" ReadOnly="true" ></asp:TextBox>
                <asp:HiddenField ID="h_2" runat="server" Value="0" />
                    </ContentTemplate>
                    <Triggers >
                    <asp:AsyncPostBackTrigger ControlID="GridView1" />
                    </Triggers>
                </asp:UpdatePanel>
                <img onclick="$('#div_5').dialog('open');$('#div_5').dialog({ title: '知识点-选择' });$('#div_5').dialog({ draggable: true,resizable:true });"
                    src="../images/select.gif" style="cursor: pointer;" />
                <a alt='清空试卷类别' onclick="serch_clear();"  style="cursor: pointer; color: Red;">
                    清空</a> 难度：<asp:DropDownList ID="d_nandu" Width="118" runat="server">
                <asp:ListItem Text="请选择难度..."  Value=""></asp:ListItem>
                    <asp:ListItem Text="容易" Value="容易"></asp:ListItem>
                    <asp:ListItem Text="中等" Value="中等"></asp:ListItem>
                    <asp:ListItem Text="困难" Value="困难"></asp:ListItem>
                
                </asp:DropDownList>
                
            题目：<asp:TextBox ID="d_timu" Width="260" CssClass="text1" runat="server"></asp:TextBox>
                <asp:Button ID="Button4" CssClass="button_b"  runat="server"   Text="搜索" OnClick="Button4_Click" />
               
            
            </div>
          
            
            <div class="panel" style="text-align: right;">
              
                <input  onclick="ChangeAllCheckStatus2(this,'checkbox1')"
                  class="button_g_s"  type="button" value="全 选" />
                <input  onclick="CheckedRev2(this,'checkbox1')"
                   class="button_g_s" type="button" value="反 选" />
                <input class="button_b_b" onclick="clearChoose(this,'checkbox1')" type="button" value="清空选择" />
                <asp:Button ID="Button5" runat="server" CssClass="button_r_b" Text="确定选择"  OnClick="Button5_Click"/>
            </div>
            
        <asp:UpdatePanel ID="UpdatePanel4" UpdateMode="Conditional"  runat="server">
        <ContentTemplate >
            
            <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" CssClass="gv"
                DataKeyNames="Top_id" GridLines="Horizontal" 
                 Width="100%" >
                <RowStyle CssClass="gvRow" />
                <HeaderStyle CssClass="gvHeader" />
                <AlternatingRowStyle CssClass="gvAlternatingRow" />
                <Columns>
                    <asp:TemplateField HeaderText="选" ItemStyle-Height="20px">
                        <HeaderStyle HorizontalAlign="Center" Width="50px" />
                        <ItemStyle HorizontalAlign="Center" Width="50px" Wrap="false" />
                        <ItemTemplate>
                            <asp:CheckBox ID="checkbox1" runat="server" />
                            <asp:HiddenField ID="Top_id" runat="server" Value='<%# Eval("Top_id") %>' />
                        </ItemTemplate>
                    </asp:TemplateField>
                    <asp:BoundField DataField="K_Name" HeaderText="章节" ItemStyle-HorizontalAlign="Center"
                        SortExpression="K_Name" />
                    <asp:BoundField DataField="Top_Diffculty" HeaderText="难度" ItemStyle-HorizontalAlign="Center"
                        SortExpression="Top_Diffculty" />
                    <%--<asp:BoundField  SortExpression="Tid_sTitle"   DataField="Tid_sTitle" HeaderText="副标题" ItemStyle-HorizontalAlign="Center" >
</asp:BoundField>--%>
                   <%-- <asp:BoundField DataField="Top_Theme" HeaderText="题目" ItemStyle-HorizontalAlign="Center"
                        SortExpression="Top_Theme" />--%>
             <asp:TemplateField HeaderText="题目">
             <ItemTemplate>
                 <asp:Label ID="Label1"          runat="server" Text=""></asp:Label>
             </ItemTemplate>
             </asp:TemplateField>
             
             <asp:TemplateField >
             <ItemTemplate>
                     <input class="button_r_s" onclick='l_in3(this,<%# Container.DataItemIndex+2%>,"#fff","#eee","#bce774","#ffff99")'
                          type="button" value="选择" />
                     
             </ItemTemplate>
             </asp:TemplateField>
                </Columns>
            </asp:GridView>
    
            <asp:Panel ID="Panel2" runat="server" Visible="false" Width="100%">
                <div class="paginator">
                    <table border="0" cellpadding="0" cellspacing="0">
                        <tr>
                            <td align="left">
                                <webdiyer:AspNetPager ID="Aspnetpager1" runat="server" AlwaysShow="True" BorderColor="Aqua"
                                    CssClass="paginator" CustomInfoClass="" CustomInfoHTML="当前第%CurrentPageIndex%/%PageCount%页 共%RecordCount%条记录 每页%PageSize%条 "
                                    CustomInfoSectionWidth="" FirstPageText="首页" HorizontalAlign="Right" LastPageText="尾页"
                                    LayoutType="Table" MoreButtonsClass="" NextPageText="下一页" NumericButtonCount="10"
                                    OnPageChanged="Pager_PageChanged1" PageIndexBoxClass="cpb" PageSize="20" PrevPageText="上一页"
                                    ShowCustomInfoSection="Right" ShowPageIndexBox="Always">
                                </webdiyer:AspNetPager>
                            </td>
                        </tr>
                    </table>
                </div>
            </asp:Panel>
        </ContentTemplate>
        <Triggers >
        <asp:AsyncPostBackTrigger ControlID="GridView1" />
            <asp:AsyncPostBackTrigger ControlID="Button4" />
            <asp:AsyncPostBackTrigger ControlID="Button5" />
        
        </Triggers>
        
        
        
        
        </asp:UpdatePanel>
            
            
            
            
    </div>
    <div id="div_4" style="display: none">
        <iframe frameborder="0" src="about:blank" style="position: absolute; z-index: -1;
            width: 100%; height: 100%; top: 0; left: 0;"></iframe>
        <asp:TreeView ID="TreeView1" runat="server" CollapseImageUrl="~/images/folder.gif"
            ExpandImageUrl="~/images/folder-closed.gif" NoExpandImageUrl="~/images/file.gif">
        </asp:TreeView>
    </div>
    <div id="div_5" style="display: none">
        <iframe frameborder="0" src="about:blank" style="position: absolute; z-index: -1;
            width: 100%; height: 100%; top: 0; left: 0;"></iframe>
        <asp:TreeView ID="TreeView2" runat="server" CollapseImageUrl="~/images/folder.gif"
            ExpandImageUrl="~/images/folder-closed.gif" NoExpandImageUrl="~/images/file.gif">
        </asp:TreeView>
    </div>
    
    
</form>
<asp:Label ID="lb_pageid" runat="server" Text="" Visible="false"></asp:Label>
<asp:Label ID="recordcount" runat="server" Visible="false"></asp:Label>
<asp:Label ID="page_indexpage" runat="server" Text="1" Visible="false"></asp:Label>
<asp:Label ID="page_count" runat="server" Text="0" Visible="false"></asp:Label>


<asp:Label ID="l2" runat="server" ></asp:Label>

</body>
</html>
