$PBExportHeader$w_taobao_trancode_ch.srw forward global type w_taobao_trancode_ch from w_publ_choice end type end forward global type w_taobao_trancode_ch from w_publ_choice string title = "选择淘宝货运部" end type global w_taobao_trancode_ch w_taobao_trancode_ch type variables s_taobao_trancode_ch ins_rslt end variables on w_taobao_trancode_ch.create call super::create end on on w_taobao_trancode_ch.destroy call super::destroy end on event close;call super::close;CloseWithReturn(This, ins_rslt) end event event open;call super::open;String taobao_code taobao_code = Message.StringParm dw_ch.SetTransObject(sqlca) dw_ch.Retrieve() Long ll_row ll_row = dw_ch.Find("code = '"+taobao_code+"'", 1, dw_ch.RowCount()) IF ll_row > 0 THEN dw_ch.ScrollToRow(ll_row) dw_ch.SetRow(ll_row) dw_ch.SelectRow(0, False) dw_ch.SelectRow(ll_row, True) END IF ins_rslt.ifok = 0 //uo_ljlib_taobao_comapp taobaocom //taobaocom = Create uo_ljlib_taobao_comapp //Int rslt = 1 //String ls_msg = '' // //oleobject arr_coms //oleobject com //Long i, cnt, ll_row //String ls_code, ls_name // //IF taobaocom.uf_getcompanys( Ref arr_coms, Ref ls_msg) <> 1 THEN // rslt = 0 // GOTO ext //END IF //cnt = arr_coms.GetCount() //FOR i = 0 To cnt - 1 // ll_row = dw_ch.InsertRow(0) // com = arr_coms.GetItem(i) // ls_code = com.Code // ls_name = com.Name // dw_ch.SetItem(ll_row, 'code', ls_code) // dw_ch.SetItem(ll_row, 'name', ls_name) // // IF ls_code = taobao_code THEN // dw_ch.Scrolltorow(ll_row) // dw_ch.SetRow(ll_row) // dw_ch.SelectRow(0, False) // dw_ch.SelectRow(ll_row, True) // END IF // //NEXT //ext: //IF rslt = 0 THEN // MessageBox('ERROR', ls_msg) // cb_exit.PostEvent( Clicked!) //END IF end event event dw_filter;call super::dw_filter;String obj_expr = '' string ls_ch ls_ch = Lower(Trim(sle_ch.Text)) IF ls_ch <> '' THEN IF Pos(ls_ch,'%') = 0 THEN obj_expr = obj_expr+"( lower(code) LIKE '%"+ls_ch+"%') OR (lower(name) LIKE '%"+ls_ch+"%' )" ELSE obj_expr = obj_expr+"( lower(code) LIKE '"+ls_ch+"') OR (lower(name) LIKE '"+ls_ch+"' )" END IF END IF dw_ch.SetFilter(obj_expr) dw_ch.SetRedraw(False) dw_ch.Filter() IF dw_ch.RowCount() >= 1 THEN dw_ch.SelectRow(0,False) dw_ch.SelectRow(1,True) END IF dw_ch.SetRedraw(True) end event type cb_func from w_publ_choice`cb_func within w_taobao_trancode_ch boolean visible = false end type type cb_exit from w_publ_choice`cb_exit within w_taobao_trancode_ch integer x = 151 end type type sle_ch from w_publ_choice`sle_ch within w_taobao_trancode_ch end type type dw_ch from w_publ_choice`dw_ch within w_taobao_trancode_ch string dataobject = "dw_taobao_trancode_ch" end type type st_1 from w_publ_choice`st_1 within w_taobao_trancode_ch end type type cb_retrieve from w_publ_choice`cb_retrieve within w_taobao_trancode_ch boolean visible = false end type type cb_choice from w_publ_choice`cb_choice within w_taobao_trancode_ch integer x = 0 end type event cb_choice::clicked;call super::clicked;Long ll_row ll_row = dw_ch.GetRow() IF ll_row <= 0 THEN MessageBox('提示', '请选择对象') RETURN END IF ins_rslt.taobao_code = dw_ch.Object.code[ll_row] ins_rslt.taobao_name = dw_ch.Object.Name[ll_row] ins_rslt.ifok = 1 Close(Parent) end event type ln_bar from w_publ_choice`ln_bar within w_taobao_trancode_ch end type type ln_bar2 from w_publ_choice`ln_bar2 within w_taobao_trancode_ch end type type r_bar from w_publ_choice`r_bar within w_taobao_trancode_ch end type type ln_1 from w_publ_choice`ln_1 within w_taobao_trancode_ch end type type ln_2 from w_publ_choice`ln_2 within w_taobao_trancode_ch end type