Public Class Form1

    Private Sub ProductSubcategoryBindingNavigatorSaveItem_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles ProductSubcategoryBindingNavigatorSaveItem.Click
        Try
            Me.Validate()
            Me.ProductSubcategoryBindingSource.EndEdit()
            Me.ProductSubcategoryTableAdapter.Update(Me.DatasetMaestroDetalle.ProductSubcategory)
        Catch ex As Exception
            MessageBox.Show("Se produjo un error al grabar el item: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try
        

    End Sub

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Try
            Me.ProductTableAdapter.Fill(Me.DatasetMaestroDetalle.Product)
            Me.ProductSubcategoryTableAdapter.Fill(Me.DatasetMaestroDetalle.ProductSubcategory)
        Catch ex As Exception
            MessageBox.Show("Se produjo un error al cargar el formulario: " + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Error)
        End Try    

    End Sub
End Class
