Zollartikel, EZA Import, Tariff

This commit is contained in:
2025-12-11 09:31:45 +01:00
parent 8c23aa4f8f
commit d1c23ac18c
9 changed files with 282 additions and 151 deletions

View File

@@ -38,6 +38,10 @@ Partial Class cATLAS_EZA_IMPORT
Me.cbxGezeTNR8to11 = New System.Windows.Forms.CheckBox() Me.cbxGezeTNR8to11 = New System.Windows.Forms.CheckBox()
Me.cbxVERAG_V1_TNR8to11 = New System.Windows.Forms.CheckBox() Me.cbxVERAG_V1_TNR8to11 = New System.Windows.Forms.CheckBox()
Me.Button7 = New System.Windows.Forms.Button() Me.Button7 = New System.Windows.Forms.Button()
Me.cboTnrTrg_VERAGImp = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboTnrSrc_VERAGImp = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboTnrTrg_Geze = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboTnrDrc_Geze = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.SuspendLayout() Me.SuspendLayout()
' '
'Button1 'Button1
@@ -210,12 +214,72 @@ Partial Class cATLAS_EZA_IMPORT
Me.Button7.TextAlign = System.Drawing.ContentAlignment.BottomCenter Me.Button7.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.Button7.UseVisualStyleBackColor = False Me.Button7.UseVisualStyleBackColor = False
' '
'cboTnrTrg_VERAGImp
'
Me.cboTnrTrg_VERAGImp._allowedValuesFreiText = Nothing
Me.cboTnrTrg_VERAGImp._allowFreiText = False
Me.cboTnrTrg_VERAGImp._value = ""
Me.cboTnrTrg_VERAGImp.FormattingEnabled = True
Me.cboTnrTrg_VERAGImp.Items.AddRange(New Object() {"TR", "EU", "DE"})
Me.cboTnrTrg_VERAGImp.Location = New System.Drawing.Point(92, 164)
Me.cboTnrTrg_VERAGImp.Name = "cboTnrTrg_VERAGImp"
Me.cboTnrTrg_VERAGImp.Size = New System.Drawing.Size(41, 21)
Me.cboTnrTrg_VERAGImp.TabIndex = 31
Me.cboTnrTrg_VERAGImp.Tag = ""
Me.cboTnrTrg_VERAGImp.Text = "DE"
'
'cboTnrSrc_VERAGImp
'
Me.cboTnrSrc_VERAGImp._allowedValuesFreiText = Nothing
Me.cboTnrSrc_VERAGImp._allowFreiText = False
Me.cboTnrSrc_VERAGImp._value = ""
Me.cboTnrSrc_VERAGImp.FormattingEnabled = True
Me.cboTnrSrc_VERAGImp.Items.AddRange(New Object() {"TR", "EU", "DE"})
Me.cboTnrSrc_VERAGImp.Location = New System.Drawing.Point(49, 164)
Me.cboTnrSrc_VERAGImp.Name = "cboTnrSrc_VERAGImp"
Me.cboTnrSrc_VERAGImp.Size = New System.Drawing.Size(41, 21)
Me.cboTnrSrc_VERAGImp.TabIndex = 30
Me.cboTnrSrc_VERAGImp.Tag = ""
Me.cboTnrSrc_VERAGImp.Text = "TR"
'
'cboTnrTrg_Geze
'
Me.cboTnrTrg_Geze._allowedValuesFreiText = Nothing
Me.cboTnrTrg_Geze._allowFreiText = False
Me.cboTnrTrg_Geze._value = ""
Me.cboTnrTrg_Geze.FormattingEnabled = True
Me.cboTnrTrg_Geze.Items.AddRange(New Object() {"TR", "EU", "DE"})
Me.cboTnrTrg_Geze.Location = New System.Drawing.Point(92, 341)
Me.cboTnrTrg_Geze.Name = "cboTnrTrg_Geze"
Me.cboTnrTrg_Geze.Size = New System.Drawing.Size(41, 21)
Me.cboTnrTrg_Geze.TabIndex = 33
Me.cboTnrTrg_Geze.Tag = ""
Me.cboTnrTrg_Geze.Text = "DE"
'
'cboTnrDrc_Geze
'
Me.cboTnrDrc_Geze._allowedValuesFreiText = Nothing
Me.cboTnrDrc_Geze._allowFreiText = False
Me.cboTnrDrc_Geze._value = ""
Me.cboTnrDrc_Geze.FormattingEnabled = True
Me.cboTnrDrc_Geze.Items.AddRange(New Object() {"TR", "EU", "DE"})
Me.cboTnrDrc_Geze.Location = New System.Drawing.Point(49, 341)
Me.cboTnrDrc_Geze.Name = "cboTnrDrc_Geze"
Me.cboTnrDrc_Geze.Size = New System.Drawing.Size(41, 21)
Me.cboTnrDrc_Geze.TabIndex = 32
Me.cboTnrDrc_Geze.Tag = ""
Me.cboTnrDrc_Geze.Text = "TR"
'
'cATLAS_EZA_IMPORT 'cATLAS_EZA_IMPORT
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(563, 355) Me.ClientSize = New System.Drawing.Size(563, 371)
Me.Controls.Add(Me.cboTnrTrg_Geze)
Me.Controls.Add(Me.cboTnrDrc_Geze)
Me.Controls.Add(Me.cboTnrTrg_VERAGImp)
Me.Controls.Add(Me.cboTnrSrc_VERAGImp)
Me.Controls.Add(Me.Button7) Me.Controls.Add(Me.Button7)
Me.Controls.Add(Me.cbxVERAG_V1_TNR8to11) Me.Controls.Add(Me.cbxVERAG_V1_TNR8to11)
Me.Controls.Add(Me.cbxGezeTNR8to11) Me.Controls.Add(Me.cbxGezeTNR8to11)
@@ -255,4 +319,8 @@ Partial Class cATLAS_EZA_IMPORT
Friend WithEvents cbxGezeTNR8to11 As CheckBox Friend WithEvents cbxGezeTNR8to11 As CheckBox
Friend WithEvents cbxVERAG_V1_TNR8to11 As CheckBox Friend WithEvents cbxVERAG_V1_TNR8to11 As CheckBox
Friend WithEvents Button7 As Button Friend WithEvents Button7 As Button
Friend WithEvents cboTnrTrg_VERAGImp As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cboTnrSrc_VERAGImp As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cboTnrTrg_Geze As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cboTnrDrc_Geze As VERAG_PROG_ALLGEMEIN.MyComboBox
End Class End Class

