123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326 |
- $PBExportHeader$w_importscnewdata.srw
- forward
- global type w_importscnewdata from w_publ_base
- end type
- type cb_1 from commandbutton within w_importscnewdata
- end type
- type mle_log from multilineedit within w_importscnewdata
- end type
- type sle_objfilename from singlelineedit within w_importscnewdata
- end type
- type st_msg from statictext within w_importscnewdata
- end type
- type cb_2 from commandbutton within w_importscnewdata
- end type
- type em_bc from editmask within w_importscnewdata
- end type
- type st_3 from statictext within w_importscnewdata
- end type
- type st_1 from statictext within w_importscnewdata
- end type
- type gb_2 from groupbox within w_importscnewdata
- end type
- end forward
- global type w_importscnewdata from w_publ_base
- integer x = 59
- integer y = 72
- integer width = 2491
- integer height = 1712
- string title = "数据导入"
- long backcolor = 79216776
- cb_1 cb_1
- mle_log mle_log
- sle_objfilename sle_objfilename
- st_msg st_msg
- cb_2 cb_2
- em_bc em_bc
- st_3 st_3
- st_1 st_1
- gb_2 gb_2
- end type
- global w_importscnewdata w_importscnewdata
- type variables
- uo_yfimex uo_dataimex
- uo_yfct uo_ct
- end variables
- on w_importscnewdata.create
- int iCurrent
- call super::create
- this.cb_1=create cb_1
- this.mle_log=create mle_log
- this.sle_objfilename=create sle_objfilename
- this.st_msg=create st_msg
- this.cb_2=create cb_2
- this.em_bc=create em_bc
- this.st_3=create st_3
- this.st_1=create st_1
- this.gb_2=create gb_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.cb_1
- this.Control[iCurrent+2]=this.mle_log
- this.Control[iCurrent+3]=this.sle_objfilename
- this.Control[iCurrent+4]=this.st_msg
- this.Control[iCurrent+5]=this.cb_2
- this.Control[iCurrent+6]=this.em_bc
- this.Control[iCurrent+7]=this.st_3
- this.Control[iCurrent+8]=this.st_1
- this.Control[iCurrent+9]=this.gb_2
- end on
- on w_importscnewdata.destroy
- call super::destroy
- destroy(this.cb_1)
- destroy(this.mle_log)
- destroy(this.sle_objfilename)
- destroy(this.st_msg)
- destroy(this.cb_2)
- destroy(this.em_bc)
- destroy(this.st_3)
- destroy(this.st_1)
- destroy(this.gb_2)
- end on
- event open;call super::open;uo_dataimex=create uo_yfimex
- uo_ct=create uo_yfct
- end event
- event close;DESTROY uo_ct
- DESTROY uo_dataimex
- end event
- type cb_func from w_publ_base`cb_func within w_importscnewdata
- boolean visible = false
- integer x = 1705
- integer y = 52
- boolean enabled = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_importscnewdata
- integer x = 2048
- integer y = 48
- integer width = 361
- end type
- type cb_1 from commandbutton within w_importscnewdata
- integer x = 1856
- integer y = 164
- integer width = 128
- integer height = 96
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = fixed!
- fontfamily fontfamily = modern!
- string facename = "幼圆"
- string text = "..."
- end type
- event clicked;string docname, named
- integer value
- value = GetFileSaveName("请输入导出文件名", docname, named, "DOC", &
- "dtt 文件(*.dtt),*.dtt,所有文件(*.*), *.*")
- IF value = 1 THEN
- sle_objfilename.text=docname
- end if
- end event
- type mle_log from multilineedit within w_importscnewdata
- integer x = 5
- integer y = 376
- integer width = 2450
- integer height = 1236
- integer taborder = 60
- 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 sle_objfilename from singlelineedit within w_importscnewdata
- integer x = 434
- integer y = 168
- integer width = 1422
- integer height = 92
- integer taborder = 40
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- boolean autohscroll = false
- borderstyle borderstyle = stylelowered!
- end type
- type st_msg from statictext within w_importscnewdata
- integer x = 5
- integer y = 292
- integer width = 2441
- integer height = 76
- 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_2 from commandbutton within w_importscnewdata
- integer x = 2048
- integer y = 152
- integer width = 361
- integer height = 108
- integer taborder = 70
- 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
- string arg_log,arg_msg,arg_objzipfilename,arg_importfilename
- int arg_info,arg_usechangetime
- datetime arg_bg_changetime,arg_ed_changtime
- int rslt,arg_commitstep,err_int
- st_msg.text=''
- if not if_hisdb then
- messagebox("提示",'不是历史查询数据库,不能导入数据',information!,OK!)
- return
- end if
- arg_importfilename=trim(sle_objfilename.text)
- arg_commitstep=integer(em_bc.text)
- if f_get_tmpfilename(arg_importfilename,arg_objzipfilename,arg_msg)=0 then
- messagebox("错误",arg_msg,stopsign!,OK!)
- return
- end if
- if uo_dataimex.f_importdata_blob(arg_importfilename,arg_objzipfilename,arg_info,&
- arg_usechangetime,arg_bg_changetime,arg_ed_changtime,arg_msg)=0 then
- st_msg.text=arg_msg
- messagebox("错误",'数据文件导入失败!',stopsign!,OK!)
- return
- end if
- rslt=uo_dataimex.f_importdata(sqlca,arg_objzipfilename,arg_commitstep,true,arg_log,arg_msg,err_int)
- if rslt=0 then
- st_msg.text=arg_msg
- messagebox("错误",'数据更新失败!',stopsign!,OK!)
- else
- messagebox("提示",'数据更新成功!',information!,OK!)
- end if
- if uo_dataimex.f_delzipfile(arg_objzipfilename,arg_msg)=0 then
- st_msg.text=st_msg.text + arg_msg
- end if
- if if_hisdb then
- if uo_ct.add_ct_datamx(0,arg_bg_changetime,arg_ed_changtime,0,0,arg_msg,0,sqlca)=0 then
- st_msg.text=st_msg.text + arg_msg
- end if
- end if
- mle_log.text=arg_log
- end event
- type em_bc from editmask within w_importscnewdata
- integer x = 434
- integer y = 52
- integer width = 270
- integer height = 92
- integer taborder = 30
- boolean bringtotop = true
- integer textsize = -10
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "11"
- alignment alignment = center!
- borderstyle borderstyle = stylelowered!
- string mask = "###0"
- boolean spin = true
- string minmax = "1~~9999"
- end type
- event modified;if dec(this.text)<=0 then this.text='1'
- end event
- type st_3 from statictext within w_importscnewdata
- integer x = 69
- integer y = 68
- integer width = 288
- integer height = 60
- 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 st_1 from statictext within w_importscnewdata
- integer x = 69
- integer y = 204
- integer width = 361
- integer height = 48
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- string text = "选择导入文件:"
- boolean focusrectangle = false
- end type
- type gb_2 from groupbox within w_importscnewdata
- integer x = 9
- integer width = 2441
- integer height = 292
- integer taborder = 20
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- long backcolor = 67108864
- end type
|