w_pageretr_ch.srw 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. $PBExportHeader$w_pageretr_ch.srw
  2. $PBExportComments$分页选择窗口
  3. forward
  4. global type w_pageretr_ch from w_publ_pageretr
  5. end type
  6. type cb_choice from uo_imflatbutton within w_pageretr_ch
  7. end type
  8. type cb_refresh from uo_imflatbutton within w_pageretr_ch
  9. end type
  10. type cb_help from uo_imflatbutton within w_pageretr_ch
  11. end type
  12. type ln_bar from line within w_pageretr_ch
  13. end type
  14. type ln_bar2 from line within w_pageretr_ch
  15. end type
  16. type r_bar from rectangle within w_pageretr_ch
  17. end type
  18. type ln_1 from line within w_pageretr_ch
  19. end type
  20. type ln_2 from line within w_pageretr_ch
  21. end type
  22. end forward
  23. global type w_pageretr_ch from w_publ_pageretr
  24. integer width = 2999
  25. integer height = 1916
  26. string title = "翻页选择"
  27. boolean minbox = false
  28. windowtype windowtype = response!
  29. event ue_help ( )
  30. cb_choice cb_choice
  31. cb_refresh cb_refresh
  32. cb_help cb_help
  33. ln_bar ln_bar
  34. ln_bar2 ln_bar2
  35. r_bar r_bar
  36. ln_1 ln_1
  37. ln_2 ln_2
  38. end type
  39. global w_pageretr_ch w_pageretr_ch
  40. forward prototypes
  41. public function integer wf_editindex_lockf ()
  42. end prototypes
  43. event ue_help();Int i
  44. i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".html")
  45. end event
  46. public function integer wf_editindex_lockf ();//wf_editindex_lockf
  47. IF local_retrieve_all OR dw_edit_mode THEN
  48. cb_nextpage.Enabled = FALSE
  49. cb_retrieveall.Enabled = FALSE
  50. em_pagerowno.Enabled = FALSE
  51. ELSE
  52. cb_nextpage.Enabled = TRUE
  53. cb_retrieveall.Enabled = TRUE
  54. em_pagerowno.Enabled = TRUE
  55. END IF
  56. IF dw_edit_mode THEN
  57. sle_usual_query.Enabled = FALSE
  58. cb_func.Enabled = FALSE
  59. ELSE
  60. sle_usual_query.Enabled = TRUE
  61. cb_func.Enabled = TRUE
  62. END IF
  63. RETURN 1
  64. end function
  65. on w_pageretr_ch.create
  66. int iCurrent
  67. call super::create
  68. this.cb_choice=create cb_choice
  69. this.cb_refresh=create cb_refresh
  70. this.cb_help=create cb_help
  71. this.ln_bar=create ln_bar
  72. this.ln_bar2=create ln_bar2
  73. this.r_bar=create r_bar
  74. this.ln_1=create ln_1
  75. this.ln_2=create ln_2
  76. iCurrent=UpperBound(this.Control)
  77. this.Control[iCurrent+1]=this.cb_choice
  78. this.Control[iCurrent+2]=this.cb_refresh
  79. this.Control[iCurrent+3]=this.cb_help
  80. this.Control[iCurrent+4]=this.ln_bar
  81. this.Control[iCurrent+5]=this.ln_bar2
  82. this.Control[iCurrent+6]=this.r_bar
  83. this.Control[iCurrent+7]=this.ln_1
  84. this.Control[iCurrent+8]=this.ln_2
  85. end on
  86. on w_pageretr_ch.destroy
  87. call super::destroy
  88. destroy(this.cb_choice)
  89. destroy(this.cb_refresh)
  90. destroy(this.cb_help)
  91. destroy(this.ln_bar)
  92. destroy(this.ln_bar2)
  93. destroy(this.r_bar)
  94. destroy(this.ln_1)
  95. destroy(this.ln_2)
  96. end on
  97. event user_key;call super::user_key; IF KeyDown(KeyD!) and KeyDown(KeyControl!) THEN
  98. if cb_choice.enabled then cb_choice.TRIGGEREVENT(CLICKED!)
  99. ELSEIF KeyDown(KeyEnter!) and (KeyDown(KeyControl!) or retrieve_all) THEN
  100. if cb_choice.enabled then cb_choice.TRIGGEREVENT(CLICKED!)
  101. END IF
  102. end event
  103. event key;this.TRIGGEREVENT('user_key')
  104. end event
  105. event close;//CLOSEWITHRETURN(THIS,<INS_RT_STRU>)
  106. //<INS_RT_STRU> 窗体级子定义结构变量,用于返回
  107. end event
  108. event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,DW_pageretr)
  109. STRING LS_EXPR
  110. LS_EXPR=Message.StringParm
  111. IF ISNULL(LS_EXPR) THEN LS_EXPR=' '
  112. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  113. DW_pageretr.setsort(LS_EXPR)
  114. DW_pageretr.SetRedraw (false)
  115. DW_pageretr.sort()
  116. DW_pageretr.SetRedraw (true)
  117. end event
  118. event open;call super::open;if_ue_sort=true
  119. end event
  120. event resize;call super::resize;ln_bar.endx = this.width
  121. ln_bar2.endx = this.width
  122. ln_1.endx = this.width
  123. ln_2.endx = this.width
  124. r_bar.width = this.width
  125. end event
  126. type cb_func from w_publ_pageretr`cb_func within w_pageretr_ch
  127. integer x = 151
  128. integer y = 0
  129. integer width = 151
  130. integer height = 164
  131. integer taborder = 110
  132. end type
  133. type cb_exit from w_publ_pageretr`cb_exit within w_pageretr_ch
  134. integer x = 603
  135. integer y = 0
  136. integer width = 151
  137. integer height = 164
  138. string text = "取消"
  139. integer picsize = 16
  140. toolbaralignment pic_align = alignattop!
  141. boolean border = false
  142. end type
  143. type sle_usual_query from w_publ_pageretr`sle_usual_query within w_pageretr_ch
  144. integer y = 180
  145. boolean bringtotop = true
  146. end type
  147. type cb_retrieveall from w_publ_pageretr`cb_retrieveall within w_pageretr_ch
  148. integer x = 1056
  149. integer width = 151
  150. integer height = 164
  151. boolean bringtotop = true
  152. string normalpicname = "p1.ico"
  153. integer picsize = 16
  154. toolbaralignment pic_align = alignattop!
  155. boolean border = false
  156. end type
  157. type em_pagerowno from w_publ_pageretr`em_pagerowno within w_pageretr_ch
  158. integer x = 754
  159. integer y = 36
  160. integer width = 302
  161. integer height = 96
  162. boolean bringtotop = true
  163. end type
  164. type dw_pageretr from w_publ_pageretr`dw_pageretr within w_pageretr_ch
  165. integer y = 288
  166. integer width = 2935
  167. integer height = 1508
  168. boolean bringtotop = true
  169. boolean titlebar = false
  170. boolean resizable = false
  171. boolean border = true
  172. borderstyle borderstyle = stylelowered!
  173. end type
  174. event dw_pageretr::doubleclicked;call super::doubleclicked;//IF mode=1 AND NOT dw_edit_mode THEN
  175. cb_choice.TRIGGEREVENT(CLICKED!)
  176. //END IF
  177. end event
  178. event dw_pageretr::retrieveend;call super::retrieveend;IF RowCount > 0 THEN
  179. dw_pageretr.SelectRow(0,FALSE)
  180. dw_pageretr.SetRow(1)
  181. dw_pageretr.SelectRow(1,TRUE)
  182. END IF
  183. end event
  184. type st_1 from w_publ_pageretr`st_1 within w_pageretr_ch
  185. integer y = 200
  186. string text = "编码含"
  187. end type
  188. type cb_nextpage from w_publ_pageretr`cb_nextpage within w_pageretr_ch
  189. integer x = 1207
  190. integer width = 78
  191. integer height = 164
  192. string normalpicname = "p4.ico"
  193. integer picsize = 16
  194. toolbaralignment pic_align = alignattop!
  195. boolean border = false
  196. end type
  197. type cb_choice from uo_imflatbutton within w_pageretr_ch
  198. integer x = 453
  199. integer width = 151
  200. integer height = 164
  201. integer taborder = 110
  202. boolean bringtotop = true
  203. string text = "选定"
  204. string normalpicname = "ok.bmp"
  205. integer picsize = 16
  206. toolbaralignment pic_align = alignattop!
  207. boolean border = false
  208. end type
  209. event clicked;call super::clicked;////LONG LS_ROW
  210. ////LS_ROW=dw_pageretr.getrow()
  211. ////if LS_ROW<=0 then
  212. //// messagebox('系统提示','请先选择目标行!',StopSign!)
  213. //// return
  214. ////end if
  215. //
  216. ////INS_RT_STRU.scustid=dw_INDEX.OBJECT.custid[LS_ROW]
  217. ////...
  218. ////CLOSE(PARENT)
  219. end event
  220. type cb_refresh from uo_imflatbutton within w_pageretr_ch
  221. integer width = 151
  222. integer height = 164
  223. integer taborder = 10
  224. boolean bringtotop = true
  225. string text = "刷新"
  226. string normalpicname = "refresh.bmp"
  227. integer picsize = 16
  228. toolbaralignment pic_align = alignattop!
  229. boolean border = false
  230. end type
  231. event clicked;call super::clicked;PARENT.TRIGGEREVENT("ue_usual_query_RETR")
  232. end event
  233. type cb_help from uo_imflatbutton within w_pageretr_ch
  234. integer x = 302
  235. integer width = 151
  236. integer height = 164
  237. integer taborder = 30
  238. boolean bringtotop = true
  239. string text = "帮助"
  240. string normalpicname = "help.bmp"
  241. integer picsize = 16
  242. toolbaralignment pic_align = alignattop!
  243. boolean border = false
  244. end type
  245. event clicked;call super::clicked;PARENT.TriggerEvent('ue_help')
  246. end event
  247. type ln_bar from line within w_pageretr_ch
  248. long linecolor = 268435456
  249. integer linethickness = 4
  250. integer beginy = 168
  251. integer endx = 2007
  252. integer endy = 168
  253. end type
  254. type ln_bar2 from line within w_pageretr_ch
  255. long linecolor = 16777215
  256. integer linethickness = 4
  257. integer beginy = 172
  258. integer endx = 2039
  259. integer endy = 172
  260. end type
  261. type r_bar from rectangle within w_pageretr_ch
  262. long linecolor = 16777215
  263. integer linethickness = 4
  264. long fillcolor = 1073741824
  265. integer x = 2139
  266. integer width = 146
  267. integer height = 68
  268. end type
  269. event constructor;this.fillcolor = 14215660
  270. this.linecolor = 14215660
  271. this.x = -1
  272. this.y = -1
  273. this.height = ln_bar.beginy - 5
  274. end event
  275. type ln_1 from line within w_pageretr_ch
  276. long linecolor = 268435456
  277. integer linethickness = 4
  278. integer beginy = 280
  279. integer endx = 2016
  280. integer endy = 280
  281. end type
  282. type ln_2 from line within w_pageretr_ch
  283. long linecolor = 16777215
  284. integer linethickness = 4
  285. integer beginy = 284
  286. integer endx = 2048
  287. integer endy = 284
  288. end type