📄 w_record.srw
字号:
$PBExportHeader$w_record.srw
forward
global type w_record from window
end type
type cb_2 from commandbutton within w_record
end type
type ddlb_1 from dropdownlistbox within w_record
end type
type dw_1 from datawindow within w_record
end type
type cb_1 from commandbutton within w_record
end type
end forward
global type w_record from window
integer width = 3424
integer height = 1772
boolean titlebar = true
string title = "销售业绩调查统计"
boolean controlmenu = true
boolean minbox = true
boolean maxbox = true
long backcolor = 67108864
string icon = "AppIcon!"
boolean center = true
cb_2 cb_2
ddlb_1 ddlb_1
dw_1 dw_1
cb_1 cb_1
end type
global w_record w_record
on w_record.create
this.cb_2=create cb_2
this.ddlb_1=create ddlb_1
this.dw_1=create dw_1
this.cb_1=create cb_1
this.Control[]={this.cb_2,&
this.ddlb_1,&
this.dw_1,&
this.cb_1}
end on
on w_record.destroy
destroy(this.cb_2)
destroy(this.ddlb_1)
destroy(this.dw_1)
destroy(this.cb_1)
end on
event open;int rc
int i
//统计销售员数量
select count(name)
into :rc
from personel
where job='销售员'
using sqlca;
// 声明游标 emp_curs.
DECLARE emp_curs CURSOR FOR
select name
from personel
where job='销售员'
using sqlca;
//定义一个变量表示员工姓名.
string emp_name
// 打开游标,执行Select操作
OPEN emp_curs;
ddlb_1.additem("全部销售员");
for i=1 to rc
// 获取结果集中的下一行
FETCH emp_curs INTO :emp_name;
ddlb_1.additem(emp_name);
next
// 关闭游标
CLOSE emp_curs;
dw_1.settransobject(sqlca)
dw_1.retrieve()
end event
type cb_2 from commandbutton within w_record
integer x = 1664
integer y = 80
integer width = 658
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.print()
end event
type ddlb_1 from dropdownlistbox within w_record
integer x = 96
integer y = 80
integer width = 549
integer height = 452
integer taborder = 10
integer textsize = -12
integer weight = 400
fontcharset fontcharset = ansi!
fontpitch fontpitch = variable!
fontfamily fontfamily = swiss!
string facename = "Arial"
long textcolor = 33554432
boolean sorted = false
string item[] = {""}
borderstyle borderstyle = stylelowered!
end type
type dw_1 from datawindow within w_record
integer x = 105
integer y = 304
integer width = 3278
integer height = 1264
integer taborder = 30
boolean titlebar = true
string title = "销售记录清单"
string dataobject = "d_record"
boolean controlmenu = true
boolean maxbox = true
boolean hscrollbar = true
boolean vscrollbar = true
boolean border = false
boolean livescroll = true
borderstyle borderstyle = stylelowered!
end type
type cb_1 from commandbutton within w_record
integer x = 718
integer y = 80
integer width = 535
integer height = 124
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;string filterstr
if ddlb_1.text<>"全部销售员" then
filterstr="saler='"+ddlb_1.text+"'"
else
filterstr=""
end if
dw_1.setfilter(filterstr)
dw_1.retrieve()
dw_1.filter()
dw_1.title=ddlb_1.text + "的销售记录如下:"
end event
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -