w_publ_choice.srw 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324
  1. $PBExportHeader$w_publ_choice.srw
  2. $PBExportComments$选择
  3. forward
  4. global type w_publ_choice from w_publ_base
  5. end type
  6. type sle_ch from u_sleedit within w_publ_choice
  7. end type
  8. type dw_ch from u_dw_rbtnfilter within w_publ_choice
  9. end type
  10. type st_1 from statictext within w_publ_choice
  11. end type
  12. type cb_retrieve from uo_imflatbutton within w_publ_choice
  13. end type
  14. type cb_choice from uo_imflatbutton within w_publ_choice
  15. end type
  16. type ln_bar from line within w_publ_choice
  17. end type
  18. type ln_bar2 from line within w_publ_choice
  19. end type
  20. type r_bar from rectangle within w_publ_choice
  21. end type
  22. type ln_1 from line within w_publ_choice
  23. end type
  24. type ln_2 from line within w_publ_choice
  25. end type
  26. end forward
  27. global type w_publ_choice from w_publ_base
  28. integer width = 2181
  29. integer height = 1808
  30. string title = ""
  31. boolean controlmenu = false
  32. boolean minbox = false
  33. windowtype windowtype = response!
  34. event dw_filter ( )
  35. sle_ch sle_ch
  36. dw_ch dw_ch
  37. st_1 st_1
  38. cb_retrieve cb_retrieve
  39. cb_choice cb_choice
  40. ln_bar ln_bar
  41. ln_bar2 ln_bar2
  42. r_bar r_bar
  43. ln_1 ln_1
  44. ln_2 ln_2
  45. end type
  46. global w_publ_choice w_publ_choice
  47. event dw_filter();//string obj_expr=''
  48. //if trim(sle_ch.text)<>'' then
  49. // IF POS(trim(sle_ch.text),'%')=0 THEN
  50. // obj_expr=obj_expr+'( empcode LIKE "%'+trim(sle_ch.text)+'%" )'
  51. // ELSE
  52. // obj_expr=obj_expr+'( empcode LIKE "'+trim(sle_ch.text)+'" )'
  53. // END IF
  54. //end if
  55. //
  56. //if trim(sle_name.text)<>'' then
  57. // if obj_expr<>'' then obj_expr=obj_expr+ ' and '
  58. // IF POS(trim(sle_ch.text),'%')=0 THEN
  59. // obj_expr=obj_expr+' ( empname LIKE "%'+trim(sle_name.text)+'%" )'
  60. // ELSE
  61. // obj_expr=obj_expr+'( empname LIKE "'+trim(sle_name.text)+'" )'
  62. // END IF
  63. //end if
  64. //
  65. //dw_ch.setfilter(obj_expr)
  66. //dw_ch.SetRedraw(False)
  67. //dw_ch.filter()
  68. //if dw_ch.rowcount()>=1 then
  69. // dw_ch.selectrow(0,false)
  70. // dw_ch.selectrow(1,true)
  71. //end if
  72. //dw_ch.SetRedraw(TRUE)
  73. end event
  74. on w_publ_choice.create
  75. int iCurrent
  76. call super::create
  77. this.sle_ch=create sle_ch
  78. this.dw_ch=create dw_ch
  79. this.st_1=create st_1
  80. this.cb_retrieve=create cb_retrieve
  81. this.cb_choice=create cb_choice
  82. this.ln_bar=create ln_bar
  83. this.ln_bar2=create ln_bar2
  84. this.r_bar=create r_bar
  85. this.ln_1=create ln_1
  86. this.ln_2=create ln_2
  87. iCurrent=UpperBound(this.Control)
  88. this.Control[iCurrent+1]=this.sle_ch
  89. this.Control[iCurrent+2]=this.dw_ch
  90. this.Control[iCurrent+3]=this.st_1
  91. this.Control[iCurrent+4]=this.cb_retrieve
  92. this.Control[iCurrent+5]=this.cb_choice
  93. this.Control[iCurrent+6]=this.ln_bar
  94. this.Control[iCurrent+7]=this.ln_bar2
  95. this.Control[iCurrent+8]=this.r_bar
  96. this.Control[iCurrent+9]=this.ln_1
  97. this.Control[iCurrent+10]=this.ln_2
  98. end on
  99. on w_publ_choice.destroy
  100. call super::destroy
  101. destroy(this.sle_ch)
  102. destroy(this.dw_ch)
  103. destroy(this.st_1)
  104. destroy(this.cb_retrieve)
  105. destroy(this.cb_choice)
  106. destroy(this.ln_bar)
  107. destroy(this.ln_bar2)
  108. destroy(this.r_bar)
  109. destroy(this.ln_1)
  110. destroy(this.ln_2)
  111. end on
  112. event open;call super::open;if_ue_sort=true
  113. dw_CH.SetTransObject (sqlca)
  114. cb_retrieve.TRIGGEREVENT(CLICKED!)
  115. end event
  116. event close;//CLOSEWITHRETURN(THIS,<INS_RT_STRU>)
  117. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  118. end event
  119. event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,dw_ch)
  120. STRING LS_EXPR
  121. LS_EXPR=Message.StringParm
  122. IF ISNULL(LS_EXPR) THEN LS_EXPR=' '
  123. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  124. dw_ch.setsort(LS_EXPR)
  125. dw_ch.SetRedraw (false)
  126. dw_ch.sort()
  127. dw_ch.SetRedraw (true)
  128. end event
  129. event resize;call super::resize;ln_bar.endx = this.width
  130. ln_bar2.endx = this.width
  131. ln_1.endx = this.width
  132. ln_2.endx = this.width
  133. r_bar.width = this.width
  134. end event
  135. type cb_func from w_publ_base`cb_func within w_publ_choice
  136. integer x = 151
  137. integer width = 151
  138. integer height = 164
  139. string normalpicname = "setting.bmp"
  140. integer picsize = 16
  141. toolbaralignment pic_align = alignattop!
  142. boolean border = false
  143. end type
  144. type cb_exit from w_publ_base`cb_exit within w_publ_choice
  145. integer x = 453
  146. integer width = 151
  147. integer height = 164
  148. integer taborder = 40
  149. string text = "取消"
  150. integer picsize = 16
  151. toolbaralignment pic_align = alignattop!
  152. boolean border = false
  153. end type
  154. type sle_ch from u_sleedit within w_publ_choice
  155. integer x = 215
  156. integer y = 180
  157. integer height = 92
  158. boolean bringtotop = true
  159. end type
  160. event inputchanged;PARENT.POSTEVENT('DW_FILTER')
  161. end event
  162. event keyup;call super::keyup;If Key = KeyDownArrow! Then //
  163. dw_CH.ScrollNextRow()
  164. End If
  165. If Key = KeyUPArrow! Then //
  166. dw_CH.ScrollPriorRow()
  167. End If
  168. end event
  169. type dw_ch from u_dw_rbtnfilter within w_publ_choice
  170. integer y = 288
  171. integer width = 2094
  172. integer height = 1412
  173. integer taborder = 20
  174. boolean bringtotop = true
  175. boolean hscrollbar = true
  176. boolean vscrollbar = true
  177. boolean hsplitscroll = true
  178. end type
  179. event clicked;IF row <=0 THEN RETURN
  180. this.setrow(row)
  181. end event
  182. event doubleclicked;cb_CHOICE.PostEvent(Clicked!)
  183. end event
  184. event rowfocuschanged;IF currentrow <=0 THEN RETURN
  185. this.selectrow(0,false)
  186. this.selectrow(currentrow,true)
  187. end event
  188. event constructor;call super::constructor;
  189. RBUTTON_FILTER_USE=true //右键查询功能开关
  190. end event
  191. type st_1 from statictext within w_publ_choice
  192. integer x = 32
  193. integer y = 208
  194. integer width = 183
  195. integer height = 48
  196. boolean bringtotop = true
  197. integer textsize = -9
  198. integer weight = 400
  199. fontcharset fontcharset = gb2312charset!
  200. fontpitch fontpitch = variable!
  201. string facename = "宋体"
  202. long textcolor = 33554432
  203. long backcolor = 134217739
  204. string text = "编码含"
  205. boolean focusrectangle = false
  206. boolean righttoleft = true
  207. end type
  208. type cb_retrieve from uo_imflatbutton within w_publ_choice
  209. integer width = 150
  210. integer height = 164
  211. integer taborder = 20
  212. boolean bringtotop = true
  213. string text = "刷新"
  214. string normalpicname = "refresh.bmp"
  215. integer picsize = 16
  216. toolbaralignment pic_align = alignattop!
  217. boolean border = false
  218. end type
  219. event clicked;call super::clicked;dw_ch.retrieve()
  220. end event
  221. type cb_choice from uo_imflatbutton within w_publ_choice
  222. integer x = 302
  223. integer width = 151
  224. integer height = 164
  225. integer taborder = 50
  226. boolean bringtotop = true
  227. string text = "选定"
  228. boolean default = true
  229. string normalpicname = "ok.bmp"
  230. integer picsize = 16
  231. toolbaralignment pic_align = alignattop!
  232. boolean border = false
  233. end type
  234. event clicked;call super::clicked;////LONG LS_ROW
  235. ////LS_ROW=dw_CH.getrow()
  236. ////if LS_ROW<=0 then
  237. //// messagebox('系统提示','请先选择目标行!',StopSign!)
  238. //// return
  239. ////end if
  240. ////INS_RT_STRU.scustid=dw_CH.OBJECT.custid[LS_ROW]
  241. ////...
  242. ////CLOSE(PARENT)
  243. end event
  244. type ln_bar from line within w_publ_choice
  245. long linecolor = 268435456
  246. integer linethickness = 4
  247. integer beginy = 168
  248. integer endx = 2007
  249. integer endy = 168
  250. end type
  251. type ln_bar2 from line within w_publ_choice
  252. long linecolor = 16777215
  253. integer linethickness = 4
  254. integer beginy = 172
  255. integer endx = 2039
  256. integer endy = 172
  257. end type
  258. type r_bar from rectangle within w_publ_choice
  259. long linecolor = 16777215
  260. integer linethickness = 4
  261. long fillcolor = 1073741824
  262. integer x = 1531
  263. integer width = 146
  264. integer height = 68
  265. end type
  266. event constructor;this.fillcolor = 14215660
  267. this.linecolor = 14215660
  268. this.x = -1
  269. this.y = -1
  270. this.height = ln_bar.beginy - 5
  271. end event
  272. type ln_1 from line within w_publ_choice
  273. long linecolor = 268435456
  274. integer linethickness = 4
  275. integer beginy = 280
  276. integer endx = 2016
  277. integer endy = 280
  278. end type
  279. type ln_2 from line within w_publ_choice
  280. long linecolor = 16777215
  281. integer linethickness = 4
  282. integer beginy = 284
  283. integer endx = 2048
  284. integer endy = 284
  285. end type