w_rpt_data.srw 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202
  1. $PBExportHeader$w_rpt_data.srw
  2. $PBExportComments$Data设置-- 窗口
  3. forward
  4. global type w_rpt_data from Window
  5. end type
  6. type cb_6 from commandbutton within w_rpt_data
  7. end type
  8. type cb_5 from commandbutton within w_rpt_data
  9. end type
  10. type cb_4 from commandbutton within w_rpt_data
  11. end type
  12. type cb_3 from commandbutton within w_rpt_data
  13. end type
  14. type cb_2 from commandbutton within w_rpt_data
  15. end type
  16. type cb_1 from commandbutton within w_rpt_data
  17. end type
  18. type dw1 from datawindow within w_rpt_data
  19. end type
  20. end forward
  21. global type w_rpt_data from Window
  22. int X=5
  23. int Y=320
  24. int Width=2798
  25. int Height=1524
  26. boolean TitleBar=true
  27. string Title="数据(data)"
  28. long BackColor=12632256
  29. boolean ControlMenu=true
  30. WindowType WindowType=response!
  31. cb_6 cb_6
  32. cb_5 cb_5
  33. cb_4 cb_4
  34. cb_3 cb_3
  35. cb_2 cb_2
  36. cb_1 cb_1
  37. dw1 dw1
  38. end type
  39. global w_rpt_data w_rpt_data
  40. type variables
  41. int i,ii_rows
  42. string is_temp
  43. datawindow idw
  44. end variables
  45. on w_rpt_data.create
  46. this.cb_6=create cb_6
  47. this.cb_5=create cb_5
  48. this.cb_4=create cb_4
  49. this.cb_3=create cb_3
  50. this.cb_2=create cb_2
  51. this.cb_1=create cb_1
  52. this.dw1=create dw1
  53. this.Control[]={this.cb_6,&
  54. this.cb_5,&
  55. this.cb_4,&
  56. this.cb_3,&
  57. this.cb_2,&
  58. this.cb_1,&
  59. this.dw1}
  60. end on
  61. on w_rpt_data.destroy
  62. destroy(this.cb_6)
  63. destroy(this.cb_5)
  64. destroy(this.cb_4)
  65. destroy(this.cb_3)
  66. destroy(this.cb_2)
  67. destroy(this.cb_1)
  68. destroy(this.dw1)
  69. end on
  70. event open;f_wcenter(this)
  71. idw=w_rpt_main.dw3
  72. is_temp=f_rpt_sdw(idw)
  73. if is_temp>'' then
  74. dw1.create(is_temp)
  75. dw1.ImportString(w_rpt_main.istr_rpt.rdata)
  76. end if
  77. end event
  78. type cb_6 from commandbutton within w_rpt_data
  79. int X=2496
  80. int Y=940
  81. int Width=247
  82. int Height=108
  83. int TabOrder=40
  84. string Text="清空"
  85. int TextSize=-9
  86. int Weight=400
  87. string FaceName="宋体"
  88. FontPitch FontPitch=Variable!
  89. end type
  90. event clicked;dw1.reset()
  91. end event
  92. type cb_5 from commandbutton within w_rpt_data
  93. int X=2496
  94. int Y=768
  95. int Width=247
  96. int Height=108
  97. int TabOrder=30
  98. string Text="删除"
  99. int TextSize=-9
  100. int Weight=400
  101. string FaceName="宋体"
  102. FontPitch FontPitch=Variable!
  103. end type
  104. event clicked;i=dw1.getrow()
  105. if i>0 then dw1.deleterow(i)
  106. dw1.setfocus()
  107. end event
  108. type cb_4 from commandbutton within w_rpt_data
  109. int X=2496
  110. int Y=596
  111. int Width=247
  112. int Height=108
  113. int TabOrder=40
  114. string Text="插入"
  115. int TextSize=-9
  116. int Weight=400
  117. string FaceName="宋体"
  118. FontPitch FontPitch=Variable!
  119. end type
  120. event clicked;i=dw1.getrow()
  121. dw1.scrolltorow(dw1.insertrow(i))
  122. dw1.setfocus()
  123. end event
  124. type cb_3 from commandbutton within w_rpt_data
  125. int X=2496
  126. int Y=424
  127. int Width=247
  128. int Height=108
  129. int TabOrder=20
  130. string Text="增加"
  131. int TextSize=-9
  132. int Weight=400
  133. string FaceName="宋体"
  134. FontPitch FontPitch=Variable!
  135. end type
  136. event clicked;dw1.scrolltorow(dw1.insertrow(0))
  137. dw1.setfocus()
  138. end event
  139. type cb_2 from commandbutton within w_rpt_data
  140. int X=2496
  141. int Y=196
  142. int Width=247
  143. int Height=108
  144. int TabOrder=50
  145. string Text="取消"
  146. int TextSize=-9
  147. int Weight=400
  148. string FaceName="宋体"
  149. FontPitch FontPitch=Variable!
  150. end type
  151. event clicked;close(parent)
  152. end event
  153. type cb_1 from commandbutton within w_rpt_data
  154. int X=2496
  155. int Y=48
  156. int Width=247
  157. int Height=108
  158. int TabOrder=10
  159. string Text="确认"
  160. int TextSize=-9
  161. int Weight=400
  162. string FaceName="宋体"
  163. FontPitch FontPitch=Variable!
  164. end type
  165. event clicked;dw1.accepttext()
  166. string ls_data
  167. ls_data=dw1.describe("datawindow.data")
  168. if ls_data='!' then ls_data=''
  169. w_rpt_main.istr_rpt.rdata=ls_data
  170. w_rpt_main.ii_save=1
  171. close(parent)
  172. end event
  173. type dw1 from datawindow within w_rpt_data
  174. int Width=2450
  175. int Height=1424
  176. int TabOrder=60
  177. BorderStyle BorderStyle=StyleLowered!
  178. boolean HScrollBar=true
  179. boolean VScrollBar=true
  180. boolean HSplitScroll=true
  181. boolean LiveScroll=true
  182. end type