View File

@@ -25,8 +25,9 @@ Public Class cATLAS_EZA_IMPORT
End Sub End Sub
Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click Private Sub Button6_Click(sender As Object, e As EventArgs) Handles Button6.Click
Me.Cursor = Cursors.WaitCursor
importExcel_DynamicAutomotive() importExcel_DynamicAutomotive()
Me.Cursor = Cursors.Default
End Sub End Sub
@@ -80,17 +81,20 @@ Public Class cATLAS_EZA_IMPORT
End Function End Function
Private Function importExcel_DynamicAutomotive() As Boolean Private Function importExcel_DynamicAutomotive() As Boolean
' --- Dateiauswahl wie gehabt ---
Dim f As New frmImportFromAVISOAnhaenge(AVISO, SENDUNG)
f.ShowDialog(Me)
If f.DialogResult <> DialogResult.OK Then Return False
If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count = 0 Then Return False
If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count > 1 Then MsgBox("Nur 1 File auswählen!") : Return False
Dim fd As New OpenFileDialog Dim filepath = f.LIST_FILES(0)
fd.Filter = "Excel Dateien|*.xls;*.xlsx" If Not filepath.ToLower.EndsWith(".xls") And Not filepath.ToLower.EndsWith(".xlsx") Then
Dim result As DialogResult = fd.ShowDialog()
If Not fd.FileName.EndsWith(".xls") And Not fd.FileName.EndsWith(".xlsx") Then
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
Return False Return False
End If End If
If result = System.Windows.Forms.DialogResult.OK Then If True Then
Me.Cursor = Cursors.WaitCursor Me.Cursor = Cursors.WaitCursor
@@ -106,7 +110,7 @@ Public Class cATLAS_EZA_IMPORT
.DisplayAlerts = False .DisplayAlerts = False
Datei = .Workbooks.Open(fd.FileName) Datei = .Workbooks.Open(filepath)
Blatt = Datei.Worksheets(1) Blatt = Datei.Worksheets(1)
Datei.Activate() Datei.Activate()
@@ -225,17 +229,20 @@ Public Class cATLAS_EZA_IMPORT
Private Function importExcel_Geze(OP_addKN8, OP_translate, OP_TNR8to11) As Boolean Private Function importExcel_Geze(OP_addKN8, OP_translate, OP_TNR8to11) As Boolean
' --- Dateiauswahl wie gehabt ---
Dim f As New frmImportFromAVISOAnhaenge(AVISO, SENDUNG)
f.ShowDialog(Me)
If f.DialogResult <> DialogResult.OK Then Return False
If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count = 0 Then Return False
If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count > 1 Then MsgBox("Nur 1 File auswählen!") : Return False
Dim fd As New OpenFileDialog Dim filepath = f.LIST_FILES(0)
fd.Filter = "Excel Dateien|*.xls;*.xlsx" If Not filepath.ToLower.EndsWith(".xls") And Not filepath.ToLower.EndsWith(".xlsx") Then
Dim result As DialogResult = fd.ShowDialog()
If Not fd.FileName.ToLower.EndsWith(".xls") And Not fd.FileName.ToLower.EndsWith(".xlsx") Then
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
Return False Return False
End If End If
If result = System.Windows.Forms.DialogResult.OK Then If True Then
Me.Cursor = Cursors.WaitCursor Me.Cursor = Cursors.WaitCursor
@@ -251,7 +258,7 @@ Public Class cATLAS_EZA_IMPORT
.DisplayAlerts = False .DisplayAlerts = False
Datei = .Workbooks.Open(fd.FileName) Datei = .Workbooks.Open(filepath)
Blatt = Datei.Worksheets(1) Blatt = Datei.Worksheets(1)
Datei.Activate() Datei.Activate()
@@ -316,11 +323,14 @@ Public Class cATLAS_EZA_IMPORT
For i As Integer = 1 To endRows - startRows + 1 Step 1 For i As Integer = 1 To endRows - startRows + 1 Step 1
If myArray(i, 1) IsNot Nothing AndAlso myArray(i, 1).ToString() <> "" Then If myArray(i, 1) IsNot Nothing AndAlso myArray(i, 1).ToString() <> "" Then
Dim POSITION As New DAKOSY_Worker.cDakosy_EZA_Warenposition Dim POSITION As New DAKOSY_Worker.cDakosy_EZA_Warenposition
POSITION.ezaWP_WarennummerEZT = myArray(i, 9).ToString() If cnt = 0 Then
POSITION.ezaWP_PackstueckAnzahl = "0" 'myArray(i, 6).ToString() POSITION.ezaWP_PackstueckAnzahl = SENDUNG.tblSnd_Colli
POSITION.ezaWP_PackstueckArt = "PK" POSITION.ezaWP_PackstueckArt = "PK"
End If
POSITION.ezaWP_WarennummerEZT = myArray(i, 9).ToString()
'POSITION.ezaWP_PackstueckAnzahl = myArray(i, 6).ToString()
POSITION.ezaWP_PackstueckArt = "" '"PK"
POSITION.ezaWP_Artikelpreis = CDbl(myArray(i, 7).ToString()).ToString("N2") POSITION.ezaWP_Artikelpreis = CDbl(myArray(i, 7).ToString()).ToString("N2")
POSITION.ezaWP_ArtikelpreisWaehrung = myArray(i, 8).ToString() POSITION.ezaWP_ArtikelpreisWaehrung = myArray(i, 8).ToString()
POSITION.ezaWP_Warenbezeichnung = myArray(i, 4).ToString() POSITION.ezaWP_Warenbezeichnung = myArray(i, 4).ToString()
@@ -342,7 +352,8 @@ Public Class cATLAS_EZA_IMPORT
'Wenn EZT Nummer 8-stellig ist, dann auf 11-stellig erweitern 'Wenn EZT Nummer 8-stellig ist, dann auf 11-stellig erweitern
If OP_TNR8to11 Then If OP_TNR8to11 Then
If If(POSITION.ezaWP_WarennummerEZT, "") <> "" AndAlso (POSITION.ezaWP_WarennummerEZT.ToString.Length >= 8 And POSITION.ezaWP_WarennummerEZT.ToString.Length < 11) Then If If(POSITION.ezaWP_WarennummerEZT, "") <> "" AndAlso (POSITION.ezaWP_WarennummerEZT.ToString.Length >= 8 And POSITION.ezaWP_WarennummerEZT.ToString.Length < 11) Then
Dim COMM_TARIFF = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetFullTariff_Only1Result(POSITION.ezaWP_WarennummerEZT, "TR") Dim COMM_TARIFF = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetFullTariff_Only1Result(POSITION.ezaWP_WarennummerEZT, "TR", cboTnrDrc_Geze._value, cboTnrTrg_Geze._value)
' MsgBox(COMM_TARIFF)
If COMM_TARIFF <> "" Then If COMM_TARIFF <> "" Then
POSITION.ezaWP_WarennummerEZT = COMM_TARIFF POSITION.ezaWP_WarennummerEZT = COMM_TARIFF
End If End If
@@ -418,12 +429,12 @@ Public Class cATLAS_EZA_IMPORT
End Function End Function
Private Function importExcel_MEYLE() As Boolean Private Function importExcel_MEYLE() As Boolean
' --- Dateiauswahl wie gehabt ---
Dim f As New frmImportFromAVISOAnhaenge(AVISO, SENDUNG) Dim f As New frmImportFromAVISOAnhaenge(AVISO, SENDUNG)
f.ShowDialog(Me) f.ShowDialog(Me)
Dim LIST_FILES = f.LIST_FILES If f.DialogResult <> DialogResult.OK Then Return False
If Not f.DialogResult = DialogResult.OK Then Return False If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count = 0 Then Return False
If LIST_FILES.Count = 0 Then Return False If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count > 1 Then MsgBox("Nur 1 File auswählen!") : Return False
@@ -438,7 +449,7 @@ Public Class cATLAS_EZA_IMPORT
Me.Cursor = Cursors.WaitCursor Me.Cursor = Cursors.WaitCursor
For Each filePath As String In LIST_FILES For Each filePath As String In f.LIST_FILES
If Not filePath.ToLower.EndsWith(".xls") AndAlso Not filePath.ToLower.EndsWith(".xlsx") Then If Not filePath.ToLower.EndsWith(".xls") AndAlso Not filePath.ToLower.EndsWith(".xlsx") Then
' Ungültige Datei überspringen oder abbrechen ' Ungültige Datei überspringen oder abbrechen
Continue For Continue For
@@ -701,27 +712,33 @@ Public Class cATLAS_EZA_IMPORT
Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click Private Sub Button3_Click(sender As Object, e As EventArgs) Handles Button3.Click
Me.Cursor = Cursors.WaitCursor
importExcel_Geze(cbxGezeKN8.Checked, cbxGezeTranslate.Checked, cbxGezeTNR8to11.Checked) importExcel_Geze(cbxGezeKN8.Checked, cbxGezeTranslate.Checked, cbxGezeTNR8to11.Checked)
Me.Cursor = Cursors.Default
End Sub End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Me.Cursor = Cursors.WaitCursor
importExcel_MEYLE() importExcel_MEYLE()
Me.Cursor = Cursors.Default
End Sub End Sub
Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click Private Sub Button5_Click(sender As Object, e As EventArgs) Handles Button5.Click
Me.Cursor = Cursors.WaitCursor
importExcel_Fressnapf() importExcel_Fressnapf()
Me.Cursor = Cursors.Default
End Sub End Sub
Private Function importExcel_Fressnapf() As Boolean Private Function importExcel_Fressnapf() As Boolean
' --- Dateiauswahl wie gehabt ---
Dim f As New frmImportFromAVISOAnhaenge(AVISO, SENDUNG) Dim f As New frmImportFromAVISOAnhaenge(AVISO, SENDUNG)
f.ShowDialog(Me) f.ShowDialog(Me)
Dim LIST_FILES = f.LIST_FILES If f.DialogResult <> DialogResult.OK Then Return False
If Not f.DialogResult = DialogResult.OK Then Return False If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count = 0 Then Return False
If LIST_FILES.Count = 0 Then Return False If f.LIST_FILES Is Nothing OrElse f.LIST_FILES.Count > 1 Then MsgBox("Nur 1 File auswählen!") : Return False
@@ -736,7 +753,7 @@ Public Class cATLAS_EZA_IMPORT
Me.Cursor = Cursors.WaitCursor Me.Cursor = Cursors.WaitCursor
For Each filePath As String In LIST_FILES For Each filePath As String In f.LIST_FILES
If Not (filePath.ToLower().EndsWith(".xls") OrElse filePath.ToLower().EndsWith(".xlsx")) Then If Not (filePath.ToLower().EndsWith(".xls") OrElse filePath.ToLower().EndsWith(".xlsx")) Then
Continue For Continue For
End If End If
@@ -1011,8 +1028,9 @@ Public Class cATLAS_EZA_IMPORT
End Function End Function
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Me.Cursor = Cursors.WaitCursor
ImportExcel_CustomsTemplate_V1(cbxVERAG_V1_Kn8.Checked, cbxVERAG_V1_translate.Checked, cbxVERAG_V1_TNR8to11.Checked) ImportExcel_CustomsTemplate_V1(cbxVERAG_V1_Kn8.Checked, cbxVERAG_V1_translate.Checked, cbxVERAG_V1_TNR8to11.Checked)
Me.Cursor = Cursors.Default
'ImportExcel_CustomsTemplate_V1_1(cbxVERAG_V1_Kn8.Checked, cbxVERAG_V1_translate.Checked, cbxVERAG_V1_TNR8to11.Checked) 'ImportExcel_CustomsTemplate_V1_1(cbxVERAG_V1_Kn8.Checked, cbxVERAG_V1_translate.Checked, cbxVERAG_V1_TNR8to11.Checked)
End Sub End Sub
@@ -1310,7 +1328,7 @@ Public Class cATLAS_EZA_IMPORT
If tariffCache.ContainsKey(hsTmp) Then If tariffCache.ContainsKey(hsTmp) Then
pos.ezaWP_WarennummerEZT = tariffCache(hsTmp) pos.ezaWP_WarennummerEZT = tariffCache(hsTmp)
Else Else
pos.ezaWP_WarennummerEZT = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetFullTariff_Only1Result(hsTmp, "TR") pos.ezaWP_WarennummerEZT = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetFullTariff_Only1Result(hsTmp, cboTnrSrc_VERAGImp._value, cboTnrTrg_VERAGImp._value)
tariffCache(hsTmp) = pos.ezaWP_WarennummerEZT tariffCache(hsTmp) = pos.ezaWP_WarennummerEZT
End If End If
End If End If
@@ -1518,10 +1536,13 @@ Public Class cATLAS_EZA_IMPORT
Return 0 Return 0
End Function End Function
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click, Button7.Click
Try Try
' Zielpfad im Temp-Ordner festlegen ' Zielpfad im Temp-Ordner festlegen
Dim tempFile As String = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "Customs_Clearance_Template_2025V1.xlsx") Dim tempFile As String = ""
If sender Is Button7 Then : tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "Customs_Clearance_Template_2025V1.xlsx")
ElseIf sender Is Button4 Then : tempFile = System.IO.Path.Combine(System.IO.Path.GetTempPath(), "Customs_Clearance_Template_V1.1.xlsx")
End If
' Ressource (als Binärdatei eingebunden) schreiben ' Ressource (als Binärdatei eingebunden) schreiben
System.IO.File.WriteAllBytes(tempFile, My.Resources.Customs_Clearance_Template) System.IO.File.WriteAllBytes(tempFile, My.Resources.Customs_Clearance_Template)

