w_user_choice.srw 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151
  1. $PBExportHeader$w_user_choice.srw
  2. forward
  3. global type w_user_choice from w_publ_choice
  4. end type
  5. end forward
  6. global type w_user_choice from w_publ_choice
  7. integer width = 2002
  8. integer height = 1440
  9. string title = "员工选择"
  10. end type
  11. global w_user_choice w_user_choice
  12. type variables
  13. s_email_user_choice s_select
  14. string obj_empcode
  15. //int ii_status = 1
  16. end variables
  17. on w_user_choice.create
  18. call super::create
  19. end on
  20. on w_user_choice.destroy
  21. call super::destroy
  22. end on
  23. event close;call super::close;CLOSEWITHRETURN(THIS,s_select)
  24. end event
  25. event dw_filter;//string filterstr
  26. //filterstr=""+trim(sle_ch.text)
  27. //
  28. String obj_expr = ''
  29. IF Trim(sle_ch.Text) <> '' THEN
  30. IF Pos(Trim(sle_ch.Text),'%') = 0 THEN
  31. obj_expr = obj_expr+'( userid LIKE "%'+Trim(sle_ch.Text)+'%" )'
  32. ELSE
  33. obj_expr = obj_expr+'( Lower(userid) LIKE "'+Trim(sle_ch.Text)+'" )'
  34. END IF
  35. END IF
  36. long a
  37. a=1
  38. IF Trim(sle_ch.Text) <> '' THEN
  39. IF obj_expr <> '' THEN obj_expr = obj_expr+ ' or '
  40. IF Pos(Trim(sle_ch.Text),'%') = 0 THEN
  41. obj_expr = obj_expr+' ( username LIKE "%'+Trim(sle_ch.Text)+'%" )'
  42. ELSE
  43. obj_expr = obj_expr+' ( username LIKE "'+Trim(sle_ch.Text)+'" )'
  44. END IF
  45. END IF
  46. dw_ch.SetFilter(obj_expr)
  47. dw_ch.SetRedraw(FALSE)
  48. dw_ch.Filter()
  49. IF dw_ch.RowCount() >= 1 THEN
  50. dw_ch.SelectRow(0,FALSE)
  51. dw_ch.SelectRow(1,TRUE)
  52. END IF
  53. dw_ch.SetRedraw(TRUE)
  54. end event
  55. event open;call super::open;obj_empcode = Message.StringParm
  56. IF obj_empcode <> '' THEN
  57. sle_ch.Text = obj_empcode
  58. THIS.TriggerEvent("dw_filter")
  59. END IF
  60. end event
  61. type cb_func from w_publ_choice`cb_func within w_user_choice
  62. end type
  63. type cb_exit from w_publ_choice`cb_exit within w_user_choice
  64. integer taborder = 50
  65. end type
  66. type sle_ch from w_publ_choice`sle_ch within w_user_choice
  67. integer x = 379
  68. integer y = 184
  69. integer width = 389
  70. end type
  71. type dw_ch from w_publ_choice`dw_ch within w_user_choice
  72. integer width = 1966
  73. integer height = 1036
  74. string dataobject = "dw_user_choice"
  75. boolean hsplitscroll = false
  76. end type
  77. type st_1 from w_publ_choice`st_1 within w_user_choice
  78. integer x = 18
  79. integer y = 204
  80. integer width = 343
  81. string text = "工号/姓名含:"
  82. alignment alignment = right!
  83. boolean righttoleft = false
  84. end type
  85. type cb_retrieve from w_publ_choice`cb_retrieve within w_user_choice
  86. integer taborder = 60
  87. end type
  88. event cb_retrieve::clicked;
  89. //if upperbound(sys_user_dept)=0 then
  90. // long a[]
  91. // a[1]=0
  92. // setnull(a[1])
  93. // dw_ch.retrieve()
  94. //else
  95. dw_ch.retrieve()
  96. //end if
  97. THIS.TriggerEvent("dw_filter")
  98. end event
  99. type cb_choice from w_publ_choice`cb_choice within w_user_choice
  100. end type
  101. event cb_choice::clicked;Long LS_ROW
  102. LS_ROW = dw_CH.GetRow()
  103. IF LS_ROW <= 0 THEN
  104. MessageBox('系统提示','请先选择目标行!',StopSign!)
  105. RETURN
  106. END IF
  107. s_select.empid = dw_CH.Object.empid[dw_CH.GetRow()]
  108. s_select.userid = dw_CH.Object.userid[dw_CH.GetRow()]
  109. s_select.username = dw_CH.Object.username[dw_CH.GetRow()]
  110. Close(PARENT)
  111. end event
  112. type ln_bar from w_publ_choice`ln_bar within w_user_choice
  113. end type
  114. type ln_bar2 from w_publ_choice`ln_bar2 within w_user_choice
  115. end type
  116. type r_bar from w_publ_choice`r_bar within w_user_choice
  117. end type
  118. type ln_1 from w_publ_choice`ln_1 within w_user_choice
  119. end type
  120. type ln_2 from w_publ_choice`ln_2 within w_user_choice
  121. end type