Private Sub cmdLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cmdLogin.Click g = New Global1.Global1 userid = txtUsername.Text ' Dim oAccessrights As New ICICI.AccessRights.UsersDB(userid, "M_EMPLOYEE") Dim empobj As New ICICI.Aottracker.Employee(userid, g.CONNECTION) Dim pwd As String pwd = empobj.PASSWORD 'validate entriees 'If txtUsername.Text = "" Or txtpassword.Text = "" Then 'MessageBox.Show("Please Enter your Login id and Password ", "Invalid", MessageBoxButtons.OK, MessageBoxIcon.Information) 'Exit Sub 'End If 'if admin login If empobj.EMPLOYEEID <> 0 Then If txtpassword.Text = pwd Then MessageBox.Show("Welcome: " & txtUsername.Text & " ", "Login Successful", MessageBoxButtons.OK, MessageBoxIcon.Information) 'Assing(Variables) 'NuNameTB = empobj.EMPLOYEEID Me.Close() frmmain.Show() Else : MessageBox.Show("Invalid UserId or Password", "Incorrect", MessageBoxButtons.OK, MessageBoxIcon.Error) txtUsername.Text = "" txtpassword.Text = "" txtUsername.Focus() End If Else MsgBox("Invalid Login id. Please contact the System Administrator for creation of Login") End If End Sub
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)