View File

@@ -54,12 +54,6 @@ Partial Class usrCntlATLAS_EZA
Me.LadenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.LadenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.XMLExampleToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.XMLExampleToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DateiimportToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DateiimportToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.DynamicAutomotiveXLSToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.GEZEXLSXToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.MEYLEXLSXToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FressnapToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.VERAGIMPORTFormatToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.VERAGFormatÖffnen2025V1ToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.EZAIDToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.EZAIDToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -448,47 +442,10 @@ Partial Class usrCntlATLAS_EZA
' '
'DateiimportToolStripMenuItem 'DateiimportToolStripMenuItem
' '
Me.DateiimportToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DynamicAutomotiveXLSToolStripMenuItem, Me.GEZEXLSXToolStripMenuItem, Me.MEYLEXLSXToolStripMenuItem, Me.FressnapToolStripMenuItem, Me.VERAGIMPORTFormatToolStripMenuItem, Me.VERAGFormatÖffnen2025V1ToolStripMenuItem})
Me.DateiimportToolStripMenuItem.Name = "DateiimportToolStripMenuItem" Me.DateiimportToolStripMenuItem.Name = "DateiimportToolStripMenuItem"
Me.DateiimportToolStripMenuItem.Size = New System.Drawing.Size(87, 20) Me.DateiimportToolStripMenuItem.Size = New System.Drawing.Size(87, 20)
Me.DateiimportToolStripMenuItem.Text = "Datei-Import" Me.DateiimportToolStripMenuItem.Text = "Datei-Import"
' '
'DynamicAutomotiveXLSToolStripMenuItem
'
Me.DynamicAutomotiveXLSToolStripMenuItem.Name = "DynamicAutomotiveXLSToolStripMenuItem"
Me.DynamicAutomotiveXLSToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
Me.DynamicAutomotiveXLSToolStripMenuItem.Text = "Dynamic Automotive (XLSX)"
'
'GEZEXLSXToolStripMenuItem
'
Me.GEZEXLSXToolStripMenuItem.Name = "GEZEXLSXToolStripMenuItem"
Me.GEZEXLSXToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
Me.GEZEXLSXToolStripMenuItem.Text = "GEZE (XLSX)"
'
'MEYLEXLSXToolStripMenuItem
'
Me.MEYLEXLSXToolStripMenuItem.Name = "MEYLEXLSXToolStripMenuItem"
Me.MEYLEXLSXToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
Me.MEYLEXLSXToolStripMenuItem.Text = "MEYLE (XLSX)"
'
'FressnapToolStripMenuItem
'
Me.FressnapToolStripMenuItem.Name = "FressnapToolStripMenuItem"
Me.FressnapToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
Me.FressnapToolStripMenuItem.Text = "Fressnapf (XLSX)"
'
'VERAGIMPORTFormatToolStripMenuItem
'
Me.VERAGIMPORTFormatToolStripMenuItem.Name = "VERAGIMPORTFormatToolStripMenuItem"
Me.VERAGIMPORTFormatToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
Me.VERAGIMPORTFormatToolStripMenuItem.Text = "VERAG-IMPORT-Format (XLSX)"
'
'VERAGFormatÖffnen2025V1ToolStripMenuItem
'
Me.VERAGFormatÖffnen2025V1ToolStripMenuItem.Name = "VERAGFormatÖffnen2025V1ToolStripMenuItem"
Me.VERAGFormatÖffnen2025V1ToolStripMenuItem.Size = New System.Drawing.Size(244, 22)
Me.VERAGFormatÖffnen2025V1ToolStripMenuItem.Text = "VERAG-Format öffnen (2025-V1)"
'
'ToolStripMenuItem1 'ToolStripMenuItem1
' '
Me.ToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EZAIDToolStripMenuItem}) Me.ToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EZAIDToolStripMenuItem})
@@ -557,11 +514,5 @@ Partial Class usrCntlATLAS_EZA
Friend WithEvents EZAIDToolStripMenuItem As ToolStripMenuItem Friend WithEvents EZAIDToolStripMenuItem As ToolStripMenuItem
Friend WithEvents BezugsnummerKopierenToolStripMenuItem As ToolStripMenuItem Friend WithEvents BezugsnummerKopierenToolStripMenuItem As ToolStripMenuItem
Friend WithEvents DateiimportToolStripMenuItem As ToolStripMenuItem Friend WithEvents DateiimportToolStripMenuItem As ToolStripMenuItem
Friend WithEvents DynamicAutomotiveXLSToolStripMenuItem As ToolStripMenuItem
Friend WithEvents XMLExampleToolStripMenuItem As ToolStripMenuItem Friend WithEvents XMLExampleToolStripMenuItem As ToolStripMenuItem
Friend WithEvents GEZEXLSXToolStripMenuItem As ToolStripMenuItem
Friend WithEvents MEYLEXLSXToolStripMenuItem As ToolStripMenuItem
Friend WithEvents FressnapToolStripMenuItem As ToolStripMenuItem
Friend WithEvents VERAGIMPORTFormatToolStripMenuItem As ToolStripMenuItem
Friend WithEvents VERAGFormatÖffnen2025V1ToolStripMenuItem As ToolStripMenuItem
End Class End Class

View File

@@ -23,8 +23,8 @@ Partial Class usrCntlZollArtikel
<System.Diagnostics.DebuggerStepThrough()> _ <System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent() Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.pnlFilter = New System.Windows.Forms.Panel() Me.pnlFilter = New System.Windows.Forms.Panel()
Me.dgvZollArtikel = New System.Windows.Forms.DataGridView() Me.dgvZollArtikel = New System.Windows.Forms.DataGridView()
Me.cntxtRightClick = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cntxtRightClick = New System.Windows.Forms.ContextMenuStrip(Me.components)
@@ -33,11 +33,12 @@ Partial Class usrCntlZollArtikel
Me.BeschreibungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.BeschreibungToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Label1 = New System.Windows.Forms.Label() Me.Label1 = New System.Windows.Forms.Label()
Me.Panel1 = New System.Windows.Forms.Panel() Me.Panel1 = New System.Windows.Forms.Panel()
Me.Button5 = New System.Windows.Forms.Button() Me.Button6 = New System.Windows.Forms.Button()
Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cntxtExcel = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ExcelEinlesenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ExcelEinlesenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.ExcelListeÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.ExcelListeÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.TabelleInExcelÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.TabelleInExcelÖffnenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Button5 = New System.Windows.Forms.Button()
Me.Button4 = New System.Windows.Forms.Button() Me.Button4 = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button() Me.Button3 = New System.Windows.Forms.Button()
Me.btnDelAll = New System.Windows.Forms.Button() Me.btnDelAll = New System.Windows.Forms.Button()
@@ -59,7 +60,8 @@ Partial Class usrCntlZollArtikel
Me.btnTarifnummerKopieren = New System.Windows.Forms.Button() Me.btnTarifnummerKopieren = New System.Windows.Forms.Button()
Me.cntxtVermerk = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.cntxtVermerk = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem() Me.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.Button6 = New System.Windows.Forms.Button() Me.cboTnrSrc = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboTnrTrg = New VERAG_PROG_ALLGEMEIN.MyComboBox()
CType(Me.dgvZollArtikel, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvZollArtikel, System.ComponentModel.ISupportInitialize).BeginInit()
Me.cntxtRightClick.SuspendLayout() Me.cntxtRightClick.SuspendLayout()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
@@ -84,8 +86,8 @@ Partial Class usrCntlZollArtikel
Me.dgvZollArtikel.AllowUserToAddRows = False Me.dgvZollArtikel.AllowUserToAddRows = False
Me.dgvZollArtikel.AllowUserToDeleteRows = False Me.dgvZollArtikel.AllowUserToDeleteRows = False
Me.dgvZollArtikel.AllowUserToResizeRows = False Me.dgvZollArtikel.AllowUserToResizeRows = False
DataGridViewCellStyle1.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer)) DataGridViewCellStyle3.BackColor = System.Drawing.Color.FromArgb(CType(CType(240, Byte), Integer), CType(CType(245, Byte), Integer), CType(CType(255, Byte), Integer))
Me.dgvZollArtikel.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 Me.dgvZollArtikel.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle3
Me.dgvZollArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvZollArtikel.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvZollArtikel.ContextMenuStrip = Me.cntxtRightClick Me.dgvZollArtikel.ContextMenuStrip = Me.cntxtRightClick
Me.dgvZollArtikel.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvZollArtikel.Dock = System.Windows.Forms.DockStyle.Fill
@@ -135,6 +137,8 @@ Partial Class usrCntlZollArtikel
'Panel1 'Panel1
' '
Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke Me.Panel1.BackColor = System.Drawing.Color.WhiteSmoke
Me.Panel1.Controls.Add(Me.cboTnrTrg)
Me.Panel1.Controls.Add(Me.cboTnrSrc)
Me.Panel1.Controls.Add(Me.Button6) Me.Panel1.Controls.Add(Me.Button6)
Me.Panel1.Controls.Add(Me.Button5) Me.Panel1.Controls.Add(Me.Button5)
Me.Panel1.Controls.Add(Me.Button4) Me.Panel1.Controls.Add(Me.Button4)
@@ -153,20 +157,20 @@ Partial Class usrCntlZollArtikel
Me.Panel1.Size = New System.Drawing.Size(1278, 79) Me.Panel1.Size = New System.Drawing.Size(1278, 79)
Me.Panel1.TabIndex = 13 Me.Panel1.TabIndex = 13
' '
'Button5 'Button6
' '
Me.Button5.ContextMenuStrip = Me.cntxtExcel Me.Button6.ContextMenuStrip = Me.cntxtExcel
Me.Button5.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer)) Me.Button6.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.ForeColor = System.Drawing.Color.Black Me.Button6.ForeColor = System.Drawing.Color.Black
Me.Button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button5.Location = New System.Drawing.Point(995, 51) Me.Button6.Location = New System.Drawing.Point(937, 51)
Me.Button5.Name = "Button5" Me.Button6.Name = "Button6"
Me.Button5.Size = New System.Drawing.Size(148, 27) Me.Button6.Size = New System.Drawing.Size(59, 27)
Me.Button5.TabIndex = 26 Me.Button6.TabIndex = 27
Me.Button5.Text = "Alle eindeutige übernehm." Me.Button6.Text = "Use Last"
Me.Button5.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.Button6.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button5.UseVisualStyleBackColor = True Me.Button6.UseVisualStyleBackColor = True
' '
'cntxtExcel 'cntxtExcel
' '
@@ -192,6 +196,21 @@ Partial Class usrCntlZollArtikel
Me.TabelleInExcelÖffnenToolStripMenuItem.Size = New System.Drawing.Size(191, 22) Me.TabelleInExcelÖffnenToolStripMenuItem.Size = New System.Drawing.Size(191, 22)
Me.TabelleInExcelÖffnenToolStripMenuItem.Text = "Tabelle in Excel öffnen" Me.TabelleInExcelÖffnenToolStripMenuItem.Text = "Tabelle in Excel öffnen"
' '
'Button5
'
Me.Button5.ContextMenuStrip = Me.cntxtExcel
Me.Button5.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer))
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.ForeColor = System.Drawing.Color.Black
Me.Button5.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button5.Location = New System.Drawing.Point(995, 51)
Me.Button5.Name = "Button5"
Me.Button5.Size = New System.Drawing.Size(148, 27)
Me.Button5.TabIndex = 26
Me.Button5.Text = "Alle eindeutige übernehm."
Me.Button5.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button5.UseVisualStyleBackColor = True
'
'Button4 'Button4
' '
Me.Button4.Enabled = False Me.Button4.Enabled = False
@@ -204,7 +223,7 @@ Partial Class usrCntlZollArtikel
Me.Button4.Size = New System.Drawing.Size(206, 50) Me.Button4.Size = New System.Drawing.Size(206, 50)
Me.Button4.TabIndex = 25 Me.Button4.TabIndex = 25
Me.Button4.Text = "8-Steller -> 11 Steller" Me.Button4.Text = "8-Steller -> 11 Steller"
Me.Button4.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.Button4.TextAlign = System.Drawing.ContentAlignment.TopRight
Me.Button4.UseVisualStyleBackColor = True Me.Button4.UseVisualStyleBackColor = True
' '
'Button3 'Button3
@@ -354,14 +373,14 @@ Partial Class usrCntlZollArtikel
Me.dgvKdVermerke.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells Me.dgvKdVermerke.AutoSizeRowsMode = System.Windows.Forms.DataGridViewAutoSizeRowsMode.AllCells
Me.dgvKdVermerke.BackgroundColor = System.Drawing.Color.White Me.dgvKdVermerke.BackgroundColor = System.Drawing.Color.White
Me.dgvKdVermerke.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize Me.dgvKdVermerke.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft
DataGridViewCellStyle2.BackColor = System.Drawing.SystemColors.Window DataGridViewCellStyle1.BackColor = System.Drawing.SystemColors.Window
DataGridViewCellStyle2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) DataGridViewCellStyle1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.ControlText DataGridViewCellStyle1.ForeColor = System.Drawing.SystemColors.ControlText
DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight DataGridViewCellStyle1.SelectionBackColor = System.Drawing.SystemColors.Highlight
DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle1.SelectionForeColor = System.Drawing.SystemColors.HighlightText
DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True]
Me.dgvKdVermerke.DefaultCellStyle = DataGridViewCellStyle2 Me.dgvKdVermerke.DefaultCellStyle = DataGridViewCellStyle1
Me.dgvKdVermerke.Location = New System.Drawing.Point(156, 3) Me.dgvKdVermerke.Location = New System.Drawing.Point(156, 3)
Me.dgvKdVermerke.Name = "dgvKdVermerke" Me.dgvKdVermerke.Name = "dgvKdVermerke"
Me.dgvKdVermerke.RowHeadersVisible = False Me.dgvKdVermerke.RowHeadersVisible = False
@@ -472,20 +491,33 @@ Partial Class usrCntlZollArtikel
Me.ToolStripMenuItem1.Size = New System.Drawing.Size(118, 22) Me.ToolStripMenuItem1.Size = New System.Drawing.Size(118, 22)
Me.ToolStripMenuItem1.Text = "Löschen" Me.ToolStripMenuItem1.Text = "Löschen"
' '
'Button6 'cboTnrSrc
' '
Me.Button6.ContextMenuStrip = Me.cntxtExcel Me.cboTnrSrc._allowedValuesFreiText = Nothing
Me.Button6.FlatAppearance.BorderColor = System.Drawing.Color.FromArgb(CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer), CType(CType(64, Byte), Integer)) Me.cboTnrSrc._allowFreiText = False
Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.cboTnrSrc._value = ""
Me.Button6.ForeColor = System.Drawing.Color.Black Me.cboTnrSrc.FormattingEnabled = True
Me.Button6.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.cboTnrSrc.Items.AddRange(New Object() {"TR", "EU", "DE"})
Me.Button6.Location = New System.Drawing.Point(937, 51) Me.cboTnrSrc.Location = New System.Drawing.Point(1058, 30)
Me.Button6.Name = "Button6" Me.cboTnrSrc.Name = "cboTnrSrc"
Me.Button6.Size = New System.Drawing.Size(59, 27) Me.cboTnrSrc.Size = New System.Drawing.Size(41, 21)
Me.Button6.TabIndex = 27 Me.cboTnrSrc.TabIndex = 28
Me.Button6.Text = "Use Last" Me.cboTnrSrc.Tag = ""
Me.Button6.TextAlign = System.Drawing.ContentAlignment.MiddleRight Me.cboTnrSrc.Text = "TR"
Me.Button6.UseVisualStyleBackColor = True '
'cboTnrTrg
'
Me.cboTnrTrg._allowedValuesFreiText = Nothing
Me.cboTnrTrg._allowFreiText = False
Me.cboTnrTrg._value = ""
Me.cboTnrTrg.FormattingEnabled = True
Me.cboTnrTrg.Items.AddRange(New Object() {"TR", "EU", "DE"})
Me.cboTnrTrg.Location = New System.Drawing.Point(1101, 30)
Me.cboTnrTrg.Name = "cboTnrTrg"
Me.cboTnrTrg.Size = New System.Drawing.Size(41, 21)
Me.cboTnrTrg.TabIndex = 29
Me.cboTnrTrg.Tag = ""
Me.cboTnrTrg.Text = "DE"
' '
'usrCntlZollArtikel 'usrCntlZollArtikel
' '
@@ -549,4 +581,6 @@ Partial Class usrCntlZollArtikel
Friend WithEvents Button4 As Button Friend WithEvents Button4 As Button
Friend WithEvents Button5 As Button Friend WithEvents Button5 As Button
Friend WithEvents Button6 As Button Friend WithEvents Button6 As Button
Friend WithEvents cboTnrTrg As VERAG_PROG_ALLGEMEIN.MyComboBox
Friend WithEvents cboTnrSrc As VERAG_PROG_ALLGEMEIN.MyComboBox
End Class End Class

View File

@@ -965,6 +965,8 @@ Public Class usrCntlZollArtikel
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
Try Try
If cboTnrSrc._value = "" Then MsgBox("Kein Quelland für die Tarifermittlung gewählt!") : Exit Sub
If cboTnrTrg._value = "" Then MsgBox("Kein Zielland für die Tarifermittlung gewählt!") : Exit Sub
Dim comm As New List(Of String) Dim comm As New List(Of String)
@@ -974,7 +976,8 @@ Public Class usrCntlZollArtikel
comm.Add(tnr.ToString.Trim()) comm.Add(tnr.ToString.Trim())
End If End If
Next Next
Dim COMM_TARIFF = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetTariffInfo(comm, "TR")
Dim COMM_TARIFF = VERAG_PROG_ALLGEMEIN.cATEZ_Tariff.GetTariffInfo(comm, cboTnrSrc._value, cboTnrTrg._value)
For Each r In dgvZollArtikel.Rows For Each r In dgvZollArtikel.Rows

View File

@@ -296,14 +296,14 @@ Public Class MyTextBox
pruefungHandled = True pruefungHandled = True
Try Try
If Not _numbersOnlyTrennzeichen And IsNumeric(sender.text) Then If Not _numbersOnlyTrennzeichen And IsNumeric(sender.text) Then
Me._value = CInt(sender.text) Me._value = CLng(sender.text)
ElseIf IsNumeric(_numbersOnlyKommastellen) And IsNumeric(sender.text) Then ElseIf IsNumeric(_numbersOnlyKommastellen) And IsNumeric(sender.text) Then
sender.text = CDbl(sender.text).ToString("N" & _numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture) sender.text = CLng(sender.text).ToString("N" & _numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture)
Me._value = CDbl(sender.text) Me._value = CLng(sender.text)
' Else ' Else
' sender.text = CDbl(sender.text) ' sender.text = CDbl(sender.text)
ElseIf IsNumeric(sender.text) Then ElseIf IsNumeric(sender.text) Then
Me._value = CDbl(sender.text) Me._value = CLng(sender.text)
Else Else
Me._value = "" Me._value = ""
End If End If
@@ -591,13 +591,13 @@ Public Class MyTextBox
ElseIf _numbersOnly Then ElseIf _numbersOnly Then
If Not _numbersOnlyTrennzeichen And IsNumeric(v) Then If Not _numbersOnlyTrennzeichen And IsNumeric(v) Then
Propvalue = CInt(v) Propvalue = CLng(v)
Me.Text = v Me.Text = v
ElseIf IsNumeric(Me._numbersOnlyKommastellen) And IsNumeric(v) Then ElseIf IsNumeric(Me._numbersOnlyKommastellen) And IsNumeric(v) Then
Propvalue = CDbl(v) Propvalue = CLng(v)
Me.Text = CDbl(v).ToString("N" & Me._numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture) Me.Text = CLng(v).ToString("N" & Me._numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture)
ElseIf IsNumeric(v) Then ElseIf IsNumeric(v) Then
Propvalue = CDbl(v) Propvalue = CLng(v)
Me.Text = v Me.Text = v
Else Else
Propvalue = "" Propvalue = ""
@@ -635,11 +635,11 @@ Public Class MyTextBox
Try Try
'String.Format("{0:N2}", CDbl(sender.text)) 'String.Format("{0:N2}", CDbl(sender.text))
If Not _numbersOnlyTrennzeichen And IsNumeric(sender.text) Then If Not _numbersOnlyTrennzeichen And IsNumeric(sender.text) Then
sender.text = CInt(sender.text) sender.text = CLng(sender.text)
ElseIf IsNumeric(_numbersOnlyKommastellen) And IsNumeric(sender.text) Then ElseIf IsNumeric(_numbersOnlyKommastellen) And IsNumeric(sender.text) Then
sender.text = CDbl(sender.text).ToString("N" & _numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture) sender.text = CLng(sender.text).ToString("N" & _numbersOnlyKommastellen) ' , CultureInfo.InvariantCulture)
Else Else
sender.text = CDbl(sender.text) sender.text = CLng(sender.text)
End If End If
e.Cancel = False e.Cancel = False
Catch ex As Exception Catch ex As Exception
@@ -652,7 +652,7 @@ Public Class MyTextBox
If _Waehrung Then If _Waehrung Then
Try Try
'String.Format("{0:N2}", CDbl(sender.text)) 'String.Format("{0:N2}", CDbl(sender.text))
CDbl(sender.text).ToString(If(_WaehrungZeichen, "C2", "N2")) CLng(sender.text).ToString(If(_WaehrungZeichen, "C2", "N2"))
e.Cancel = False e.Cancel = False
Catch ex As Exception Catch ex As Exception
errDescription = "Die Eingabe muss eine Zahl sein! (z.B. 123,45)" errDescription = "Die Eingabe muss eine Zahl sein! (z.B. 123,45)"

View File

@@ -39,7 +39,6 @@ Public Class cEZT_ImportCodenummern
Me.ezt_Ende = ezt_Ende Me.ezt_Ende = ezt_Ende
Me.ezt_Sprache = ezt_Sprache Me.ezt_Sprache = ezt_Sprache
Me.ezt_Text = ezt_Text Me.ezt_Text = ezt_Text
End Sub End Sub
Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) Public Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)

View File

@@ -103,6 +103,12 @@ Public Class cATEZ_Tariff
' Create an instance of the HTTP object ' Create an instance of the HTTP object
Dim http As New Chilkat.Http() Dim http As New Chilkat.Http()
' ==== TIMEOUTS ERHÖHEN ====
http.ConnectTimeout = 30000 ' 30 Sekunden Verbindungsaufbau
http.ReadTimeout = 300000 ' 5 min /300 Sekunden Antwort lesen
' =========================
Dim baseUrl = "" Dim baseUrl = ""
@@ -131,7 +137,7 @@ Public Class cATEZ_Tariff
' Führe die GET-Anfrage aus ' Führe die GET-Anfrage aus
Dim response As String = http.QuickGetStr(url) Dim response As String = http.QuickGetStr(url)
'MsgBox(response.ToString)
' Prüfe auf Fehler ' Prüfe auf Fehler
If http.LastMethodSuccess = False Then If http.LastMethodSuccess = False Then
Throw New Exception("HTTP Request failed: " & http.LastErrorText) Throw New Exception("HTTP Request failed: " & http.LastErrorText)

