Public Class PageMember
Private Sub Form2_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DatabaseDataSet.Member' table. You can move, or remove it, as needed.
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
MemberBindingSource.AddNew()
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonADD.Click
MemberBindingSource.AddNew()
MemberBindingSource.EndEdit()
End Sub
Private Sub Button4_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCONFIRM.Click
MemberTableAdapter.Update(DatabaseDataSet.Member)
Dim result As Integer = MessageBox.Show("Continue?", "Save Successfully", MessageBoxButtons.YesNo)
If result = DialogResult.Yes Then
Else
result = DialogResult.No
Me.Hide()
PageLogin.Close()
End If
End Sub
Private Sub Button3_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDELETE.Click
MemberBindingSource.RemoveCurrent()
End Sub
Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEDIT.Click
MemberBindingSource.EndEdit()
End Sub
End ClassCode (VB.NET)
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DatabaseDataSet.Member' table. You can move, or remove it, as needed.
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
End Sub
Private Sub MemberBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MemberBindingNavigatorSaveItem.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
End Sub
Private Sub ButtonADD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonADD.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.MemberBindingSource.AddNew()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
Private Sub ButtonDELETE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDELETE.Click
Me.Validate()
Me.MemberBindingSource.RemoveCurrent()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
End Sub
Private Sub ButtonCONFIRM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCONFIRM.Click
Me.Validate()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
Private Sub ButtonEDIT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEDIT.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.MemberBindingSource.AddNew()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
End Class
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
'TODO: This line of code loads data into the 'DatabaseDataSet.Member' table. You can move, or remove it, as needed.
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
End Sub
Private Sub MemberBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MemberBindingNavigatorSaveItem.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
End Sub
Private Sub ButtonADD_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonADD.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.MemberBindingSource.AddNew()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
Private Sub ButtonDELETE_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonDELETE.Click
Me.Validate()
Me.MemberBindingSource.RemoveCurrent()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
Me.MemberTableAdapter.Fill(Me.DatabaseDataSet.Member)
End Sub
Private Sub ButtonCONFIRM_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonCONFIRM.Click
Me.Validate()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
Private Sub ButtonEDIT_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ButtonEDIT.Click
Me.Validate()
Me.MemberBindingSource.EndEdit()
Me.MemberBindingSource.AddNew()
Me.TableAdapterManager.UpdateAll(Me.DatabaseDataSet)
End Sub
End Class