学生综测管理系统一.需求分析
(一)数据分析
1.原始数据包括4个表:
(1)会计一班综测成绩单
(2)会计二班综测成绩单
(3)会计三班综测成绩单
(4)财务管理班综测成绩单
2.表容:
3.表单(封面):
要求:在用户名中输入学号
密码中输入数字“0”
点击“确认”按钮后进入主菜单如果未输入密码时,显示
如果输入密码错误时,显示
4.菜单:
(1)数据浏览:例如点击“浏览”栏中的财管班综测,得:
(2)数据编辑:例如点击“编辑”按钮栏中的会计二班得:
(3)数据查询:按照学号查询个人综测成绩
例如查询学号为的学生的综测得
如果学好不存在时,显示
5.退出:点击“退出”按钮时,显示
点击“是”则可以退出系统。
二.程序设计
主程序
set talk off
close all
do form fm
modify wind screen titl'地大经管学生综测管理系统' clear
do cxcd.mpr
read event
quit
菜单部分
浏览子菜单代码:
会计一班综测use kj1
brow
会计二班综测use kj2
brow
会计三班综测use kj3
brow
财管综测
use cg
brow
编辑子菜单代码:编辑会计一班use kj1
append
编辑会计二班use kj2
append
编辑会计三班use kj3
append
编辑财管班
use cg
append
查询子菜单代码:会计一班
do while .T.
accept "请输入要查询的学生学号(输入0结束查询):"to xh if xh=='0'
exit
endif
locate for alltrim(学号)==xh
if found()
disp for alltrim(学号)==xh
else
wait "没有此学号!" window
endif
enddo
会计二班
use kj2
do while .T.
accept "请输入要查询的学生学号(输入0结束查询):"to xh if xh=='0'
exit
endif
locate for alltrim(学号)==xh
if found()
disp for alltrim(学号)==xh
else
wait "没有此学号!" window
endif
enddo
use kj3
do while .T.
accept "请输入要查询的学生学号(输入0结束查询):"to xh if xh=='0'
exit
endif
locate for alltrim(学号)==xh
if found()
disp for alltrim(学号)==xh
else
wait "没有此学号!" window
endif
enddo
财管班
use cg
do while .T.
accept "请输入要查询的学生学号(输入0结束查询):"to xh if xh=='0'
exit
endif
locate for alltrim(学号)==xh
if found()
disp for alltrim(学号)==xh
else
wait "没有此学号!" window
endif
Enddo
汇总查询
use hz
do while .T.
accept "请输入要查询的学生学号(输入0结束查询):"to xh
if xh=='0'
exit
endif
locate for alltrim(学号)==xh
if found()
disp for alltrim(学号)==xh
else
wait "没有此学号!" window
endif
Enddo
退出代码:
ask=messagebox("确实要退出系统吗",4+32+256,"学生综测管理系统") if ask=6
close all
quit
else
endif
帮助子菜单代码:
版本信息
clear
use 版本
list
封面部分代码
数据环境中加入新口令表(xklb.dbf,存密码和学号)
Form1.intn中写:
Public errornumber,Ps
Errornumber=0
退出的click中写:
ask=messagebox("确定要退出系统吗?",4+32+256,"学生综测管理系统") if ask=6
close all
quit
else
endif
确定的click中写:
use xklb
a=Thisform.text1.value
b=Thisform.text2.value
if a==""
n=messagebox("请输入用户名",4+32,"学生管理系统登陆")
do case
case n=6
thisform.text1.value=""
thisform.text1.setfocus
case n=7
thisform.release
endcase
else
if b==""
n=messagebox("请输入密码",4+32,"学生管理系统登陆")
do case
case n=6
thisform.text2.value=""
thisform.text2.setfocus
case n=7
thisform.release
endcase
endif
endif
locate for alltrim(xklb.Id)==alltrim(a)
if found()
if alltrim(xklb.Ps)==alltrim(b)
do cxcd.mpr
thisform.release
else
messagebox("密码错误,请重新输入",64,"学生综测管理系统登陆") errornumber=errornumber+1
endif
else
messagebox("用户"+a+"不存在!",64,"学生综测管理系统登陆") errornumber=errornumber+1
endif。