View File

@@ -2,6 +2,8 @@
Imports System.IO Imports System.IO
Imports System.Text Imports System.Text
Imports Newtonsoft.Json Imports Newtonsoft.Json
Imports System.Net.Http
Imports System.Net.Http.Headers
Public Class cWiseBankApi Public Class cWiseBankApi
' { ' {
@@ -91,12 +93,17 @@ Public Class cWiseBankApi
Private ReadOnly apiToken As String '245a89e8-b8e3-4ceb-8326-ad7cd4d19eda Private Shared BASE_URL As String = "https://api.wise.com"
Private Shared API_TOKEN As String = "245a89e8-b8e3-4ceb-8326-ad7cd4d19eda"
Private ReadOnly profileId As String ' Private ReadOnly profileId As String '
Private ReadOnly balanceId As String Private ReadOnly balanceId As String
'AVISO 'AVISO
Sub New()
End Sub
Public Sub New(token As String, profile As String, balance As String) Public Sub New(token As String, profile As String, balance As String)
apiToken = token API_TOKEN = token
profileId = profile profileId = profile
balanceId = balance balanceId = balance
End Sub End Sub
@@ -124,7 +131,7 @@ Public Class cWiseBankApi
Dim request As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest) Dim request As HttpWebRequest = CType(WebRequest.Create(url), HttpWebRequest)
request.Method = "GET" request.Method = "GET"
request.Headers.Add("Authorization", "Bearer " & apiToken) request.Headers.Add("Authorization", "Bearer " & API_TOKEN)
Try Try
Using response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse) Using response As HttpWebResponse = CType(request.GetResponse(), HttpWebResponse)
@@ -140,4 +147,46 @@ Public Class cWiseBankApi
End Try End Try
End Function End Function
'
'Public Shared Async Function CreatePaymentLinkAsync(
' profileId As Long,
' amount As Decimal,
' currency As String,
' description As String,
' reference As String,
' redirectUrl As String
') As Task(Of String)
' Using client As New HttpClient()
' client.BaseAddress = New Uri(BASE_URL)
' client.DefaultRequestHeaders.Authorization =
' New AuthenticationHeaderValue("Bearer", API_TOKEN)
' Dim body = New With {
' .profileId = profileId,
' .amount = New With {
' .value = amount,
' .currency = currency
' },
' .description = description,
' .reference = reference,
' .redirectUrl = redirectUrl
' }
' Dim json = JsonConvert.SerializeObject(body)
' Dim content = New StringContent(json, Encoding.UTF8, "application/json")
' Dim response = Await client.PostAsync("/v1/payment-requests", content)
' Dim responseContent = Await response.Content.ReadAsStringAsync()
' If Not response.IsSuccessStatusCode Then
' Throw New Exception("Wise API Error: " & responseContent)
' End If
' Return responseContent
' End Using
'End Function '
End Class End Class