家庭图书管理系统方案设计书(1)(5)

2019-04-13 22:00

)。

/*==============================================================*/ /* Table: Score */

/*==============================================================*/ create table Score (

Sno char(15) not null, Cno char(15) not null, ID integer null, Score integer not null )。

/*==============================================================*/ /* Table: Student */

/*==============================================================*/ create table Student (

Sno char(15) not null, Cno char(15) not null, Sname char(20) not null, Class char(10) not null, Birthday date not null, Sex char(2) not null, Address char(30) null, Tel char(15) null, Resume char(256) null, constraint PK_STUDENT primary key (Sno) )。

alter table Score

add constraint FK_SCORE_RELATIONS_STUDENT foreign key (Sno) references Student (Sno) on update restrict on delete restrict。

alter table Score

add constraint FK_SCORE_RELATIONS_COURSE foreign key (Cno) references Course (Cno) on update restrict on delete restrict。

alter table Student

add constraint FK_STUDENT_RELATIONS_COURSE foreign key (Cno) references Course (Cno) on update restrict on delete restrict。

登陆界面代码

Option Explicit

Private Sub cboUserType_Change() gnUserType = cboUserType.ListIndex End Sub

Private Sub cboUserType_Click() gnUserType = cboUserType.ListIndex End Sub

Private Sub cmdCancel_Click() Unload Me End Sub

Private Sub cmdOK_Click() ''取得用户输入的用户名和密码 Dim user As String, pwd As String user = txtUser pwd = txtPwd

''根据不同的身份,选择不同的表用以查询 Dim r As New ADODB.Recordset Dim strORA As String Select Case gnUserType Case 0: '选择身份为教师

strORA = \ Case 1: '选择身份为课程

strORA = \ End Select

'打开记录集 r

r.Open strORA, DataEnv.Con.ConnectionString, adOpenStatic

''用户密码错误的次数,如果错误次数超过3次,则退出系统 Static nTryCount As Integer

If r.EOF Then ''登录失败

MsgBox \对不起,无此用户或者密码不正确!请重新输入!!\错误\ txtUser.SetFocus txtUser.SelStart = 0

txtUser.SelLength = Len(txtUser) nTryCount = nTryCount + 1 If nTryCount >= 3 Then

MsgBox \您无权操作本系统!再见!\无权限\ Unload Me End If

Else ''登陆成功

''显示MDI窗体, 并将用户类型和用户名传到MDI窗体中

gnUserType = cboUserType.ListIndex gsUserName = txtPwd

''注意调用顺序 Unload Me MDIMain.Show End If End Sub

Private Sub Form_Load() cboUserType.ListIndex = 0 End Sub


家庭图书管理系统方案设计书(1)(5).doc 将本文的Word文档下载到电脑 下载失败或者文档不完整,请联系客服人员解决!

下一篇:钢结构厂房毕业设计电子版计算书

相关阅读
本类排行
× 注册会员免费下载(下载后可以自由复制和排版)

马上注册会员

注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: