123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277 |
- $PBExportHeader$w_dytitle_inwarebuy.srw
- forward
- global type w_dytitle_inwarebuy from w_publ_base
- end type
- type dw_1 from u_dw_rbtnfilter within w_dytitle_inwarebuy
- end type
- type cb_1 from commandbutton within w_dytitle_inwarebuy
- end type
- type st_1 from statictext within w_dytitle_inwarebuy
- end type
- type sle_1 from singlelineedit within w_dytitle_inwarebuy
- end type
- type cb_2 from commandbutton within w_dytitle_inwarebuy
- end type
- end forward
- global type w_dytitle_inwarebuy from w_publ_base
- integer width = 3296
- integer height = 2176
- string title = "明细标题与execl标题对应关系"
- dw_1 dw_1
- cb_1 cb_1
- st_1 st_1
- sle_1 sle_1
- cb_2 cb_2
- end type
- global w_dytitle_inwarebuy w_dytitle_inwarebuy
- forward prototypes
- public subroutine wf_reset_dw1 ()
- public subroutine wf_save ()
- public function string of_globalreplace (string as_source, string as_old, string as_new)
- end prototypes
- public subroutine wf_reset_dw1 ();Long i,ll_hang
- dw_1.AcceptText()
- String ls_name,ls_dwtitlename,ls_execltitlename,ls_filtername
- FOR i = 1 To dw_1.RowCount()
- IF i = 1 THEN
- SELECT Top 1 hang Into :ll_hang From u_dytitle_inwarebuy;
- IF ll_hang <> 0 THEN
- sle_1.Text = string(ll_hang)
- ELSE
- sle_1.Text = '1'
- END IF
- END IF
-
- IF dw_1.Object.Name[i] <> '' THEN
- ls_name = dw_1.Object.Name[i]
- SELECT execltitlename,filtername Into :ls_execltitlename,:ls_filtername From u_dytitle_inwarebuy Where Name = :ls_name;
- IF ls_execltitlename <> '' THEN
- dw_1.Object.execltitlename[i] = ls_execltitlename
- ELSE
- dw_1.Object.execltitlename[i] = dw_1.Object.dwtitlename[i]
- END IF
- dw_1.Object.filtername[i] = ls_filtername//过滤字眼
-
- END IF
- NEXT
- end subroutine
- public subroutine wf_save ();long i,hang
- string arg_msg
- uo_inware_buy uo_save
- uo_save = Create uo_inware_buy
- uo_save.commit_transaction = sqlca
- dw_1.AcceptText()
- hang=long(trim(sle_1.text))
- for i=1 to dw_1.rowcount()
- if uo_save.uof_save_dytitle_inwarebuy(hang,dw_1.Object.name[i],dw_1.Object.dwtitlename[i],dw_1.Object.execltitlename[i],of_globalreplace(dw_1.Object.filtername[i],',',','),arg_msg )=0 then
- messagebox('Error','保存出错!' + arg_msg)
- return
- end if
- next
- messagebox('成功','保存成功' )
- end subroutine
- public function string of_globalreplace (string as_source, string as_old, string as_new);long ll_oldlen, ll_newlen, ll_pos
- ll_pos = Pos(as_source,as_old)
- IF ll_pos > 0 Then
- ll_oldlen = Len(as_old)
- ll_newlen = Len(as_new)
- DO WHILE ll_pos > 0
- as_source = Replace(as_source,ll_pos,ll_oldlen,as_new)
- ll_pos = Pos(as_source,as_old,ll_pos + ll_newlen)
- LOOP
- END IF
- RETURN as_source
- end function
- on w_dytitle_inwarebuy.create
- int iCurrent
- call super::create
- this.dw_1=create dw_1
- this.cb_1=create cb_1
- this.st_1=create st_1
- this.sle_1=create sle_1
- this.cb_2=create cb_2
- iCurrent=UpperBound(this.Control)
- this.Control[iCurrent+1]=this.dw_1
- this.Control[iCurrent+2]=this.cb_1
- this.Control[iCurrent+3]=this.st_1
- this.Control[iCurrent+4]=this.sle_1
- this.Control[iCurrent+5]=this.cb_2
- end on
- on w_dytitle_inwarebuy.destroy
- call super::destroy
- destroy(this.dw_1)
- destroy(this.cb_1)
- destroy(this.st_1)
- destroy(this.sle_1)
- destroy(this.cb_2)
- end on
- event open;call super::open;s_dytitle_inwarebuy s_tran
- s_tran=message.powerobjectparm
- long i,row
- for i=1 to upperbound(s_tran.col_name)
- row=dw_1.insertrow(0)
- dw_1.object.name[row]=s_tran.col_name[i]
- dw_1.object.dwtitlename[row]=s_tran.title_name[i]
- next
- wf_reset_dw1()
- end event
- type cb_func from w_publ_base`cb_func within w_dytitle_inwarebuy
- boolean visible = false
- end type
- type cb_exit from w_publ_base`cb_exit within w_dytitle_inwarebuy
- boolean visible = false
- integer x = 2912
- integer y = 916
- end type
- type dw_1 from u_dw_rbtnfilter within w_dytitle_inwarebuy
- integer width = 2848
- integer height = 2020
- integer taborder = 40
- boolean bringtotop = true
- string dataobject = "dw_dytitle_inwarebuy"
- boolean maxbox = true
- boolean hscrollbar = true
- boolean vscrollbar = true
- boolean resizable = true
- boolean hsplitscroll = true
- boolean rbutton_setposition_use = true
- end type
- event clicked;call super::clicked;IF row > 0 THEN
- This.SelectRow(0,False)
- This.SelectRow(row,True)
- This.SetRow(row)
- END IF
-
- end event
- event doubleclicked;call super::doubleclicked;IF dw_edit_mode THEN
-
- Parent.TriggerEvent('ue_add_fymx')
-
- END IF
- end event
- event rbuttondown;call super::rbuttondown;IF Not dw_edit_mode THEN RETURN
- m_dwchild_rbotton m_print
- m_print = Create m_dwchild_rbotton
- m_print.m_0.PopMenu(This.X + This.PointerX() + 50,This.Y + This.PointerY() + 50)
- end event
- event rowfocuschanged;call super::rowfocuschanged;This.SelectRow(0,False)
- IF currentrow <= 0 THEN RETURN
- This.SelectRow(currentrow,True)
- end event
- type cb_1 from commandbutton within w_dytitle_inwarebuy
- integer x = 2885
- integer y = 328
- integer width = 402
- integer height = 128
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "保存"
- end type
- event clicked;string ls_hang
- ls_hang=trim(sle_1.Text)
- IF IsNumber(ls_hang) = False THEN
- MessageBox("Error!","填写的明细标题行号有误!!")
- sle_1.Text = '1'
- RETURN
- END IF
- wf_save()
- close(parent)
- end event
- type st_1 from statictext within w_dytitle_inwarebuy
- integer x = 2907
- integer y = 64
- integer width = 366
- integer height = 72
- 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 sle_1 from singlelineedit within w_dytitle_inwarebuy
- integer x = 2903
- integer y = 164
- integer width = 361
- integer height = 84
- integer taborder = 50
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- long textcolor = 33554432
- string text = "1"
- borderstyle borderstyle = stylelowered!
- end type
- type cb_2 from commandbutton within w_dytitle_inwarebuy
- integer x = 2885
- integer y = 484
- integer width = 402
- integer height = 128
- integer taborder = 60
- boolean bringtotop = true
- integer textsize = -9
- integer weight = 400
- fontcharset fontcharset = gb2312charset!
- fontpitch fontpitch = variable!
- string facename = "宋体"
- string text = "退出"
- end type
- event clicked;close(parent)
- end event
|