w_empinfo_choice.srw 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. $PBExportHeader$w_empinfo_choice.srw
  2. forward
  3. global type w_empinfo_choice from w_publ_choice
  4. end type
  5. type st_2 from statictext within w_empinfo_choice
  6. end type
  7. type sle_name from u_sleedit within w_empinfo_choice
  8. end type
  9. end forward
  10. global type w_empinfo_choice from w_publ_choice
  11. integer width = 2318
  12. integer height = 1668
  13. string title = "人员选择"
  14. st_2 st_2
  15. sle_name sle_name
  16. end type
  17. global w_empinfo_choice w_empinfo_choice
  18. type variables
  19. s_empselect s_select
  20. string obj_empcode
  21. end variables
  22. on w_empinfo_choice.create
  23. int iCurrent
  24. call super::create
  25. this.st_2=create st_2
  26. this.sle_name=create sle_name
  27. iCurrent=UpperBound(this.Control)
  28. this.Control[iCurrent+1]=this.st_2
  29. this.Control[iCurrent+2]=this.sle_name
  30. end on
  31. on w_empinfo_choice.destroy
  32. call super::destroy
  33. destroy(this.st_2)
  34. destroy(this.sle_name)
  35. end on
  36. event close;call super::close;CLOSEWITHRETURN(THIS,s_select)
  37. end event
  38. event dw_filter;//string filterstr
  39. //filterstr=""+trim(sle_ch.text)
  40. //
  41. String obj_expr = ''
  42. IF Trim(sle_ch.Text) <> '' THEN
  43. IF Pos(Trim(sle_ch.Text),'%') = 0 THEN
  44. obj_expr = obj_expr+'( Lower(u_rs_empinfo_empcode) LIKE "%'+Lower(Trim(sle_ch.Text))+'%" )'
  45. ELSE
  46. obj_expr = obj_expr+'( Lower(u_rs_empinfo_empcode) LIKE "'+Lower(Trim(sle_ch.Text))+'" )'
  47. END IF
  48. END IF
  49. IF Trim(sle_name.Text) <> '' THEN
  50. IF obj_expr <> '' THEN obj_expr = obj_expr+ ' or '
  51. IF Pos(Trim(sle_ch.Text),'%') = 0 THEN
  52. obj_expr = obj_expr+' ( u_rs_empinfo_empname LIKE "%'+Trim(sle_name.Text)+'%" )'
  53. ELSE
  54. obj_expr = obj_expr+'( u_rs_empinfo_empname LIKE "'+Trim(sle_name.Text)+'" )'
  55. END IF
  56. END IF
  57. dw_ch.SetFilter(obj_expr)
  58. dw_ch.SetRedraw(FALSE)
  59. dw_ch.Filter()
  60. IF dw_ch.RowCount() >= 1 THEN
  61. dw_ch.SelectRow(0,FALSE)
  62. dw_ch.SelectRow(1,TRUE)
  63. END IF
  64. dw_ch.SetRedraw(TRUE)
  65. end event
  66. event open;call super::open;obj_empcode=message.stringparm
  67. if obj_empcode<>'' then
  68. sle_ch.text=obj_empcode
  69. sle_name.text=obj_empcode
  70. this.triggerevent("dw_filter")
  71. end if
  72. end event
  73. type cb_func from w_publ_choice`cb_func within w_empinfo_choice
  74. end type
  75. type cb_exit from w_publ_choice`cb_exit within w_empinfo_choice
  76. integer taborder = 50
  77. end type
  78. type sle_ch from w_publ_choice`sle_ch within w_empinfo_choice
  79. integer x = 238
  80. integer width = 389
  81. end type
  82. type dw_ch from w_publ_choice`dw_ch within w_empinfo_choice
  83. integer width = 2272
  84. integer height = 1216
  85. string dataobject = "dw_rs_empinfo_choice"
  86. boolean hscrollbar = false
  87. boolean hsplitscroll = false
  88. end type
  89. type st_1 from w_publ_choice`st_1 within w_empinfo_choice
  90. integer x = 23
  91. integer width = 210
  92. string text = "工号含:"
  93. boolean righttoleft = false
  94. end type
  95. type cb_retrieve from w_publ_choice`cb_retrieve within w_empinfo_choice
  96. integer taborder = 60
  97. end type
  98. event cb_retrieve::clicked;dw_ch.retrieve()
  99. end event
  100. type cb_choice from w_publ_choice`cb_choice within w_empinfo_choice
  101. end type
  102. event cb_choice::clicked;LONG LS_ROW
  103. LS_ROW=dw_CH.getrow()
  104. if LS_ROW<=0 then
  105. messagebox('提示','请先选择目标行!', Information!, OK! )
  106. return
  107. end if
  108. s_select.empid=dw_ch.object.u_rs_empinfo_empid[dw_ch.getrow()]
  109. s_select.empcode=dw_ch.object.u_rs_empinfo_empcode[dw_ch.getrow()]
  110. s_select.empname=dw_ch.object.u_rs_empinfo_empname[dw_ch.getrow()]
  111. CLOSE(PARENT)
  112. end event
  113. type ln_bar from w_publ_choice`ln_bar within w_empinfo_choice
  114. end type
  115. type ln_bar2 from w_publ_choice`ln_bar2 within w_empinfo_choice
  116. end type
  117. type r_bar from w_publ_choice`r_bar within w_empinfo_choice
  118. end type
  119. type ln_1 from w_publ_choice`ln_1 within w_empinfo_choice
  120. end type
  121. type ln_2 from w_publ_choice`ln_2 within w_empinfo_choice
  122. end type
  123. type st_2 from statictext within w_empinfo_choice
  124. integer x = 722
  125. integer y = 212
  126. integer width = 201
  127. integer height = 60
  128. boolean bringtotop = true
  129. integer textsize = -9
  130. integer weight = 400
  131. fontcharset fontcharset = gb2312charset!
  132. fontpitch fontpitch = variable!
  133. string facename = "宋体"
  134. long textcolor = 33554432
  135. long backcolor = 134217739
  136. boolean enabled = false
  137. string text = "姓名含:"
  138. boolean focusrectangle = false
  139. end type
  140. type sle_name from u_sleedit within w_empinfo_choice
  141. integer x = 928
  142. integer y = 196
  143. integer width = 416
  144. integer taborder = 20
  145. boolean bringtotop = true
  146. end type
  147. event inputchanged;PARENT.POSTEVENT('DW_FILTER')
  148. end event