w_accset_ch.srw 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. $PBExportHeader$w_accset_ch.srw
  2. forward
  3. global type w_accset_ch from w_publ_choice
  4. end type
  5. end forward
  6. global type w_accset_ch from w_publ_choice
  7. integer width = 2080
  8. integer height = 2200
  9. string title = "帐套选择"
  10. long backcolor = 82700779
  11. end type
  12. global w_accset_ch w_accset_ch
  13. type variables
  14. long rtn_accsetid = 0,acc_accsetid = 0
  15. int ins_cropid
  16. end variables
  17. on w_accset_ch.create
  18. call super::create
  19. end on
  20. on w_accset_ch.destroy
  21. call super::destroy
  22. end on
  23. event close;call super::close;CloseWithReturn(THIS,rtn_accsetid)
  24. end event
  25. event open;call super::open;acc_accsetid = message.doubleparm
  26. select cropid into :ins_cropid from cw_accset
  27. where accsetid = :acc_accsetid;
  28. if sqlca.sqlcode <> 0 then
  29. messagebox('提示','查询帐套行业类型失败')
  30. close(this)
  31. end if
  32. dw_CH.SetTransObject (sqlca)
  33. cb_retrieve.TRIGGEREVENT(CLICKED!)
  34. end event
  35. event dw_filter;if trim(sle_ch.text)='' then
  36. dw_ch.setfilter('')
  37. else
  38. string obj_expr=''
  39. obj_expr=obj_expr+' ( pos(accsetname ,"'+trim(sle_ch.text)+'")<>0 ) '
  40. obj_expr=obj_expr+' or ( pos(cropname ,"'+trim(sle_ch.text)+'")<>0 ) '
  41. dw_ch.setfilter(obj_expr)
  42. end if
  43. dw_ch.filter()
  44. end event
  45. type cb_func from w_publ_choice`cb_func within w_accset_ch
  46. end type
  47. type cb_exit from w_publ_choice`cb_exit within w_accset_ch
  48. end type
  49. type sle_ch from w_publ_choice`sle_ch within w_accset_ch
  50. integer x = 581
  51. integer width = 690
  52. end type
  53. type dw_ch from w_publ_choice`dw_ch within w_accset_ch
  54. integer width = 1957
  55. integer height = 1672
  56. string dataobject = "dw_accset_ch"
  57. end type
  58. type st_1 from w_publ_choice`st_1 within w_accset_ch
  59. integer width = 535
  60. string text = "帐套代号/企业名称含"
  61. end type
  62. type cb_retrieve from w_publ_choice`cb_retrieve within w_accset_ch
  63. end type
  64. event cb_retrieve::clicked;dw_ch.retrieve(acc_accsetid,ins_cropid)
  65. end event
  66. type cb_choice from w_publ_choice`cb_choice within w_accset_ch
  67. end type
  68. event cb_choice::clicked;call super::clicked;long li_row
  69. li_row = dw_ch.getrow()
  70. if li_row = 0 then
  71. messagebox('系统提示','请选择帐套')
  72. return
  73. end if
  74. rtn_accsetid = dw_ch.object.accsetid[li_row]
  75. close(parent)
  76. end event
  77. type ln_bar from w_publ_choice`ln_bar within w_accset_ch
  78. end type
  79. type ln_bar2 from w_publ_choice`ln_bar2 within w_accset_ch
  80. end type
  81. type r_bar from w_publ_choice`r_bar within w_accset_ch
  82. end type
  83. type ln_1 from w_publ_choice`ln_1 within w_accset_ch
  84. end type
  85. type ln_2 from w_publ_choice`ln_2 within w_accset_ch
  86. end type