8
Visual BASIC .NET 2012 PART 26-login type 2using binding source count Dr. GIRIJA NARASIMHAN 1 This slides are available http://slideshare.net /nbgirija

Part 26 login type2 using binding source count

Embed Size (px)

Citation preview

Page 1: Part 26 login type2 using binding source count

1

Visual BASIC .NET 2012

PART 26-login type 2using binding source count

Dr. GIRIJA NARASIMHAN

This slides are available http://slideshare.net /nbgirija

Page 2: Part 26 login type2 using binding source count

2Dr. GIRIJA NARASIMHAN

This tutorial only for beginners , those who don’t have any knowledge about any programming language skill and application design.

Page 3: Part 26 login type2 using binding source count

Dr.GIRIJA NARASIMHAN 3

Public Class Form1

Private Sub Login1BindingNavigatorSaveItem_Click(sender As Object, e As EventArgs) Handles Login1BindingNavigatorSaveItem.Click Me.Validate() Me.Login1BindingSource.EndEdit() Me.TableAdapterManager.UpdateAll(Me.Database1DataSet)

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 SubEnd Class

Page 4: Part 26 login type2 using binding source count

Dr.GIRIJA NARASIMHAN 4

Page 5: Part 26 login type2 using binding source count

Dr.GIRIJA NARASIMHAN 5

Page 6: Part 26 login type2 using binding source count

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 SubEnd class

Page 7: Part 26 login type2 using binding source count

Dr.GIRIJA NARASIMHAN 7

Page 8: Part 26 login type2 using binding source count

Dr.GIRIJA NARASIMHAN 8