$PBExportHeader$w_xls_update_templates_ifpic.srw forward global type w_xls_update_templates_ifpic from w_xls_publ_base end type type sle_2 from u_xls_sleedit within w_xls_update_templates_ifpic end type type st_1 from statictext within w_xls_update_templates_ifpic end type type cb_save from uo_xls_imflatbutton within w_xls_update_templates_ifpic end type type cbx_ifpic from checkbox within w_xls_update_templates_ifpic end type end forward global type w_xls_update_templates_ifpic from w_xls_publ_base integer width = 2034 integer height = 508 string title = "修改模版属性" boolean minbox = false windowtype windowtype = response! boolean toolbarvisible = false sle_2 sle_2 st_1 st_1 cb_save cb_save cbx_ifpic cbx_ifpic end type global w_xls_update_templates_ifpic w_xls_update_templates_ifpic type variables Long cur_tid,flag = 0,cur_templatesid uo_sendtoexcel obj_xls end variables on w_xls_update_templates_ifpic.create int iCurrent call super::create this.sle_2=create sle_2 this.st_1=create st_1 this.cb_save=create cb_save this.cbx_ifpic=create cbx_ifpic iCurrent=UpperBound(this.Control) this.Control[iCurrent+1]=this.sle_2 this.Control[iCurrent+2]=this.st_1 this.Control[iCurrent+3]=this.cb_save this.Control[iCurrent+4]=this.cbx_ifpic end on on w_xls_update_templates_ifpic.destroy call super::destroy destroy(this.sle_2) destroy(this.st_1) destroy(this.cb_save) destroy(this.cbx_ifpic) end on event open; CALL SUPER::OPEN; s_xls_templates s_xls s_xls = Message.PowerObjectParm cur_tid = s_xls.tid cur_templatesid =s_xls.templatesid IF IsNull(cur_tid) OR cur_tid = 0 THEN Close(THIS) IF IsNull(cur_templatesid) OR cur_templatesid = 0 THEN Close(THIS) sle_2.text = s_xls.templatesname if s_xls.ifpic = 1 then cbx_ifpic.checked = true else cbx_ifpic.checked = false end if obj_xls = CREATE uo_sendtoexcel obj_xls.commit_transaction = sqlca end event event close; CALL SUPER::CLOSE; CloseWithReturn(THIS,flag) end event type cb_func from w_xls_publ_base`cb_func within w_xls_update_templates_ifpic boolean visible = false integer x = 2158 integer y = 768 end type type cb_exit from w_xls_publ_base`cb_exit within w_xls_update_templates_ifpic integer x = 1248 integer y = 288 integer width = 320 string text = "取消" integer picsize = 16 end type type sle_2 from u_xls_sleedit within w_xls_update_templates_ifpic integer x = 338 integer y = 44 integer width = 1623 integer height = 96 integer taborder = 20 boolean bringtotop = true end type type st_1 from statictext within w_xls_update_templates_ifpic integer x = 73 integer y = 68 integer width = 233 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 = 134217739 string text = "模版名称" boolean focusrectangle = false end type type cb_save from uo_xls_imflatbutton within w_xls_update_templates_ifpic integer x = 384 integer y = 280 integer width = 320 integer taborder = 40 boolean bringtotop = true string normalpicname = "save.bmp" integer picsize = 16 end type event clicked; CALL SUPER::Clicked; sle_2.Text = Trim(sle_2.Text) String errmsg IF sle_2.Text = '' THEN MessageBox('系统提示','请输入模版名称!') RETURN END IF String TemplatesName TemplatesName = sle_2.Text Int li_ifpic IF cbx_ifpic.Checked THEN li_ifpic = 1 ELSE li_ifpic = 0 END IF IF obj_xls.of_updatetemp_ifpic(cur_tid, cur_templatesid, TemplatesName, li_ifpic,errmsg,TRUE) <> 1 THEN flag = 0 MessageBox('失败',errmsg) RETURN END IF MessageBox("成功","修改模版属性成功") flag = 1 Close(PARENT) end event type cbx_ifpic from checkbox within w_xls_update_templates_ifpic integer x = 59 integer y = 184 integer width = 338 integer height = 60 boolean bringtotop = true integer textsize = -9 integer weight = 400 fontcharset fontcharset = gb2312charset! fontpitch fontpitch = variable! string facename = "宋体" long textcolor = 33554432 long backcolor = 134217739 string text = "含有图片" boolean lefttext = true end type