w_configure_ch_zj.srw 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. $PBExportHeader$w_configure_ch_zj.srw
  2. forward
  3. global type w_configure_ch_zj from w_publ_choice
  4. end type
  5. end forward
  6. global type w_configure_ch_zj from w_publ_choice
  7. integer width = 2217
  8. integer height = 1728
  9. string title = "子件选择"
  10. end type
  11. global w_configure_ch_zj w_configure_ch_zj
  12. type variables
  13. long cur_mtrlid = 0
  14. s_edit_index_tran s_tran
  15. string ins_status = ''
  16. end variables
  17. on w_configure_ch_zj.create
  18. call super::create
  19. end on
  20. on w_configure_ch_zj.destroy
  21. call super::destroy
  22. end on
  23. event open;if_ue_sort=true
  24. wf_movetocenter()
  25. dw_CH.SetTransObject (sqlca)
  26. s_tran=Message.powerobjectparm
  27. cur_mtrlid = s_tran.c_long
  28. cb_retrieve.TRIGGEREVENT(CLICKED!)
  29. end event
  30. event close;call super::close;CLOSEWITHRETURN(THIS,ins_status)
  31. end event
  32. event dw_filter;call super::dw_filter;String obj_expr = ''
  33. IF Trim(sle_ch.Text) <> '' THEN
  34. IF Pos(Trim(sle_ch.Text),'%') = 0 THEN
  35. obj_expr = obj_expr+'( name LIKE "%'+Trim(sle_ch.Text)+'%" )'
  36. ELSE
  37. obj_expr = obj_expr+'(name LIKE "'+Trim(sle_ch.Text)+'" )'
  38. END IF
  39. END IF
  40. dw_ch.SetFilter(obj_expr)
  41. dw_ch.SetRedraw(FALSE)
  42. dw_ch.Filter()
  43. IF dw_ch.RowCount() >= 1 THEN
  44. dw_ch.SelectRow(0,FALSE)
  45. dw_ch.SelectRow(1,TRUE)
  46. dw_ch.SetRow( 1)
  47. END IF
  48. dw_ch.SetRedraw(TRUE)
  49. end event
  50. type cb_func from w_publ_choice`cb_func within w_configure_ch_zj
  51. end type
  52. type cb_exit from w_publ_choice`cb_exit within w_configure_ch_zj
  53. end type
  54. type sle_ch from w_publ_choice`sle_ch within w_configure_ch_zj
  55. integer x = 311
  56. end type
  57. type dw_ch from w_publ_choice`dw_ch within w_configure_ch_zj
  58. integer width = 2176
  59. integer height = 1324
  60. string dataobject = "dw_configure_ch_zj"
  61. end type
  62. event dw_ch::doubleclicked;if row<=0 then return
  63. cb_CHOICE.PostEvent(Clicked!)
  64. end event
  65. type st_1 from w_publ_choice`st_1 within w_configure_ch_zj
  66. integer y = 204
  67. integer width = 274
  68. integer height = 52
  69. string text = "名称包含:"
  70. boolean righttoleft = false
  71. end type
  72. type cb_retrieve from w_publ_choice`cb_retrieve within w_configure_ch_zj
  73. end type
  74. event cb_retrieve::clicked;dw_ch.retrieve(cur_mtrlid)
  75. end event
  76. type cb_choice from w_publ_choice`cb_choice within w_configure_ch_zj
  77. end type
  78. event cb_choice::clicked;call super::clicked;Long ls_row
  79. ls_row = dw_ch.GetRow( )
  80. IF ls_row <= 0 THEN
  81. MessageBox('警告','请选定目标行')
  82. RETURN
  83. END IF
  84. ins_status = dw_ch.Object.name[ls_row]
  85. Close(PARENT)
  86. end event
  87. type ln_bar from w_publ_choice`ln_bar within w_configure_ch_zj
  88. end type
  89. type ln_bar2 from w_publ_choice`ln_bar2 within w_configure_ch_zj
  90. end type
  91. type r_bar from w_publ_choice`r_bar within w_configure_ch_zj
  92. integer x = 1248
  93. integer y = 4
  94. end type
  95. type ln_1 from w_publ_choice`ln_1 within w_configure_ch_zj
  96. end type
  97. type ln_2 from w_publ_choice`ln_2 within w_configure_ch_zj
  98. end type