Dim intNumRows1 As Integer
Dim intNumRows2 As Integer
Dim intNumRows3 As Integer
strSQL = "SELECT COUNT(*) FROM member WHERE Username = '" & Me.txtusername.Text & "' AND Password = '" & Me.txtpassword.Text & "' "
objCmd = New MySqlCommand(strSQL, objConn)
intNumRows1 = objCmd.ExecuteScalar()
strNUM = "SELECT COUNT(*) FROM book WHERE book_no = '" & Me.lblnum.Text & "'"
objCmd = New MySqlCommand(strNUM, objConn)
intNumRows2 = objCmd.ExecuteScalar()
strDATE = "SELECT COUNT(*) FROM book WHERE book_date = '" & DateTime.Today & "'"
objCmd = New MySqlCommand(strDATE, objConn)
intNumRows3 = objCmd.ExecuteScalar()
If intNumRows1 > 0 Then
If intNumRows2 > 0 Then
If intNumRows3 > 0 Then
Me.Hide()
Else
MessageBox.Show("You Not Booked This Computer")
End If
Else
MessageBox.Show("Please Booking for Use")
End If
Else
MessageBox.Show("Username & Password Incorrect")
End If
objConn.Close()
objConn = Nothing
End Sub