ADMIN UsrParam, DHF Import

This commit is contained in:
2025-08-20 21:32:47 +02:00
parent a97eb51344
commit 0100b3ed89
5 changed files with 1211 additions and 186 deletions

View File

@@ -24,17 +24,8 @@ Partial Class usrCntlATLAS_EZA
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.SplitContainer = New System.Windows.Forms.SplitContainer()
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel(Me.components)
Me.btnAllgemein = New System.Windows.Forms.Button()
Me.btnAdressen = New System.Windows.Forms.Button()
Me.btnAktiveVeredelung = New System.Windows.Forms.Button()
Me.btnPositionen = New System.Windows.Forms.Button()
Me.btnDV1 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.pnl = New System.Windows.Forms.Panel()
Me.Label6 = New System.Windows.Forms.Label()
Me.cboDakosyAction = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboStammreferenz = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label4 = New System.Windows.Forms.Label()
Me.Label5 = New System.Windows.Forms.Label()
@@ -56,17 +47,27 @@ Partial Class usrCntlATLAS_EZA
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.ToolStripMenuItem1 = New System.Windows.Forms.ToolStripMenuItem()
Me.EZAIDToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.MEYLEXLSXToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.FressnapToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel(Me.components)
Me.btnAllgemein = New System.Windows.Forms.Button()
Me.btnAdressen = New System.Windows.Forms.Button()
Me.btnAktiveVeredelung = New System.Windows.Forms.Button()
Me.btnPositionen = New System.Windows.Forms.Button()
Me.btnDV1 = New System.Windows.Forms.Button()
Me.Button5 = New System.Windows.Forms.Button()
Me.cboDakosyAction = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboStammreferenz = New VERAG_PROG_ALLGEMEIN.MyComboBox()
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainer.Panel1.SuspendLayout()
Me.SplitContainer.SuspendLayout()
Me.MyFlowLayoutPanel1.SuspendLayout()
Me.pnl.SuspendLayout()
Me.cntxtBezugsnr.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.MenuStrip.SuspendLayout()
Me.MyFlowLayoutPanel1.SuspendLayout()
Me.SuspendLayout()
'
'SplitContainer
@@ -92,128 +93,6 @@ Partial Class usrCntlATLAS_EZA
Me.SplitContainer.SplitterWidth = 1
Me.SplitContainer.TabIndex = 0
'
'MyFlowLayoutPanel1
'
Me.MyFlowLayoutPanel1.BackColor = System.Drawing.Color.WhiteSmoke
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnAllgemein)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnAdressen)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnAktiveVeredelung)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnPositionen)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnDV1)
Me.MyFlowLayoutPanel1.Controls.Add(Me.Button5)
Me.MyFlowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.MyFlowLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.MyFlowLayoutPanel1.Margin = New System.Windows.Forms.Padding(1)
Me.MyFlowLayoutPanel1.Name = "MyFlowLayoutPanel1"
Me.MyFlowLayoutPanel1.Size = New System.Drawing.Size(573, 72)
Me.MyFlowLayoutPanel1.TabIndex = 0
'
'btnAllgemein
'
Me.btnAllgemein.BackColor = System.Drawing.Color.SteelBlue
Me.btnAllgemein.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnAllgemein.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAllgemein.ForeColor = System.Drawing.SystemColors.ControlLightLight
Me.btnAllgemein.Image = Global.SDL.My.Resources.Resources.android_note12
Me.btnAllgemein.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnAllgemein.Location = New System.Drawing.Point(2, 2)
Me.btnAllgemein.Margin = New System.Windows.Forms.Padding(2)
Me.btnAllgemein.Name = "btnAllgemein"
Me.btnAllgemein.Padding = New System.Windows.Forms.Padding(0, 12, 0, 3)
Me.btnAllgemein.Size = New System.Drawing.Size(75, 67)
Me.btnAllgemein.TabIndex = 0
Me.btnAllgemein.Text = "Allgemein"
Me.btnAllgemein.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnAllgemein.UseVisualStyleBackColor = False
'
'btnAdressen
'
Me.btnAdressen.BackColor = System.Drawing.Color.White
Me.btnAdressen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnAdressen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAdressen.Image = Global.SDL.My.Resources.Resources.house1
Me.btnAdressen.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnAdressen.Location = New System.Drawing.Point(81, 2)
Me.btnAdressen.Margin = New System.Windows.Forms.Padding(2)
Me.btnAdressen.Name = "btnAdressen"
Me.btnAdressen.Padding = New System.Windows.Forms.Padding(0, 0, 0, 3)
Me.btnAdressen.Size = New System.Drawing.Size(75, 67)
Me.btnAdressen.TabIndex = 1
Me.btnAdressen.Text = "Adressen"
Me.btnAdressen.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnAdressen.UseVisualStyleBackColor = False
'
'btnAktiveVeredelung
'
Me.btnAktiveVeredelung.BackColor = System.Drawing.Color.White
Me.btnAktiveVeredelung.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnAktiveVeredelung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAktiveVeredelung.Image = Global.SDL.My.Resources.Resources.aktiveVeredelung1
Me.btnAktiveVeredelung.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnAktiveVeredelung.Location = New System.Drawing.Point(160, 2)
Me.btnAktiveVeredelung.Margin = New System.Windows.Forms.Padding(2)
Me.btnAktiveVeredelung.Name = "btnAktiveVeredelung"
Me.btnAktiveVeredelung.Padding = New System.Windows.Forms.Padding(0, 6, 0, 3)
Me.btnAktiveVeredelung.Size = New System.Drawing.Size(94, 67)
Me.btnAktiveVeredelung.TabIndex = 3
Me.btnAktiveVeredelung.Text = "Pass. Veredel."
Me.btnAktiveVeredelung.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnAktiveVeredelung.UseVisualStyleBackColor = False
Me.btnAktiveVeredelung.Visible = False
'
'btnPositionen
'
Me.btnPositionen.BackColor = System.Drawing.Color.White
Me.btnPositionen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnPositionen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnPositionen.Image = Global.SDL.My.Resources.Resources.list_new_small2
Me.btnPositionen.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnPositionen.Location = New System.Drawing.Point(258, 2)
Me.btnPositionen.Margin = New System.Windows.Forms.Padding(2)
Me.btnPositionen.Name = "btnPositionen"
Me.btnPositionen.Padding = New System.Windows.Forms.Padding(0, 0, 0, 3)
Me.btnPositionen.Size = New System.Drawing.Size(81, 67)
Me.btnPositionen.TabIndex = 4
Me.btnPositionen.Text = "Positionen"
Me.btnPositionen.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnPositionen.UseVisualStyleBackColor = False
'
'btnDV1
'
Me.btnDV1.BackColor = System.Drawing.Color.White
Me.btnDV1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnDV1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDV1.Image = Global.SDL.My.Resources.Resources.moneybag1
Me.btnDV1.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnDV1.Location = New System.Drawing.Point(343, 2)
Me.btnDV1.Margin = New System.Windows.Forms.Padding(2)
Me.btnDV1.Name = "btnDV1"
Me.btnDV1.Padding = New System.Windows.Forms.Padding(0, 2, 0, 3)
Me.btnDV1.Size = New System.Drawing.Size(94, 67)
Me.btnDV1.TabIndex = 6
Me.btnDV1.Text = "D.V.1"
Me.btnDV1.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnDV1.UseVisualStyleBackColor = False
Me.btnDV1.Visible = False
'
'Button5
'
Me.Button5.BackColor = System.Drawing.Color.White
Me.Button5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Image = Global.SDL.My.Resources.Resources.android_note12
Me.Button5.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Button5.Location = New System.Drawing.Point(441, 2)
Me.Button5.Margin = New System.Windows.Forms.Padding(2)
Me.Button5.Name = "Button5"
Me.Button5.Padding = New System.Windows.Forms.Padding(0, 12, 0, 3)
Me.Button5.Size = New System.Drawing.Size(81, 67)
Me.Button5.TabIndex = 5
Me.Button5.Text = "Referenzen"
Me.Button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.Button5.UseVisualStyleBackColor = False
Me.Button5.Visible = False
'
'pnl
'
Me.pnl.BackColor = System.Drawing.Color.WhiteSmoke
@@ -242,35 +121,6 @@ Partial Class usrCntlATLAS_EZA
Me.Label6.Text = "Stammref.:"
Me.Label6.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'cboDakosyAction
'
Me.cboDakosyAction._allowedValuesFreiText = Nothing
Me.cboDakosyAction._allowFreiText = False
Me.cboDakosyAction._value = ""
Me.cboDakosyAction.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cboDakosyAction.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cboDakosyAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboDakosyAction.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboDakosyAction.FormattingEnabled = True
Me.cboDakosyAction.Location = New System.Drawing.Point(200, 48)
Me.cboDakosyAction.Name = "cboDakosyAction"
Me.cboDakosyAction.Size = New System.Drawing.Size(158, 21)
Me.cboDakosyAction.TabIndex = 1
'
'cboStammreferenz
'
Me.cboStammreferenz._allowedValuesFreiText = Nothing
Me.cboStammreferenz._allowFreiText = True
Me.cboStammreferenz._value = ""
Me.cboStammreferenz.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cboStammreferenz.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboStammreferenz.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboStammreferenz.FormattingEnabled = True
Me.cboStammreferenz.Location = New System.Drawing.Point(71, 48)
Me.cboStammreferenz.Name = "cboStammreferenz"
Me.cboStammreferenz.Size = New System.Drawing.Size(129, 21)
Me.cboStammreferenz.TabIndex = 13
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -445,7 +295,7 @@ Partial Class usrCntlATLAS_EZA
'
'DateiimportToolStripMenuItem
'
Me.DateiimportToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DynamicAutomotiveXLSToolStripMenuItem, Me.GEZEXLSXToolStripMenuItem, Me.MEYLEXLSXToolStripMenuItem})
Me.DateiimportToolStripMenuItem.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.DynamicAutomotiveXLSToolStripMenuItem, Me.GEZEXLSXToolStripMenuItem, Me.MEYLEXLSXToolStripMenuItem, Me.FressnapToolStripMenuItem})
Me.DateiimportToolStripMenuItem.Name = "DateiimportToolStripMenuItem"
Me.DateiimportToolStripMenuItem.Size = New System.Drawing.Size(87, 20)
Me.DateiimportToolStripMenuItem.Text = "Datei-Import"
@@ -462,6 +312,12 @@ Partial Class usrCntlATLAS_EZA
Me.GEZEXLSXToolStripMenuItem.Size = New System.Drawing.Size(224, 22)
Me.GEZEXLSXToolStripMenuItem.Text = "GEZE (XLSX)"
'
'MEYLEXLSXToolStripMenuItem
'
Me.MEYLEXLSXToolStripMenuItem.Name = "MEYLEXLSXToolStripMenuItem"
Me.MEYLEXLSXToolStripMenuItem.Size = New System.Drawing.Size(224, 22)
Me.MEYLEXLSXToolStripMenuItem.Text = "MEYLE (XLSX)"
'
'ToolStripMenuItem1
'
Me.ToolStripMenuItem1.DropDownItems.AddRange(New System.Windows.Forms.ToolStripItem() {Me.EZAIDToolStripMenuItem})
@@ -475,11 +331,162 @@ Partial Class usrCntlATLAS_EZA
Me.EZAIDToolStripMenuItem.Size = New System.Drawing.Size(109, 22)
Me.EZAIDToolStripMenuItem.Text = "EZA ID"
'
'MEYLEXLSXToolStripMenuItem
'FressnapToolStripMenuItem
'
Me.MEYLEXLSXToolStripMenuItem.Name = "MEYLEXLSXToolStripMenuItem"
Me.MEYLEXLSXToolStripMenuItem.Size = New System.Drawing.Size(224, 22)
Me.MEYLEXLSXToolStripMenuItem.Text = "MEYLE (XLSX)"
Me.FressnapToolStripMenuItem.Name = "FressnapToolStripMenuItem"
Me.FressnapToolStripMenuItem.Size = New System.Drawing.Size(224, 22)
Me.FressnapToolStripMenuItem.Text = "Fressnapf (XLSX)"
'
'MyFlowLayoutPanel1
'
Me.MyFlowLayoutPanel1.BackColor = System.Drawing.Color.WhiteSmoke
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnAllgemein)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnAdressen)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnAktiveVeredelung)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnPositionen)
Me.MyFlowLayoutPanel1.Controls.Add(Me.btnDV1)
Me.MyFlowLayoutPanel1.Controls.Add(Me.Button5)
Me.MyFlowLayoutPanel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.MyFlowLayoutPanel1.Location = New System.Drawing.Point(0, 0)
Me.MyFlowLayoutPanel1.Margin = New System.Windows.Forms.Padding(1)
Me.MyFlowLayoutPanel1.Name = "MyFlowLayoutPanel1"
Me.MyFlowLayoutPanel1.Size = New System.Drawing.Size(573, 72)
Me.MyFlowLayoutPanel1.TabIndex = 0
'
'btnAllgemein
'
Me.btnAllgemein.BackColor = System.Drawing.Color.SteelBlue
Me.btnAllgemein.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnAllgemein.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAllgemein.ForeColor = System.Drawing.SystemColors.ControlLightLight
Me.btnAllgemein.Image = Global.SDL.My.Resources.Resources.android_note12
Me.btnAllgemein.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnAllgemein.Location = New System.Drawing.Point(2, 2)
Me.btnAllgemein.Margin = New System.Windows.Forms.Padding(2)
Me.btnAllgemein.Name = "btnAllgemein"
Me.btnAllgemein.Padding = New System.Windows.Forms.Padding(0, 12, 0, 3)
Me.btnAllgemein.Size = New System.Drawing.Size(75, 67)
Me.btnAllgemein.TabIndex = 0
Me.btnAllgemein.Text = "Allgemein"
Me.btnAllgemein.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnAllgemein.UseVisualStyleBackColor = False
'
'btnAdressen
'
Me.btnAdressen.BackColor = System.Drawing.Color.White
Me.btnAdressen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnAdressen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAdressen.Image = Global.SDL.My.Resources.Resources.house1
Me.btnAdressen.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnAdressen.Location = New System.Drawing.Point(81, 2)
Me.btnAdressen.Margin = New System.Windows.Forms.Padding(2)
Me.btnAdressen.Name = "btnAdressen"
Me.btnAdressen.Padding = New System.Windows.Forms.Padding(0, 0, 0, 3)
Me.btnAdressen.Size = New System.Drawing.Size(75, 67)
Me.btnAdressen.TabIndex = 1
Me.btnAdressen.Text = "Adressen"
Me.btnAdressen.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnAdressen.UseVisualStyleBackColor = False
'
'btnAktiveVeredelung
'
Me.btnAktiveVeredelung.BackColor = System.Drawing.Color.White
Me.btnAktiveVeredelung.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnAktiveVeredelung.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAktiveVeredelung.Image = Global.SDL.My.Resources.Resources.aktiveVeredelung1
Me.btnAktiveVeredelung.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnAktiveVeredelung.Location = New System.Drawing.Point(160, 2)
Me.btnAktiveVeredelung.Margin = New System.Windows.Forms.Padding(2)
Me.btnAktiveVeredelung.Name = "btnAktiveVeredelung"
Me.btnAktiveVeredelung.Padding = New System.Windows.Forms.Padding(0, 6, 0, 3)
Me.btnAktiveVeredelung.Size = New System.Drawing.Size(94, 67)
Me.btnAktiveVeredelung.TabIndex = 3
Me.btnAktiveVeredelung.Text = "Pass. Veredel."
Me.btnAktiveVeredelung.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnAktiveVeredelung.UseVisualStyleBackColor = False
Me.btnAktiveVeredelung.Visible = False
'
'btnPositionen
'
Me.btnPositionen.BackColor = System.Drawing.Color.White
Me.btnPositionen.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnPositionen.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnPositionen.Image = Global.SDL.My.Resources.Resources.list_new_small2
Me.btnPositionen.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnPositionen.Location = New System.Drawing.Point(258, 2)
Me.btnPositionen.Margin = New System.Windows.Forms.Padding(2)
Me.btnPositionen.Name = "btnPositionen"
Me.btnPositionen.Padding = New System.Windows.Forms.Padding(0, 0, 0, 3)
Me.btnPositionen.Size = New System.Drawing.Size(81, 67)
Me.btnPositionen.TabIndex = 4
Me.btnPositionen.Text = "Positionen"
Me.btnPositionen.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnPositionen.UseVisualStyleBackColor = False
'
'btnDV1
'
Me.btnDV1.BackColor = System.Drawing.Color.White
Me.btnDV1.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.btnDV1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnDV1.Image = Global.SDL.My.Resources.Resources.moneybag1
Me.btnDV1.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.btnDV1.Location = New System.Drawing.Point(343, 2)
Me.btnDV1.Margin = New System.Windows.Forms.Padding(2)
Me.btnDV1.Name = "btnDV1"
Me.btnDV1.Padding = New System.Windows.Forms.Padding(0, 2, 0, 3)
Me.btnDV1.Size = New System.Drawing.Size(94, 67)
Me.btnDV1.TabIndex = 6
Me.btnDV1.Text = "D.V.1"
Me.btnDV1.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.btnDV1.UseVisualStyleBackColor = False
Me.btnDV1.Visible = False
'
'Button5
'
Me.Button5.BackColor = System.Drawing.Color.White
Me.Button5.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Center
Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button5.Image = Global.SDL.My.Resources.Resources.android_note12
Me.Button5.ImageAlign = System.Drawing.ContentAlignment.TopCenter
Me.Button5.Location = New System.Drawing.Point(441, 2)
Me.Button5.Margin = New System.Windows.Forms.Padding(2)
Me.Button5.Name = "Button5"
Me.Button5.Padding = New System.Windows.Forms.Padding(0, 12, 0, 3)
Me.Button5.Size = New System.Drawing.Size(81, 67)
Me.Button5.TabIndex = 5
Me.Button5.Text = "Referenzen"
Me.Button5.TextAlign = System.Drawing.ContentAlignment.BottomCenter
Me.Button5.UseVisualStyleBackColor = False
Me.Button5.Visible = False
'
'cboDakosyAction
'
Me.cboDakosyAction._allowedValuesFreiText = Nothing
Me.cboDakosyAction._allowFreiText = False
Me.cboDakosyAction._value = ""
Me.cboDakosyAction.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.cboDakosyAction.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cboDakosyAction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboDakosyAction.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboDakosyAction.FormattingEnabled = True
Me.cboDakosyAction.Location = New System.Drawing.Point(200, 48)
Me.cboDakosyAction.Name = "cboDakosyAction"
Me.cboDakosyAction.Size = New System.Drawing.Size(158, 21)
Me.cboDakosyAction.TabIndex = 1
'
'cboStammreferenz
'
Me.cboStammreferenz._allowedValuesFreiText = Nothing
Me.cboStammreferenz._allowFreiText = True
Me.cboStammreferenz._value = ""
Me.cboStammreferenz.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
Me.cboStammreferenz.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
Me.cboStammreferenz.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.cboStammreferenz.FormattingEnabled = True
Me.cboStammreferenz.Location = New System.Drawing.Point(71, 48)
Me.cboStammreferenz.Name = "cboStammreferenz"
Me.cboStammreferenz.Size = New System.Drawing.Size(129, 21)
Me.cboStammreferenz.TabIndex = 13
'
'usrCntlATLAS_EZA
'
@@ -493,7 +500,6 @@ Partial Class usrCntlATLAS_EZA
Me.SplitContainer.Panel1.ResumeLayout(False)
CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainer.ResumeLayout(False)
Me.MyFlowLayoutPanel1.ResumeLayout(False)
Me.pnl.ResumeLayout(False)
Me.pnl.PerformLayout()
Me.cntxtBezugsnr.ResumeLayout(False)
@@ -501,6 +507,7 @@ Partial Class usrCntlATLAS_EZA
Me.Panel1.PerformLayout()
Me.MenuStrip.ResumeLayout(False)
Me.MenuStrip.PerformLayout()
Me.MyFlowLayoutPanel1.ResumeLayout(False)
Me.ResumeLayout(False)
End Sub
@@ -540,4 +547,5 @@ Partial Class usrCntlATLAS_EZA
Friend WithEvents XMLExampleToolStripMenuItem As ToolStripMenuItem
Friend WithEvents GEZEXLSXToolStripMenuItem As ToolStripMenuItem
Friend WithEvents MEYLEXLSXToolStripMenuItem As ToolStripMenuItem
Friend WithEvents FressnapToolStripMenuItem As ToolStripMenuItem
End Class

