Private Sub btnEnter_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnEnter.Click
Dim menu As New frmATMMenu
For i As Integer = 0 To objDS.Tables(0).Rows.Count - 1 ' loops through the PINs in the table
If txtPIN.Text = DirectCast(objDS.Tables(0).Rows(i)("PIN"), System.Int32) Then
Me.Hide()
menu.Show()
ElseIf txtPIN.Text <> DirectCast(objDS.Tables(0).Rows(i)("PIN"), System.Int32) Then
MessageBox.Show("Wrong PIN entered. Please try again.", "Wrong PIN", MessageBoxButtons.OK, MessageBoxIcon.Hand)
End If
Next
End Sub
*edit: Modified code tags for proper display. Thanks for using tags.
This post has been edited by Martyr2: 17 March 2008 - 02:25 PM

New Topic/Question
Reply




MultiQuote





|