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

📄 w_employee.srw

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

global type w_employee from window
integer width = 3941
integer height = 2468
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
dw_1 dw_1
cb_exit cb_exit
mle_1 mle_1
cb_save cb_save
cb_update cb_update
cb_del cb_del
cb_add cb_add
dw_2 dw_2
end type
global w_employee w_employee

on w_employee.create
this.dw_1=create dw_1
this.cb_exit=create cb_exit
this.mle_1=create mle_1
this.cb_save=create cb_save
this.cb_update=create cb_update
this.cb_del=create cb_del
this.cb_add=create cb_add
this.dw_2=create dw_2
this.Control[]={this.dw_1,&
this.cb_exit,&
this.mle_1,&
this.cb_save,&
this.cb_update,&
this.cb_del,&
this.cb_add,&
this.dw_2}
end on

on w_employee.destroy
destroy(this.dw_1)
destroy(this.cb_exit)
destroy(this.mle_1)
destroy(this.cb_save)
destroy(this.cb_update)
destroy(this.cb_del)
destroy(this.cb_add)
destroy(this.dw_2)
end on

event open;dw_1.SetTransObject(sqlca)
dw_1.Retrieve()

dw_2.SetTransObject(sqlca)
dw_2.Retrieve()

mle_1.text="(1)人员编号:前2位为00,后5位为工作证号    (2)实验室工龄:实验室工作的累积年龄  " &
+ "(3)所学专业:按教育部1998年颁布的<<对照表>>代码填写,无者填0  " &
+ "(4)专业职务:按<<专业技术职务代码>>填写,另加:400-行政工作人员;500-工人;510-技师;511-高级技师  " & 
+ "(5)出生年月,评职时间(无者填0):前4位表示年,后2位表示月。如199910表示1999年10月  " &
+ "(6)国内进修时间:指一学年内在国内脱产进修的总月数,无者填0  " &
+ "(7)国外进修时间:指一学年内在国外脱产进修的总月数,无者填0  " &
+ "(8)论文数量:一学年内发表论文(含译文)的总篇数"
end event

type dw_1 from datawindow within w_employee
integer x = 539
integer y = 12
integer width = 2939
integer height = 508
integer taborder = 10
string dataobject = "d_employee_1"
boolean vscrollbar = true
borderstyle borderstyle = stylelowered!
end type

event clicked;dw_2.ScrollToRow(row)
end event

type cb_exit from commandbutton within w_employee
integer x = 2930
integer y = 1716
integer width = 457
integer height = 128
integer taborder = 60
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
string text = "退出(E&xit)"
end type

event clicked;close(parent)
end event
type mle_1 from multilineedit within w_employee
integer x = 242
integer y = 1884
integer width = 3611
integer height = 464
integer taborder = 60
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
boolean underline = true
long textcolor = 33554432
long backcolor = 67108864
boolean border = false
end type

type cb_save from commandbutton within w_employee
integer x = 2359
integer y = 1708
integer width = 471
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 = "保存(&Save)"
end type

event clicked;dw_2.update()
cb_add.enabled=true
cb_del.enabled=true
cb_update.enabled=true
cb_save.enabled=false
cb_exit.enabled=true
dw_2.enabled=false
dw_1.Retrieve()
end event

type cb_update from commandbutton within w_employee
integer x = 1682
integer y = 1708
integer width = 539
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 = "更改(&Update)"
end type

event clicked;cb_add.enabled=false
cb_del.enabled=false
cb_update.enabled=false
cb_save.enabled=true
cb_exit.enabled=false
dw_2.enabled=true
end event

type cb_del from commandbutton within w_employee
integer x = 1083
integer y = 1708
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 = "删除(&Del)"
end type

event clicked;dw_2.DeleteRow(0)

end event

type cb_add from commandbutton within w_employee
integer x = 475
integer y = 1708
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 = "添加(&Add)"
end type

event clicked;long ll;
ll=dw_2.InsertRow(0)
dw_2.ScrollToRow(ll)
cb_add.enabled=false
cb_del.enabled=false
cb_update.enabled=false
cb_save.enabled=true
cb_exit.enabled=false
dw_2.enabled=true
end event

type dw_2 from datawindow within w_employee
integer x = 82
integer y = 556
integer width = 3776
integer height = 1128
integer taborder = 10
boolean enabled = false
string title = "none"
string dataobject = "d_employee"
boolean border = false
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type

⌨️ 快捷键说明

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