$PBExportHeader$w_rpt_data.srw $PBExportComments$Data设置-- 窗口 forward global type w_rpt_data from Window end type type cb_6 from commandbutton within w_rpt_data end type type cb_5 from commandbutton within w_rpt_data end type type cb_4 from commandbutton within w_rpt_data end type type cb_3 from commandbutton within w_rpt_data end type type cb_2 from commandbutton within w_rpt_data end type type cb_1 from commandbutton within w_rpt_data end type type dw1 from datawindow within w_rpt_data end type end forward global type w_rpt_data from Window int X=5 int Y=320 int Width=2798 int Height=1524 boolean TitleBar=true string Title="数据(data)" long BackColor=12632256 boolean ControlMenu=true WindowType WindowType=response! cb_6 cb_6 cb_5 cb_5 cb_4 cb_4 cb_3 cb_3 cb_2 cb_2 cb_1 cb_1 dw1 dw1 end type global w_rpt_data w_rpt_data type variables int i,ii_rows string is_temp datawindow idw end variables on w_rpt_data.create this.cb_6=create cb_6 this.cb_5=create cb_5 this.cb_4=create cb_4 this.cb_3=create cb_3 this.cb_2=create cb_2 this.cb_1=create cb_1 this.dw1=create dw1 this.Control[]={this.cb_6,& this.cb_5,& this.cb_4,& this.cb_3,& this.cb_2,& this.cb_1,& this.dw1} end on on w_rpt_data.destroy destroy(this.cb_6) destroy(this.cb_5) destroy(this.cb_4) destroy(this.cb_3) destroy(this.cb_2) destroy(this.cb_1) destroy(this.dw1) end on event open;f_wcenter(this) idw=w_rpt_main.dw3 is_temp=f_rpt_sdw(idw) if is_temp>'' then dw1.create(is_temp) dw1.ImportString(w_rpt_main.istr_rpt.rdata) end if end event type cb_6 from commandbutton within w_rpt_data int X=2496 int Y=940 int Width=247 int Height=108 int TabOrder=40 string Text="清空" int TextSize=-9 int Weight=400 string FaceName="宋体" FontPitch FontPitch=Variable! end type event clicked;dw1.reset() end event type cb_5 from commandbutton within w_rpt_data int X=2496 int Y=768 int Width=247 int Height=108 int TabOrder=30 string Text="删除" int TextSize=-9 int Weight=400 string FaceName="宋体" FontPitch FontPitch=Variable! end type event clicked;i=dw1.getrow() if i>0 then dw1.deleterow(i) dw1.setfocus() end event type cb_4 from commandbutton within w_rpt_data int X=2496 int Y=596 int Width=247 int Height=108 int TabOrder=40 string Text="插入" int TextSize=-9 int Weight=400 string FaceName="宋体" FontPitch FontPitch=Variable! end type event clicked;i=dw1.getrow() dw1.scrolltorow(dw1.insertrow(i)) dw1.setfocus() end event type cb_3 from commandbutton within w_rpt_data int X=2496 int Y=424 int Width=247 int Height=108 int TabOrder=20 string Text="增加" int TextSize=-9 int Weight=400 string FaceName="宋体" FontPitch FontPitch=Variable! end type event clicked;dw1.scrolltorow(dw1.insertrow(0)) dw1.setfocus() end event type cb_2 from commandbutton within w_rpt_data int X=2496 int Y=196 int Width=247 int Height=108 int TabOrder=50 string Text="取消" int TextSize=-9 int Weight=400 string FaceName="宋体" FontPitch FontPitch=Variable! end type event clicked;close(parent) end event type cb_1 from commandbutton within w_rpt_data int X=2496 int Y=48 int Width=247 int Height=108 int TabOrder=10 string Text="确认" int TextSize=-9 int Weight=400 string FaceName="宋体" FontPitch FontPitch=Variable! end type event clicked;dw1.accepttext() string ls_data ls_data=dw1.describe("datawindow.data") if ls_data='!' then ls_data='' w_rpt_main.istr_rpt.rdata=ls_data w_rpt_main.ii_save=1 close(parent) end event type dw1 from datawindow within w_rpt_data int Width=2450 int Height=1424 int TabOrder=60 BorderStyle BorderStyle=StyleLowered! boolean HScrollBar=true boolean VScrollBar=true boolean HSplitScroll=true boolean LiveScroll=true end type