学生成绩管理系统技术说明文档内容摘要:

If admin = False Then MsgBox 你没有管理本功能的权限 ,请与管理员联系 ! Exit Sub End If If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If 12 Case 3 If admin = False Then MsgBox 你没有管理本功能的权限 ,请与管理员联系 ! Exit Sub End If If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If Case 4 If admin = False Then MsgBox 你没有管理本功能的权限 ,请与管理员联系 ! Exit Sub End If If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If Case 5 If admin = False Then MsgBox 你没有管理本功能的权限 ,请与管理员联系 ! Exit Sub End If If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If Case 6 If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If Case 7 If mdi = False Then MsgBox 请保存数据。 , vbInformation, 不允许当前操作。 Else End End If End Select End Sub Private Sub user_Click() If admin = False Then MsgBox 你没有管理本功能的权限 ,请与管理员联系 ! Exit Sub End If If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If End Sub Private Sub xuankecha_Click() If mdi = True Then Else 13 MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If End Sub Private Sub zhuxiu_Click() If admin = False Then MsgBox 你没有管理本功能的权限 ,请与管理员联系 ! Exit Sub End If If mdi = True Then Else MsgBox 每次只能打开一个窗口,请关闭正在打开的窗口。 , vbInformation, 不允许当前操作。 End If End Sub ( 4)用户管理代码 Dim gridsave As Boolean Dim gridedit As Boolean Dim griddelete As Boolean Private Sub Form_Load() = ( ) / 2 = ( ) / 20 = ( ) / 2 = ( ) / 20 On Error GoTo finish CNwinndy, W]vyYnonvku\ntyZbl_e`hms^ With Grid1 .AllowUserResizing = True .DisplayFocusRect = False .ExtendLastCol = True .Appearance = Flat .FixedRowColStyle = Flat .ScrollBarStyle = Flat . = Tahoma . = 8 .BackColorFixed = RGB(84, 201, 134) .BackColorFixedSel = RGB(167, 111, 177) .BackColorBkg = RGB(198, 229, 211) .BackColorScrollBar = RGB(150, 170, 210) .BackColor1 = RGB(231, 235, 247) .BackColor2 = RGB(198, 229, 211) .GridColor = RGB(148, 190, 231) .AllowUserResizing = True .DisplayFocusRect = False .ExtendLastCol = True .Appearance = Flat .FixedRowColStyle = Flat .ScrollBarStyle = Flat .GridColor = RGB(148, 190, 231) . = Tahoma . = 8 .Column(0).Width = 0 .Column(1).Width = 100 .Column(2).Width = 100 .Column(3).Width = 100 .Column(3).CellType = cellComboBox .ComboBox(3).Clear .ComboBox(3).AddItem 超级管理员 .ComboBox(3).AddItem 一般用户 End With Call callmain (1).Locked = True gridsave = False gridedit = True griddelete = True 14 mdi = False Exit Sub finish: MsgBox End Sub Private Sub callmain() On Error GoTo finish gridsave = False gridedit = True griddelete = True Set mdbrs = (select * from 登录 ) = 1 i = 3 = i + 1 For i = 0 To 2 (0, i + 1).Text = (i).Name Next i = 1 Do While Not = + 1 For j = 1 To 3 If (j 1) = Null Then (i, j).Text = Else (i, j).Text = (j 1) End If Next i = i + 1 Loop (1).Locked = True Exit Sub finish: MsgBox End Sub Private Sub Form_LostFocus() End Sub Private Sub Form_Unload(Cancel As Integer) mdi = True End Sub Private Sub XPButton1_Click() On Error GoTo finish gridsave = True gridedit = False griddelete = False Set mdbrs = (select * from 登录 ) = 1 = 2 (1).Locked = False (1, 1).SetFocus Exit Sub finish: MsgBox End Sub Private Sub XPButton2_Click() On Error GoTo finish If gridsave = False Then MsgBox 不支持保存操作。 , vbInformation, 当前不支持 Exit Sub End If If (1, 1).Text And (1, 2).Text Then Set mdbrs = (select * from 登录 where 用户名 =39。 amp。 (1, 1).Text amp。 39。 ) 15 If = True Then Set mdbrs = (insert into 登录 values(39。 amp。 (1, 1).Text amp。 39。 ,39。 amp。 (1, 2).Text amp。 39。 ,39。 amp。 (1, 3).Text amp。 39。 )) MsgBox 提交成功。 , vbInformation, Call callmain Else MsgBox 该管理员己存在。 , vbInformation, 不可重名 Exit Sub End If Else MsgBox 用户名和密码都不可以是空格。 , vbInformation, 错误提示 End If Exit Sub finish: MsgBox End Sub Private Sub XPButton3_Click() On Error GoTo finish If gridedit = False Then MsgBox 当前修改操作不被允许 !, vbInformation, 非使用对象 Exit Sub End If For i = 1 To 1 Set mdbrs = (update 登录 set 密码 =39。 amp。 (i, 2).Text amp。 39。 ,权限 =39。 amp。 (i, 3).Text amp。 39。 where 用户名 =39。 amp。 (i, 1).Text amp。 39。 ) Next MsgBox 修改的数据己经完成 , vbInformation, 完成操作 Call callmain Exit Sub finish: MsgBox End Sub Private Sub XPButton4_Click() On Error GoTo finish Dim i As Integer If griddelete = False Then MsgBox 当前删除操作不被允许 !, vbInformation, 非使用对象 Exit Sub End If If hang = 0 Then MsgBox 没有选择用户或者没有用户可以删除 !, vbInformation, 非使用对象 Exit Sub End If i = MsgBox(确认删除此记录吗。 , 4, 删除学生 ) If i = 6 Then Set mdbrs = (delete from 登录 where 用户名 =39。 amp。 (hang, 1).Text amp。 39。 ) MsgBox 目标己删除 ,请刷新数据 !, vbInformation, 删除成功 Call callmain Else MsgBox 目标没有删除 !, vbInformation, 删除失败 End If Exit Sub finish: MsgBox End Sub Private Sub XPButton5_Click() Unload Me End Sub Private Sub Grid1_RowColChange(ByVal Row As Long, ByVal Col As Long) hang = Row End Sub ( 5)学生管理代码 Dim gridedit1 As Boolean 16 Dim gridsave1 As Boolean Dim griddelete1 As Boolean Private Sub Form_Load() = ( ) / 2 = ( ) / 20 On Error GoTo finish mdi = False CNwinndy, W]vyYnonvku\ntyZbl_e`hms^。
阅读剩余 0%
本站所有文章资讯、展示的图片素材等内容均为注册用户上传(部分报媒/平媒内容转载自网络合作媒体),仅供学习参考。 用户通过本站上传、发布的任何内容的知识产权归属用户或原始著作权人所有。如有侵犯您的版权,请联系我们反馈本站将在三个工作日内改正。