View File

@@ -1428,24 +1428,7 @@ Public Class usrCntlATLAS_EZA
End Function
Private Function ToDoubleSafe(o As Object) As Double
If o Is Nothing OrElse IsDBNull(o) Then Return 0
' Direkte Numerik
If TypeOf o Is Double Then Return DirectCast(o, Double)
If TypeOf o Is Decimal Then Return Convert.ToDouble(o)
If TypeOf o Is Integer OrElse TypeOf o Is Int64 OrElse TypeOf o Is Int16 Then Return Convert.ToDouble(o)
' String-Fälle (leer, deutsch, englisch)
Dim s = o.ToString().Trim()
If s = "" Then Return 0
Dim v As Double
If Double.TryParse(s, NumberStyles.Any, CultureInfo.CurrentCulture, v) Then Return v
If Double.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, v) Then Return v
Return 0 ' Notfalls 0
End Function
Private Sub pnl_Paint_1(sender As Object, e As PaintEventArgs) Handles pnl.Paint
@@ -1497,5 +1480,309 @@ Public Class usrCntlATLAS_EZA
Private Sub MEYLEXLSXToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles MEYLEXLSXToolStripMenuItem.Click
importExcel_MEYLE()
End Sub
Private Sub FressnapToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles FressnapToolStripMenuItem.Click
importExcel_Fressnapf()
End Sub
Private Function importExcel_Fressnapf() As Boolean
Dim fd As New OpenFileDialog With {
.Filter = "Excel Dateien|*.xls;*.xlsx",
.Multiselect = True,
.Title = "Bitte eine oder mehrere Excel-Dateien auswählen"
}
If fd.ShowDialog() <> DialogResult.OK Then
Me.Cursor = Cursors.Default
MsgBox("Keine Datei ausgewählt!")
Return False
End If
Dim cnt As Integer = 0
If EZA.eza_WARENPOS.Count > 0 Then
If vbYes = MsgBox("Sollten die aktuellen Einträge gelöscht werden?", vbYesNo) Then
EZA.eza_WARENPOS.Clear()
End If
End If
Me.Cursor = Cursors.WaitCursor
For Each filePath As String In fd.FileNames
If Not (filePath.ToLower().EndsWith(".xls") OrElse filePath.ToLower().EndsWith(".xlsx")) Then
Continue For
End If
Dim exclApp As Excel.Application = Nothing
Dim Datei As Excel.Workbook = Nothing
Dim Blatt As Excel.Worksheet = Nothing
Try
exclApp = New Excel.Application With {
.CutCopyMode = False,
.DisplayAlerts = False
}
Datei = exclApp.Workbooks.Open(filePath)
Blatt = CType(Datei.Worksheets(1), Excel.Worksheet)
Datei.Activate()
Try : Blatt.ShowAllData() : Catch : End Try
' --- Prüfe, ob Kopfzeile in Zeile 17 existiert
If Not checkExcelHeader_Fressnapf(Blatt) Then
Throw New ApplicationException("Excel-Struktur entspricht nicht dem erwarteten Layout (Header-Zeile 17).")
End If
' --- Spalten dynamisch per Header ermitteln (Zeile 17)
Dim colDesc = FindHeaderColumn(Blatt, 17, {"warenbeschreibung"})
Dim colImpCode = FindHeaderColumn(Blatt, 17, {"importcodenummer", "warentarifnummer", "eztnummer", "ezt-nummer"})
Dim colOrigin = FindHeaderColumn(Blatt, 17, {"ursprungsland", "ursprungslandcode"})
Dim colCurrency = FindHeaderColumn(Blatt, 17, {"währung", "waehrung", "currency"})
Dim colNetMass = FindHeaderColumn(Blatt, 17, {"nettomasse", "nettomas­se", "nettomasse kg", "eigenmasse"})
Dim colQty = FindHeaderColumn(Blatt, 17, {"menge", "quantity", "qty"})
Dim colValue = FindHeaderColumn(Blatt, 17, {"warenwert", "invoice value", "value"})
' Minimal erforderliche Spalten prüfen
If colDesc = -1 OrElse colImpCode = -1 OrElse colOrigin = -1 OrElse colCurrency = -1 OrElse colValue = -1 Then
Throw New ApplicationException("Nicht alle erforderlichen Spaltenköpfe gefunden (Beschreibung/Warentarifnummer/Ursprungsland/Währung/Warenwert).")
End If
' --- Datenbereich bestimmen: ab Zeile 18 bis erste Leerzeile in Spalte A (Pos.)
Dim startRows As Integer = 18
Dim endRows As Integer = startRows
Dim usedRows As Integer = Blatt.UsedRange.Rows.Count
Do While endRows <= usedRows
Dim val = Blatt.Range("A" & endRows).Value
If val Is Nothing OrElse val.ToString().Trim() = "" Then Exit Do
endRows += 1
Loop
endRows -= 1
If endRows < startRows Then
Throw New ApplicationException("Keine Positionsdaten im Excel gefunden.")
End If
' --- Spaltenanzahl mindestens so groß wie letzte genutzte Spalte
Dim colCount As Integer = Math.Max(Blatt.UsedRange.Columns.Count, Math.Max(Math.Max(Math.Max(colDesc, colImpCode), Math.Max(colOrigin, colCurrency)), Math.Max(colValue, If(colNetMass < 0, 0, colNetMass))) + 1)
If colCount < 19 Then colCount = 19 ' typischerweise A..S
' --- Rohdaten in DataTable übernehmen
Dim DATA As New DataTable()
For c As Integer = 1 To colCount
DATA.Columns.Add("Spalte" & c, GetType(String))
Next
For r As Integer = startRows To endRows
Dim newRow As DataRow = DATA.NewRow()
For c As Integer = 1 To colCount
Dim value = Blatt.Cells(r, c).Value
newRow(c - 1) = If(value IsNot Nothing, value.ToString(), "")
Next
' Normalisierung für Gruppierung
If colCurrency >= 0 Then newRow(colCurrency) = newRow(colCurrency).ToString().Trim().ToUpper()
If colOrigin >= 0 Then newRow(colOrigin) = newRow(colOrigin).ToString().Trim().ToUpper()
DATA.Rows.Add(newRow)
Next
' --- Nur numerische Pos.-Zeilen behalten (Spalte A / Index 0)
For i As Integer = DATA.Rows.Count - 1 To 0 Step -1
Dim posTxt As String = DATA.Rows(i)(0).ToString().Trim()
Dim posNum As Integer
If Not Integer.TryParse(posTxt, posNum) Then
DATA.Rows.RemoveAt(i)
End If
Next
' --- Gruppieren nach: Beschreibung, Warentarifnummer, Ursprungsland, Währung
Dim resultDATA As DataTable = DATA.Clone()
Dim groups = From row In DATA.AsEnumerable()
Group row By
keyDesc = row(colDesc),
keyTariff = row(colImpCode),
keyOrigin = row(colOrigin),
keyCurr = row(colCurrency)
Into grp = Group
Select keyDesc, keyTariff, keyOrigin, keyCurr, grp
For Each g In groups
Dim newRow As DataRow = resultDATA.NewRow()
newRow(colDesc) = g.keyDesc
newRow(colImpCode) = g.keyTariff
newRow(colOrigin) = g.keyOrigin
newRow(colCurrency) = g.keyCurr
' Summenfelder (nur wenn vorhanden)
If colQty >= 0 Then newRow(colQty) = g.grp.Sum(Function(r) ToDoubleSafe(r(colQty))).ToString()
If colNetMass >= 0 Then newRow(colNetMass) = g.grp.Sum(Function(r) ToDoubleSafe(r(colNetMass))).ToString()
newRow(colValue) = g.grp.Sum(Function(r) ToDoubleSafe(r(colValue))).ToString()
resultDATA.Rows.Add(newRow)
Next
' --- Kopfwerte optional (z. B. Belegnummer)
Dim HandlesRgNr As String = ""
Try
If Blatt.Range("A8") IsNot Nothing AndAlso Blatt.Range("A8").Value IsNot Nothing Then
HandlesRgNr = Blatt.Range("A8").Value.ToString().Trim()
End If
Catch
End Try
' --- Ergebniszeilen in EZA schreiben
For Each row As DataRow In resultDATA.Rows
Dim tariff As String = row(colImpCode).ToString().Trim()
Dim desc As String = row(colDesc).ToString().Trim()
If tariff = "" AndAlso desc = "" Then Continue For
Dim POSITION As New DAKOSY_Worker.cDakosy_EZA_Warenposition
' *** WAREN­TARIFNUMMER ***
POSITION.ezaWP_WarennummerEZT = tariff
' Packstücke (nicht aus Excel, Standardwerte)
POSITION.ezaWP_PackstueckAnzahl = "0"
POSITION.ezaWP_PackstueckArt = "PK"
' *** ARTIKELPREIS (Warenwert) ***
Dim warenwert As Double = ToDoubleSafe(row(colValue))
POSITION.ezaWP_Artikelpreis = warenwert.ToString("N2")
' *** WÄHRUNG ***
POSITION.ezaWP_ArtikelpreisWaehrung = row(colCurrency).ToString()
' *** BESCHREIBUNG ***
POSITION.ezaWP_Warenbezeichnung = desc
' *** EIGENMASSE (aus Nettomasse, wenn vorhanden) ***
If colNetMass >= 0 Then
Dim netto As Double = ToDoubleSafe(row(colNetMass))
POSITION.ezaWP_Eigenmasse = netto.ToString("N1")
Else
POSITION.ezaWP_Eigenmasse = "0.0"
End If
' *** URSPRUNGS­LAND (2-stellig) ***
Dim ursprung As String = row(colOrigin).ToString().Trim().ToUpper()
If ursprung.Length >= 2 Then POSITION.ezaWP_UrsprungslandCode = ursprung.Substring(0, 2)
' Unterlagen (optional)
If Not String.IsNullOrWhiteSpace(HandlesRgNr) Then
POSITION.ezaWP_UNTERLAGEN.Add(New DAKOSY_Worker.cDakosy_EZA_WarenpositionVorgelegteUnterlagen With {
.ezaWpUl_Art = "N380",
.ezaWpUl_Bereich = "4",
.ezaWpUl_VorlageKz = "J",
.ezaWpUl_Nummer = HandlesRgNr,
.ezaWpUl_DatumAusstellung = Nothing
})
End If
EZA.eza_WARENPOS.Add(POSITION)
cnt += 1
Next
Catch ex As Exception
Me.Cursor = Cursors.Default
MsgBox("FEHLER beim Einlesen: " & vbCrLf & ex.Message)
Finally
' Ressourcen sauber freigeben
Try
If Datei IsNot Nothing Then Datei.Close(False)
Catch
End Try
Try
If exclApp IsNot Nothing Then exclApp.Quit()
Catch
End Try
Try
If Blatt IsNot Nothing Then System.Runtime.InteropServices.Marshal.FinalReleaseComObject(Blatt)
Catch
End Try
Try
If Datei IsNot Nothing Then System.Runtime.InteropServices.Marshal.FinalReleaseComObject(Datei)
Catch
End Try
Try
If exclApp IsNot Nothing Then System.Runtime.InteropServices.Marshal.FinalReleaseComObject(exclApp)
Catch
End Try
Blatt = Nothing : Datei = Nothing : exclApp = Nothing
GC.Collect()
GC.WaitForPendingFinalizers()
End Try
Console.WriteLine("Verarbeite Datei: " & filePath)
Next
Me.FindForm.SuspendLayout()
POSITIONEN.setValues(EZA, True)
btnPositionen.PerformClick()
Me.FindForm.ResumeLayout()
MsgBox(cnt & " Datensätze wurden eingelesen.")
Me.Cursor = Cursors.Default
Return True
End Function
' Liefert die 0-basierte Spaltennummer (DataTable-Index) anhand eines Header-Texts in rowIdx.
' Gibt -1 zurück, wenn keine der gesuchten Varianten gefunden wird.
Private Function FindHeaderColumn(ws As Excel.Worksheet, rowIdx As Integer, headerVariants As IEnumerable(Of String)) As Integer
Dim maxScanCols As Integer = 35 ' etwas Puffer
For c As Integer = 1 To maxScanCols
Dim cell = ws.Cells(rowIdx, c).Value
If cell Is Nothing Then Continue For
Dim norm = cell.ToString().Trim().ToLower()
For Each hv In headerVariants
If norm.Contains(hv.ToLower()) Then
Return c - 1 ' DataTable ist 0-basiert
End If
Next
Next
Return -1
End Function
Private Function ToDoubleSafe(obj As Object) As Double
If obj Is Nothing Then Return 0
Dim s As String = obj.ToString().Trim()
If s = "" Then Return 0
' Komma/Punkt robust behandeln, kulturinvariant parsen
Dim d As Double
' Erst alle Tausenderpunkte/Kommas vereinheitlichen
s = s.Replace(" ", "")
' Häufigster Fall: deutsches Komma
If s.Contains(",") AndAlso Not s.Contains(".") Then
s = s.Replace(".", "")
s = s.Replace(",", ".")
ElseIf s.Contains(".") AndAlso s.Contains(",") Then
' Entferne Tausender-Trenner, behalte Dezimaltrennzeichen als Punkt
s = s.Replace(".", "")
s = s.Replace(",", ".")
End If
If Double.TryParse(s, Globalization.NumberStyles.Any, Globalization.CultureInfo.InvariantCulture, d) Then
Return d
End If
Return 0
End Function
' Prüft Kopfzeile in Zeile 17:
' A17="Pos.", D17 beginnt mit "Warenbeschreibung",
' P17 beginnt mit "Importcodenummer", R17 beginnt mit "Ursprungsland"
Private Function checkExcelHeader_Fressnapf(ws As Excel.Worksheet) As Boolean
Try
Dim a = CStr(ws.Range("A17").Value)
Dim d = CStr(ws.Range("D17").Value)
If a Is Nothing OrElse d Is Nothing Then Return False
Return a.Trim().ToLower() = "pos." AndAlso
d.Trim().ToLower().StartsWith("warenbeschreibung")
Catch
Return False
End Try
End Function
End Class