⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 w_buyhouse.srw

📁 pb所需编程技巧和事例
💻 SRW
字号:
$PBExportHeader$w_buyhouse.srw
forward
global type w_buyhouse from window
end type
type cb_2 from commandbutton within w_buyhouse
end type
type cb_1 from commandbutton within w_buyhouse
end type
type dw_1 from datawindow within w_buyhouse
end type
end forward

global type w_buyhouse from window
integer width = 3250
integer height = 2836
boolean titlebar = true
string title = "买房啦"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_2 cb_2
cb_1 cb_1
dw_1 dw_1
end type
global w_buyhouse w_buyhouse

type variables
string num
end variables

on w_buyhouse.create
this.cb_2=create cb_2
this.cb_1=create cb_1
this.dw_1=create dw_1
this.Control[]={this.cb_2,&
this.cb_1,&
this.dw_1}
end on

on w_buyhouse.destroy
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.dw_1)
end on

event open;
dw_1.settransobject(sqlca)
dw_1.retrieve()

dw_1.insertrow(0)
dw_1.object.bookdate[1]=today()

string itemname,identifyno,buildingno,unitno
int storey,buildingheight
string housetype,description,direction
int area
dec price
string memo
num=message.stringparm ;

select itemname,identifyno,buildingno,unitno,
		storey,buildingheight,housetype,description,direction,
		area,price,memo
into :itemname,:identifyno,:buildingno,:unitno,
		:storey,:buildingheight,:housetype,:description,:direction,
		:area,:price,:memo		
from house
where number=:num
using sqlca;

dw_1.object.number[1]=num
dw_1.object.itemname[1]=itemname
dw_1.object.identifyno[1]=identifyno
dw_1.object.buildingno[1]=buildingno
dw_1.object.unitno[1]=unitno
dw_1.object.storey[1]=storey
dw_1.object.buildingheight[1]=buildingheight
dw_1.object.housetype[1]=housetype
dw_1.object.description[1]=description
dw_1.object.direction[1]=direction
dw_1.object.area[1]=area
dw_1.object.price[1]=price
dw_1.object.memo[1]=memo

end event
type cb_2 from commandbutton within w_buyhouse
integer x = 1472
integer y = 2488
integer width = 571
integer height = 128
integer taborder = 30
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "打印销售凭据"
end type

event clicked;dw_1.print()
end event

type cb_1 from commandbutton within w_buyhouse
integer x = 837
integer y = 2484
integer width = 457
integer height = 128
integer taborder = 20
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "交易成功"
end type

event clicked;dw_1.update()

Update house
   set flag=1
 where number=:num
 using sqlca;

 
end event

type dw_1 from datawindow within w_buyhouse
integer x = 64
integer y = 40
integer width = 3109
integer height = 2380
integer taborder = 10
string dataobject = "d_buyhouse"
boolean vscrollbar = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -