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

📄 w_dept.srw

📁 pb所需编程技巧和事例
💻 SRW
字号:
$PBExportHeader$w_dept.srw
forward
global type w_dept from window
end type
type cb_exit from commandbutton within w_dept
end type
type cb_del from commandbutton within w_dept
end type
type cb_update from commandbutton within w_dept
end type
type cb_add from commandbutton within w_dept
end type
type dw_1 from datawindow within w_dept
end type
end forward

global type w_dept from window
integer width = 1842
integer height = 1120
boolean titlebar = true
string title = "部门信息维护"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_exit cb_exit
cb_del cb_del
cb_update cb_update
cb_add cb_add
dw_1 dw_1
end type
global w_dept w_dept

on w_dept.create
this.cb_exit=create cb_exit
this.cb_del=create cb_del
this.cb_update=create cb_update
this.cb_add=create cb_add
this.dw_1=create dw_1
this.Control[]={this.cb_exit,&
this.cb_del,&
this.cb_update,&
this.cb_add,&
this.dw_1}
end on

on w_dept.destroy
destroy(this.cb_exit)
destroy(this.cb_del)
destroy(this.cb_update)
destroy(this.cb_add)
destroy(this.dw_1)
end on

event open;dw_1.setTransObject(SQLCA)
dw_1.retrieve()
end event

type cb_exit from commandbutton within w_dept
integer x = 1349
integer y = 840
integer width = 334
integer height = 128
integer taborder = 50
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "退出"
end type

event clicked;close(parent)
end event

type cb_del from commandbutton within w_dept
integer x = 512
integer y = 840
integer width = 334
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.deleterow(0)
end event

type cb_update from commandbutton within w_dept
integer x = 923
integer y = 840
integer width = 334
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.update()
dw_1.retrieve()
cb_add.enabled=true
cb_del.enabled=true
cb_update.enabled=true
end event

type cb_add from commandbutton within w_dept
integer x = 96
integer y = 840
integer width = 334
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;long rl
rl=dw_1.insertrow(0)
dw_1.scrolltorow(rl)
cb_add.enabled=false
cb_del.enabled=false
cb_update.enabled=true
end event

type dw_1 from datawindow within w_dept
integer x = 128
integer y = 104
integer width = 1605
integer height = 648
integer taborder = 10
string title = "none"
string dataobject = "d_dept"
boolean vscrollbar = true
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

⌨️ 快捷键说明

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