biz_testSample01.xfdl 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194
  1. <?xml version="1.0" encoding="utf-8"?>
  2. <FDL version="1.4">
  3. <TypeDefinition url="..\default_typedef.xml"/>
  4. <Form id="biz_testSample01" classname="biz_testSample01" inheritanceid="" position="absolute 0 0 1024 768" titletext="New Form">
  5. <Layouts>
  6. <Layout>
  7. <Shape id="Shape00" text="Shape00" position="absolute 28 629 992 638"/>
  8. <GroupBox id="GroupBox00" text="ReadOnly" position="absolute 21 13 1001 192" onlbuttondown="GroupBox00_onlbuttondown"/>
  9. <Grid id="gd_AndOr" taborder="1" useinputpanel="false" position="absolute 40 75 363 184" binddataset="ds1">
  10. <Formats>
  11. <Format id="default">
  12. <Columns>
  13. <Column size="80"/>
  14. <Column size="80"/>
  15. <Column size="80"/>
  16. </Columns>
  17. <Rows>
  18. <Row size="24" band="head"/>
  19. <Row size="24"/>
  20. </Rows>
  21. <Band id="head">
  22. <Cell text="inclprcpno"/>
  23. <Cell col="1" text="status"/>
  24. <Cell col="2" text="ansttm"/>
  25. </Band>
  26. <Band id="body">
  27. <Cell text="bind:inclprcpno"/>
  28. <Cell col="1" text="bind:status"/>
  29. <Cell col="2" edittype="expr:(inclprcpno&gt;0||status=='D')?'normal':'none'" text="bind:ansttm"/>
  30. </Band>
  31. </Format>
  32. </Formats>
  33. </Grid>
  34. <Static id="Static00" text="1. And/Or&#13;&#10;&lt;bind id=&quot;bind40&quot; ref=&quot;/root/main/prcp/prcplist/ansttm&quot; readonly=&quot;( ../inclprcpno &amp;gt; 0 ) or (../status = &amp;quot;D&amp;quot;)&quot;/&gt;" position="absolute 44 27 1000 74"/>
  35. <GroupBox id="grp_Calculate" text="Calculate" position="absolute 7 211 984 621"/>
  36. <Static id="Static01" text="1. 사칙연산 (일반)&#13;&#10;&lt;bind id=&quot;bind_totamt&quot; ref=&quot;/root/hidden/totamt&quot; calculate=&quot;(/root/main/orch_one/paytotamt) - (/root/main/orch_one/incmtax) -(/root/main/orch_one/resdntax)&quot;/&gt;" position="absolute 58 256 976 286" onclick="Static01_onclick"/>
  37. <Edit id="ed_cal1" taborder="2" position="absolute 66 302 189 332"/>
  38. <Static id="st_cal1" text="Static02" position="absolute 223 305 358 331" style="border:1 solid #808080ff ;" onclick="Static02_onclick" expr="expr:ds2.getColumn(ds2.rowposition,&quot;paytotamt&quot;)-ds2.getColumn(ds2.rowposition,&quot;incmtax&quot;)-ds2.getColumn(ds2.rowposition,&quot;resdntax&quot;)"/>
  39. <Button id="Button00" taborder="3" text="Button00" position="absolute 384 302 527 338" onclick="Button00_onclick"/>
  40. <Grid id="Grid00" taborder="4" useinputpanel="false" position="absolute 607 310 915 381" binddataset="ds2">
  41. <Formats>
  42. <Format id="default">
  43. <Columns>
  44. <Column size="80"/>
  45. <Column size="80"/>
  46. <Column size="80"/>
  47. <Column size="80"/>
  48. </Columns>
  49. <Rows>
  50. <Row size="24" band="head"/>
  51. <Row size="24"/>
  52. </Rows>
  53. <Band id="head">
  54. <Cell text="paytotamt"/>
  55. <Cell col="1" text="incmtax"/>
  56. <Cell col="2" text="resdntax"/>
  57. <Cell col="3" text="totamt"/>
  58. </Band>
  59. <Band id="body">
  60. <Cell edittype="normal" text="bind:paytotamt"/>
  61. <Cell col="1" text="bind:incmtax"/>
  62. <Cell col="2" text="bind:resdntax"/>
  63. <Cell col="3" text="bind:totamt"/>
  64. </Band>
  65. </Format>
  66. </Formats>
  67. </Grid>
  68. <Button id="Button01" taborder="5" text="Button01" position="absolute 225 355 358 380" onclick="Button01_onclick"/>
  69. <Edit id="ed_cal2" taborder="6" position="absolute 65 355 199 383"/>
  70. <Static id="Static02" text="Static02" position="absolute 66 395 199 424"/>
  71. <Button id="Button02" taborder="7" text="Button02" position="absolute 221 404 358 429" onclick="Button02_onclick"/>
  72. <Button id="Button03" taborder="8" text="Button03" position="absolute 648 415 725 431" onclick="Button03_onclick"/>
  73. </Layout>
  74. </Layouts>
  75. <Objects>
  76. <Dataset id="ds1" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  77. <ColumnInfo>
  78. <Column id="inclprcpno" type="INT" size="256"/>
  79. <Column id="status" type="STRING" size="256"/>
  80. <Column id="ansttm" type="STRING" size="256"/>
  81. </ColumnInfo>
  82. <Rows>
  83. <Row>
  84. <Col id="inclprcpno">1</Col>
  85. <Col id="status">D</Col>
  86. <Col id="ansttm">true</Col>
  87. </Row>
  88. <Row>
  89. <Col id="inclprcpno">2</Col>
  90. <Col id="status">E</Col>
  91. <Col id="ansttm">true</Col>
  92. </Row>
  93. <Row>
  94. <Col id="inclprcpno">0</Col>
  95. <Col id="status">E</Col>
  96. <Col id="ansttm">false</Col>
  97. </Row>
  98. </Rows>
  99. </Dataset>
  100. <Dataset id="ds2" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  101. <ColumnInfo>
  102. <Column id="paytotamt" type="INT" size="256"/>
  103. <Column id="incmtax" type="INT" size="256"/>
  104. <Column id="resdntax" type="INT" size="256"/>
  105. <Column id="totamt" type="STRING" size="256"/>
  106. </ColumnInfo>
  107. <Rows>
  108. <Row>
  109. <Col id="paytotamt">10</Col>
  110. <Col id="incmtax">20</Col>
  111. <Col id="resdntax">30</Col>
  112. </Row>
  113. </Rows>
  114. </Dataset>
  115. <Dataset id="Dataset00" firefirstcount="0" firenextcount="0" useclientlayout="false" updatecontrol="true" enableevent="true" loadkeymode="keep" loadfiltermode="keep" reversesubsum="false">
  116. <ColumnInfo>
  117. <Column id="Column0" type="STRING" size="256"/>
  118. <Column id="Column1" type="STRING" size="256"/>
  119. </ColumnInfo>
  120. <Rows>
  121. <Row/>
  122. </Rows>
  123. </Dataset>
  124. </Objects>
  125. <Bind>
  126. <BindItem id="item0" compid="ed_cal1" propid="value" datasetid="ds2" columnid="totamt"/>
  127. <BindItem id="item1" compid="st_cal1" propid="text" datasetid="ds2" columnid="totamt"/>
  128. <BindItem id="item2" compid="ed_cal2" propid="value" datasetid="Dataset00" columnid="Column0"/>
  129. <BindItem id="item3" compid="Static02" propid="text" datasetid="Dataset00" columnid="Column0"/>
  130. </Bind>
  131. <Script type="xscript4.0"><![CDATA[
  132. function Button00_onclick(obj:Button, e:ClickEventInfo)
  133. {
  134. var v = ds2.getColumn(ds2.rowposition,"paytotamt")-ds2.getColumn(ds2.rowposition,"incmtax")-ds2.getColumn(ds2.rowposition,"resdntax");
  135. alert(v);
  136. ds2.setColumn(ds2.rowposition,"totamt", v);
  137. }
  138. function fn_TFBind(refID, oper, scrpt ){
  139. trace(refID);
  140. var ref = this.all[refID];
  141. var vText = "";
  142. trace(ref);
  143. if(oper == "readonly"){
  144. trace("readonly");
  145. if(scrpt){
  146. ref.readonly = true;
  147. }else{
  148. ref.readonly = false;
  149. }
  150. }else if("calculate"){
  151. trace("calculate");
  152. vText = scrpt;
  153. switch(ref){
  154. case "[object Edit]" : ref.value=vText;
  155. break;
  156. case "[object Static]" : ref.text=vText;
  157. break;
  158. }
  159. }
  160. }
  161. function fn_TFBind_Grid(ref,cellid, oper, scrpt){
  162. }
  163. function Button01_onclick(obj:Button, e:ClickEventInfo)
  164. {
  165. // fn_TFBind("ed_cal2", "readonly", "ds2.getColumn(ds2.rowposition,'paytotamt')-ds2.getColumn(ds2.rowposition,'incmtax')-ds2.getColumn(ds2.rowposition,'resdntax')");
  166. fn_TFBind("ed_cal2", "readonly", true);
  167. fn_TFBind("ed_cal2", "calculate", ds2.getColumn(ds2.rowposition,'paytotamt')-ds2.getColumn(ds2.rowposition,'incmtax')-ds2.getColumn(ds2.rowposition,'resdntax'));
  168. fn_TFBind_Grid("ed_cal2", "readonly", true);
  169. }
  170. function Button02_onclick(obj:Button, e:ClickEventInfo)
  171. {
  172. Static02.text = "aaaa";
  173. }
  174. function Button03_onclick(obj:Button, e:ClickEventInfo)
  175. {
  176. var boolean1 = new Boolean(true);
  177. var objBoolean = obj;
  178. alert(objBoolean);
  179. }
  180. ]]></Script>
  181. </Form>
  182. </FDL>