Admin Page
Admin Page
Imports System.Data.SqlClient
Try
Using conn As New SqlConnection(connectionString)
Dim query As String = "SELECT * FROM Booking"
Dim adapter As New SqlDataAdapter(query conn)
Dim table As New DataTable()
adapter.Fill(table)
dgvbooking.DataSource = table
End Using
Catch ex As Exception
MessageBox.Show("Error: " & ex.Message)
End Try
End Sub
1
Private Sub dgvbooking_CellContentClick(sender As Object e As
DataGridViewCellEventArgs) Handles dgvbooking.CellContentClick
End Sub
Private Sub DeleteSelectedBooking()
If dgvbooking.SelectedRows.Count > 0 Then
Dim autoId As Integer = dgvbooking.SelectedRows(0).Cells("autoId").Value