?? frmdelstuent_name.vb
字號:
?Public Class FrmDelStuent_Name
Private Sub FrmDelStuent_Name_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
DGVResult.DataSource = DBStudent.LoadStudent("Name", Me.TxtName.Text, "")
End Sub
Private Sub DGVResult_CellContentDoubleClick(ByVal sender As Object, ByVal e As System.Windows.Forms.DataGridViewCellEventArgs) Handles DGVResult.CellContentDoubleClick
If User.Mod2 = "可讀" Then
MsgBox("您無權寫入記錄!", MsgBoxStyle.Exclamation, "信息框")
Exit Sub
End If
Dim DR As DialogResult
DR = MsgBox("請確認是否刪除 " & DGVResult.Rows(e.RowIndex).Cells(1).Value & " 這條記錄", MsgBoxStyle.YesNo, "信息框")
If DR = Windows.Forms.DialogResult.Yes Then
DBStudent.DelStudent(DGVResult.Rows(e.RowIndex).Cells(0).Value)
Else
Exit Sub
End If
DGVResult.DataSource = DBStudent.LoadStudent("Name", Me.TxtName.Text, "")
End Sub
Private Sub BtnOK_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles BtnOK.Click
DGVResult.DataSource = DBStudent.LoadStudent("Name", Me.TxtName.Text, "")
End Sub
End Class
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -