计算机专业应用ppt课件

  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

.
11

3、按商品查询
• 功能要求:出现一个表单,按商品名称查询 结果的清单/汇总,,在表格grid显示查询结果)
.
12
.
13
• n=thisform.combo1.value • select 编码 as n1 from 商品 where 名称=n into cursor de • n1=alltrim(n1)

• endcase

thisform.refresh
.
8
• 2、按日期查询
• 功能要求:出现一个表单,按日期(年/月/日) 查询结果的清单/汇总, 在表格grid显示查询 结果
.
9
.
10
查询按钮的参考代码:
• do case
• case thisform.optiongroup1.value=1
• case thisform.optiongroup1.value=2
• thisform.grid1.recordsource="select sum(数量*单价*折扣) as 总销售 额 from 员工,销售日记 where 员工.姓名=n and 员工.员工编号=销售 日记.员工编号 into cursor d1"

y=thisform.spinner1.value

if thisform.check2.value=1

m=thisform.spinner2.value

if thisform.check3.value=1

d=thisform.spinner3.value

thisform.grid1.recordsource="select sum(数量*单价*折扣) as 总销售额 from 销售日记 where year(销售日期)=y and month(销售日期)=m and
.
6
• 查询内容设置。
• 1、按名称查询
• 功能要求:出现一个表单,按员工姓名查询结 果的清单/汇总,在表格grid显示查询结果
.
7
查询按钮的参考代码:
• n=thisform.combo1.value
• do case
• case thisform.optiongroup1.value=1

thisform.grid1.recordsource="select 姓名 ,销售日记.* from 员工,销售日 记 where 员工.员工编号=销售日记.员工编号 and 员工.姓名=n into cursor d1"

thisform.grid1.recordsource="select * from 销售日记 where year(销售日期)=y and month(销售日期)=m and day(销售日期)=d into cursor d1"

else

thisform.grid1.recordsource="select * from 销售日记 where year(销售日期)=y and month(销售日期)=m into cursor d1"
day(销售日期)=d into cursor d1"

else

thisform.grid1.recordsource="select sum(数量*单价*折扣)as 总销售额 from 销售日记 where year(销售日期)=y and month(销售日期)=m into
cursor d1"

endif

else

thisform.grid1.recordsource="select * from 销售日记 where year(销售日期)=y into cursor d1"

endif

endif
• case thisform.optiongroup1.value=2

if thisform.check1.value=1
3、顶层表单的设置问题。
.
3
• 本学期的主要内容 完成系统的后面三部分 1)查询 2)统计 3)系统服务(数据备份,数据恢复,数Βιβλιοθήκη Baidu的初
始化)
.
4
添加 员工信息
浏览 浏览信息
修改
查询
浏览修改3 名称查询
统计
员工销售 额
系统服务 文件备份
销售日记
查询修改3 日期查询 商品销售 文件恢复3 额
商品
浏览删除3 商品查询 月销售额 修改系统用 户2,3


if thisform.check1.value=1

y=thisform.spinner1.value

if thisform.check2.value=1

m=thisform.spinner2.value

if thisform.check3.value=1

d=thisform.spinner3.value
经销商
经销商查 经销商销 退出系统

售额
系统用户 2,3
钞卡分类 钞卡分类
查询
汇总
.
5
• 知识点回顾。 • 1、SQL中select 语句的使用。
select 目标子句 from 范围子句 where 条件子句 group by 分组子句
having 分组筛选 order by 排序子句 into dbf/cursor (结果去向)
• do case
• case thisform.optiongroup1.value=2

• thisform.grid1.recordsource="select * from 销售日记 where alltrim(商 品)=n1 into cursor d1"
• case thisform.optiongroup1.value=1

endif

else

thisform.grid1.recordsource="select sum(数量*单价*折扣) as 总销售额 from 销售日记 where year(销售日期)=y into cursor d1"

endif

endif


endcase

thisform.refresh
计算机专业应用
.
1
本学期的上课安排
• 1~7周,每周4节。共28个学时。 • 第10周提交系统及说明文档。
.
2
上机内容1
• 主要内容
• 作业存在的问题讲评
1、数据库中表字段的设置问题 销售日记表(数量,单价,折扣) 系统用户表(权限)
2、数据表和自由表问题 数据表(员工,销售日记,商品,供应商) 自由表(访问登记,系统用户)
相关文档
最新文档