Public Class login

    Private Sub btnok_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnok.Click

       
        'If TextBox1.Text = "admin" And TextBox2.Text = "a1" Then

        '    MessageBox.Show("You log-on as administrator.")

        '    With Form1

        '        .btnopen.Show()
        '        .btnview.Show()
        '        .btnvotersid.Show()
        '        .btnAddID.Show()
        '        .btnunfnshvoter.Show()
        '        .btnviewcand.Show()
        '        .btnreset.Show()
        '        .btnuseracc.Show()


        '        .btnloin.Text = "Log-Out"

        '    End With

        '    Me.Close()


        'ElseIf TextBox1.Text = "jason" And TextBox2.Text = "062108" Then

        '    MessageBox.Show("You log-on as Programmer.")

        '    With Form1

        '        .btnopen.Show()
        '        .btnview.Show()
        '        .btnvotersid.Show()
        '        .btnAddID.Show()
        '        .btnunfnshvoter.Show()
        '        .btnviewcand.Show()
        '        .btnuseracc.Show()


        '        .btnloin.Text = "Log-Out"

        '    End With

        '    Me.Close()


        'ElseIf TextBox1.Text = "comelec" And TextBox2.Text = "ssao" Then
        '    MessageBox.Show("You log-on as Board of Election Inspector.")
        '    Me.Close()
        '    Form1.btnloin.Text = "Log-Out"
        'Else


        Dim sql As String

        sql = "select * from tbluseraccounts where userusername ='" & TextBox1.Text & "' and userpassword = '" & TextBox2.Text & "'"
        ejbfindthis(sql)
        checkresultuser()
        Me.Close()

        'End If

    End Sub

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

   
End Class