123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359 |
- $PBExportHeader$w_rpt_field_def2.srw
- forward
- global type w_rpt_field_def2 from w_publ_base
- end type
- type dw_table from u_dw_rbtnfilter within w_rpt_field_def2
- end type
- type dw_field from u_dw_rbtnfilter within w_rpt_field_def2
- end type
- type ln_bar2 from line within w_rpt_field_def2
- end type
- type ln_bar from line within w_rpt_field_def2
- end type
- type r_bar from rectangle within w_rpt_field_def2
- end type
- end forward
- global type w_rpt_field_def2 from w_publ_base
- integer width = 3611
- integer height = 2372
- string title = "系统数据字典"
- boolean maxbox = true
- windowstate windowstate = maximized!
- event retrieve_field ( )
- event dwnkey pbm_dwnkey
- dw_table dw_table
- dw_field dw_field
- ln_bar2 ln_bar2
- ln_bar ln_bar
- r_bar r_bar
- end type
- global w_rpt_field_def2 w_rpt_field_def2
- type variables
- //long ll_billid
- uo_reportdef uo_report
- uo_billdef uo_bill
- boolean ls_update_flag=true
- Boolean dw_edit_mode_table = FALSE
- str_rpt s_rpt_parm
- s_rpt_bill s_bill[]
- long dw_table_h,dw_field_h,dw_field_w
- long modifyrow_no
- string ins_sqlerrtext
- end variables
- event retrieve_field();Long row
- row = dw_table.GetRow()
- IF row > 0 THEN
- dw_field.SetRedraw (FALSE)
- // dw_field.Retrieve(dw_table.Object.table_english[row])
- String ls_file
- ls_file = "pbc_tnam = '" + dw_table.Object.table_english[row] + "'"
- dw_field.SetFilter(ls_file)
- dw_field.filter()
- dw_field.SetRedraw (TRUE)
- ELSE
- dw_field.Reset()
- END IF
- end event
- on w_rpt_field_def2.create
- int iCurrent
- call super::create
- this.dw_table=create dw_table
- this.dw_field=create dw_field
- this.ln_bar2=create ln_bar2
- this.ln_bar=create ln_bar
- this.r_bar=create r_bar
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_table
- this.Control[iCurrent+2]=this.dw_field
- this.Control[iCurrent+3]=this.ln_bar2
- this.Control[iCurrent+4]=this.ln_bar
- this.Control[iCurrent+5]=this.r_bar
- end on
- on w_rpt_field_def2.destroy
- call super::destroy
- destroy(this.dw_table)
- destroy(this.dw_field)
- destroy(this.ln_bar2)
- destroy(this.ln_bar)
- destroy(this.r_bar)
- end on
- event open;call super::open;//dw_table.SetTransObject(sqlca)
- //dw_field.SetTransObject(sqlca)
- //dw_table.Retrieve()
- this.TriggerEvent('retrieve_field')
- end event
- event close;call super::close;DESTROY uo_report
- end event
- event resize;call super::resize;long w_width,w_height
- w_width = 3630
- w_height = 2290 + 100
- ln_bar.endx = this.width
- ln_bar2.endx = this.width
- r_bar.width = this.width
- if newwidth < w_width then this.width = w_width
- if newheight < w_height then this.height = w_height
- dw_table.height = this.height - (w_height - dw_table_h)
- dw_field.width=this.width - (w_width - dw_field_w)
- dw_field.height=this.height - (w_height - dw_field_h)
- end event
- event closequery;call super::closequery;
- Int ls_row = 0
- IF dw_edit_mode THEN
- dw_field.AcceptText()
- ls_row = dw_field.GetNextModified(0, Primary!)+&
- dw_field.GetNextModified(0, Filter!)+dw_field.DeletedCount()
- IF ls_row > 0 THEN
- IF MessageBox('询问','数据已经改变,是否先保存?',Question!,YesNo!,1 ) = 1 THEN
- RETURN 1
- END IF
- END IF
- END IF
- IF dw_edit_mode_table THEN
- dw_table.AcceptText()
- ls_row = dw_table.GetNextModified(0, Primary!)+&
- dw_table.GetNextModified(0, Filter!)+dw_table.DeletedCount()
- IF ls_row > 0 THEN
- IF MessageBox('询问','数据已经改变,是否先保存?',Question!,YesNo!,1 ) = 1 THEN
- RETURN 1
- END IF
- END IF
- END IF
- end event
- type cb_func from w_publ_base`cb_func within w_rpt_field_def2
- integer width = 151
- integer height = 164
- string normalpicname = "setting.bmp"
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_rpt_field_def2
- integer x = 151
- integer width = 151
- integer height = 164
- integer picsize = 16
- toolbaralignment pic_align = alignattop!
- boolean border = false
- end type
- type dw_table from u_dw_rbtnfilter within w_rpt_field_def2
- integer y = 188
- integer width = 1499
- integer height = 2080
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "ds_rpt_table_def"
- boolean vscrollbar = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- boolean autosave_setlayout_use = false
- end type
- event clicked;call super::clicked;IF not( dw_edit_mode or row <=0 ) THEN this.setrow(row)
- end event
- event rowfocuschanged;call super::rowfocuschanged;IF dw_edit_mode THEN RETURN
- IF currentrow <= 0 THEN
- dw_field.Reset()
- RETURN
- END IF
- THIS.SetRow(currentrow)
- THIS.SelectRow(0,FALSE)
- THIS.SelectRow(currentrow,TRUE)
- PARENT.TriggerEvent('retrieve_field')
- end event
- event constructor;call super::constructor;dw_table_h = this.height
- end event
- event rowfocuschanging;call super::rowfocuschanging;if dw_edit_mode_table then return 1
- end event
- event dwnkey;if keydown(KeyF4!) then //read layout
- uf_read_profile_filter()
- uf_read_profile_sort()
- //uf_read_profile_layout()
- elseif keydown(KeyF5!) then //save layout 不含列显示
- uf_save_profile_filter()
- uf_save_profile_sort()
- //uf_save_profile_layout()
- elseif keydown(KeyF9!) then //reset layout 不含列显示
- uf_reset_layout()
- end if
- PARENT.TriggerEvent(Key!)
- end event
- type dw_field from u_dw_rbtnfilter within w_rpt_field_def2
- integer x = 1504
- integer y = 184
- integer width = 2085
- integer height = 2080
- integer taborder = 20
- boolean bringtotop = true
- string dataobject = "ds_rpt_field_def"
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean rbutton_filter_use = true
- boolean titleclick_sort_use = true
- end type
- event rowfocuschanged;call super::rowfocuschanged;
- this.selectrow(0,false)
- this.selectrow(currentrow,true)
- end event
- event doubleclicked;call super::doubleclicked;if dw_edit_mode then return
- parent.triggerevent('ue_f7')
- end event
- event constructor;call super::constructor;dw_field_h = this.height
- dw_field_w = this.width
- end event
- event ue_setlayout;//if setcolumn_visible_USE=false then return
- //IF this.DATAOBJECT='' THEN RETURN
- //
- //datastore ls_ds
- //ls_ds=create datastore
- //ls_ds.dataobject='dw_rbtnfilter_setlayout'
- //string ls_mdfstr,ls_mdftext_str,ls_titlex_str,ls_titley_str,ls_x_str,ls_y_str //存放modify string
- //string des_1,des_2,szColumn,ls_cwidth,ls_alignment
- //long nColumnIndex,nColumnCount,lRow,ls_i
- //s_dw_rbtnfilter_setlayout_rt ls_s_rt
- //
- //nColumnCount = Integer( this.Object.DataWindow.Column.Count)
- //
- //For nColumnIndex = 1 To nColumnCount
- // des_1= this.Describe( "#" + String(nColumnIndex) + ".Name")
- // des_2= this.describe(des_1+ "_t.Text")
- //
- // szColumn = f_strip( des_2)
- // If szColumn <> "!" Then
- // lRow = ls_ds.InsertRow( 0)
- // ls_ds.SetItem( lRow, "ctitle", szColumn)
- // ls_ds.SetItem( lRow, "cname", des_1)
- // ls_ds.SetItem( lRow, "cshow_flag", long(this.describe(des_1+ ".Visible")))
- // ls_ds.SetItem( lRow, "cnewtitle", this.describe(des_1+ "_t.text"))
- // ls_ds.SetItem( lRow, "cwidth", long(this.describe(des_1+ ".width")))
- // ls_ds.SetItem( lRow, "alignment", long(this.describe(des_1+ ".alignment")))
- // ls_ds.SetItem( lRow, "nColumnIndex", nColumnIndex)
- // ls_ds.SetItem( lRow, "titlex", long(this.describe(des_1+ "_t.x")))
- // ls_ds.SetItem( lRow, "titley", long(this.describe(des_1+ "_t.y")))
- // ls_ds.SetItem( lRow, "x", long(this.describe(des_1+ ".x")))
- // ls_ds.SetItem( lRow, "y", long(this.describe(des_1+ ".y")))
- // End If
- //Next
- //
- ////---打开设置窗口
- //openwithparm(w_dw_rbtnfilter_setlayout,ls_ds)
- //
- //ls_s_rt=message.powerobjectparm
- ////---处理设置
- //if ls_s_rt.flag=1 then //要保存修改
- // ls_ds.setfullstate( ls_s_rt.b_changes )
- // for ls_i=1 to ls_ds.rowcount()
- // ls_mdfstr=ls_mdfstr+ls_ds.object.cname[ls_i]+'.visible='+string(ls_ds.object.cshow_flag[ls_i])+'~t'
- // ls_mdfstr=ls_mdfstr+ls_ds.object.cname[ls_i]+'_t.visible='+string(ls_ds.object.cshow_flag[ls_i])+'~t'
- //
- // ls_mdftext_str=ls_mdftext_str+ls_ds.object.cname[ls_i]+"_t.text='"+ls_ds.object.cnewtitle[ls_i]+"'~t"
- // ls_titlex_str=ls_titlex_str+ls_ds.object.cname[ls_i]+"_t.x="+string(ls_ds.object.titlex[ls_i])+'~t'
- // ls_titley_str=ls_titley_str+ls_ds.object.cname[ls_i]+"_t.y="+string(ls_ds.object.titley[ls_i])+'~t'
- // ls_x_str=ls_x_str+ls_ds.object.cname[ls_i]+".x="+string(ls_ds.object.x[ls_i])+'~t'
- // ls_y_str=ls_y_str+ls_ds.object.cname[ls_i]+".y="+string(ls_ds.object.y[ls_i])+'~t'
- // ls_cwidth=ls_cwidth+ls_ds.object.cname[ls_i]+".width="+string(ls_ds.object.cwidth[ls_i])+'~t'
- // ls_alignment=ls_alignment+ls_ds.object.cname[ls_i]+".alignment="+string(ls_ds.object.alignment[ls_i])+'~t'
- // next
- //
- // ins_mdfstr_column_visible=ls_mdfstr
- // ins_mdfstr_column_text=ls_mdftext_str
- // ins_mdfstr_column_x=ls_titlex_str+ls_x_str
- // ins_mdfstr_column_y=ls_titley_str+ls_y_str
- // ins_mdfstr_column_width=ls_cwidth
- // ins_mdfstr_column_alignment=ls_alignment
- //
- // this.modify( ins_mdfstr_column_visible)
- // this.modify(ins_mdfstr_column_text)
- // this.modify(ins_mdfstr_column_width)
- // this.modify(ins_mdfstr_column_x)
- // this.modify(ins_mdfstr_column_y)
- // this.modify(ins_mdfstr_column_alignment)
- //elseif ls_s_rt.flag=2 then //reset
- // uf_reset_layout()
- // uf_save_profile_layout()
- //end if
- //
- //destroy ls_ds
- //
- //
- //
- end event
- event dwnkey;call super::dwnkey;PARENT.TriggerEvent(Key!)
- end event
- type ln_bar2 from line within w_rpt_field_def2
- long linecolor = 16777215
- integer linethickness = 4
- integer beginy = 176
- integer endx = 3406
- integer endy = 176
- end type
- type ln_bar from line within w_rpt_field_def2
- long linecolor = 268435456
- integer linethickness = 4
- integer beginy = 172
- integer endx = 3406
- integer endy = 172
- end type
- type r_bar from rectangle within w_rpt_field_def2
- long linecolor = 16777215
- long fillcolor = 1073741824
- integer x = 3250
- integer y = -8
- integer width = 73
- integer height = 172
- end type
- event constructor;this.fillcolor = 14215660
- this.linecolor = 14215660
- this.x = -1
- this.y = -1
- this.height = ln_bar2.beginy - 5
- end event
|