$PBExportHeader$w_cus_ecomm_rep_cm_ch.srw forward global type w_cus_ecomm_rep_cm_ch from w_publ_choice end type type cbx_mlselect from checkbox within w_cus_ecomm_rep_cm_ch end type type cbx_all from checkbox within w_cus_ecomm_rep_cm_ch end type end forward global type w_cus_ecomm_rep_cm_ch from w_publ_choice integer width = 3611 integer height = 1680 string title = "电子商务用户联系人列表" cbx_mlselect cbx_mlselect cbx_all cbx_all end type global w_cus_ecomm_rep_cm_ch w_cus_ecomm_rep_cm_ch type variables s_cus_rep_cm_ljfieb_arr INS_RT_STRU //Transaction tr_eb_sqlca long il_repid Boolean if_changeselect = TRUE Int if_mlselect = 0 end variables on w_cus_ecomm_rep_cm_ch.create int iCurrent call super::create this.cbx_mlselect=create cbx_mlselect this.cbx_all=create cbx_all iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.cbx_mlselect this.Control[iCurrent+2]=this.cbx_all end on on w_cus_ecomm_rep_cm_ch.destroy call super::destroy destroy(this.cbx_mlselect) destroy(this.cbx_all) end on event open;//tr_eb_sqlca = sys_email_sqlca // 电子商务连接 This.TriggerEvent('ue_before_open') wf_movetocenter() if_ue_sort = True dw_CH.SetTransObject (sqlca) il_repid = Message.DoubleParm cb_retrieve.Triggerevent(Clicked!) end event event close;call super::close;CLOSEWITHRETURN(THIS,INS_RT_STRU) end event type cb_func from w_publ_choice`cb_func within w_cus_ecomm_rep_cm_ch end type type cb_exit from w_publ_choice`cb_exit within w_cus_ecomm_rep_cm_ch end type type sle_ch from w_publ_choice`sle_ch within w_cus_ecomm_rep_cm_ch boolean visible = false end type type dw_ch from w_publ_choice`dw_ch within w_cus_ecomm_rep_cm_ch integer y = 176 integer width = 3589 string dataobject = "dw_cus_ecomm_rep_cm_ch" end type event dw_ch::clicked;IF row > 0 THEN This.SetRow(row) IF if_mlselect = 1 THEN // This.SelectRow(row,Not This.IsSelected(row)) IF if_changeselect THEN This.SelectRow(row,Not This.IsSelected(row)) ELSE if_changeselect = True END IF ELSE This.SelectRow(0,False) This.SelectRow(row,True) END IF END IF end event event dw_ch::rowfocuschanged;IF if_mlselect = 1 THEN IF currentrow <= 0 THEN RETURN IF KeyDown(keycontrol!) THEN // This.SelectRow(currentrow,Not This.IsSelected(currentrow)) IF THIS.IsSelected(currentrow) THEN THIS.SelectRow(currentrow,FALSE) if_changeselect = FALSE ELSE if_changeselect = TRUE END IF ELSE // This.SelectRow(currentrow,Not This.IsSelected(currentrow)) IF NOT THIS.IsSelected(currentrow) THEN THIS.SelectRow(currentrow,TRUE) if_changeselect = FALSE ELSE if_changeselect = TRUE END IF END IF ELSE IF dw_edit_mode THEN RETURN IF currentrow <= 0 THEN RETURN THIS.SelectRow(0,FALSE) THIS.SelectRow(currentrow,TRUE) END IF end event type st_1 from w_publ_choice`st_1 within w_cus_ecomm_rep_cm_ch boolean visible = false end type type cb_retrieve from w_publ_choice`cb_retrieve within w_cus_ecomm_rep_cm_ch end type event cb_retrieve::clicked;dw_CH.Retrieve(il_repid) end event type cb_choice from w_publ_choice`cb_choice within w_cus_ecomm_rep_cm_ch end type event cb_choice::clicked;call super::clicked;Long LS_ROW,cnt,ls_i LS_ROW = dw_CH.GetRow() IF LS_ROW <= 0 THEN MessageBox('系统提示','请先选择目标行!',StopSign!) RETURN END IF cnt = 0 FOR ls_i = 1 To dw_CH.RowCount() IF dw_CH.IsSelected(ls_i) THEN cnt++ INS_RT_STRU.ljemail[cnt] = dw_CH.Object.ljemail[ls_i] INS_RT_STRU.cmtype[cnt] = dw_CH.Object.cmtype[ls_i] INS_RT_STRU.username[cnt] = dw_CH.Object.username[ls_i] // INS_RT_STRU.loginname[cnt] = dw_CH.Object.loginname[LS_ROW] END IF NEXT Close(Parent) end event type ln_bar from w_publ_choice`ln_bar within w_cus_ecomm_rep_cm_ch end type type ln_bar2 from w_publ_choice`ln_bar2 within w_cus_ecomm_rep_cm_ch end type type r_bar from w_publ_choice`r_bar within w_cus_ecomm_rep_cm_ch end type type ln_1 from w_publ_choice`ln_1 within w_cus_ecomm_rep_cm_ch boolean visible = false end type type ln_2 from w_publ_choice`ln_2 within w_cus_ecomm_rep_cm_ch boolean visible = false end type type cbx_mlselect from checkbox within w_cus_ecomm_rep_cm_ch integer x = 827 integer y = 68 integer width = 201 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 string text = "多选" end type event clicked;IF THIS.Checked THEN if_mlselect = 1 cbx_all.Enabled = TRUE ELSE if_mlselect = 0 cbx_all.Enabled = FALSE cbx_all.Checked = FALSE Long li FOR li = 1 TO dw_ch.RowCount() dw_ch.SelectRow(li,FALSE) NEXT END IF f_SetProfileString (sys_empid,dw_ch.DataObject, "if_mlselect", String(if_mlselect)) end event event constructor;if_mlselect = Integer(f_ProfileString (sys_empid,dw_ch.DataObject, "if_mlselect", '0')) IF if_mlselect = 0 THEN THIS.Checked = FALSE cbx_all.Enabled = FALSE ELSE THIS.Checked = TRUE cbx_all.Enabled = TRUE END IF this.backcolor = 14215660 end event type cbx_all from checkbox within w_cus_ecomm_rep_cm_ch integer x = 1038 integer y = 68 integer width = 242 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long backcolor = 134217739 boolean enabled = false string text = "全选" end type event clicked;IF dw_ch.RowCount() <= 0 THEN RETURN Long li IF THIS.Checked THEN FOR li = 1 TO dw_ch.RowCount() dw_ch.SelectRow(li,TRUE) NEXT ELSE FOR li = 1 TO dw_ch.RowCount() dw_ch.SelectRow(li,FALSE) NEXT END IF end event event constructor;this.backcolor = 14215660 end event