BATTLEFIELD ORM: TIPS, TACTICS AND STRATEGIES FOR CONQUERING YOUR DATABASE
Part 26 login type2 using binding source count
1. Visual BASIC .NET 2012
PART 26-login type 2using binding source count
Dr. GIRIJA NARASIMHAN 1
This slides are available http://slideshare.net /nbgirija
2. Dr. GIRIJA NARASIMHAN 2
This tutorial only for beginners , those
who don’t have any knowledge about
any programming language skill and
application design.
3. Dr.GIRIJA NARASIMHAN 3
End Sub
Private Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Database1DataSet.login1' table. You can move,
or remove it, as needed.
Me.Login1TableAdapter.Fill(Me.Database1DataSet.login1)
UsernameTextBox.Enabled = False
PwdTextBox.Enabled = False
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Login1BindingSource.Filter = "username= '" & TextBox1.Text & "' and pwd='" & TextBox2.Text
& "'"
If Login1BindingSource.Count = 1 Then
MessageBox.Show("login sucesssfully")
Else
MessageBox.Show("incorrect login")
End If
End Sub
End Class
6. Dr.GIRIJA NARASIMHAN 6
Public Class Form2
Private Sub LogincharBindingNavigatorSaveItem_Click(sender As Object, e As EventArgs)
Handles LogincharBindingNavigatorSaveItem.Click
Me.Validate()
Me.LogincharBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.Database1DataSet)
End Sub
Private Sub Form2_Load(sender As Object, e As EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'Database1DataSet.loginchar' table. You can
move, or remove it, as needed.
Me.LogincharTableAdapter.Fill(Me.Database1DataSet.loginchar)
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
LogincharBindingSource.Filter = "uname like'" & TextBox1.Text & "' And pwd1 like'" &
TextBox2.Text & "' "
If LogincharBindingSource.Count = 1 Then
MessageBox.Show("sucessfully login")
Else
MessageBox.Show("incorrect login")
End If
End Sub
End class