frmdelrecruit.vb

来自「通用学籍管理软件 vb开发access数据库的实例」· VB 代码 · 共 23 行

VB
23
字号
Public Class FrmDelRecruit
    Dim RowIndex As Integer
    Private Sub FrmDelRecruit_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        DGVRecruit.DataSource = DBRecruit.LoadRecruit()
    End Sub

    Private Sub BtnExit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnExit.Click
        Me.Close()
    End Sub

    Private Sub BtnDel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnDel.Click
        If User.Mod1 = "可读" Then
            MsgBox("您无权写入记录!", MsgBoxStyle.Exclamation, "信息框")
            Exit Sub
        End If
        DBRecruit.DelRecruit(DGVRecruit.Rows(RowIndex).Cells(0).Value)
        DGVRecruit.DataSource = DBRecruit.LoadRecruit()
    End Sub

    Private Sub DGVRecruit_CellContentClick(ByVal sender As System.Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGVRecruit.CellContentClick
        RowIndex = e.RowIndex
    End Sub
End Class

⌨️ 快捷键说明

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