67 lines
2.6 KiB
VB.net
67 lines
2.6 KiB
VB.net
Imports System.Windows.Forms
|
|
|
|
Public Class usrCntlFaktAdresse
|
|
Public Property _Titel As String = "ADRESSE:"
|
|
Dim PROG As New SDL.cProgramFunctions
|
|
|
|
' Public KundenNr As Integer = -1
|
|
|
|
Private Sub usrCntlAdresse_Layout(sender As Object, e As Windows.Forms.LayoutEventArgs) Handles Me.Layout
|
|
Me.Label9.Text = Me._Titel
|
|
End Sub
|
|
Sub New()
|
|
|
|
' Dieser Aufruf ist für den Designer erforderlich.
|
|
InitializeComponent()
|
|
|
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
|
|
|
End Sub
|
|
|
|
|
|
Private Sub usrCntlAdresse_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
|
initME()
|
|
End Sub
|
|
Public Sub initME()
|
|
kdFirma.initKdBox(Me.FindForm, txtkdNr)
|
|
' MsgBox("A" & Me.Name)
|
|
' sbLand.initSearchBox(Me.FindForm, "LandKz,LandBez FROM [Länderverzeichnis für die Außenhandelsstatistik]", {"LandKz", "LandBez"}, "", "LandKz", "LandKz", "LandKz")
|
|
sbLand.initSearchBox(Me.FindForm, " [Code] ,[Description] as Land FROM tbl_DY_ZollDE_C0008_LaenderFull", {"Code", "Description"}, " (StartDate is null OR StartDate< GETDATE()) AND (EndDate is null OR EndDate> GETDATE()) ", "Code", "Code", "Code", "FMZOLL", , 400, 200)
|
|
|
|
End Sub
|
|
|
|
Private Sub kdFirma_TextChanged(sender As Object, e As EventArgs) Handles kdFirma.PropertyChanged
|
|
txtStrasse.Text = ""
|
|
sbLand.SET_VALUE("")
|
|
txtPlz.Text = ""
|
|
txtOrt.Text = ""
|
|
txtEORI.Text = ""
|
|
txtAnsprechpartner.Text = ""
|
|
|
|
FlatButton3.Enabled = (kdFirma.KdNr_value > 0)
|
|
FlatButton3.Image = IIf(kdFirma.KdNr > 0, My.Resources.person1, My.Resources.personInaktiv)
|
|
If kdFirma.KdNr_value > 0 Then
|
|
If kdFirma.KdData_ADRESSEN IsNot Nothing Then
|
|
txtStrasse.Text = If(kdFirma.KdData_ADRESSEN.Straße, "")
|
|
sbLand.SET_VALUE(cProgramFunctions.getISO2Land(If(kdFirma.KdData_ADRESSEN.LandKz, "")))
|
|
|
|
txtPlz.Text = If(kdFirma.KdData_ADRESSEN.PLZ, "")
|
|
txtOrt.Text = If(kdFirma.KdData_ADRESSEN.Ort, "")
|
|
'txtAnsprechpartner.Text = ""
|
|
End If
|
|
If kdFirma.KdData_KUNDE IsNot Nothing Then
|
|
txtEORI.Text = If(kdFirma.KdData_KUNDE.EORITIN, "")
|
|
End If
|
|
End If
|
|
End Sub
|
|
|
|
Private Sub FlatButton3_Click(sender As Object, e As EventArgs) Handles FlatButton3.Click
|
|
If kdFirma.KdNr > 0 Then
|
|
Me.Cursor = Cursors.WaitCursor
|
|
PROG.showKd(kdFirma.KdNr)
|
|
Me.Cursor = Cursors.Default
|
|
End If
|
|
End Sub
|
|
End Class
|