📄 frmmenu.frm
字号:
Begin VB.Menu selectinfo
Caption = "查询信息 "
Begin VB.Menu stuselectinfo
Caption = "学生查询信息"
Begin VB.Menu stumodifyinfo
Caption = "修改个人信息"
End
Begin VB.Menu stuselinfo
Caption = "查询信息"
End
End
Begin VB.Menu Mseg4
Caption = "-"
End
Begin VB.Menu teasel
Caption = "教师查询信息"
Begin VB.Menu teamodifyinfo
Caption = "修改个人信息"
End
Begin VB.Menu teaselectinfo
Caption = "查询信息"
End
End
End
Begin VB.Menu selectcourse
Caption = "选课系统 "
Begin VB.Menu stuselectcourse
Caption = "学生选课系统"
End
Begin VB.Menu Mseg5
Caption = "-"
End
Begin VB.Menu teaselectcourse
Caption = "教师选课系统"
End
End
Begin VB.Menu datasum
Caption = "数据统计 "
Begin VB.Menu opesumdata
Caption = "数据各种统计"
End
End
Begin VB.Menu print_manag
Caption = "打印管理 "
Begin VB.Menu baopring_print
Caption = "打印管理"
End
Begin VB.Menu Mseg10
Caption = "-"
End
End
Begin VB.Menu menu_manage
Caption = "辅助管理"
Begin VB.Menu meun_cou
Caption = "计算器"
End
Begin VB.Menu menu_help
Caption = "帮助"
End
End
End
Attribute VB_Name = "frmmain"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub backup_Click()
' Call sDoDB("还原", "(local)", "stuchoose", "sa", "")
frmrestore.Show
End Sub
Private Sub baopring_stu_Click()
DataReport1.Show
End Sub
Private Sub baopring_tea_Click()
DataReport2.Show
End Sub
Private Sub baoprint_course_Click()
DataReport3.Show
End Sub
Private Sub baopring_print_Click()
frmprint.Show
End Sub
Private Sub couupdate_Click()
frmcourseupdate.Show
End Sub
Private Sub exit_Click()
Dim ok As Integer
ok = MsgBox("你真的要退出系统吗?", vbOKCancel + vbExclamation, "警告")
If ok = 1 Then End
End Sub
Private Sub Form_Load()
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
Dim role1 As Integer
Dim ok As Integer
txtSQL = "select * from user_If where Uname = '" & user_name & "'"
Set mrc = MyDB.ExecuteSQL(txtSQL, MsgText)
role1 = Trim(mrc.Fields(2)) '获取用户权限
mrc.Close
If role1 = 1 Then
userupdate.Enabled = False
backup.Enabled = False
restore.Enabled = False
stumanage.Enabled = False
teamanage.Enabled = False
coursemanage.Enabled = False
stuselectinfo.Enabled = False
stuselectcourse.Enabled = False
opesumdata.Enabled = False
End If
If role1 = 2 Then
userupdate.Enabled = False
backup.Enabled = False
restore.Enabled = False
stumanage.Enabled = False
teamanage.Enabled = False
coursemanage.Enabled = False
teasel.Enabled = False
teaselectcourse.Enabled = False
opesumdata.Enabled = False
End If
If role1 = 3 Then
userupdate.Enabled = False
End If
End Sub
Private Sub menu_help_Click()
' Shell "hh.exe" & fullpath("help.chm"), vbNormalFocus
App.HelpFile = fullpath("help.chm")
Call Htmlhelp(hWnd, App.HelpFile, HH_DISPLAY_TOPIC, ByVal "操作统计.htm")
End Sub
Private Sub meun_cou_Click()
X = Shell("calc.exe")
End Sub
Private Sub opesumdata_Click()
frmdatacount.Show
End Sub
Private Sub restore_Click()
frmbackup.Show
End Sub
Private Sub selectcou_Click()
frmcourseinfo.Show
End Sub
Private Sub selectstu_Click()
frmstudentinfo.Show
End Sub
Private Sub selecttea_Click()
frmteacherinfo.Show
End Sub
Private Sub stumodifyinfo_Click()
frmstuperupdate.Show
End Sub
Private Sub stuselectcourse_Click()
frmstuselect.Show
End Sub
Private Sub stuselinfo_Click()
frmsearch.Show
End Sub
Private Sub stuupdate_Click()
frmstudentupdate.Show
End Sub
Private Sub teamodifyinfo_Click()
frmteaperupdate.Show
End Sub
Private Sub teaselectcourse_Click()
frmteaselect.Show
End Sub
Private Sub teaselectinfo_Click()
frmtselectinfo.Show
End Sub
Private Sub teaupdate_Click()
frmteacherupdate.Show
End Sub
Private Sub Timer1_Timer()
'调用FLASH ,使用得它循环PLAYING
ShockwaveFlash1.Movie = App.Path & "\botton.swf"
ShockwaveFlash1.Playing = True
End Sub
Private Sub Toolbar1_ButtonClick(ByVal Button As MSComctlLib.Button)
Dim txtSQL As String
Dim mrc As ADODB.Recordset
Dim MsgText As String
Dim role1 As Integer
txtSQL = "select * from user_If where Uname = '" & user_name & "'"
Set mrc = MyDB.ExecuteSQL(txtSQL, MsgText)
role1 = Trim(mrc.Fields(2)) '获取用户权限
mrc.Close
If Button.Key = "backup" Then
If role1 = 0 Or role1 = 3 Then
frmbackup.Show
Else
MsgBox "你无权进行数据库备份", vbOKOnly + vbExclamation, "警告"
End If
End If
If Button.Key = "restor" Then
If role1 = 0 Or role1 = 3 Then
frmrestore.Show
Else
MsgBox "你无权进行数据库还原", vbOKOnly + vbExclamation, "警告"
End If
End If
If Button.Key = "userpwd" Then frmuserpwd.Show
If Button.Key = "zhuxiao" Then
Unload Me
frmlogin.Show
End If
If Button.Key = "exit" Then
ok = MsgBox("你真的要退出系统吗?", vbOKCancel + vbExclamation, "警告")
If ok = 1 Then End
End If
End Sub
Private Sub userpwd_Click()
frmuserpwd.Show
End Sub
Private Sub userupdate_Click()
frmuserupdate.Show
End Sub
Private Sub ussd_Click()
sdfrm.Show 1
End Sub
Private Sub zhuxiao_Click()
Unload Me
frmlogin.Show
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -