$PBExportHeader$w_rpt_imexport.srw forward global type w_rpt_imexport from w_rpt_publ_base end type type sle_filename from singlelineedit within w_rpt_imexport end type type cb_1 from uo_rpt_imflatbutton within w_rpt_imexport end type type cb_import from uo_rpt_imflatbutton within w_rpt_imexport end type type cb_export from uo_rpt_imflatbutton within w_rpt_imexport end type type cbx_update from checkbox within w_rpt_imexport end type type sle_filename1 from singlelineedit within w_rpt_imexport end type type cb_2 from uo_rpt_imflatbutton within w_rpt_imexport end type type gb_1 from groupbox within w_rpt_imexport end type type gb_2 from groupbox within w_rpt_imexport end type end forward global type w_rpt_imexport from w_rpt_publ_base integer width = 2235 integer height = 760 string title = "龙嘉导入导出单据格式/报表" boolean minbox = false windowtype windowtype = response! long backcolor = 67108864 sle_filename sle_filename cb_1 cb_1 cb_import cb_import cb_export cb_export cbx_update cbx_update sle_filename1 sle_filename1 cb_2 cb_2 gb_1 gb_1 gb_2 gb_2 end type global w_rpt_imexport w_rpt_imexport type variables s_rpt_imex s_imexport_reposts u_report_imex uo_imex end variables on w_rpt_imexport.create int iCurrent call super::create this.sle_filename=create sle_filename this.cb_1=create cb_1 this.cb_import=create cb_import this.cb_export=create cb_export this.cbx_update=create cbx_update this.sle_filename1=create sle_filename1 this.cb_2=create cb_2 this.gb_1=create gb_1 this.gb_2=create gb_2 iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.sle_filename this.Control[iCurrent+2]=this.cb_1 this.Control[iCurrent+3]=this.cb_import this.Control[iCurrent+4]=this.cb_export this.Control[iCurrent+5]=this.cbx_update this.Control[iCurrent+6]=this.sle_filename1 this.Control[iCurrent+7]=this.cb_2 this.Control[iCurrent+8]=this.gb_1 this.Control[iCurrent+9]=this.gb_2 end on on w_rpt_imexport.destroy call super::destroy destroy(this.sle_filename) destroy(this.cb_1) destroy(this.cb_import) destroy(this.cb_export) destroy(this.cbx_update) destroy(this.sle_filename1) destroy(this.cb_2) destroy(this.gb_1) destroy(this.gb_2) end on event open;call super::open;s_imexport_reposts = message.powerobjectparm if s_imexport_reposts.rpid = 0 then cbx_update.checked = true cbx_update.enabled = false end if end event type cb_exit from w_rpt_publ_base`cb_exit within w_rpt_imexport integer x = 1819 integer y = 568 integer width = 325 end type type sle_filename from singlelineedit within w_rpt_imexport integer x = 101 integer y = 160 integer width = 1591 integer height = 92 integer taborder = 30 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 borderstyle borderstyle = stylelowered! end type type cb_1 from uo_rpt_imflatbutton within w_rpt_imexport integer x = 1710 integer y = 160 integer width = 114 integer height = 96 integer taborder = 40 boolean bringtotop = true string text = "..." end type event clicked;call super::clicked; integer i string pathname string filename i = getfilesavename("报表格式文件",pathname,filename,"ljbb","报表格式文件ljbb,*.ljbb") if i = 1 and trim(pathname) <> "" and trim(filename) <> "" then parent.sle_filename.text = pathname end if return end event type cb_import from uo_rpt_imflatbutton within w_rpt_imexport integer x = 1824 integer y = 160 integer width = 325 integer height = 96 integer taborder = 40 boolean bringtotop = true string text = "导入" end type event clicked;call super::clicked; Integer bttn String arg_msg Boolean lb_ifupdate = FALSE IF NOT sys_power_issuper THEN MessageBox("系统提示","非管理员不可以操作") RETURN END IF IF Trim(PARENT.sle_filename.Text) = "" THEN MessageBox(publ_operator,"请选择导入格式文件") RETURN END IF lb_ifupdate = NOT PARENT.cbx_update.Checked IF lb_ifupdate = TRUE THEN bttn = MessageBox("警告!","当前单据格式/报表将被覆盖,是否进行操作?",exclamation!,okcancel!,2) END IF IF bttn = 2 THEN RETURN END IF PARENT.uo_imex = CREATE u_report_imex IF PARENT.uo_imex.f_import_report(Trim(PARENT.sle_filename.Text),lb_ifupdate,s_imexport_reposts.rpid,s_imexport_reposts.billid,arg_msg) = 0 THEN MessageBox(publ_operator,arg_msg) ELSE MessageBox(publ_operator,"导入单据格式/报表成功") END IF Destroy(PARENT.uo_imex) RETURN end event type cb_export from uo_rpt_imflatbutton within w_rpt_imexport integer x = 1819 integer y = 404 integer width = 325 integer height = 96 integer taborder = 40 boolean bringtotop = true string text = "导出" end type event clicked;call super::clicked;string arg_msg if s_imexport_reposts.rpid = 0 then messagebox("系统提示","没有导出对象") return end if if not sys_power_issuper then messagebox("系统提示","非管理员不可以操作") return end if if trim(parent.sle_filename1.text) = "" then messagebox("系统提示","请选择导出格式文件") return end if parent.uo_imex = create u_report_imex if parent.uo_imex.f_export_report(parent.s_imexport_reposts,trim(parent.sle_filename1.text),arg_msg) = 0 then messagebox(publ_operator,arg_msg) else messagebox("系统提示","导出当前单据格式/报表成功") end if destroy(parent.uo_imex) return end event type cbx_update from checkbox within w_rpt_imexport integer x = 64 integer y = 4 integer width = 402 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 string text = "创建新格式" end type type sle_filename1 from singlelineedit within w_rpt_imexport integer x = 96 integer y = 404 integer width = 1591 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 borderstyle borderstyle = stylelowered! end type type cb_2 from uo_rpt_imflatbutton within w_rpt_imexport integer x = 1705 integer y = 404 integer width = 114 integer height = 96 integer taborder = 50 boolean bringtotop = true string text = "..." end type event clicked;call super::clicked; integer i string pathname string filename i = getfilesavename("报表格式文件",pathname,filename,"ljbb","报表格式文件ljbb,*.ljbb") if i = 1 and trim(pathname) <> "" and trim(filename) <> "" then parent.sle_filename1.text = pathname end if return end event type gb_1 from groupbox within w_rpt_imexport integer x = 64 integer y = 92 integer width = 2107 integer height = 216 integer taborder = 10 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 79741120 string text = "导入文件路径" end type type gb_2 from groupbox within w_rpt_imexport integer x = 59 integer y = 336 integer width = 2107 integer height = 216 integer taborder = 20 integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 79741120 string text = "导出文件路径" end type