⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.vb

📁 通用学籍管理软件 vb开发access数据库的实例
💻 VB
字号:
Public Class FrmMain



    Private Sub MenuAddUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuAddUser.Click
        If User.UserName <> "Admin" Then
            MsgBox("只有超级管理员才有此权限!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmAddUser()
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuEditUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuEditUser.Click
        If User.UserName <> "Admin" Then
            MsgBox("只有超级管理员才有此权限!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmEditUser
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuDelUser_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuDelUser.Click
        If User.UserName <> "Admin" Then
            MsgBox("只有超级管理员才有此权限!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmDelUser()
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuModifyPWD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuModifyPWD.Click
        Dim FrmObj As New FrmModPwd()
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuLock_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuLock.Click
        Me.Hide()
        Dim FrmObj As New FrmLockScreen()

        FrmObj.Show()
    End Sub

    Private Sub MenuLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuLogin.Click
        Me.Hide()
        Dim FrmObj As New FrmLogin
        ' FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub 新增班级ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 新增班级ToolStripMenuItem.Click
      
        If User.Mod1 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If

        Dim FrmObj As New FrmAddClass
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub 退出ToolStripMenuItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles 退出ToolStripMenuItem.Click
        End
    End Sub

    Private Sub MenuAddRecruit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuAddRecruit.Click
        If User.Mod1 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmAddRecruit()
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuDelClass_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuDelClass.Click
        If User.Mod1 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmDelClass()
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuDelRecruit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuDelRecruit.Click
        If User.Mod1 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmDelRecruit()
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub


    Private Sub MenuAddStuent_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuAddStuent.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmAddStudent
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuCheckStuent_Class_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuCheckStuent_Class.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmCheckStuent_Class
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuCheckStuent_Name_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuCheckStuent_Name.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmCheckStuent_Name
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuCheckStuent_Recruit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuCheckStuent_Recruit.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmCheckStuent_Recruit
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuCheckStuent_All_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuCheckStuent_All.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmCheckStuent_All
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuFindStuent_Name_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuFindStuent_Name.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmFindStuent_Name
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuFindStuent_Graduate_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuFindStuent_Graduate.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmFindStuent_Graduate
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuFindStuent_Family_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuFindStuent_Family.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmFindStuent_Family
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuFindStuent_Fee_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuFindStuent_Fee.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmFindStuent_Fee
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuDelStuent_Class_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuDelStuent_Class.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmDelStuent_Class
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuDelStuent_Recruit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuDelStuent_Recruit.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmDelStuent_Recruit
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuDelStuent_Name_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuDelStuent_Name.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmDelStuent_Name
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuEditStuent_Class_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuEditStuent_Class.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmEditStudent_Class
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuEditStuent_Name_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuEditStuent_Name.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmEditStudent_Name
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuEditStuent_Recruit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuEditStuent_Recruit.Click
        If User.Mod2 = "无权限" Then
            MsgBox("您无权访问此模块!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        Dim FrmObj As New FrmEditStudent_Recruit
        FrmObj.MdiParent = Me
        FrmObj.Show()
    End Sub

    Private Sub MenuLogoff_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MenuLogoff.Click
        Me.用户管理UToolStripMenuItem.Enabled = False
        Me.MenuAddClass.Enabled = False
        Me.学籍管理BToolStripMenuItem.Enabled = False
        Me.MenuLock.Enabled = False
    End Sub
End Class

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -