Imports IntraSell_DLL

Public Class KundenPreiseForm

    Private Sub Form_Verlassen() Handles MyBase.Verlassen
        Me.Close()
    End Sub

    Private Sub KundenPreiseForm_Load(sender As Object, e As EventArgs) Handles MyBase.Load
        Try
            ds = KundenPreise1.DsPreise
            ParentBindingNavigator.BindingSource = KundenPreise1.GrartikelvkpreisperselectionBindingSource
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub

    Private Sub AdressenControl1_IDNRChanged(IDNR As Integer) Handles AdressenControl1.IDNRChanged
        Try
            KundenPreise1.KundNr = IDNR
            KundenPreise1.Lade()
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub

    Private Sub ArtikelControl1_ArtNrChanged(ArtNr As Integer) Handles ArtikelControl1.ArtNrChanged
        Try
            WriteLog("Filter ArtNr " & ArtNr)
            KundenPreise1.ArtNr = ArtNr
            KundenPreise1.Lade(ArtNr)
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub

    Private Sub BindingNavigatorSaveItem_Click(sender As Object, e As System.EventArgs) Handles MyBase.Save
        Try
            KundenPreise1.Save()
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub

    Public Sub Lade(IDNR As Integer)
        Try
            AdressenControl1.IDNR = IDNR
            KundenPreise1.Lade()
        Catch ex As Exception
            HandleAppError(ex)
        End Try
    End Sub


End Class