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

📄 value.srw

📁 用pb(power builder)制作的医院管理系统 附有数据库脚本
💻 SRW
字号:
$PBExportHeader$value.srw
forward
global type value from window
end type
type cb_4 from commandbutton within value
end type
type cb_3 from commandbutton within value
end type
type cb_2 from commandbutton within value
end type
type cb_1 from commandbutton within value
end type
type dw_1 from datawindow within value
end type
type dw_2 from datawindow within value
end type
type gb_1 from groupbox within value
end type
end forward

global type value from window
integer width = 2533
integer height = 2996
boolean titlebar = true
string title = "价格管理"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
boolean hscrollbar = true
boolean vscrollbar = true
boolean resizable = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_4 cb_4
cb_3 cb_3
cb_2 cb_2
cb_1 cb_1
dw_1 dw_1
dw_2 dw_2
gb_1 gb_1
end type
global value value

type variables
/* Use to save the row which was ckicked */
long crow 
/* flag is a sign, it use to record the dw_drug_pricecontrol_view have been clicked or not*/
int flag  
/* 记录进货号、药品号、药品规格和单价 */
double d_unit_price
string s_stock_id,s_drug_id,s_specs
end variables

on value.create
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.dw_1=create dw_1
this.dw_2=create dw_2
this.gb_1=create gb_1
this.Control[]={this.cb_4,&
this.cb_3,&
this.cb_2,&
this.cb_1,&
this.dw_1,&
this.dw_2,&
this.gb_1}
end on

on value.destroy
destroy(this.cb_4)
destroy(this.cb_3)
destroy(this.cb_2)
destroy(this.cb_1)
destroy(this.dw_1)
destroy(this.dw_2)
destroy(this.gb_1)
end on

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

type cb_4 from commandbutton within value
integer x = 837
integer y = 356
integer width = 457
integer height = 128
integer taborder = 40
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.scrollnextrow()

end event

type cb_3 from commandbutton within value
integer x = 265
integer y = 356
integer width = 457
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.scrollpriorrow()

end event

type cb_2 from commandbutton within value
integer x = 837
integer y = 104
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;If dw_1.Update()=1 Then
	Commit;	
	messagebox("恭喜!","数据已经保存成功")
Else
	Rollback;
	messagebox("抱歉!","数据保存出错")
End if

/*dw_2.retrieve()

dw_2.enabled=true
dw_1.enabled=false
cb_1.enabled=true
cb_2.enabled=false*/



end event

type cb_1 from commandbutton within value
integer x = 247
integer y = 100
integer width = 457
integer height = 128
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "修改价格"
end type

event clicked;If flag = 1 Then
	dw_2.enabled=false
	dw_1.enabled=true
   cb_1.enabled=false
	cb_2.enabled=true
	flag = 0
Else
	messagebox("警告!","您还未选取需进行修改的行")
End If
end event

type dw_1 from datawindow within value
integer x = 155
integer y = 672
integer width = 2149
integer height = 752
integer taborder = 20
string title = "none"
string dataobject = "price_view"
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

type dw_2 from datawindow within value
integer x = 82
integer y = 1592
integer width = 2185
integer height = 844
integer taborder = 10
string title = "none"
string dataobject = "price"
boolean hscrollbar = true
boolean vscrollbar = true
boolean hsplitscroll = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

event clicked;dw_1.ScrollToRow(dw_2.getClickedRow())
crow = dw_2.getClickedRow()
flag = 1

/* Get values of stock_id, drug_id, specs and unit_price */
/* 取得进货号、药品号、药品规格和单价 */
/*s_stock_id = dw_2.GetItemString(crow,1)
s_drug_id = dw_2.GetItemString(crow,2)
s_specs = dw_2.GetItemString(crow,3)
d_unit_price = dw_2.GetItemNumber(crow,8)*/
end event

type gb_1 from groupbox within value
integer x = 87
integer y = 540
integer width = 2267
integer height = 964
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
long backcolor = 67108864
string text = "none"
end type

⌨️ 快捷键说明

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