📄 w_update_prod.srw
字号:
$PBExportHeader$w_update_prod.srw
$PBExportComments$Window to update a product, used by w_prod_listview
forward
global type w_update_prod from window
end type
type cb_cancel from commandbutton within w_update_prod
end type
type cb_ok from commandbutton within w_update_prod
end type
type dw_prod from datawindow within w_update_prod
end type
end forward
global type w_update_prod from window
integer x = 174
integer y = 228
integer width = 2679
integer height = 888
boolean titlebar = true
string title = "更新商品信息"
boolean controlmenu = true
windowtype windowtype = response!
long backcolor = 75530304
toolbaralignment toolbaralignment = alignatleft!
cb_cancel cb_cancel
cb_ok cb_ok
dw_prod dw_prod
end type
global w_update_prod w_update_prod
type variables
Boolean ib_Changed
end variables
event open;//call super::open;
Integer li_ID
Blob lblb_BMP
li_ID = Message.DoubleParm
// Retrieve data into DataWindow
dw_prod.SetTransObject(sqlca)
dw_prod.Retrieve(li_ID)
// Retrieve blob into picture
SelectBlob catalog_picture
into :lblb_BMP
from product
where id = :li_ID;
//p_product.SetPicture(lblb_BMP)
ib_Changed = False
end event
on w_update_prod.create
this.cb_cancel=create cb_cancel
this.cb_ok=create cb_ok
this.dw_prod=create dw_prod
this.Control[]={this.cb_cancel,&
this.cb_ok,&
this.dw_prod}
end on
on w_update_prod.destroy
destroy(this.cb_cancel)
destroy(this.cb_ok)
destroy(this.dw_prod)
end on
event closequery;Integer li_Ans
If ib_Changed Then
li_Ans = MessageBox("更改商品", "这个商品的信息已经改变,你想要在退出之前保存?", &
Question!, YesNoCancel!)
If li_Ans = 3 Then
Message.ReturnValue = 1
Elseif li_Ans = 1 Then
dw_prod.Update()
commit;
Message.DoubleParm = 1
End if
End if
end event
type cb_cancel from commandbutton within w_update_prod
integer x = 1321
integer y = 628
integer width = 352
integer height = 100
integer taborder = 30
integer textsize = -12
integer weight = 400
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "MS Sans Serif"
string text = "取消"
boolean cancel = true
end type
event clicked;CloseWithReturn(Parent, 0)
end event
type cb_ok from commandbutton within w_update_prod
integer x = 800
integer y = 628
integer width = 352
integer height = 100
integer taborder = 20
integer textsize = -12
integer weight = 400
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "MS Sans Serif"
string text = "确定"
boolean default = true
end type
event clicked;dw_prod.AcceptText()
If ib_Changed Then
dw_prod.Update()
commit;
ib_Changed = False
CloseWithReturn(Parent, 1)
Else
CloseWIthReturn(Parent, 0)
End if
end event
type dw_prod from datawindow within w_update_prod
integer x = 50
integer y = 36
integer width = 2496
integer height = 532
integer taborder = 10
string dataobject = "d_edit_product"
boolean border = false
boolean livescroll = true
end type
event itemchanged;ib_Changed = True
end event
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -