<%@ Page Title="" Language="VB" MasterPageFile="~/App_MasterPage/mpManager.master" AutoEventWireup="false" CodeFile="SQLBuild.aspx.vb" Inherits="Manager_Tags_SQLBuild" validateRequest="false"  %>

<asp:Content ID="Content1" ContentPlaceHolderID="chpPageTitle" Runat="Server">查询编辑器</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="chpHead" Runat="Server">
<style type="text/css">
    #BuildStep1{display:block;}
    #BuildStep2{display:none;}
    #TableList{width:200px;height:550px;}
    #lrSplit{width: 6px;background:url(/App_Themes/ManagerTheme/images/splitBG.gif); background-repeat:repeat-y;}
    #SelectedTable{height:240px;}
    #divScroll{padding:10px 0px 0px 10px;height:240px;overflow:scroll;overflow-y:hidden;}
    #ToolBar{height:30px;border-top: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC; background-color:#e7e7e6; padding-right:20px; line-height:30px;}
    #ToolBar img{ margin:7px 10px 0px 10px;}
    #ToolBar input{margin:5px 5px 0px 5px;}
    #SQLText{height:160px;border-bottom: 1px solid #CCCCCC;}
    #ExValue{height:100px;}
    #divSQLTest{overflow-x:hidden;overflow-y:scroll;height:160px;}
    .Contenttable{border: 1px solid #CCCCCC;margin:0px; padding:0px;}
    .TableScroll{overflow-x:hidden;overflow-y:scroll;width:200px;height:550px; margin:0px; padding:0px;}
    .Tableli{list-style:none; line-height:25px; height:25px;}
    .Tableli span{display:block; float:left; cursor:pointer; padding:0px 5px 0px 5px;}
    .liSelected{background-color:#0373F5;color:#fff;}
    .TBFieldsList{border: 2px ridge #ffffff;width:300px; float:left; }
    .TBFieldsList_table{width:300px;}
    .TBTitle{font-size:12px;font-family:Microsoft YaHei;color:#FFFFFF;background-color:#3399FF;height:25px;line-height:25px;padding:0px 0px 0px 10px;}
    .FieldsName{color:#666666;width:150px;}
    .FieldIcon{width:30px; text-align:center;}
    .TBConnect{width:38px; float:left; margin-top:35px;}
    .FieldsScroll{overflow-x:hidden;overflow-y:scroll;height:180px;width:300px;}
    .TabNormal{background-color:#e7e7e6;writing-mode: tb-rl; text-align: center; padding-right:5px; height:60px;border-top: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;letter-spacing:4px;direction: rtl!important;direction:inherit;cursor:pointer;}
    .TabSelect{background-color:#fffbd1;writing-mode: tb-rl; text-align: center; padding-right:5px; height:60px;border-top: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC; letter-spacing:4px;direction: rtl!important;direction:inherit;cursor:pointer;}
    .TabSQLNormal{background-color:#e7e7e6;writing-mode: tb-rl; text-align: center; padding-right:5px; height:80px;border-top: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;letter-spacing:4px;direction: rtl!important;direction:inherit;cursor:pointer;}
    .TabSQLSelect{background-color:#fffbd1;writing-mode: tb-rl; text-align: center; padding-right:5px; height:80px;border-top: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC; letter-spacing:4px;direction: rtl!important;direction:inherit;cursor:pointer;}
    .TBSelectFilter{width:100%;border-top: 1px solid #CCCCCC;border-left: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;}
    .TBSelectFilterTitle{line-height:25px;height:25px;text-align:center; font-weight:bold; background-color:#3399FF;border-bottom: 1px solid #CCCCCC;border-right: 1px solid #CCCCCC; color:#FFFFFF}
    .TBSelectFilterText{line-height:25px;height:25px;text-align:center;border-right: 1px solid #CCCCCC;border-bottom: 1px solid #CCCCCC;}
    .TDAlert{ background-color:#e7e7e6;}
    .TDNormal{ background-color:#FFFFFF;}
    .ToolBarLeft{float:left;}
    .ToolBarLeft img{ cursor:pointer;}
    .ToolBarLine{ background-image: url(/App_Themes/ManagerTheme/Images/MenuQkLine.gif); height:30px; width:5px; float:left; }
    .menuin{background-color:#B0E6FF;cursor:pointer;height:25px;line-height:25px;}
    .menuout{background-color:#FFFFFF;height:25px;line-height:25px;}
    .dClass{height:130px;position:absolute;display:none; background-color:#FFFFFF; width:385px;border: 1px solid #C0C0C0; padding-top:5px;overflow:scroll;overflow-x:hidden;}
    .cClass{margin:0px;padding:0px; }
    .cClass li{list-style:none; font-size:12px;padding:0px 10px 0px 10px; line-height:25px;height:25px; cursor:pointer; overflow:hidden;}
    .cClass_lihour{list-style:none; font-size:12px;padding:0px 10px 0px 10px; line-height:25px; cursor:pointer;color:#ff8502;}
    
</style>
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="chpScript" Runat="Server">
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/jquery.min.js"></script> 
<script type="text/javascript" src="/App_Themes/ManagerTheme/js/lhgdialog.min.js"></script>
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/JSON.js"></script> 
<script type="text/javascript" src="/App_Themes/ManagerTheme/Js/SQLBuild.js"></script> 
<script language="javascript" type="text/javascript">
    var hfWhere ='<%=hfWhere.ClientID %>';
    var hfOrderBY ='<%=hfOrderBY.ClientID %>';
    var hfSelectFields='<%=hfSelectFields.ClientID %>';
    var hfTableJson = '<%=hfTableJson.ClientID %>';
    var btnFlash = '<%=imgReflash.ClientID %>';
    var hfHTMLMain = '<%=hfHTMLMain.ClientID %>';
    var hfHTMLWhere = '<%=hfHTMLWhere.ClientID %>';
    var hfHTMLOrder = '<%=hfHTMLOrder.ClientID %>';
    var hfInner = '<%=hfInner.ClientID %>'
    var hfHTMLInner = '<%=hfHTMLInner.ClientID %>'
    var txtSQLMain = '<%=txtSQLMain.ClientID %>';
    var txtSQLCount = '<%=txtSQLCount.ClientID %>';
    var hftxtSQL = '<%=hftxtSQL.ClientID %>';
    var btnRunPars = '<%=btnRunPars.ClientID %>';
    var hfParList = '<%=hfParList.ClientID %>';
    var lblParList = '<%=lblParList.ClientID %>';
</script>
</asp:Content>
<asp:Content ID="Content4" ContentPlaceHolderID="chpTitle" Runat="Server">
</asp:Content>
<asp:Content ID="Content5" ContentPlaceHolderID="chpContent" Runat="Server">
<div id="BuildStep2">
    <table border="0" width="100%" cellspacing="0" cellpadding="0" class="line_table">
        <tr>
            <td align="right" width="20%">查询名称：</td>
            <td width="30%"><asp:TextBox ID="txtSQLName" runat="server"  Width="96%" ></asp:TextBox></td>
            <td width="50%"><font color="red">*</font></td>
        </tr>
        <tr>
            <td align="right" width="20%">查询分类：</td>
            <td width="30%"><asp:DropDownList ID="dplSQLClassID" runat="server"></asp:DropDownList></td>
            <td width="50%"><font color="red">*</font></td>
        </tr>
        <tr>
            <td align="right" width="20%">缓存类型：</td>
            <td width="30%"><asp:DropDownList ID="dplCacheLifeType" runat="server"><asp:ListItem Value="1">绝对时间</asp:ListItem><asp:ListItem Value="2">相对时间</asp:ListItem><asp:ListItem Value="3">文件</asp:ListItem><asp:ListItem Value="0">无缓存</asp:ListItem></asp:DropDownList>                    </td>
            <td width="50%"><font color="red"></font></td>
        </tr>
        <tr>
            <td align="right" width="20%">缓存依赖：</td>
            <td width="30%"><asp:TextBox ID="txtDependOf" runat="server"  Width="50%" >20</asp:TextBox></td>
            <td width="50%"><font color="red"></font></td>
        </tr>                                                                                             	            
    </table>
    <div style=" text-align:center"><img src="/App_Themes/ManagerTheme/Images/EditSQL.gif" alt="编辑SQL" style=" cursor:pointer;" onclick="TabPannel(2);">&nbsp;&nbsp;<asp:ImageButton ID="imgSave" runat="server" ImageUrl="~/App_Themes/ManagerTheme/Images/tj.jpg" style="height: 22px" ToolTip="添加" /></div>  
    <asp:HiddenField ID="hfWhere" runat="server" />
    <asp:HiddenField ID="hfOrderBY" runat="server" />
    <asp:HiddenField ID="hfSelectFields" runat="server" />
    <asp:HiddenField ID="hfTableJson" runat="server" />
    <asp:HiddenField ID="hfHTMLMain" runat="server" />
    <asp:HiddenField ID="hfHTMLWhere" runat="server" />
    <asp:HiddenField ID="hfHTMLOrder" runat="server" />
    <asp:HiddenField ID="hfInner" runat="server" />
    <asp:HiddenField ID="hfHTMLInner" runat="server" />
    <asp:HiddenField ID="hftxtSQL" runat="server" />
    <asp:HiddenField ID="hfParList" runat="server" />
</div>

<div id="BuildStep1">
    <div id="dClass" class="dClass">
    <ul id="ulClass" class="cClass"></ul></div>
    <table style="width: 100%" cellpadding="0" cellspacing="0" class="Contenttable">
	<tr>
		<td rowspan="8" id="TableList" valign="top"><ul class="TableScroll" id="ulTableList"></ul></td>
		<td rowspan="8" id="lrSplit"></td>
		<td valign="top" rowspan="4" id="SelectedTable">
		    <div id="divScroll">
		        <div id="divSelectedTable"></div>
		        <div id="divFilter" style="display:none;">
		            <table cellpadding="0" cellspacing="0" class="TBSelectFilter">
		                <tr>
		                    <td class="TBSelectFilterTitle" style="width:10%">连接符</td>
		                    <td class="TBSelectFilterTitle" style="width:25%">字段</td>
		                    <td class="TBSelectFilterTitle" style="width:10%">运算符</td>
		                    <td class="TBSelectFilterTitle" style="width:15%">取值方式</td>
		                    <td class="TBSelectFilterTitle" style="width:10%">名称/值</td>
		                    <td class="TBSelectFilterTitle" style="width:10%">值解密</td>
		                    <td class="TBSelectFilterTitle" style="width:10%">可为空</td>
		                    <td class="TBSelectFilterTitle" style="width:10%">可忽略</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H1" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="A1" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B1" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C1" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D1" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E1" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F1" name="F1" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G1" name="G1" /></td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H2" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:30%" id="A2" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B2" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C2" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D2" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E2" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F2" name="F2" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G2" name="G2" /></td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H3" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:30%" id="A3" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B3" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C3" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D3" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E3" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F3" name="F3" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G3" name="G3" /></td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H4" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:30%" id="A4" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B4" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C4" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D4" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E4" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F4" name="F4" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G4" name="G4" /></td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H5" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:30%" id="A5" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B5" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C5" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D5" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E5" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F5" name="F5" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G5" name="G5" /></td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H6" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:30%" id="A6" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B6" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C6" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D6" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E6" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F6" name="F6" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G6" name="G6" /></td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:10%" id="H7" title="Connect">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:30%" id="A7" title="Field">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="B7" title="Operator">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:15%" id="C7" title="ValueMethod">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="D7" title="NameValue">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" id="E7" title="Decrypt">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Empty"><input type="checkbox" id="F7" name="F7" /></td>
		                    <td class="TBSelectFilterText" style="width:10%" title="Ignore"><input type="checkbox" id="G7" name="G7" /></td>
		                </tr>
		            </table>
		        </div>
		        <div id="divOrder" style="display:none;">
		            <table cellpadding="0" cellspacing="0" class="TBSelectFilter">
		                <tr>
		                    <td class="TBSelectFilterTitle" style="width:25%">字段来源</td>
		                    <td class="TBSelectFilterTitle" style="width:25%">字段名称</td>
		                    <td class="TBSelectFilterTitle" style="width:25%">排序来源</td>
		                    <td class="TBSelectFilterTitle" style="width:25%">排序名称</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA1" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB1" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC1" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD1" title="OrderName">&nbsp;</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA2" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB2" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC2" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD2" title="OrderName">&nbsp;</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA3" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB3" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC3" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD3" title="OrderName">&nbsp;</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA4" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB4" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC4" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD4" title="OrderName">&nbsp;</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA5" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB5" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC5" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD5" title="OrderName">&nbsp;</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA6" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB6" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC6" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD6" title="OrderName">&nbsp;</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:25%" id="AA7" title="FieldSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="BB7" title="FieldName">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="CC7" title="OrderSource">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:25%" id="DD7" title="OrderName">&nbsp;</td>
		                </tr>
		            </table> 
		        </div>
		        <div id="divConnect" style="display:none;">
		            <table cellpadding="0" cellspacing="0" class="TBSelectFilter">
		                <tr>
		                    <td class="TBSelectFilterTitle" style="width:25%">关联字段A</td>
		                    <td class="TBSelectFilterTitle" style="width:25%">关联字段B</td>
		                </tr>
		                <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA1" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB1" title="CnnField">&nbsp;</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA2" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB2" title="CnnField">&nbsp;</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA3" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB3" title="CnnField">&nbsp;</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA4" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB4" title="CnnField">&nbsp;</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA5" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB5" title="CnnField">&nbsp;</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA6" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB6" title="CnnField">&nbsp;</td>
		                </tr>
		                 <tr>
		                    <td class="TBSelectFilterText" style="width:50%" id="AAA7" title="CnnField">&nbsp;</td>
		                    <td class="TBSelectFilterText" style="width:50%" id="BBB7" title="CnnField">&nbsp;</td>
		                </tr>
		            </table>
		        </div>
		    </div>
	    </td>
		<td class="TabSelect" title="Fields" id="TabSelectedTable" onclick="FieldsTab(this.id);">输出</td>
	</tr>
	<tr><td class="TabNormal" title="Fields" id="TabConnect" onclick="FieldsTab(this.id);">关联</td></tr>
	<tr><td class="TabNormal" title="Fields" id="TabFilter" onclick="FieldsTab(this.id);">过滤</td></tr>
	<tr><td class="TabNormal" title="Fields" id="TabOrder" onclick="FieldsTab(this.id);">排序</td></tr>
	<tr><td id="ToolBar" colspan="2">
	    <div class="ToolBarLeft">
	        <img alt="Save" src="/App_Themes/ManagerTheme/Images/iconSave.gif" onclick="iconSaveClick();TabPannel(1);" />
	        <asp:ImageButton ID="imgRun" runat="server" ImageUrl="/App_Themes/ManagerTheme/Images/iconRun.gif" />
	    </div>
	    <div class="ToolBarLine"></div>
	    <div class="ToolBarLeft">
	        <img alt="PageSize" src="/App_Themes/ManagerTheme/Images/PageSize.gif" onclick="InsertPageSize();" />
	        <img alt="Page" src="/App_Themes/ManagerTheme/Images/Page.gif" onclick="InsertPage();" />
	        <img alt="Request" src="/App_Themes/ManagerTheme/Images/iconRequest.gif" onclick="InsertRequest();" />
	        <img alt="Cookie" src="/App_Themes/ManagerTheme/Images/iconCookie.gif" onclick="InsertCookie();" />
	    </div>
	    <div class="ToolBarLine"></div>
	    <div class="ToolBarLeft">
	        <span><asp:DropDownList ID="dplSQLTemplate" runat="server"></asp:DropDownList> </span>
	        <span><asp:ImageButton ID="imgReflash" runat="server" ImageUrl="/App_Themes/ManagerTheme/Images/iconBuildSQL.gif" /></span>
	    </div>
	</td></tr>
	<tr><td id="SQLText" valign="top" rowspan="2">
            <div id="divSQLMain"><asp:TextBox ID="txtSQLMain" runat="server" TextMode="MultiLine" Width="99%" Height="155px" BorderWidth="0px"></asp:TextBox></div>
            <div id="divSQLCount" style="display:none;"><asp:TextBox ID="txtSQLCount" runat="server" TextMode="MultiLine" Width="99%" Height="155px" BorderWidth="0px"></asp:TextBox></div>
            <div id="divSQLTest" style="display:none;"><asp:Label ID="lblParList" runat="server" Text=""></asp:Label><div style="text-align:center; margin-top:5px;"><asp:Button ID="btnRunPars" runat="server" Text="提交" /></div></div>
	    </td>
	    <td  class="TabSQLSelect" title="SQL" id="TabSQLMain" onclick="SQLTab(this.id);">主查询</td>
	</tr>
	<tr><td  class="TabSQLNormal" title="SQL" id="TabSQLCount" onclick="SQLTab(this.id);">记录总数</td></tr>
	<tr><td id="ExValue" valign="top" colspan="2"><div style="overflow-x:hidden;overflow-y:scroll;height:100px;"><div style="height:1000px;"><asp:Label ID="lblExValue" runat="server" Text=""></asp:Label></div></div></td></tr>
</table>
</div>
</asp:Content>

