104 lines
5.3 KiB
VB.net
104 lines
5.3 KiB
VB.net
Public Class usrcntlVerbundenheit
|
|
Implements FormualrInterface
|
|
|
|
Public Event CHANGED(name, value)
|
|
Public Event KDNR_CHANGED(kdnr)
|
|
Public Event DELETE(c As Control)
|
|
Public Event MOVE_UP(c As Control)
|
|
Public Event MOVE_DOWN(c As Control)
|
|
|
|
Public KdNR As Integer = -1
|
|
Public Sub ChangeKDNr(kdnr As Integer) _
|
|
Implements FormualrInterface.ChangeKDNr
|
|
'initKdNR(kdnr)
|
|
txtFirma.KdNr = kdnr
|
|
End Sub
|
|
|
|
Sub initControlsHandler()
|
|
For Each c In Me.Controls
|
|
Select Case c.GetType.ToString
|
|
Case GetType(VERAG_PROG_ALLGEMEIN.MyTextBox).ToString
|
|
AddHandler DirectCast(c, VERAG_PROG_ALLGEMEIN.MyTextBox).Leave, Sub()
|
|
RaiseEvent CHANGED(c.name, c.text)
|
|
End Sub
|
|
Case GetType(VERAG_PROG_ALLGEMEIN.MyComboBox).ToString
|
|
AddHandler DirectCast(c, VERAG_PROG_ALLGEMEIN.MyComboBox).SelectedIndexChanged, Sub()
|
|
RaiseEvent CHANGED(c.name, c._value)
|
|
End Sub
|
|
Case GetType(TextBox).ToString
|
|
AddHandler DirectCast(c, TextBox).Leave, Sub()
|
|
RaiseEvent CHANGED(c.name, c.text)
|
|
End Sub
|
|
End Select
|
|
Next
|
|
End Sub
|
|
|
|
Private Sub btnDel_Click(sender As Object, e As EventArgs) Handles btnDel.Click
|
|
RaiseEvent DELETE(Me)
|
|
End Sub
|
|
|
|
Private Sub btnup_Click(sender As Object, e As EventArgs) Handles btnUp.Click
|
|
RaiseEvent MOVE_UP(Me)
|
|
End Sub
|
|
|
|
Private Sub btnDown_Click(sender As Object, e As EventArgs) Handles btnDown.Click
|
|
RaiseEvent MOVE_DOWN(Me)
|
|
End Sub
|
|
|
|
Private Sub Button1_Click(sender As Object, e As EventArgs)
|
|
|
|
End Sub
|
|
|
|
Private Sub usrcntlVollmacht_AT_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
|
|
txtFirma.initKdBox(Me.FindForm)
|
|
AddHandler txtFirma.PropertyChanged, Sub()
|
|
Me.KdNR = txtFirma.KdNr_value
|
|
If txtFirma.KdNr_value > 0 Then
|
|
If txtFirma.KdData_ADRESSEN IsNot Nothing Then
|
|
Dim ADRESSE = txtFirma.KdData_ADRESSEN
|
|
Dim KUNDE = txtFirma.KdData_KUNDE
|
|
txtFirma.Text = If(ADRESSE.Name_1, ADRESSE.Ordnungsbegriff)
|
|
' txtFirma2.Text = If(ADRESSE.Name_2, "")
|
|
txtAdresse1.Text = If(ADRESSE.Straße, "")
|
|
txtAdresse2.Text = (If(ADRESSE.LandKz, "") & " " & If(ADRESSE.PLZ, "") & " " & If(ADRESSE.Ort, "")).ToString.Trim
|
|
If If(ADRESSE.UstIdKz, "") <> "" And If(ADRESSE.UstIdNr, "") <> "" Then
|
|
txtUid.Text = ADRESSE.UstIdKz & ADRESSE.UstIdNr
|
|
End If
|
|
txtEori.Text = If(KUNDE.EORITIN, txtEori.Text)
|
|
Dim sql As New VERAG_PROG_ALLGEMEIN.SQL
|
|
' txtAdresse3.Text = If(ADRESSE.LandKz IsNot Nothing, sql.getValueTxtBySql("ThenSELECT isnull([Land],'') FROM [Währungstabelle] WHERE [LandKz]='" & ADRESSE.LandKz & "'", "FMZOLL"), "")
|
|
End If
|
|
End If
|
|
RaiseEvent KDNR_CHANGED(KdNR)
|
|
End Sub
|
|
initControlsHandler()
|
|
cboSprache.Items.Clear()
|
|
cboSprache.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Deutsch", "DE"))
|
|
cboSprache.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Englisch", "EN"))
|
|
cboSprache.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Französisch", "FR"))
|
|
|
|
If KdNR > 0 Then txtFirma.KdNr = KdNR
|
|
|
|
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG Spedition AG", "AG"))
|
|
cboFirma.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("VERAG Customs Service GmbH", "CS"))
|
|
cboFirma.changeItem("AG")
|
|
' cboFiliale.fillWithSQL(" SELECT FilialenNr, Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", , "FMZOLL", True)
|
|
|
|
' txtBearbeiter.Text = If(VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME, "")
|
|
|
|
|
|
|
|
End Sub
|
|
|
|
Private Sub pic_Click(sender As Object, e As EventArgs) Handles pic.Click
|
|
FormularManagerNEU.genPDF(Me, True)
|
|
End Sub
|
|
|
|
|
|
|
|
Private Sub PictureBox1_Click(sender As Object, e As EventArgs)
|
|
FormularManagerNEU.genPDF(Me, , , , True)
|
|
End Sub
|
|
End Class
|