w_subjectdef_ch.srw 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146
  1. $PBExportHeader$w_subjectdef_ch.srw
  2. forward
  3. global type w_subjectdef_ch from w_publ_choice
  4. end type
  5. end forward
  6. global type w_subjectdef_ch from w_publ_choice
  7. integer width = 3511
  8. integer height = 2280
  9. string title = "科目选择"
  10. long backcolor = 83162356
  11. end type
  12. global w_subjectdef_ch w_subjectdef_ch
  13. type variables
  14. s_subject s_rt_subject
  15. long accsetid
  16. end variables
  17. on w_subjectdef_ch.create
  18. call super::create
  19. end on
  20. on w_subjectdef_ch.destroy
  21. call super::destroy
  22. end on
  23. event close;CloseWithReturn(This,s_rt_subject)
  24. end event
  25. event open;call super::open;String ls_subid
  26. ls_subid = Message.StringParm
  27. IF ls_subid <> '' THEN
  28. sle_ch.Text = ls_subid
  29. THIS.TriggerEvent("dw_filter")
  30. END IF
  31. end event
  32. event 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+'( subid LIKE "%'+Trim(sle_ch.Text)+'%" )'
  36. obj_expr = obj_expr+' or ( name LIKE "%'+Trim(sle_ch.Text)+'%" )'
  37. ELSE
  38. obj_expr = obj_expr+'( subid LIKE "'+Trim(sle_ch.Text)+'" )'
  39. obj_expr = obj_expr+' or ( name LIKE "'+Trim(sle_ch.Text)+'" )'
  40. END IF
  41. END IF
  42. dw_ch.SetFilter(obj_expr)
  43. dw_ch.SetRedraw(FALSE)
  44. dw_ch.Filter()
  45. IF dw_ch.RowCount() >= 1 THEN
  46. dw_ch.SelectRow(0,FALSE)
  47. dw_ch.SelectRow(1,TRUE)
  48. END IF
  49. dw_ch.SetRedraw(TRUE)
  50. end event
  51. event ue_before_open;call super::ue_before_open;if_ue_sort = TRUE
  52. end event
  53. type cb_func from w_publ_choice`cb_func within w_subjectdef_ch
  54. end type
  55. type cb_exit from w_publ_choice`cb_exit within w_subjectdef_ch
  56. end type
  57. type sle_ch from w_publ_choice`sle_ch within w_subjectdef_ch
  58. integer x = 571
  59. integer width = 1065
  60. end type
  61. type dw_ch from w_publ_choice`dw_ch within w_subjectdef_ch
  62. integer width = 3493
  63. integer height = 1880
  64. string dataobject = "dw_subject_ch"
  65. end type
  66. type st_1 from w_publ_choice`st_1 within w_subjectdef_ch
  67. integer width = 535
  68. string text = "科目代码|科目名称含"
  69. end type
  70. type cb_retrieve from w_publ_choice`cb_retrieve within w_subjectdef_ch
  71. end type
  72. event cb_retrieve::clicked;dw_ch.retrieve(sys_accsetid)
  73. end event
  74. type cb_choice from w_publ_choice`cb_choice within w_subjectdef_ch
  75. end type
  76. event cb_choice::clicked;call super::clicked;Long ll_row
  77. Int li_detailflag
  78. ll_row = dw_ch.GetRow()
  79. IF ll_row <= 0 THEN
  80. MessageBox('系统提示','请选择目标科目')
  81. RETURN
  82. END IF
  83. li_detailflag = dw_ch.Object.detailflag[ll_row]
  84. IF li_detailflag = 0 THEN
  85. MessageBox(publ_operator,'明细科目,不能选择')
  86. RETURN
  87. END IF
  88. s_rt_subject.subid = dw_ch.Object.subid[ll_row]
  89. s_rt_subject.Name = dw_ch.Object.Name[ll_row]
  90. s_rt_subject.dcflag = dw_ch.Object.dcflag[ll_row]
  91. s_rt_subject.detailflag = dw_ch.Object.detailflag[ll_row]
  92. s_rt_subject.hswb = dw_ch.Object.hswb[ll_row]
  93. s_rt_subject.moneyid = dw_ch.Object.moneyid[ll_row]
  94. s_rt_subject.hsqty = dw_ch.Object.hsqty[ll_row]
  95. s_rt_subject.hsdept = dw_ch.Object.hsdept[ll_row]
  96. s_rt_subject.hsemp =dw_ch.Object.hsemp[ll_row]
  97. s_rt_subject.hsitem = dw_ch.Object.hsitem[ll_row]
  98. s_rt_subject.hscust = dw_ch.Object.hscust[ll_row]
  99. s_rt_subject.hsspt = dw_ch.Object.hsspt[ll_row]
  100. s_rt_subject.hstrader = dw_ch.Object.hstrader[ll_row]
  101. Close(PARENT)
  102. end event
  103. type ln_bar from w_publ_choice`ln_bar within w_subjectdef_ch
  104. end type
  105. type ln_bar2 from w_publ_choice`ln_bar2 within w_subjectdef_ch
  106. end type
  107. type r_bar from w_publ_choice`r_bar within w_subjectdef_ch
  108. end type
  109. type ln_1 from w_publ_choice`ln_1 within w_subjectdef_ch
  110. end type
  111. type ln_2 from w_publ_choice`ln_2 within w_subjectdef_ch
  112. end type