Public Class LogInForm

    Private Sub cmdLogIn_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogIn.Click
        Dim LogInTableApt As New CSE_DEPTDataSetTableAdapters.LogInTableAdapter
        Dim selForm As New SelectionForm

        LogInTableApt.ClearBeforeFill = True
        LogInTableApt.FillByUserNamePassWord(CSE_DEPTDataSet.LogIn, txtUserName.Text, txtPassWord.Text)
        If CSE_DEPTDataSet.LogIn.Count = 0 Then
            MessageBox.Show("No matched username/password found!")
            txtUserName.Focus()
            Exit Sub
        End If
        selForm.Show()
        Me.Hide()
    End Sub

    Private Sub cmdCancel_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdCancel.Click
        Me.Close()
    End Sub
End Class
