w_cus_ecomm_rep_cm_ch.srw 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264
  1. $PBExportHeader$w_cus_ecomm_rep_cm_ch.srw
  2. forward
  3. global type w_cus_ecomm_rep_cm_ch from w_publ_choice
  4. end type
  5. type cbx_mlselect from checkbox within w_cus_ecomm_rep_cm_ch
  6. end type
  7. type cbx_all from checkbox within w_cus_ecomm_rep_cm_ch
  8. end type
  9. end forward
  10. global type w_cus_ecomm_rep_cm_ch from w_publ_choice
  11. integer width = 3611
  12. integer height = 1680
  13. string title = "电子商务用户联系人列表"
  14. cbx_mlselect cbx_mlselect
  15. cbx_all cbx_all
  16. end type
  17. global w_cus_ecomm_rep_cm_ch w_cus_ecomm_rep_cm_ch
  18. type variables
  19. s_cus_rep_cm_ljfieb_arr INS_RT_STRU
  20. //Transaction tr_eb_sqlca
  21. long il_repid
  22. Boolean if_changeselect = TRUE
  23. Int if_mlselect = 0
  24. end variables
  25. on w_cus_ecomm_rep_cm_ch.create
  26. int iCurrent
  27. call super::create
  28. this.cbx_mlselect=create cbx_mlselect
  29. this.cbx_all=create cbx_all
  30. iCurrent=UpperBound(this.Control)
  31. this.Control[iCurrent+1]=this.cbx_mlselect
  32. this.Control[iCurrent+2]=this.cbx_all
  33. end on
  34. on w_cus_ecomm_rep_cm_ch.destroy
  35. call super::destroy
  36. destroy(this.cbx_mlselect)
  37. destroy(this.cbx_all)
  38. end on
  39. event open;//tr_eb_sqlca = sys_email_sqlca // 电子商务连接
  40. This.TriggerEvent('ue_before_open')
  41. wf_movetocenter()
  42. if_ue_sort = True
  43. dw_CH.SetTransObject (sqlca)
  44. il_repid = Message.DoubleParm
  45. cb_retrieve.Triggerevent(Clicked!)
  46. end event
  47. event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU)
  48. end event
  49. type cb_func from w_publ_choice`cb_func within w_cus_ecomm_rep_cm_ch
  50. end type
  51. type cb_exit from w_publ_choice`cb_exit within w_cus_ecomm_rep_cm_ch
  52. end type
  53. type sle_ch from w_publ_choice`sle_ch within w_cus_ecomm_rep_cm_ch
  54. boolean visible = false
  55. end type
  56. type dw_ch from w_publ_choice`dw_ch within w_cus_ecomm_rep_cm_ch
  57. integer y = 176
  58. integer width = 3589
  59. string dataobject = "dw_cus_ecomm_rep_cm_ch"
  60. end type
  61. event dw_ch::clicked;IF row > 0 THEN
  62. This.SetRow(row)
  63. IF if_mlselect = 1 THEN
  64. // This.SelectRow(row,Not This.IsSelected(row))
  65. IF if_changeselect THEN
  66. This.SelectRow(row,Not This.IsSelected(row))
  67. ELSE
  68. if_changeselect = True
  69. END IF
  70. ELSE
  71. This.SelectRow(0,False)
  72. This.SelectRow(row,True)
  73. END IF
  74. END IF
  75. end event
  76. event dw_ch::rowfocuschanged;IF if_mlselect = 1 THEN
  77. IF currentrow <= 0 THEN RETURN
  78. IF KeyDown(keycontrol!) THEN
  79. // This.SelectRow(currentrow,Not This.IsSelected(currentrow))
  80. IF THIS.IsSelected(currentrow) THEN
  81. THIS.SelectRow(currentrow,FALSE)
  82. if_changeselect = FALSE
  83. ELSE
  84. if_changeselect = TRUE
  85. END IF
  86. ELSE
  87. // This.SelectRow(currentrow,Not This.IsSelected(currentrow))
  88. IF NOT THIS.IsSelected(currentrow) THEN
  89. THIS.SelectRow(currentrow,TRUE)
  90. if_changeselect = FALSE
  91. ELSE
  92. if_changeselect = TRUE
  93. END IF
  94. END IF
  95. ELSE
  96. IF dw_edit_mode THEN RETURN
  97. IF currentrow <= 0 THEN RETURN
  98. THIS.SelectRow(0,FALSE)
  99. THIS.SelectRow(currentrow,TRUE)
  100. END IF
  101. end event
  102. type st_1 from w_publ_choice`st_1 within w_cus_ecomm_rep_cm_ch
  103. boolean visible = false
  104. end type
  105. type cb_retrieve from w_publ_choice`cb_retrieve within w_cus_ecomm_rep_cm_ch
  106. end type
  107. event cb_retrieve::clicked;dw_CH.Retrieve(il_repid)
  108. end event
  109. type cb_choice from w_publ_choice`cb_choice within w_cus_ecomm_rep_cm_ch
  110. end type
  111. event cb_choice::clicked;call super::clicked;Long LS_ROW,cnt,ls_i
  112. LS_ROW = dw_CH.GetRow()
  113. IF LS_ROW <= 0 THEN
  114. MessageBox('系统提示','请先选择目标行!',StopSign!)
  115. RETURN
  116. END IF
  117. cnt = 0
  118. FOR ls_i = 1 To dw_CH.RowCount()
  119. IF dw_CH.IsSelected(ls_i) THEN
  120. cnt++
  121. INS_RT_STRU.ljemail[cnt] = dw_CH.Object.ljemail[ls_i]
  122. INS_RT_STRU.cmtype[cnt] = dw_CH.Object.cmtype[ls_i]
  123. INS_RT_STRU.username[cnt] = dw_CH.Object.username[ls_i]
  124. // INS_RT_STRU.loginname[cnt] = dw_CH.Object.loginname[LS_ROW]
  125. END IF
  126. NEXT
  127. Close(Parent)
  128. end event
  129. type ln_bar from w_publ_choice`ln_bar within w_cus_ecomm_rep_cm_ch
  130. end type
  131. type ln_bar2 from w_publ_choice`ln_bar2 within w_cus_ecomm_rep_cm_ch
  132. end type
  133. type r_bar from w_publ_choice`r_bar within w_cus_ecomm_rep_cm_ch
  134. end type
  135. type ln_1 from w_publ_choice`ln_1 within w_cus_ecomm_rep_cm_ch
  136. boolean visible = false
  137. end type
  138. type ln_2 from w_publ_choice`ln_2 within w_cus_ecomm_rep_cm_ch
  139. boolean visible = false
  140. end type
  141. type cbx_mlselect from checkbox within w_cus_ecomm_rep_cm_ch
  142. integer x = 827
  143. integer y = 68
  144. integer width = 201
  145. integer height = 60
  146. boolean bringtotop = true
  147. integer textsize = -9
  148. integer weight = 400
  149. fontcharset fontcharset = gb2312charset!
  150. fontpitch fontpitch = variable!
  151. string facename = "宋体"
  152. long backcolor = 134217739
  153. string text = "多选"
  154. end type
  155. event clicked;IF THIS.Checked THEN
  156. if_mlselect = 1
  157. cbx_all.Enabled = TRUE
  158. ELSE
  159. if_mlselect = 0
  160. cbx_all.Enabled = FALSE
  161. cbx_all.Checked = FALSE
  162. Long li
  163. FOR li = 1 TO dw_ch.RowCount()
  164. dw_ch.SelectRow(li,FALSE)
  165. NEXT
  166. END IF
  167. f_SetProfileString (sys_empid,dw_ch.DataObject, "if_mlselect", String(if_mlselect))
  168. end event
  169. event constructor;if_mlselect = Integer(f_ProfileString (sys_empid,dw_ch.DataObject, "if_mlselect", '0'))
  170. IF if_mlselect = 0 THEN
  171. THIS.Checked = FALSE
  172. cbx_all.Enabled = FALSE
  173. ELSE
  174. THIS.Checked = TRUE
  175. cbx_all.Enabled = TRUE
  176. END IF
  177. this.backcolor = 14215660
  178. end event
  179. type cbx_all from checkbox within w_cus_ecomm_rep_cm_ch
  180. integer x = 1038
  181. integer y = 68
  182. integer width = 242
  183. integer height = 60
  184. boolean bringtotop = true
  185. integer textsize = -9
  186. integer weight = 400
  187. fontcharset fontcharset = gb2312charset!
  188. fontpitch fontpitch = variable!
  189. string facename = "宋体"
  190. long backcolor = 134217739
  191. boolean enabled = false
  192. string text = "全选"
  193. end type
  194. event clicked;IF dw_ch.RowCount() <= 0 THEN RETURN
  195. Long li
  196. IF THIS.Checked THEN
  197. FOR li = 1 TO dw_ch.RowCount()
  198. dw_ch.SelectRow(li,TRUE)
  199. NEXT
  200. ELSE
  201. FOR li = 1 TO dw_ch.RowCount()
  202. dw_ch.SelectRow(li,FALSE)
  203. NEXT
  204. END IF
  205. end event
  206. event constructor;this.backcolor = 14215660
  207. end event