w_cus_maxamt_edit.srw 9.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429
  1. $PBExportHeader$w_cus_maxamt_edit.srw
  2. forward
  3. global type w_cus_maxamt_edit from w_publ_base
  4. end type
  5. type dw_1 from u_dw_rbtnfilter within w_cus_maxamt_edit
  6. end type
  7. type cb_edi from uo_imflatbutton within w_cus_maxamt_edit
  8. end type
  9. type cb_cancel from uo_imflatbutton within w_cus_maxamt_edit
  10. end type
  11. type cb_save from uo_imflatbutton within w_cus_maxamt_edit
  12. end type
  13. type cb_retrievemx from uo_imflatbutton within w_cus_maxamt_edit
  14. end type
  15. type tv_1 from uo_tv_cusarea within w_cus_maxamt_edit
  16. end type
  17. type cb_help from uo_imflatbutton within w_cus_maxamt_edit
  18. end type
  19. type cbx_inuse from checkbox within w_cus_maxamt_edit
  20. end type
  21. type ln_bar from line within w_cus_maxamt_edit
  22. end type
  23. type ln_bar2 from line within w_cus_maxamt_edit
  24. end type
  25. type r_bar from rectangle within w_cus_maxamt_edit
  26. end type
  27. end forward
  28. global type w_cus_maxamt_edit from w_publ_base
  29. integer x = 46
  30. integer y = 36
  31. integer width = 3602
  32. integer height = 2300
  33. string title = "客户信用额"
  34. boolean maxbox = true
  35. windowstate windowstate = maximized!
  36. event ue_help ( )
  37. dw_1 dw_1
  38. cb_edi cb_edi
  39. cb_cancel cb_cancel
  40. cb_save cb_save
  41. cb_retrievemx cb_retrievemx
  42. tv_1 tv_1
  43. cb_help cb_help
  44. cbx_inuse cbx_inuse
  45. ln_bar ln_bar
  46. ln_bar2 ln_bar2
  47. r_bar r_bar
  48. end type
  49. global w_cus_maxamt_edit w_cus_maxamt_edit
  50. type variables
  51. String ls_areaname = ''
  52. Int inuse = 1
  53. end variables
  54. forward prototypes
  55. public function integer wf_facechange ()
  56. end prototypes
  57. event ue_help();Int i
  58. i = htmlhelpA(Handle(THIS), sys_help_chm, 0, THIS.Title+".html")
  59. end event
  60. public function integer wf_facechange ();//wf_facechange
  61. if dw_edit_mode then
  62. cb_cancel.enabled=true
  63. cb_save.enabled=true
  64. cb_func.enabled=false
  65. cb_retrievemx.enabled=false
  66. dw_1.SetTabOrder(2,10)
  67. dw_1.SetTabOrder(3,20)
  68. dw_1.SetTabOrder(4,30)
  69. else
  70. cb_cancel.enabled=false
  71. cb_save.enabled=false
  72. cb_func.enabled=true
  73. cb_retrievemx.enabled=true
  74. dw_1.SetTabOrder(2,0)
  75. dw_1.SetTabOrder(3,0)
  76. dw_1.SetTabOrder(4,0)
  77. end if
  78. return 1
  79. end function
  80. on w_cus_maxamt_edit.create
  81. int iCurrent
  82. call super::create
  83. this.dw_1=create dw_1
  84. this.cb_edi=create cb_edi
  85. this.cb_cancel=create cb_cancel
  86. this.cb_save=create cb_save
  87. this.cb_retrievemx=create cb_retrievemx
  88. this.tv_1=create tv_1
  89. this.cb_help=create cb_help
  90. this.cbx_inuse=create cbx_inuse
  91. this.ln_bar=create ln_bar
  92. this.ln_bar2=create ln_bar2
  93. this.r_bar=create r_bar
  94. iCurrent=UpperBound(this.Control)
  95. this.Control[iCurrent+1]=this.dw_1
  96. this.Control[iCurrent+2]=this.cb_edi
  97. this.Control[iCurrent+3]=this.cb_cancel
  98. this.Control[iCurrent+4]=this.cb_save
  99. this.Control[iCurrent+5]=this.cb_retrievemx
  100. this.Control[iCurrent+6]=this.tv_1
  101. this.Control[iCurrent+7]=this.cb_help
  102. this.Control[iCurrent+8]=this.cbx_inuse
  103. this.Control[iCurrent+9]=this.ln_bar
  104. this.Control[iCurrent+10]=this.ln_bar2
  105. this.Control[iCurrent+11]=this.r_bar
  106. end on
  107. on w_cus_maxamt_edit.destroy
  108. call super::destroy
  109. destroy(this.dw_1)
  110. destroy(this.cb_edi)
  111. destroy(this.cb_cancel)
  112. destroy(this.cb_save)
  113. destroy(this.cb_retrievemx)
  114. destroy(this.tv_1)
  115. destroy(this.cb_help)
  116. destroy(this.cbx_inuse)
  117. destroy(this.ln_bar)
  118. destroy(this.ln_bar2)
  119. destroy(this.r_bar)
  120. end on
  121. event open;call super::open;dw_1.settransobject(sqlca)
  122. cb_retrievemx.triggerevent(clicked!)
  123. end event
  124. event ue_filter;call super::ue_filter;OPENWITHPARM(w_filter_query,dw_1)
  125. STRING LS_EXPR
  126. LS_EXPR=Message.StringParm
  127. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  128. dw_1.setfilter(LS_EXPR)
  129. dw_1.SetRedraw (false)
  130. dw_1.filter()
  131. dw_1.SetRedraw (TRUE)
  132. end event
  133. event ue_sort;call super::ue_sort;OPENwithparm(w_sortrow,DW_1)
  134. STRING LS_EXPR
  135. LS_EXPR=Message.StringParm
  136. IF ISNULL(LS_EXPR) THEN LS_EXPR=' '
  137. if len(LS_EXPR)>2 and trim(LS_EXPR)='' then return
  138. dw_1.setsort(LS_EXPR)
  139. dw_1.SetRedraw (false)
  140. dw_1.sort()
  141. dw_1.SetRedraw (true)
  142. end event
  143. event ue_before_open;call super::ue_before_open;if_ue_filter=true
  144. if_ue_sort=true
  145. end event
  146. event resize;call super::resize;ln_bar.endx = this.width
  147. ln_bar2.endx = this.width
  148. r_bar.width = this.width
  149. long w_width,w_height
  150. w_width = 3602
  151. w_height = 2300
  152. if newwidth < w_width then this.width = w_width
  153. if newheight < w_height then this.height = w_height
  154. tv_1.height=this.height - (w_height - 1952)
  155. dw_1.width=this.width - (w_width - 2633)
  156. dw_1.height=this.height - (w_height - 1952)
  157. end event
  158. type cb_func from w_publ_base`cb_func within w_cus_maxamt_edit
  159. integer x = 165
  160. integer height = 172
  161. end type
  162. type cb_exit from w_publ_base`cb_exit within w_cus_maxamt_edit
  163. integer x = 987
  164. integer width = 165
  165. integer height = 172
  166. integer picsize = 16
  167. toolbaralignment pic_align = alignattop!
  168. boolean border = false
  169. end type
  170. type dw_1 from u_dw_rbtnfilter within w_cus_maxamt_edit
  171. integer x = 951
  172. integer y = 188
  173. integer width = 2633
  174. integer height = 1952
  175. integer taborder = 50
  176. boolean bringtotop = true
  177. boolean titlebar = true
  178. string title = "客户资料"
  179. string dataobject = "dw_cust_maxamt_edit"
  180. boolean maxbox = true
  181. boolean hscrollbar = true
  182. boolean vscrollbar = true
  183. boolean resizable = true
  184. boolean hsplitscroll = true
  185. borderstyle borderstyle = stylebox!
  186. end type
  187. event clicked; if row>0 then
  188. this.setrow(row)
  189. this.selectrow(0,false)
  190. this.selectrow(row,true)
  191. end if
  192. end event
  193. event constructor;call super::constructor;
  194. RBUTTON_FILTER_USE=true //右键查询功能开关
  195. end event
  196. event rowfocuschanged;IF currentrow <=0 THEN RETURN
  197. this.selectrow(0,false)
  198. this.selectrow(currentrow,true)
  199. end event
  200. type cb_edi from uo_imflatbutton within w_cus_maxamt_edit
  201. integer x = 329
  202. integer width = 165
  203. integer height = 172
  204. integer taborder = 60
  205. boolean bringtotop = true
  206. string text = "修改"
  207. string normalpicname = "open.bmp"
  208. integer picsize = 16
  209. toolbaralignment pic_align = alignattop!
  210. boolean border = false
  211. end type
  212. event clicked;call super::clicked;IF NOT f_power_ind(16) THEN
  213. MessageBox('提示','你没有使用权限!', Information!, OK! )
  214. RETURN
  215. END IF
  216. dw_edit_mode = TRUE
  217. wf_facechange()
  218. dw_1.SetFocus()
  219. end event
  220. type cb_cancel from uo_imflatbutton within w_cus_maxamt_edit
  221. integer x = 494
  222. integer width = 165
  223. integer height = 172
  224. integer taborder = 60
  225. boolean bringtotop = true
  226. boolean enabled = false
  227. string text = "取消"
  228. string normalpicname = "undo.bmp"
  229. integer picsize = 16
  230. toolbaralignment pic_align = alignattop!
  231. boolean border = false
  232. end type
  233. event clicked;call super::clicked;dw_edit_mode=false
  234. wf_facechange()
  235. cb_retrievemx.triggerevent(clicked!)
  236. end event
  237. type cb_save from uo_imflatbutton within w_cus_maxamt_edit
  238. integer x = 658
  239. integer width = 165
  240. integer height = 172
  241. integer taborder = 70
  242. boolean bringtotop = true
  243. boolean enabled = false
  244. string text = "保存"
  245. string normalpicname = "save.bmp"
  246. integer picsize = 16
  247. toolbaralignment pic_align = alignattop!
  248. boolean border = false
  249. end type
  250. event clicked;call super::clicked;dw_1.AcceptText()
  251. IF dw_1.GetNextModified(0, Primary!) = 0 THEN
  252. MessageBox('提示','没有任何修改,不可以保存!', Information!, OK! )
  253. RETURN
  254. END IF
  255. IF dw_1.Update() = 1 THEN
  256. COMMIT;
  257. ELSE
  258. ROLLBACK;
  259. MessageBox('提示','保存操作失败"!', Information!, OK! )
  260. RETURN
  261. END IF
  262. dw_edit_mode = FALSE
  263. wf_facechange()
  264. end event
  265. type cb_retrievemx from uo_imflatbutton within w_cus_maxamt_edit
  266. integer width = 165
  267. integer height = 172
  268. integer taborder = 20
  269. string text = "刷新"
  270. string normalpicname = "refresh.bmp"
  271. integer picsize = 16
  272. toolbaralignment pic_align = alignattop!
  273. boolean border = false
  274. end type
  275. event clicked;call super::clicked;dw_1.retrieve(ls_areaname,sys_areaid,inuse)
  276. end event
  277. type tv_1 from uo_tv_cusarea within w_cus_maxamt_edit
  278. integer y = 188
  279. integer width = 951
  280. integer height = 1952
  281. integer taborder = 70
  282. boolean bringtotop = true
  283. integer textsize = -9
  284. fontcharset fontcharset = gb2312charset!
  285. fontfamily fontfamily = anyfont!
  286. string facename = "宋体"
  287. end type
  288. event selectionchanged;call super::selectionchanged;if not dw_edit_mode then
  289. ls_areaname = this.uo_cur_info.areaname
  290. ls_areaname = ls_areaname + '%'
  291. cb_retrievemx.triggerevent(clicked!)
  292. end if
  293. end event
  294. type cb_help from uo_imflatbutton within w_cus_maxamt_edit
  295. string tag = "帮助[F1]"
  296. integer x = 823
  297. integer width = 165
  298. integer height = 172
  299. integer taborder = 20
  300. boolean bringtotop = true
  301. string text = "帮助"
  302. string normalpicname = "help.bmp"
  303. integer picsize = 16
  304. toolbaralignment pic_align = alignattop!
  305. boolean border = false
  306. end type
  307. event clicked;call super::clicked;PARENT.TriggerEvent('ue_help')
  308. end event
  309. type cbx_inuse from checkbox within w_cus_maxamt_edit
  310. integer x = 1207
  311. integer y = 84
  312. integer width = 402
  313. integer height = 60
  314. boolean bringtotop = true
  315. integer textsize = -9
  316. integer weight = 400
  317. fontcharset fontcharset = gb2312charset!
  318. fontpitch fontpitch = variable!
  319. string facename = "宋体"
  320. long textcolor = 33554432
  321. long backcolor = 134217739
  322. string text = "只显示有效"
  323. boolean checked = true
  324. end type
  325. event clicked;IF dw_edit_mode THEN RETURN
  326. IF THIS.Checked THEN
  327. inuse = 1
  328. ELSE
  329. inuse = -1
  330. END IF
  331. cb_retrievemx.TriggerEvent(Clicked!)
  332. end event
  333. event constructor;this.Backcolor = 14215660
  334. end event
  335. type ln_bar from line within w_cus_maxamt_edit
  336. long linecolor = 268435456
  337. integer linethickness = 4
  338. integer beginy = 176
  339. integer endx = 3323
  340. integer endy = 176
  341. end type
  342. type ln_bar2 from line within w_cus_maxamt_edit
  343. long linecolor = 16777215
  344. integer linethickness = 4
  345. integer beginy = 180
  346. integer endx = 3323
  347. integer endy = 180
  348. end type
  349. type r_bar from rectangle within w_cus_maxamt_edit
  350. long linecolor = 16777215
  351. long fillcolor = 1073741824
  352. integer x = 2747
  353. integer width = 73
  354. integer height = 172
  355. end type
  356. event constructor;this.fillcolor = 14215660
  357. this.linecolor = 14215660
  358. this.x = -1
  359. this.y = -1
  360. this.height = ln_bar2.beginy - 5
  361. end event