学生学籍管理信息系统的设计与实现分析

\警告\

\警告\

\警告\

\警告\

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 档案查询.Show End Sub

Private Sub dall_Click(Index As Integer) 档案浏览.Show End Sub

Private Sub dasc_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 档案删除.Show End Sub

Private Sub datj_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 档案添加.Show End Sub

Private Sub daxg_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If

21

\警告\

\警告\

\警告\

档案修改.Show End Sub

Private Sub kcsz_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 课程设置.Show End Sub

Private Sub Picture1_Click() End Sub

Private Sub scyh_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 删除用户.Show End Sub

Private Sub tc_Click(Index As Integer) Unload Me End Sub

Private Sub tjyh_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 添加用户.Show End Sub

22

\警告\

\警告\

\警告\

Private Sub xgmm_Click(Index As Integer) 修改密码.Show End Sub

Private Sub xksz_Click() If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 选课设置.Show End Sub

Private Sub xqsz_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 学期设置.Show End Sub

Private Sub yxsz_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly,

Exit Sub End If 院系设置.Show End Sub

Private Sub zysz_Click(Index As Integer) If qxstra = \

MsgBox \你没有权限进行操作!\vbExclamation + vbOKOnly, Exit Sub

23

End If 专业设置.Show End Sub

(1)数据更新

CREATE TRIGGER scupdate ON dbo.student //建立学生信息表更新触发器 FOR UPDATE AS

UPDATE SC //更新学生选课表SC

SET SNO = (SELECT SNO FROM INSERTED) //将SC表中的学号改成学生表改后的 WHERE SNO = (SELECT SNO FROM DELETED); //更改对应的学生学号

CREATE TRIGGER graduateupdate ON dbo.student //建立学生信息表更新触发器 FOR UPDATE AS

UPDATE GRADUATE //更新学生毕业信息表GRADUATE

SET SNO = (SELECT SNO FROM INSERTED) //将GRADUATE表中的学号改成学生表修改

后的

WHERE SNO = (SELECT SNO FROM DELETED); //更改对应的学生学号

CREATE TRIGGER majorupdate ON dbo.student //建立学生信息表更新触发器 FOR UPDATE AS

UPDATE MAJOR //更新专业信息表MAJOR

SET SNO = (SELECT SNO FROM INSERTED) //将MAJOR表中的学号改成学生表修改后的 WHERE SNO = (SELECT SNO FROM DELETED); //更改对应的学生学号 CREATE TRIGGER student1 ON dbo.major //建立专业信息表更新触发器 FOR UPDATE AS

UPDATE STUDENT //更新学生信息信息表STUDENT

SET MNO = (SELECT MNO FROM INSERTED) //将STUDENT表中的专业号改成专业表修改

后的

WHERE MNO = (SELECT MNO FROM DELETED); //更改对应的专业号

CREATE TRIGGER student2update ON dbo.department //建立院系信息表更新触发器

24

FOR UPDATE AS

UPDATE STUDENT //更新学生信息信息表STUDENT

SET DMPNO = (SELECT DMPNO FROM INSERTED) //将STUDENT表中的院系号改成专业

表修改后的

WHERE DMPNO = (SELECT DMPNO FROM DELETED); //更改对应的院系号 (2) 数据删除

CREATE TRIGGER sc1update ON dbo.course //建立课程信息表删除触发器 FOR DELETE AS

UPDATE SC //删除选课信息表SC

SET CNO = NULL //删除SC表中的课程号删除

WHERE CNO = (SELECT CNO FROM DELETED) //找到对应的课程号

CREATE TRIGGER stu_majorupdate ON dbo.major //建立专业信息表删除触发器 FOR DELETE AS

UPDATE STUDENT //删除学生信息表STUDENT SET MNO = NULL //删除STUDENT 表中的专业号删除

WHERE MNO = (SELECT MNO FROM DELETED) //找到对应的专业号

CREATE TRIGGER teacherupdate ON dbo.department //建立院系信息表删除触发器 FOR DELETE AS

UPDATE TEACHER //删除教师信息表TEACHER SET DMPNO = NULL //删除TEACHER表中的院系号删除

WHERE DMPNO = (SELECT DMPNO FROM DELETED) //找到对应的院系号

25

联系客服:779662525#qq.com(#替换为@) 苏ICP备20003344号-4