123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816 |
- $PBExportHeader$w_ol_mov_pipeline.srw
- forward
- global type w_ol_mov_pipeline from w_publ_base
- end type
- type mle_log from multilineedit within w_ol_mov_pipeline
- end type
- type st_msg from statictext within w_ol_mov_pipeline
- end type
- type cb_1 from commandbutton within w_ol_mov_pipeline
- end type
- type st_vservermsg from statictext within w_ol_mov_pipeline
- end type
- type cb_obj_cnt from commandbutton within w_ol_mov_pipeline
- end type
- type st_obj_msg from statictext within w_ol_mov_pipeline
- end type
- type gb_14 from groupbox within w_ol_mov_pipeline
- end type
- type gb_2 from groupbox within w_ol_mov_pipeline
- end type
- type ddplb_obj_tran from dropdownpicturelistbox within w_ol_mov_pipeline
- end type
- type st_222 from statictext within w_ol_mov_pipeline
- end type
- type ddlb_st from dropdownlistbox within w_ol_mov_pipeline
- end type
- type st_3e from statictext within w_ol_mov_pipeline
- end type
- type em_ed from editmask within w_ol_mov_pipeline
- end type
- type dw_error from datawindow within w_ol_mov_pipeline
- end type
- type dw_1 from u_dw_rbtnfilter within w_ol_mov_pipeline
- end type
- type cb_2 from commandbutton within w_ol_mov_pipeline
- end type
- end forward
- global type w_ol_mov_pipeline from w_publ_base
- integer x = 46
- integer y = 32
- integer width = 3118
- integer height = 2168
- string title = "转移已截数数据"
- boolean maxbox = true
- windowstate windowstate = maximized!
- long backcolor = 80269524
- mle_log mle_log
- st_msg st_msg
- cb_1 cb_1
- st_vservermsg st_vservermsg
- cb_obj_cnt cb_obj_cnt
- st_obj_msg st_obj_msg
- gb_14 gb_14
- gb_2 gb_2
- ddplb_obj_tran ddplb_obj_tran
- st_222 st_222
- ddlb_st ddlb_st
- st_3e st_3e
- em_ed em_ed
- dw_error dw_error
- dw_1 dw_1
- cb_2 cb_2
- end type
- global w_ol_mov_pipeline w_ol_mov_pipeline
- type variables
- uo_remote_sqlca uo_rm_sqlca
- uo_yfimex_pipeline uo_pl_yfimex
- uo_getdbinfo uo_dbinfo
- uo_yfct uo_ct
- transaction obj_sqlca //目标数据传递事务对象
- int obj_hisflag,obj_ifd_msttake
- boolean obj_ifconnect=false
- end variables
- forward prototypes
- public function integer wf_pipeline_ctdata ()
- public function integer wf_check_data ()
- end prototypes
- public function integer wf_pipeline_ctdata ();//wf_pipeline_ctdata()
- DateTime arg_bg_changetime,arg_ed_changetime
- String arg_log,arg_msg,ls_tbname
- Int arg_getflag = 0,arg_usechangetime = 0
- Int rslt,ls_k,tbc = 0,ls_i
- Long bg_ctmint,ed_ctmint
- Long arg_commitstep = 100,arg_maxerrors = 100
- arg_bg_changetime = DateTime(Date(Left(ddlb_st.Text,10)),Time(Right(ddlb_st.Text,8)))
- arg_ed_changetime = DateTime(Date(Left(em_ed.Text,10)),Time(Right(em_ed.Text,8)))
- st_msg.Text = ''
- s_exporttableinfo arg_zipfileinfo[200]
- s_sys_tntblinfo ls_tntblinfo
- //0.取标记
- SELECT ct_dateint INTO :bg_ctmint FROM sys_ct_data Where ct_datetime = :arg_bg_changetime;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox("错误",'查询截数开始时间标记失败',stopsign!,OK!)
- rslt = 0
- GOTO ext
- END IF
- SELECT ct_dateint INTO :ed_ctmint FROM sys_ct_data Where ct_datetime = :arg_ed_changetime;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox("错误",'查询截数结束时间标记失败',stopsign!,OK!)
- rslt = 0
- GOTO ext
- END IF
- //2.表文件数组
- //2.1无filter_string表
- FOR ls_i = 1 TO UpperBound(s_tntblinfo)
- ls_tntblinfo = s_tntblinfo[ls_i]
- If (ls_tntblinfo.tabletype = 0 OR ls_tntblinfo.tabletype = 1) AND ls_tntblinfo.table_name <> '' THEN
- ls_k++
- arg_zipfileinfo[ls_k].table_name = s_tntblinfo[ls_i].table_name
- arg_zipfileinfo[ls_k].filter_string = ''
- END IF
- NEXT
- ls_k++
- arg_zipfileinfo[ls_k].table_name = 'u_bsnNo' //业务编号表
- arg_zipfileinfo[ls_k].filter_string = ''
- ls_k++
- arg_zipfileinfo[ls_k].table_name = 'Sys_scIdentity' //ID流水表
- arg_zipfileinfo[ls_k].filter_string = ''
- ls_k++
- arg_zipfileinfo[ls_k].table_name = 'u_mtrlware' //库存表
- arg_zipfileinfo[ls_k].filter_string = ''
- //2.2 有filter_string表
- Int arr_cnt
- Long ll_a
- s_yfct s_ctmx[]
- f_init_cttbinfo(arg_ed_changetime,bg_ctmint,ed_ctmint,s_ctmx[])
- arr_cnt = UpperBound(s_ctmx)
- FOR ll_a = 1 TO arr_cnt
- ls_k++
- arg_zipfileinfo[ls_k].table_name = s_ctmx[ll_a].etbname
- arg_zipfileinfo[ls_k].filter_string = s_ctmx[ll_a].ctstr
- NEXT
- uo_pl_yfimex.uf_pl_execute(sqlca,obj_sqlca,dw_error,arg_zipfileinfo[],ls_k,arg_commitstep,arg_maxerrors,arg_msg,arg_log,TRUE)
- //6.
- IF NOT if_hisdb THEN
- Long err_num,pos_1,pos_2,len_1
- String char_enter
- char_enter = Char(13)+Char(10)
- len_1 = Len(',总错误- ')
- pos_1 = Pos(arg_log,',总错误- ')
- pos_2 = Pos(arg_log,char_enter,pos_1)
- err_num = Long(Mid(arg_log, pos_1 + Len(',总错误- '),pos_2 - pos_1 - len_1 ))
-
- IF uo_ct.add_ct_datamx(0,arg_bg_changetime,arg_ed_changetime,err_num,0,arg_msg,1,sqlca) = 0 THEN
- st_msg.Text = st_msg.Text + arg_msg
- END IF
-
- IF uo_ct.add_ct_datamx(0,arg_bg_changetime,arg_ed_changetime,err_num,0,arg_msg,1,obj_sqlca) = 0 THEN
- st_msg.Text = st_msg.Text + arg_msg
- END IF
- END IF
- MessageBox("提示",'数据传递完毕!',information!,OK!)
- ext:
- mle_log.Text = arg_log
- RETURN 1
- end function
- public function integer wf_check_data ();Int rslt = 1
- DateTime arg_bg_changetime,arg_ed_changetime
- Long ll_i,ll_k,ll_row
- Long bg_ctmint,ed_ctmint
- Long ll_local,ll_his
- String ls_errsql
- String ls_msg
- Int arr_cnt
- s_yfct s_ctmx[]
- String str_dwSQl,str_SyntaxFromSQL
- DataStore ds_data,ds_data_his
- arg_bg_changetime = DateTime(Date(Left(ddlb_st.Text,10)),Time(Right(ddlb_st.Text,8)))
- arg_ed_changetime = DateTime(Date(Left(em_ed.Text,10)),Time(Right(em_ed.Text,8)))
- st_msg.Text = ''
- //0.取标记
- SELECT ct_dateint INTO :bg_ctmint FROM sys_ct_data Where ct_datetime = :arg_bg_changetime;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox("错误",'查询截数开始时间标记失败',stopsign!,OK!)
- rslt = 0
- GOTO ext
- END IF
- SELECT ct_dateint INTO :ed_ctmint FROM sys_ct_data Where ct_datetime = :arg_ed_changetime;
- IF sqlca.SQLCode <> 0 THEN
- MessageBox("错误",'查询截数结束时间标记失败',stopsign!,OK!)
- rslt = 0
- GOTO ext
- END IF
- f_init_cttbinfo(arg_ed_changetime,bg_ctmint,ed_ctmint,s_ctmx[])
- arr_cnt = UpperBound(s_ctmx)
- ds_data = CREATE DataStore
- ds_data_his = CREATE DataStore
- OPEN(w_sys_wait_jdt)
- w_sys_wait_jdt.Show()
- w_sys_wait_jdt.wf_accepttol(arr_cnt) //初始化进度条1
- dw_1.SetRedraw(FALSE)
- FOR ll_i = 1 TO arr_cnt
- ls_msg = ''
- ls_errsql = ''
- ll_local = 0
- ll_his = 0
- ds_data.Reset()
- ds_data_his.Reset()
-
- if s_ctmx[ll_i].etbname = '' then continue
-
- w_sys_wait_jdt.st_msg.Text = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 正在建dw..." //进度信息
-
- str_dwSQl = "select "+s_ctmx[ll_i].etbname+".* from "+s_ctmx[ll_i].etbname+s_ctmx[ll_i].ctstr
-
- str_SyntaxFromSQL = sqlca.SyntaxFromSQL(str_dwSQl,"style(type=grid)",ls_msg)
- IF ls_msg > '' THEN
- ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" dw语法生成失败"
- GOTO nexttable
- END IF
-
- ds_data.CREATE(str_SyntaxFromSQL,ls_msg)
- IF ls_msg > '' THEN
- ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 建立相关DW失败"
- GOTO nexttable
- END IF
-
- ds_data.SetTransObject(sqlca)
- w_sys_wait_jdt.st_msg.Text = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 正在本地取数据..." //进度信息
- ll_local = ds_data.Retrieve()
- IF IsNull(ll_local) THEN ll_local = 0
-
- //历史
- str_SyntaxFromSQL = obj_sqlca.SyntaxFromSQL(str_dwSQl,"style(type=grid)",ls_msg)
- IF ls_msg > '' THEN
- ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" dw语法生成失败"
- GOTO nexttable
- END IF
-
- ds_data_his.CREATE(str_SyntaxFromSQL,ls_msg)
- IF ls_msg > '' THEN
- ls_errsql = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 历史建立相关DW失败"
- GOTO nexttable
- END IF
-
- ds_data_his.SetTransObject(obj_sqlca)
- w_sys_wait_jdt.st_msg.Text = s_ctmx[ll_i].ctbname+'/'+s_ctmx[ll_i].etbname+" 正在历史取数据..." //进度信息
- ll_his = ds_data_his.Retrieve()
- IF IsNull(ll_his) THEN ll_his = 0
-
- nexttable :
- ll_row = dw_1.InsertRow(0)
- dw_1.Object.tblname[ll_row] = s_ctmx[ll_i].ctbname
- dw_1.Object.etblname[ll_row] = s_ctmx[ll_i].etbname
- dw_1.Object.local[ll_row] = ll_local
- dw_1.Object.his[ll_row] = ll_his
- dw_1.Object.errsql[ll_row] = ls_errsql
- w_sys_wait_jdt.wf_inc(ll_i) //进度
- NEXT
- dw_1.SetRedraw(TRUE)
- CLOSE(w_sys_wait_jdt)
- DESTROY ds_data
- DESTROY ds_data_his
- MessageBox("提示",'数据检查完毕!',information!,OK!)
- ext:
- RETURN 1
- end function
- on w_ol_mov_pipeline.create
- int iCurrent
- call super::create
- this.mle_log=create mle_log
- this.st_msg=create st_msg
- this.cb_1=create cb_1
- this.st_vservermsg=create st_vservermsg
- this.cb_obj_cnt=create cb_obj_cnt
- this.st_obj_msg=create st_obj_msg
- this.gb_14=create gb_14
- this.gb_2=create gb_2
- this.ddplb_obj_tran=create ddplb_obj_tran
- this.st_222=create st_222
- this.ddlb_st=create ddlb_st
- this.st_3e=create st_3e
- this.em_ed=create em_ed
- this.dw_error=create dw_error
- this.dw_1=create dw_1
- this.cb_2=create cb_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.mle_log
- this.Control[iCurrent+2]=this.st_msg
- this.Control[iCurrent+3]=this.cb_1
- this.Control[iCurrent+4]=this.st_vservermsg
- this.Control[iCurrent+5]=this.cb_obj_cnt
- this.Control[iCurrent+6]=this.st_obj_msg
- this.Control[iCurrent+7]=this.gb_14
- this.Control[iCurrent+8]=this.gb_2
- this.Control[iCurrent+9]=this.ddplb_obj_tran
- this.Control[iCurrent+10]=this.st_222
- this.Control[iCurrent+11]=this.ddlb_st
- this.Control[iCurrent+12]=this.st_3e
- this.Control[iCurrent+13]=this.em_ed
- this.Control[iCurrent+14]=this.dw_error
- this.Control[iCurrent+15]=this.dw_1
- this.Control[iCurrent+16]=this.cb_2
- end on
- on w_ol_mov_pipeline.destroy
- call super::destroy
- destroy(this.mle_log)
- destroy(this.st_msg)
- destroy(this.cb_1)
- destroy(this.st_vservermsg)
- destroy(this.cb_obj_cnt)
- destroy(this.st_obj_msg)
- destroy(this.gb_14)
- destroy(this.gb_2)
- destroy(this.ddplb_obj_tran)
- destroy(this.st_222)
- destroy(this.ddlb_st)
- destroy(this.st_3e)
- destroy(this.em_ed)
- destroy(this.dw_error)
- destroy(this.dw_1)
- destroy(this.cb_2)
- end on
- event resize;dw_1.Width = THIS.Width - 30
- dw_error.Width = THIS.Width - 30
- mle_log.Width = THIS.Width - 30
- mle_log.Height = THIS.Height - mle_log.Y - 30
- end event
- event open;call super::open;uo_dbinfo=create uo_getdbinfo
- uo_pl_yfimex=create uo_yfimex_pipeline
- uo_ct=create uo_yfct
- obj_sqlca = create transaction
- end event
- event close;destroy uo_dbinfo
- destroy uo_pl_yfimex
- destroy uo_ct
- if obj_ifconnect then
- disconnect using obj_sqlca;
- end if
- end event
- type cb_func from w_publ_base`cb_func within w_ol_mov_pipeline
- boolean visible = false
- integer x = 1504
- boolean enabled = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_ol_mov_pipeline
- boolean visible = false
- integer x = 1824
- boolean enabled = false
- end type
- type mle_log from multilineedit within w_ol_mov_pipeline
- integer y = 1356
- integer width = 3077
- integer height = 708
- integer taborder = 100
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean displayonly = true
- borderstyle borderstyle = stylelowered!
- end type
- type st_msg from statictext within w_ol_mov_pipeline
- integer y = 480
- integer width = 2880
- integer height = 88
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16776960
- boolean enabled = false
- boolean border = true
- boolean focusrectangle = false
- end type
- type cb_1 from commandbutton within w_ol_mov_pipeline
- integer x = 2290
- integer y = 340
- integer width = 293
- integer height = 96
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "执行传递"
- end type
- event clicked;if MessageBox("询问",'是否确定要传送数据? ', Exclamation!, yesno!, 2) =2 then return
- if if_hisdb then
- messagebox("提示",'当前数据库是历史查询数据库,不能通过管道传送数据!',information!,OK!)
- return
- end if
- if not obj_ifconnect then
- messagebox("提示",'目标数据库还没有连接,请检查!',information!,OK!)
- return
- end if
- if obj_hisflag=0 then
- messagebox("提示",'目标数据库不是历史查询数据库,不能通过管道传送数据!',information!,OK!)
- return
- end if
- wf_pipeline_ctdata()
- end event
- type st_vservermsg from statictext within w_ol_mov_pipeline
- integer x = 18
- integer y = 12
- integer width = 1344
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 255
- long backcolor = 80269524
- boolean enabled = false
- string text = "如果数据库连接错误,需要尝试等待60s才会提示失败."
- boolean focusrectangle = false
- end type
- type cb_obj_cnt from commandbutton within w_ol_mov_pipeline
- integer x = 635
- integer y = 144
- integer width = 247
- integer height = 88
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "连接"
- end type
- event clicked;//st_obj_msg.Text = '正在连接...[如果连接失败可能需要等待60秒]'
- //Long ls_r,arg_cnt_no
- //String arg_msg,db_msg
- //arg_cnt_no = Integer(Right(ddplb_obj_tran.Text,2))
- //int li_switchflag
- //String arg_superpsw,arg_prg_id,arg_cur_version,ls_switchpsw
- //
- //ls_r = uo_rm_sqlca.cnt_remote_sqlca(arg_cnt_no,obj_sqlca,arg_msg)
- //IF ls_r = 1 THEN
- // IF uo_dbinfo.get_dbinfo(obj_sqlca,obj_hisflag,arg_superpsw,arg_prg_id,arg_cur_version,li_switchflag,ls_switchpsw,db_msg) = 0 THEN
- // MessageBox("系统提示",db_msg )
- // st_obj_msg.Text = '失败 >>'+arg_msg + ','+db_msg
- // obj_ifconnect = FALSE
- // ELSE
- // st_obj_msg.Text = '数据库连接 成功 >>'+String(Today())+' '+String(Now())
- // obj_ifconnect = TRUE
- // END IF
- //ELSE
- // st_obj_msg.Text = '失败 >>'+arg_msg
- // obj_ifconnect = FALSE
- //END IF
- int li_switchflag
- String ls_switchpsw
- st_obj_msg.Text = '正在连接...[如果连接失败可能需要等待60秒]'
- Long ls_r,ll_ConnectionID
- String arg_msg
- ll_ConnectionID = Integer(Mid(ddplb_obj_tran.Text,1,Pos(ddplb_obj_tran.Text,' ') - 1))
- IF f_connect_db(ll_ConnectionID,obj_sqlca,arg_msg) = 0 THEN
- MessageBox("错误",arg_msg,stopsign!,OK! )
- RETURN
- END IF
- String ls_superpsw
- string arg_prg_id
- string arg_cur_version
- IF uo_dbinfo.get_dbinfo(obj_sqlca,obj_hisflag,ls_superpsw,arg_prg_id,arg_cur_version,li_switchflag,ls_switchpsw,arg_msg) = 0 THEN
- MessageBox("错误",arg_msg,stopsign!,OK! )
- st_obj_msg.Text = '失败 >>'+arg_msg
- obj_ifconnect = FALSE
- ELSE
- st_obj_msg.Text = '数据库连接 成功 >>'+String(Today())+' '+String(Now())
- obj_ifconnect = TRUE
- END IF
- end event
- type st_obj_msg from statictext within w_ol_mov_pipeline
- integer x = 891
- integer y = 144
- integer width = 1966
- integer height = 88
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long backcolor = 16776960
- boolean enabled = false
- boolean border = true
- boolean focusrectangle = false
- end type
- type gb_14 from groupbox within w_ol_mov_pipeline
- integer y = 288
- integer width = 2880
- integer height = 192
- integer taborder = 70
- integer textsize = -9
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "源数据库导出范围:"
- end type
- type gb_2 from groupbox within w_ol_mov_pipeline
- integer y = 88
- integer width = 2880
- integer height = 172
- integer taborder = 30
- integer textsize = -9
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "目标数据库连接:"
- end type
- type ddplb_obj_tran from dropdownpicturelistbox within w_ol_mov_pipeline
- integer x = 23
- integer y = 140
- integer width = 613
- integer height = 908
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- string picturename[] = {"Update!"}
- long picturemaskcolor = 553648127
- end type
- event selectionchanged;//setProfileString(sys_inifilename, parent.classname(), this.classname(), this.text)
- st_obj_msg.text='远程服务器: [未知连接]'
- obj_ifconnect=false
- end event
- event constructor;//string histxt
- //histxt=ProfileString(sys_inifilename, parent.classname(), this.classname(), '')
- //
- //int li
- //string arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg
- //this.reset()
- //for li=1 to sys_remote_sqlca_p
- // uo_rm_sqlca.Get_remote_sqlca(li,arg_cntname,arg_dbms,arg_database,arg_userid,arg_dbpass,arg_logid,arg_logpassword,arg_servername,arg_dbparm,arg_msg)
- //
- // this.ADDItem(arg_cntname+string(li,'00'),1)
- //
- //next
- //this.text=histxt
- String ls_txt
- long ll_ConnectionID
- String ls_ConnectionName
- THIS.Reset()
- DECLARE cur_db CURSOR FOR
- SELECT U_OuterConnection.ConnectionID,
- U_OuterConnection.ConnectionName
- FROM U_OuterConnection
- WHERE U_OuterConnection.ConnectionType = 1;
- open cur_db;
- fetch cur_db into :ll_ConnectionID,:ls_ConnectionName;
- do while sqlca.sqlcode = 0
- ls_txt = string(ll_ConnectionID)+' '+ls_ConnectionName
- THIS.AddItem(ls_txt,1)
- fetch cur_db into :ll_ConnectionID,:ls_ConnectionName;
- loop
- THIS.Text = ls_txt
- end event
- type st_222 from statictext within w_ol_mov_pipeline
- integer x = 32
- integer y = 364
- integer width = 480
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- boolean enabled = false
- string text = "截数时间开始时间:"
- boolean focusrectangle = false
- end type
- type ddlb_st from dropdownlistbox within w_ol_mov_pipeline
- integer x = 498
- integer y = 348
- integer width = 667
- integer height = 972
- integer taborder = 80
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean sorted = false
- boolean vscrollbar = true
- borderstyle borderstyle = stylelowered!
- end type
- event constructor;datetime ls_ctdt,first_ctdt
- long ctdt_num=0
- DECLARE ct_cur CURSOR FOR
- SELECT sys_ct_data.ct_datetime
- FROM sys_ct_data
- ORDER BY sys_ct_data.ct_datetime ASC ;
- open ct_cur;
- fetch ct_cur into :ls_ctdt;
- first_ctdt=ls_ctdt
- do while sqlca.sqlcode=0
- ddlb_st.additem(string(ls_ctdt,'yyyy-mm-dd hh:mm:ss'))
- ctdt_num++
- fetch ct_cur into :ls_ctdt;
- loop
- close ct_cur;
- if ctdt_num=0 then
- first_ctdt=datetime(date('1900-01-01'),time(0))
- ddlb_st.additem(string(first_ctdt,'yyyy-mm-dd hh:mm:ss'))
- end if
- ddlb_st.text=string(first_ctdt,'yyyy-mm-dd hh:mm:ss')
-
- end event
- type st_3e from statictext within w_ol_mov_pipeline
- integer x = 1179
- integer y = 364
- integer width = 480
- integer height = 64
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- boolean enabled = false
- string text = "截数时间结束时间:"
- boolean focusrectangle = false
- end type
- type em_ed from editmask within w_ol_mov_pipeline
- integer x = 1664
- integer y = 348
- integer width = 617
- integer height = 84
- integer taborder = 90
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean enabled = false
- borderstyle borderstyle = stylelowered!
- maskdatatype maskdatatype = datetimemask!
- string mask = "yyyy-mm-dd hh:mm:ss"
- boolean spin = true
- end type
- event constructor;datetime last_ctdt
- select top 1 ct_datetime into :last_ctdt from sys_ct_data order by ct_dateint desc;
- if sqlca.sqlcode <>0 then last_ctdt=datetime(date('1900-01-01'),time(0))
- em_ed.text=string(last_ctdt,'yyyy-mm-dd hh:mm:ss')
- end event
- type dw_error from datawindow within w_ol_mov_pipeline
- integer y = 1156
- integer width = 3077
- integer height = 196
- integer taborder = 20
- boolean bringtotop = true
- boolean livescroll = true
- borderstyle borderstyle = stylelowered!
- end type
- type dw_1 from u_dw_rbtnfilter within w_ol_mov_pipeline
- integer y = 572
- integer width = 3077
- integer height = 584
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "dw_local_his"
- boolean hscrollbar = true
- boolean vscrollbar = true
- end type
- type cb_2 from commandbutton within w_ol_mov_pipeline
- integer x = 2583
- integer y = 340
- integer width = 274
- integer height = 96
- integer taborder = 100
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 700
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "检查"
- end type
- event clicked;if MessageBox("询问",'是否确定要检查(本地数据库 - 历史数据库)数据? ', Exclamation!, OKCancel!, 2) =2 then return
- if not obj_ifconnect then
- messagebox("提示",'历史数据库还没有连接,请检查!',information!,OK!)
- return
- end if
- if obj_hisflag=0 then
- messagebox("提示",'目标数据库不是历史查询数据库,不能检查数据!',information!,OK!)
- return
- end if
- wf_check_data()
- end event
|