123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- <?xml version="1.0" encoding="EUC-KR"?>
- <?xml-stylesheet type="text/css" href="../../../com/commonweb/css/common.css" ?>
- <xhtml:html xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://www.w3.org/2002/01/xforms" xmlns:ev="http://www.w3.org/2001/xml-events">
- <xhtml:head>
- <xhtml:title>SQL 실행기</xhtml:title>
- <model id="model1">
- <instance id="instance1">
- <root xmlns="">
- <main>
- <result>
- <resultset/>
- </result>
- <sql/>
- <sqltype>select</sqltype>
- <pagequery>true</pagequery>
- <maxcount>1000</maxcount>
- </main>
- <send>
- <sql/>
- <datasource>comdb</datasource>
- <maxcount>1000</maxcount>
- <offset/>
- <rollback/>
- <sqltype/>
- <params>
- <pname/>
- <pvalue/>
- </params>
- <totcnt>false</totcnt>
- </send>
- <init>
- <sqlpopupitem>
- <item>
- <name>select 실행</name>
- <func>fSubmitSelect</func>
- </item>
- <item>
- <name>insert/update/delete 실행</name>
- <func>fSubmitUpdate</func>
- </item>
- <item>
- <name>procedure call 실행</name>
- <func>fSubmitCall</func>
- </item>
- </sqlpopupitem>
- </init>
- <temp/>
- </root>
- </instance>
- <script type="javascript" ev:event="xforms-ready">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- <submission id="TXZSL00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result/resultset"/>
- <submission id="TRZSL00201" mediatype="application/x-www-form-urlencoded" method="post" ref="/root/send" resultref="/root/main/result/resultset"/>
- </model>
- <script type="javascript" src="../../../com/commonweb/js/common.js"/>
- <script type="javascript" src="../../../com/commonweb/js/tfHelper.js"/>
- <script type="javascript">
- <![CDATA[
- // 화면 open시와 초기화 버튼 클릭시 화면 초기화 기능을 수행한다.
- function fInitialize() {
- grd_resultset.rebuild();
- model.resetInstanceNode("/root/main/sql");
- model.setValue("/root/main/sqltype","select");
- model.setValue("/root/main/maxcount",1000);
- model.setValue("/root/main/pagequery","true");
-
- model.setValue("/root/send/datasource","comdb");
- model.setValue("/root/send/maxcount",1000);
- model.resetInstanceNode("/root/send/sql");
- model.resetInstanceNode("/root/send/offset");
- model.resetInstanceNode("/root/send/rollback");
- model.resetInstanceNode("/root/send/sqltype");
- model.removeNodeset("/root/send/params");
- model.refresh();
- }
- function fSubmitExecute() {
- var sqlText = model.getValue("/root/main/sql");
- model.makeValue("/root/send/sql",sqlText);
-
- var sqlType = model.getValue("/root/main/sqltype");
- model.makeValue("/root/send/sqltype",sqlType);
-
- grd_resultset.rebuild();
- if (sqlType == "select") {
- submit("TRZSL00201");
- } else {
- submit("TXZSL00201");
- }
- }
- function fSubmitSelect() {
- model.makeValue("/root/send/sqltype","select");
- submit("TRZSL00201");
- }
- function fSubmitUpdate() {
- model.makeValue("/root/send/sqltype","update");
- submit("TXZSL00201");
- }
- function fSubmitCall() {
- model.makeValue("/root/send/sqltype","call");
- submit("TXZSL00201");
- }
- ]]>
- </script>
- </xhtml:head>
- <xhtml:body guideline="1,1196;" style="margin-left:8; margin-top:0; margin-right:8; margin-bottom:0; ">
- <group id="group1" style="left:0px; top:0px; width:1195px; height:13px; ">
- <caption id="caption6" class="tit_1" style="left:0px; top:0px; width:189px; height:14px; ">SQL 실행기</caption>
- </group>
- <group id="group3" scroll="auto" style="left:0px; top:40px; width:1195px; height:744px; ">
- <line id="line4" class="line_2" style="x1:0px; y1:740px; x2:1194px; y2:740px; "/>
- <group id="group2" style="left:0px; top:14px; width:1194px; height:35px; vertical-align:top; ">
- <shape id="roundrect1" appearance="roundrect" style="left:0px; top:0px; width:1194px; height:35px; "/>
- <caption id="caption2" class="search_name" style="left:16px; top:8px; width:114px; height:17px; ">datasource :</caption>
- <line id="line13" style="x1:1121px; y1:7px; x2:1121px; y2:29px; border-color:#ffe4bb; border-left-style:solid; "/>
- <select id="chk_rollback" ref="/root/send/rollback" navindex="3" overflow="visible" appearance="full" style="left:1030px; top:10px; width:80px; height:17px; border-style:none; ">
- <choices>
- <item>
- <label>Rollback</label>
- <value>true</value>
- </item>
- </choices>
- </select>
- <select1 id="cmb_datasource" ref="/root/send/datasource" class="combo_search" navindex="1" appearance="minimal" style="left:140px; top:8px; width:110px; height:19px; ">
- <choices>
- <item>
- <label>comdb</label>
- <value>comdb</value>
- </item>
- <item>
- <label>emrdb</label>
- <value>emrdb</value>
- </item>
- <item>
- <label>pamdb</label>
- <value>pamdb</value>
- </item>
- <item>
- <label>astdb</label>
- <value>astdb</value>
- </item>
- <item>
- <label>lisdb</label>
- <value>lisdb</value>
- </item>
- <item>
- <label>misdb</label>
- <value>misdb</value>
- </item>
- <item>
- <label>tisdb</label>
- <value>tisdb</value>
- </item>
- <item>
- <label>crmdb</label>
- <value>crmdb</value>
- </item>
- <item>
- <label>cmcdb</label>
- <value>cmcdb</value>
- </item>
- <item>
- <label>sybdb</label>
- <value>sybdb</value>
- </item>
- <item>
- <label>bnsdb</label>
- <value>bnsdb</value>
- </item>
- <item>
- <label>edsdb</label>
- <value>edsdb</value>
- </item>
- </choices>
- </select1>
- <button id="btn_execute" class="btn1_letter2" navindex="4" style="left:1132px; top:7px; width:56px; height:22px; ">
- <caption>실행</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- if (chk_pagequery.value == "true") {
- ipt_maxcount.disabled = false;
- model.makeValue("/root/send/maxcount",model.getValue("/root/main/maxcount"));
- } else {
- ipt_maxcount.disabled = true;
- model.makeValue("/root/send/maxcount",0);
- }
- //model.makeValue("/root/send/maxcount",model.getValue("/root/main/maxcount"));
- fSubmitExecute();
- //model.send("TXZSL00201");
- ]]>
- </script>
- </button>
- <select1 id="cmb_sqltype" ref="/root/main/sqltype" navindex="2" appearance="minimal" style="left:845px; top:8px; width:165px; height:19px; ">
- <choices>
- <item>
- <label>select</label>
- <value>select</value>
- </item>
- <item>
- <label>insert/update/delete</label>
- <value>update</value>
- </item>
- <item>
- <label>call</label>
- <value>call</value>
- </item>
- </choices>
- </select1>
- </group>
- <caption id="caption1" class="tit_2" style="left:6px; top:370px; width:139px; height:14px; ">Result Set</caption>
- <line id="line1" class="line_1" style="x1:0px; y1:385px; x2:1194px; y2:385px; "/>
- <caption id="cap_msgcnts3" class="cell_1" style="left:925px; top:390px; width:100px; height:23px; ">object size(est.)</caption>
- <caption id="caption20" class="tit_2" style="left:6px; top:62px; width:149px; height:14px; ">SQL parameters</caption>
- <line id="line8" class="line_1" style="x1:0px; y1:77px; x2:235px; y2:77px; "/>
- <line id="line7" class="line_3" style="x1:0px; y1:741px; x2:1194px; y2:741px; "/>
- <line id="line2" class="line_1" style="x1:240px; y1:77px; x2:1194px; y2:77px; "/>
- <caption id="caption3" class="tit_2" style="left:245px; top:62px; width:149px; height:14px; ">SQL</caption>
- <datagrid id="grd_params" nodeset="/root/send/params" caption="name^value" colwidth="100, 100" dataheight="25" defaultrows="0" explorerbar="sort" extendlastcol="scroll" mergecellsfixedrows="bycolrec" rowheader="seq" rowheight="25" style="left:0px; top:82px; width:235px; height:277px; ">
- <col ref="pname" type="input" style="text-align:left; word-wrap:none; "/>
- <col ref="pvalue" type="input" style="text-align:center; "/>
- </datagrid>
- <textarea id="tar_sql" ref="/root/main/sql" navindex="5" style="left:240px; top:82px; width:954px; height:277px; ">
- <script type="javascript" ev:event="onmousedown">
- <![CDATA[
- setPopupMenu("tar_sql",false,"/root/init/sqlpopupitem/item","name","func");
- ]]>
- </script>
- <script type="javascript" ev:event="DOMFocusOut">
- <![CDATA[
- initPopupMenu();
- ]]>
- </script>
- </textarea>
- <button id="btn_addparam" class="icon_plus" style="left:200px; top:60px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- grd_params.addRow();
- ]]>
- </script>
- </button>
- <button id="btn_delparam" class="icon_minus" style="left:220px; top:60px; width:13px; height:15px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- var cur_row = grd_params.row;
- grd_params.deleteRow(cur_row);
- ]]>
- </script>
- </button>
- <datagrid id="grd_resultset" nodeset="/root/main/result/resultset" caption="column" colsep="^" colwidth="79" datatype="delimeter" mergecellsfixedrows="bycolrec" rowheader="seq" rowsep="|" style="left:0px; top:390px; width:1193px; height:350px; ">
- <col ref="depth"/>
- </datagrid>
- <button id="btn_clearsql" class="btn2_letter3" style="left:1138px; top:55px; width:53px; height:19px; ">
- <caption>clear</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.resetInstanceNode("/root/main/sql");
- model.refresh();
- ]]>
- </script>
- </button>
- <input id="ipt_maxcount" ref="/root/main/maxcount" style="left:1050px; top:363px; width:109px; height:19px; "/>
- <button id="btn_nextresult" class="icon_right" visibility="hidden" style="left:1165px; top:363px; width:26px; height:19px; ">
- <caption/>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- model.makeValue("/root/send/offset",grd_resultset.rows-1);
- fSubmitExecute();
- ]]>
- </script>
- </button>
- <select id="chk_pagequery" ref="/root/main/pagequery" overflow="visible" appearance="full" style="left:945px; top:365px; width:100px; height:20px; border-style:none; ">
- <choices>
- <item>
- <label>Page query</label>
- <value>true</value>
- </item>
- </choices>
- <script type="javascript" ev:event="xforms-value-changed">
- <![CDATA[
- if (chk_pagequery.value == "true") {
- ipt_maxcount.disabled = false;
- //model.makeValue("/root/send/maxcount",model.getValue("/root/main/maxcount"));
- } else {
- ipt_maxcount.disabled = true;
- //model.makeValue("/root/send/maxcount",0);
- }
- ]]>
- </script>
- </select>
- </group>
- <group id="group4" scroll="auto" style="left:0px; top:13px; width:1195px; height:27px; ">
- <line id="line32" class="line_6" style="x1:0px; y1:25px; x2:1194px; y2:25px; "/>
- <button id="btn_init" class="btn4_letter3" navindex="6" style="left:1126px; top:3px; width:68px; height:22px; ">
- <caption>초기화</caption>
- <script type="javascript" ev:event="DOMActivate">
- <![CDATA[
- fInitialize();
- ]]>
- </script>
- </button>
- </group>
- </xhtml:body>
- </xhtml:html>
|