(1)deandma.dbf,见表1
表1
字段名 数据类型 备注 班级 Char(8) 主键Not null 系 Char(10) Not null 专业 Char(14) Not null
(2)grade.dbf,见表2
表2
字段名 数据类型 备注 Char(8) 主键Not null 班级 Char(10) Not null 课程 Char(18) Not null 成绩 Int (5) Not null 学期 Char(2) Not null 备注 Memo Null (3)stduents.dbf,见表3
表3
字段名 数据类型 备注 班级 Char(8) 主键 Not null Char(8) Not null Char(8) Not null 性别 Char(6) Not Null 出生日期 Datetime Null 政治面貌 Char(8) Null 身份证号码 Char(16) Null 入学时间 Datetime Null 籍贯 Char(16) Null 家庭住址 Char(28) Null 邮政编码 Char(6) Null 照片 General Null 备注 Memo Null
(4).dbf,见表4
表4 用户信息表
字段名 数据类型 备注 Char(8) 主键 Not null 密码 Char(6) Not null 标识 Logical Not null
4.2登陆界面设计
"进入"按钮的click事件添加如下的代码:
sele yonghu
if allt(thisform.text1.value)==""
messagebox(left(allt(thisform.label1.caption),6)+"为空,请输入!",64,"提示")
thisform.text1.setfocus
else
if allt(thisform.text2.value)==""
messagebox("密码为空,请输入!",64,"提示")
thisform.text2.setfocus
else
n=n+1
locate for allt()=allt(thisform.text1.value);
.and. allt(密码)=allt(thisform.text2.value)
if found()
if thisform.check1.value==1 .and. 标识
checked=1
thisform.release
do menu.mpr
else
if thisform.check1.value==1.and.!标识
messagebox("你不是管理员!",48,"警告")
thisform.check1.value=0
else
checked=0
cyonghu=allt()
cmima=allt(密码)
thisform.release
do menu.mpr
endif
endif
else
if n>=3
messagebox("你不是合法用户,请与管理员联系!",48,"警告")
thisform.release
clear event
quit
else
messagebox(left(allt(thisform.label1.caption),6)+"或密码错误,请重新输入!",64,"提示")
thisform.text1.value=""
thisform.text1.setfocus
thisform.text2.value=""
endif
endif
endif
endif
"取消"按钮的click事件添加如下的代码
nr=messagebox("你选择了退出登录,是否退出?",68,"用户登录")
if nr=6
thisform.release
quit
endif
4.3学生信息录入
"增加"按钮的click事件添加如下的代码:
if this.caption=="增加"
if(thisformbo3.displayvalue=="(选择)").or.(alltrim(thisform.text1.value)=="");
.or.(alltrim(thisform.text2.value)=="")
messagebox("班级、和必须填充!!",64,"提示")
else
locate for alltrim(thisform.text1.value)=alltrim(students.)
if !eof()
=messagebox("此已经存在,请重新输入!",64,"提示")
thisform.text1.value=""
thisform.text1.setfocus
else
sele students
append blank
replace 班级 with alltrim(thisformbo3.value),with alltrim(thisform.text1.value);
with alltrim(thisform.text2.value),出生日期with ctod(alltrim(thisform.text4.value));
入学时间 with ctod(alltrim(thisform.text6.value)), 籍贯with alltrim(thisform.text7.value);
家庭住址 with alltrim(thisform.text8.value),身份证号码with alltrim(thisform.text8.value);
备注 with alltrim(thisform.edit1.value),邮政编码 with alltrim(thisform.text3.value)
if alltrim(thisformbo4.value)==""
replace 性别 with alltrim(thisformbo4.displayvalue)
else
replace 性别 with alltrim(thisformbo4.value)
endif
if alltrim(thisformbo5.value)==""
replace 政治面貌 with alltrim(thisformbo5.displayvalue)
else
replace 政治面貌 with alltrim(thisformbo5.value)
endif
&& if .not.alltrim(thisform.label17.caption)==""
if !pictemp==""
wait windows "正在导入相片,请等待!......." at 100,40 timeout 2 nowait
&& pictemp=thisform.label17.caption
append general students.照片 from "&pictemp"
endif
pictemp=""