Professional Documents
Culture Documents
Add new
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnAdd.Click
CustomersBindingSource.AddNew()
End Sub
Save
Private Sub btnSave_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnSave.Click
Try
CustomersBindingSource.EndEdit()
TableAdapterManager.UpdateAll(It4uDataSet)
MsgBox("Record Successfully saved")
Catch ex As Exception
MsgBox("Error occur, please recheck the fields and try again")
End Try
End Sub
Delete
Private Sub btnDelete_Click(ByVal sender As System.Object, ByVal e As System.EventArgs)
Handles btnDelete.Click
CustomersBindingSource.EndEdit()
TableAdapterManager.UpdateAll(It4uDataSet)
MsgBox("Record deleted")
End Sub
End Class
Exit/close
Private Sub btnClose_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs)
Handles btnClose.Click
Me.Hide()
Else
Return
End If
End Sub
Move next
Private Sub btnNext_Click(ByVal sender As
System.Object, ByVal e As System.EventArgs) Handles
btnNext.Click
Customersbindingsource.MoveNext
End Sub
Customersbindingsource.MovePrevious
End Sub