CBAM Rechner

This commit is contained in:
2025-12-19 09:11:05 +01:00
parent d1c23ac18c
commit 29eb8afbe6
11 changed files with 725 additions and 176 deletions

View File

@@ -59,6 +59,27 @@ Partial Class usrCntlCBAM
Me.btnCBAM_DS_TELOTEC_Copy = New System.Windows.Forms.Button() Me.btnCBAM_DS_TELOTEC_Copy = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DAKOSY_XML = New System.Windows.Forms.Button() Me.btnCBAM_DS_DAKOSY_XML = New System.Windows.Forms.Button()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DAKOSY_Spedb = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DAKOSY_GP = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DHF_VERAG_GP = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DHF_UNISPED_GP = New System.Windows.Forms.Button()
Me.btnCBAM_DS_TELOTEC_GP = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.lblKafkaCnt = New System.Windows.Forms.Label()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Label7 = New System.Windows.Forms.Label()
Me.Label8 = New System.Windows.Forms.Label()
Me.Label9 = New System.Windows.Forms.Label()
Me.Label10 = New System.Windows.Forms.Label()
Me.Label11 = New System.Windows.Forms.Label()
Me.Button4 = New System.Windows.Forms.Button()
Me.txtCalcLand = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtCalcErg = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtCalcJahr = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtCalcEmission = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtCalcGewicht = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtCalcKN8 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components) Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components)
Me.cbxUNISPED = New System.Windows.Forms.CheckBox() Me.cbxUNISPED = New System.Windows.Forms.CheckBox()
Me.cbxIMEX = New System.Windows.Forms.CheckBox() Me.cbxIMEX = New System.Windows.Forms.CheckBox()
@@ -68,15 +89,8 @@ Partial Class usrCntlCBAM
Me.txtVon = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtVon = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtBis = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtBis = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtEori = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtEori = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DAKOSY_Spedb = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DAKOSY_GP = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DHF_VERAG_GP = New System.Windows.Forms.Button()
Me.btnCBAM_DS_DHF_UNISPED_GP = New System.Windows.Forms.Button()
Me.btnCBAM_DS_TELOTEC_GP = New System.Windows.Forms.Button()
Me.Button3 = New System.Windows.Forms.Button()
Me.lblKafkaCnt = New System.Windows.Forms.Label()
Me.cntxtAddSdl.SuspendLayout() Me.cntxtAddSdl.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.MyPanel1.SuspendLayout() Me.MyPanel1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
' '
@@ -490,6 +504,336 @@ Partial Class usrCntlCBAM
Me.Button2.Text = "In Zwischenablage kopieren" Me.Button2.Text = "In Zwischenablage kopieren"
Me.Button2.UseVisualStyleBackColor = True Me.Button2.UseVisualStyleBackColor = True
' '
'Button1
'
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(106, 438)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(168, 42)
Me.Button1.TabIndex = 44
Me.Button1.Text = "XML Datensatz generieren " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(DAKOSY)"
Me.Button1.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DAKOSY_Spedb
'
Me.btnCBAM_DS_DAKOSY_Spedb.Enabled = False
Me.btnCBAM_DS_DAKOSY_Spedb.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DAKOSY_Spedb.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DAKOSY_Spedb.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DAKOSY_Spedb.Location = New System.Drawing.Point(144, 347)
Me.btnCBAM_DS_DAKOSY_Spedb.Name = "btnCBAM_DS_DAKOSY_Spedb"
Me.btnCBAM_DS_DAKOSY_Spedb.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DAKOSY_Spedb.TabIndex = 45
Me.btnCBAM_DS_DAKOSY_Spedb.Text = "Mit Sped-Buch vergleichen"
Me.btnCBAM_DS_DAKOSY_Spedb.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DAKOSY_Spedb.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DAKOSY_GP
'
Me.btnCBAM_DS_DAKOSY_GP.Enabled = False
Me.btnCBAM_DS_DAKOSY_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DAKOSY_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DAKOSY_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DAKOSY_GP.Location = New System.Drawing.Point(144, 258)
Me.btnCBAM_DS_DAKOSY_GP.Name = "btnCBAM_DS_DAKOSY_GP"
Me.btnCBAM_DS_DAKOSY_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DAKOSY_GP.TabIndex = 46
Me.btnCBAM_DS_DAKOSY_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_DAKOSY_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DAKOSY_GP.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DHF_VERAG_GP
'
Me.btnCBAM_DS_DHF_VERAG_GP.Enabled = False
Me.btnCBAM_DS_DHF_VERAG_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DHF_VERAG_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DHF_VERAG_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DHF_VERAG_GP.Location = New System.Drawing.Point(318, 258)
Me.btnCBAM_DS_DHF_VERAG_GP.Name = "btnCBAM_DS_DHF_VERAG_GP"
Me.btnCBAM_DS_DHF_VERAG_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DHF_VERAG_GP.TabIndex = 47
Me.btnCBAM_DS_DHF_VERAG_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_DHF_VERAG_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DHF_VERAG_GP.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DHF_UNISPED_GP
'
Me.btnCBAM_DS_DHF_UNISPED_GP.Enabled = False
Me.btnCBAM_DS_DHF_UNISPED_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DHF_UNISPED_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DHF_UNISPED_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DHF_UNISPED_GP.Location = New System.Drawing.Point(492, 258)
Me.btnCBAM_DS_DHF_UNISPED_GP.Name = "btnCBAM_DS_DHF_UNISPED_GP"
Me.btnCBAM_DS_DHF_UNISPED_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DHF_UNISPED_GP.TabIndex = 48
Me.btnCBAM_DS_DHF_UNISPED_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_DHF_UNISPED_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DHF_UNISPED_GP.UseVisualStyleBackColor = True
'
'btnCBAM_DS_TELOTEC_GP
'
Me.btnCBAM_DS_TELOTEC_GP.Enabled = False
Me.btnCBAM_DS_TELOTEC_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_TELOTEC_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_TELOTEC_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_TELOTEC_GP.Location = New System.Drawing.Point(666, 258)
Me.btnCBAM_DS_TELOTEC_GP.Name = "btnCBAM_DS_TELOTEC_GP"
Me.btnCBAM_DS_TELOTEC_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_TELOTEC_GP.TabIndex = 49
Me.btnCBAM_DS_TELOTEC_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_TELOTEC_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_TELOTEC_GP.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Image = Global.SDL.My.Resources.Resources.ico_greenpulse
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button3.Location = New System.Drawing.Point(106, 580)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(168, 42)
Me.Button3.TabIndex = 50
Me.Button3.Text = "Daten an Greenpulse" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "übertragen"
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button3.UseVisualStyleBackColor = True
'
'lblKafkaCnt
'
Me.lblKafkaCnt.AutoSize = True
Me.lblKafkaCnt.Location = New System.Drawing.Point(280, 609)
Me.lblKafkaCnt.Name = "lblKafkaCnt"
Me.lblKafkaCnt.Size = New System.Drawing.Size(10, 13)
Me.lblKafkaCnt.TabIndex = 51
Me.lblKafkaCnt.Text = "-"
'
'Panel1
'
Me.Panel1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Panel1.BackColor = System.Drawing.Color.FloralWhite
Me.Panel1.Controls.Add(Me.txtCalcLand)
Me.Panel1.Controls.Add(Me.txtCalcErg)
Me.Panel1.Controls.Add(Me.Button4)
Me.Panel1.Controls.Add(Me.txtCalcJahr)
Me.Panel1.Controls.Add(Me.Label11)
Me.Panel1.Controls.Add(Me.txtCalcEmission)
Me.Panel1.Controls.Add(Me.Label10)
Me.Panel1.Controls.Add(Me.Label9)
Me.Panel1.Controls.Add(Me.txtCalcGewicht)
Me.Panel1.Controls.Add(Me.Label8)
Me.Panel1.Controls.Add(Me.txtCalcKN8)
Me.Panel1.Controls.Add(Me.Label7)
Me.Panel1.Location = New System.Drawing.Point(818, 317)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(223, 315)
Me.Panel1.TabIndex = 52
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Underline, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.Location = New System.Drawing.Point(3, 3)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(84, 13)
Me.Label7.TabIndex = 53
Me.Label7.Text = "CBAM-Rechner:"
'
'Label8
'
Me.Label8.AutoSize = True
Me.Label8.Location = New System.Drawing.Point(3, 25)
Me.Label8.Name = "Label8"
Me.Label8.Size = New System.Drawing.Size(59, 13)
Me.Label8.TabIndex = 55
Me.Label8.Text = "Tarif (8 St.)"
'
'Label9
'
Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(3, 45)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(64, 13)
Me.Label9.TabIndex = 57
Me.Label9.Text = "Gewicht(to):"
'
'Label10
'
Me.Label10.AutoSize = True
Me.Label10.Location = New System.Drawing.Point(3, 65)
Me.Label10.Name = "Label10"
Me.Label10.Size = New System.Drawing.Size(67, 13)
Me.Label10.TabIndex = 59
Me.Label10.Text = "(Emis.CO2/t)"
'
'Label11
'
Me.Label11.AutoSize = True
Me.Label11.Location = New System.Drawing.Point(3, 85)
Me.Label11.Name = "Label11"
Me.Label11.Size = New System.Drawing.Size(68, 13)
Me.Label11.TabIndex = 61
Me.Label11.Text = "(Jahr)/(Land)"
'
'Button4
'
Me.Button4.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button4.Location = New System.Drawing.Point(3, 106)
Me.Button4.Name = "Button4"
Me.Button4.Size = New System.Drawing.Size(217, 28)
Me.Button4.TabIndex = 53
Me.Button4.Text = "Berechnen"
Me.Button4.UseVisualStyleBackColor = True
'
'txtCalcLand
'
Me.txtCalcLand._DateTimeOnly = False
Me.txtCalcLand._numbersOnly = False
Me.txtCalcLand._numbersOnlyKommastellen = ""
Me.txtCalcLand._numbersOnlyTrennzeichen = True
Me.txtCalcLand._Prozent = False
Me.txtCalcLand._ShortDateNew = False
Me.txtCalcLand._ShortDateOnly = False
Me.txtCalcLand._TimeOnly = False
Me.txtCalcLand._TimeOnly_Seconds = False
Me.txtCalcLand._value = ""
Me.txtCalcLand._Waehrung = False
Me.txtCalcLand._WaehrungZeichen = True
Me.txtCalcLand.Enabled = False
Me.txtCalcLand.ForeColor = System.Drawing.Color.Black
Me.txtCalcLand.Location = New System.Drawing.Point(149, 82)
Me.txtCalcLand.MaxLength = 2
Me.txtCalcLand.MaxLineLength = -1
Me.txtCalcLand.MaxLines_Warning = ""
Me.txtCalcLand.MaxLines_Warning_Label = Nothing
Me.txtCalcLand.Name = "txtCalcLand"
Me.txtCalcLand.Size = New System.Drawing.Size(70, 20)
Me.txtCalcLand.TabIndex = 65
'
'txtCalcErg
'
Me.txtCalcErg._DateTimeOnly = False
Me.txtCalcErg._numbersOnly = False
Me.txtCalcErg._numbersOnlyKommastellen = ""
Me.txtCalcErg._numbersOnlyTrennzeichen = True
Me.txtCalcErg._Prozent = False
Me.txtCalcErg._ShortDateNew = False
Me.txtCalcErg._ShortDateOnly = False
Me.txtCalcErg._TimeOnly = False
Me.txtCalcErg._TimeOnly_Seconds = False
Me.txtCalcErg._value = ""
Me.txtCalcErg._Waehrung = False
Me.txtCalcErg._WaehrungZeichen = True
Me.txtCalcErg.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
Or System.Windows.Forms.AnchorStyles.Left) _
Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.txtCalcErg.BackColor = System.Drawing.Color.FloralWhite
Me.txtCalcErg.ForeColor = System.Drawing.Color.Black
Me.txtCalcErg.Location = New System.Drawing.Point(6, 134)
Me.txtCalcErg.MaxLength = 3000
Me.txtCalcErg.MaxLineLength = -1
Me.txtCalcErg.MaxLines_Warning = ""
Me.txtCalcErg.MaxLines_Warning_Label = Nothing
Me.txtCalcErg.Multiline = True
Me.txtCalcErg.Name = "txtCalcErg"
Me.txtCalcErg.ReadOnly = True
Me.txtCalcErg.Size = New System.Drawing.Size(214, 181)
Me.txtCalcErg.TabIndex = 64
'
'txtCalcJahr
'
Me.txtCalcJahr._DateTimeOnly = False
Me.txtCalcJahr._numbersOnly = False
Me.txtCalcJahr._numbersOnlyKommastellen = ""
Me.txtCalcJahr._numbersOnlyTrennzeichen = True
Me.txtCalcJahr._Prozent = False
Me.txtCalcJahr._ShortDateNew = False
Me.txtCalcJahr._ShortDateOnly = False
Me.txtCalcJahr._TimeOnly = False
Me.txtCalcJahr._TimeOnly_Seconds = False
Me.txtCalcJahr._value = ""
Me.txtCalcJahr._Waehrung = False
Me.txtCalcJahr._WaehrungZeichen = True
Me.txtCalcJahr.ForeColor = System.Drawing.Color.Black
Me.txtCalcJahr.Location = New System.Drawing.Point(73, 82)
Me.txtCalcJahr.MaxLength = 4
Me.txtCalcJahr.MaxLineLength = -1
Me.txtCalcJahr.MaxLines_Warning = ""
Me.txtCalcJahr.MaxLines_Warning_Label = Nothing
Me.txtCalcJahr.Name = "txtCalcJahr"
Me.txtCalcJahr.Size = New System.Drawing.Size(70, 20)
Me.txtCalcJahr.TabIndex = 60
'
'txtCalcEmission
'
Me.txtCalcEmission._DateTimeOnly = False
Me.txtCalcEmission._numbersOnly = True
Me.txtCalcEmission._numbersOnlyKommastellen = ""
Me.txtCalcEmission._numbersOnlyTrennzeichen = True
Me.txtCalcEmission._Prozent = False
Me.txtCalcEmission._ShortDateNew = False
Me.txtCalcEmission._ShortDateOnly = False
Me.txtCalcEmission._TimeOnly = False
Me.txtCalcEmission._TimeOnly_Seconds = False
Me.txtCalcEmission._value = ""
Me.txtCalcEmission._Waehrung = False
Me.txtCalcEmission._WaehrungZeichen = True
Me.txtCalcEmission.ForeColor = System.Drawing.Color.Black
Me.txtCalcEmission.Location = New System.Drawing.Point(73, 62)
Me.txtCalcEmission.MaxLength = 10
Me.txtCalcEmission.MaxLineLength = -1
Me.txtCalcEmission.MaxLines_Warning = ""
Me.txtCalcEmission.MaxLines_Warning_Label = Nothing
Me.txtCalcEmission.Name = "txtCalcEmission"
Me.txtCalcEmission.Size = New System.Drawing.Size(147, 20)
Me.txtCalcEmission.TabIndex = 58
'
'txtCalcGewicht
'
Me.txtCalcGewicht._DateTimeOnly = False
Me.txtCalcGewicht._numbersOnly = True
Me.txtCalcGewicht._numbersOnlyKommastellen = ""
Me.txtCalcGewicht._numbersOnlyTrennzeichen = True
Me.txtCalcGewicht._Prozent = False
Me.txtCalcGewicht._ShortDateNew = False
Me.txtCalcGewicht._ShortDateOnly = False
Me.txtCalcGewicht._TimeOnly = False
Me.txtCalcGewicht._TimeOnly_Seconds = False
Me.txtCalcGewicht._value = ""
Me.txtCalcGewicht._Waehrung = False
Me.txtCalcGewicht._WaehrungZeichen = True
Me.txtCalcGewicht.ForeColor = System.Drawing.Color.Black
Me.txtCalcGewicht.Location = New System.Drawing.Point(73, 42)
Me.txtCalcGewicht.MaxLength = 10
Me.txtCalcGewicht.MaxLineLength = -1
Me.txtCalcGewicht.MaxLines_Warning = ""
Me.txtCalcGewicht.MaxLines_Warning_Label = Nothing
Me.txtCalcGewicht.Name = "txtCalcGewicht"
Me.txtCalcGewicht.Size = New System.Drawing.Size(147, 20)
Me.txtCalcGewicht.TabIndex = 56
'
'txtCalcKN8
'
Me.txtCalcKN8._DateTimeOnly = False
Me.txtCalcKN8._numbersOnly = False
Me.txtCalcKN8._numbersOnlyKommastellen = ""
Me.txtCalcKN8._numbersOnlyTrennzeichen = True
Me.txtCalcKN8._Prozent = False
Me.txtCalcKN8._ShortDateNew = False
Me.txtCalcKN8._ShortDateOnly = False
Me.txtCalcKN8._TimeOnly = False
Me.txtCalcKN8._TimeOnly_Seconds = False
Me.txtCalcKN8._value = ""
Me.txtCalcKN8._Waehrung = False
Me.txtCalcKN8._WaehrungZeichen = True
Me.txtCalcKN8.ForeColor = System.Drawing.Color.Black
Me.txtCalcKN8.Location = New System.Drawing.Point(73, 22)
Me.txtCalcKN8.MaxLength = 8
Me.txtCalcKN8.MaxLineLength = -1
Me.txtCalcKN8.MaxLines_Warning = ""
Me.txtCalcKN8.MaxLines_Warning_Label = Nothing
Me.txtCalcKN8.Name = "txtCalcKN8"
Me.txtCalcKN8.Size = New System.Drawing.Size(147, 20)
Me.txtCalcKN8.TabIndex = 54
'
'MyPanel1 'MyPanel1
' '
Me.MyPanel1.Controls.Add(Me.cbxUNISPED) Me.MyPanel1.Controls.Add(Me.cbxUNISPED)
@@ -634,113 +978,12 @@ Partial Class usrCntlCBAM
Me.txtEori.Size = New System.Drawing.Size(341, 20) Me.txtEori.Size = New System.Drawing.Size(341, 20)
Me.txtEori.TabIndex = 1 Me.txtEori.TabIndex = 1
' '
'Button1
'
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Location = New System.Drawing.Point(106, 438)
Me.Button1.Name = "Button1"
Me.Button1.Size = New System.Drawing.Size(168, 42)
Me.Button1.TabIndex = 44
Me.Button1.Text = "XML Datensatz generieren " & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "(DAKOSY)"
Me.Button1.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DAKOSY_Spedb
'
Me.btnCBAM_DS_DAKOSY_Spedb.Enabled = False
Me.btnCBAM_DS_DAKOSY_Spedb.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DAKOSY_Spedb.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DAKOSY_Spedb.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DAKOSY_Spedb.Location = New System.Drawing.Point(144, 347)
Me.btnCBAM_DS_DAKOSY_Spedb.Name = "btnCBAM_DS_DAKOSY_Spedb"
Me.btnCBAM_DS_DAKOSY_Spedb.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DAKOSY_Spedb.TabIndex = 45
Me.btnCBAM_DS_DAKOSY_Spedb.Text = "Mit Sped-Buch vergleichen"
Me.btnCBAM_DS_DAKOSY_Spedb.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DAKOSY_Spedb.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DAKOSY_GP
'
Me.btnCBAM_DS_DAKOSY_GP.Enabled = False
Me.btnCBAM_DS_DAKOSY_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DAKOSY_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DAKOSY_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DAKOSY_GP.Location = New System.Drawing.Point(144, 258)
Me.btnCBAM_DS_DAKOSY_GP.Name = "btnCBAM_DS_DAKOSY_GP"
Me.btnCBAM_DS_DAKOSY_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DAKOSY_GP.TabIndex = 46
Me.btnCBAM_DS_DAKOSY_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_DAKOSY_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DAKOSY_GP.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DHF_VERAG_GP
'
Me.btnCBAM_DS_DHF_VERAG_GP.Enabled = False
Me.btnCBAM_DS_DHF_VERAG_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DHF_VERAG_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DHF_VERAG_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DHF_VERAG_GP.Location = New System.Drawing.Point(318, 258)
Me.btnCBAM_DS_DHF_VERAG_GP.Name = "btnCBAM_DS_DHF_VERAG_GP"
Me.btnCBAM_DS_DHF_VERAG_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DHF_VERAG_GP.TabIndex = 47
Me.btnCBAM_DS_DHF_VERAG_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_DHF_VERAG_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DHF_VERAG_GP.UseVisualStyleBackColor = True
'
'btnCBAM_DS_DHF_UNISPED_GP
'
Me.btnCBAM_DS_DHF_UNISPED_GP.Enabled = False
Me.btnCBAM_DS_DHF_UNISPED_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_DHF_UNISPED_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_DHF_UNISPED_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_DHF_UNISPED_GP.Location = New System.Drawing.Point(492, 258)
Me.btnCBAM_DS_DHF_UNISPED_GP.Name = "btnCBAM_DS_DHF_UNISPED_GP"
Me.btnCBAM_DS_DHF_UNISPED_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_DHF_UNISPED_GP.TabIndex = 48
Me.btnCBAM_DS_DHF_UNISPED_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_DHF_UNISPED_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_DHF_UNISPED_GP.UseVisualStyleBackColor = True
'
'btnCBAM_DS_TELOTEC_GP
'
Me.btnCBAM_DS_TELOTEC_GP.Enabled = False
Me.btnCBAM_DS_TELOTEC_GP.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnCBAM_DS_TELOTEC_GP.Image = Global.SDL.My.Resources.Resources.Excel_logo
Me.btnCBAM_DS_TELOTEC_GP.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnCBAM_DS_TELOTEC_GP.Location = New System.Drawing.Point(666, 258)
Me.btnCBAM_DS_TELOTEC_GP.Name = "btnCBAM_DS_TELOTEC_GP"
Me.btnCBAM_DS_TELOTEC_GP.Size = New System.Drawing.Size(130, 42)
Me.btnCBAM_DS_TELOTEC_GP.TabIndex = 49
Me.btnCBAM_DS_TELOTEC_GP.Text = "GP Detailbericht"
Me.btnCBAM_DS_TELOTEC_GP.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnCBAM_DS_TELOTEC_GP.UseVisualStyleBackColor = True
'
'Button3
'
Me.Button3.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button3.Image = Global.SDL.My.Resources.Resources.ico_greenpulse
Me.Button3.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button3.Location = New System.Drawing.Point(106, 580)
Me.Button3.Name = "Button3"
Me.Button3.Size = New System.Drawing.Size(168, 42)
Me.Button3.TabIndex = 50
Me.Button3.Text = "Daten an Greenpulse" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "übertragen"
Me.Button3.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button3.UseVisualStyleBackColor = True
'
'lblKafkaCnt
'
Me.lblKafkaCnt.AutoSize = True
Me.lblKafkaCnt.Location = New System.Drawing.Point(280, 609)
Me.lblKafkaCnt.Name = "lblKafkaCnt"
Me.lblKafkaCnt.Size = New System.Drawing.Size(10, 13)
Me.lblKafkaCnt.TabIndex = 51
Me.lblKafkaCnt.Text = "-"
'
'usrCntlCBAM 'usrCntlCBAM
' '
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.Controls.Add(Me.Panel1)
Me.Controls.Add(Me.lblKafkaCnt) Me.Controls.Add(Me.lblKafkaCnt)
Me.Controls.Add(Me.Button3) Me.Controls.Add(Me.Button3)
Me.Controls.Add(Me.btnCBAM_DS_TELOTEC_GP) Me.Controls.Add(Me.btnCBAM_DS_TELOTEC_GP)
@@ -793,6 +1036,8 @@ Partial Class usrCntlCBAM
Me.Name = "usrCntlCBAM" Me.Name = "usrCntlCBAM"
Me.Size = New System.Drawing.Size(1041, 632) Me.Size = New System.Drawing.Size(1041, 632)
Me.cntxtAddSdl.ResumeLayout(False) Me.cntxtAddSdl.ResumeLayout(False)
Me.Panel1.ResumeLayout(False)
Me.Panel1.PerformLayout()
Me.MyPanel1.ResumeLayout(False) Me.MyPanel1.ResumeLayout(False)
Me.MyPanel1.PerformLayout() Me.MyPanel1.PerformLayout()
Me.ResumeLayout(False) Me.ResumeLayout(False)
@@ -852,4 +1097,17 @@ Partial Class usrCntlCBAM
Friend WithEvents btnCBAM_DS_TELOTEC_GP As Button Friend WithEvents btnCBAM_DS_TELOTEC_GP As Button
Friend WithEvents Button3 As Button Friend WithEvents Button3 As Button
Friend WithEvents lblKafkaCnt As Label Friend WithEvents lblKafkaCnt As Label
Friend WithEvents Panel1 As Panel
Friend WithEvents Label10 As Label
Friend WithEvents txtCalcEmission As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label9 As Label
Friend WithEvents txtCalcGewicht As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label8 As Label
Friend WithEvents txtCalcKN8 As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label7 As Label
Friend WithEvents txtCalcErg As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Button4 As Button
Friend WithEvents txtCalcJahr As VERAG_PROG_ALLGEMEIN.MyTextBox
Friend WithEvents Label11 As Label
Friend WithEvents txtCalcLand As VERAG_PROG_ALLGEMEIN.MyTextBox
End Class End Class

View File

@@ -364,7 +364,7 @@ Public Class usrCntlCBAM
Private Sub usrCntlCBAM_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub usrCntlCBAM_Load(sender As Object, e As EventArgs) Handles Me.Load
txtJahr.Text = Now.Year txtJahr.Text = Now.Year
txtCalcJahr.Text = Now.Year
If Now.Month < 3 Then If Now.Month < 3 Then
txtJahr.Text = Now.Year - 1 txtJahr.Text = Now.Year - 1
@@ -2029,5 +2029,8 @@ Public Class usrCntlCBAM
End Function End Function
Private Sub Button4_Click(sender As Object, e As EventArgs) Handles Button4.Click
txtCalcErg.Text = cATEZ_Greenpulse_CBAM_CostCalculation.calcCBAM(txtCalcKN8._value, txtCalcGewicht._value, txtCalcEmission._value, txtCalcJahr._value, txtCalcLand._value)
End Sub
End Class End Class

View File

@@ -551,10 +551,10 @@ Public Class KdSearchBox
SQLstr &= " ) " SQLstr &= " ) "
End If End If
'AUSNAHME BIS BESSERE LÖSUNG: ''AUSNAHME BIS BESSERE LÖSUNG:
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then
SQLstr &= " and Filialen.Firma NOT IN ('AMBAR') " ' SQLstr &= " and Filialen.Firma NOT IN ('AMBAR') "
End If 'End If
'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'Keine 'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'Keine
@@ -643,10 +643,10 @@ Public Class KdSearchBox
End If End If
'AUSNAHME BIS BESSERE LÖSUNG: 'AUSNAHME BIS BESSERE LÖSUNG
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then 'If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA = "FRONTOFFICE" Then
SQLstr &= " and Filialen.Firma NOT IN ('AMBAR') " ' SQLstr &= " and Filialen.Firma NOT IN ('AMBAR') "
End If 'End If
If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'" If Not _displayWoelflKd Then SQLstr &= " AND AdressenNr NOT LIKE '15%'"
SQLstr &= " order by Ordnungsbegriff " SQLstr &= " order by Ordnungsbegriff "

View File

@@ -54,6 +54,9 @@ Public Class SQL
Else Else
Try Try
If VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED Then
Return My.MySettings.Default.VERAGConnectionStringPROD
End If
Return My.MySettings.Default.FMZOLL_PRODConnectionString Return My.MySettings.Default.FMZOLL_PRODConnectionString
Catch ex As Exception Catch ex As Exception
' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;" ' Return "Data Source=192.168.0.91\SQLFMZOLL;Initial Catalog=VERAG;Integrated Security=false;User ID=test;Password=BmWr501956;"
@@ -919,51 +922,7 @@ Public Class SQL
Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT() Case "PARKZEIT" : conn = GetNewOpenConnectionPARKZEIT()
End Select End Select
'NOT Working--------------------------------------------
'Try
' ' MsgBox(sql)
' Using cmd As New SqlCommand(sql, conn)
' If list IsNot Nothing Then
' For Each i In list
' If String.IsNullOrWhiteSpace(i.Scalarvariable) Then
' Throw New Exception("❌ Leerer Parametername in SQLVariable!")
' End If
' If i.Scalarvariable.ToLower = "errno" Then
' Throw New Exception("❌ Ungültiger Parametername 'errno' bitte umbenennen.")
' End If
' If Not System.Text.RegularExpressions.Regex.IsMatch(i.Scalarvariable, "^[a-zA-Z0-9_]+$") Then
' Throw New Exception("❌ Ungültiger SQL-Parametername (Regex): '" & i.Scalarvariable & "'")
' End If
' 'MsgBox(i.Text.trim & " " & IIf(i.Value Is Nothing, DBNull.Value, i.Value))
' cmd.Parameters.AddWithValue("@" & i.Scalarvariable.trim, IIf(i.Value Is Nothing, DBNull.Value, i.Value))
' Next
' End If
' cmd.ExecuteNonQuery()
' End Using
' conn.Close()
' Return True
'Catch ex As Exception
' ' MsgBox("ERR!")
' If ex.Message.Contains("Falsche Syntax in der Nähe von '@errno'") Then
' ' Spezielle Behandlung für den Fehler mit dem Parameter 'errno'
' 'VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR("❌ Ungültiger SQL-Parametername 'errno' bitte umbenennen.", ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, , , , , sql)
' ElseIf ex.Message.Contains("Leerer Parametername") Then
' If showErr Then VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, , , , , sql)
' End If
'End Try
'Return False
'NOT Working--------------------------------------------
Try Try
' MsgBox(sql) ' MsgBox(sql)
@@ -972,6 +931,12 @@ Public Class SQL
For Each i In list For Each i In list
'MsgBox(i.Text.trim & " " & IIf(i.Value Is Nothing, DBNull.Value, i.Value)) 'MsgBox(i.Text.trim & " " & IIf(i.Value Is Nothing, DBNull.Value, i.Value))
cmd.Parameters.AddWithValue("@" & i.Scalarvariable.trim, IIf(i.Value Is Nothing, DBNull.Value, i.Value)) cmd.Parameters.AddWithValue("@" & i.Scalarvariable.trim, IIf(i.Value Is Nothing, DBNull.Value, i.Value))
'Dim p As SqlParameter = cmd.Parameters.Add(
' "@" & i.Scalarvariable.Trim,
' SqlDbType.Variant
')
'p.Value = If(i.Value Is Nothing, DBNull.Value, i.Value)
Next Next
End If End If
cmd.ExecuteNonQuery() cmd.ExecuteNonQuery()
@@ -1028,16 +993,20 @@ Public Class SQL
Else Else
cmd.ExecuteNonQuery() cmd.ExecuteNonQuery()
'If id <= 0 Then
' Dim newcmd As New SqlCommand("SELECT CONVERT(int,isnull(@@IDENTITY,0))", conn)
' id = CInt(newcmd.ExecuteScalar)
' If id = 0 Then
' Dim newcmd2 As New SqlCommand("SELECT CONVERT(int,isnull(SCOPE_IDENTITY(),0))", conn)
' id = CInt(newcmd2.ExecuteScalar)
' End If
'End If
If id <= 0 Then If id <= 0 Then
Dim newcmd As New SqlCommand("SELECT CONVERT(int,isnull(@@IDENTITY,0))", conn) Using newcmd2 As New SqlCommand("SELECT CONVERT(int, ISNULL(SCOPE_IDENTITY(),0))", conn)
id = CInt(newcmd.ExecuteScalar) id = CInt(newcmd2.ExecuteScalar())
If id = 0 Then End Using
Dim newcmd2 As New SqlCommand("SELECT CONVERT(int,isnull(SCOPE_IDENTITY(),0))", conn)
id = CInt(newcmd2.ExecuteScalar)
End If
End If End If
End If End If
'Return True 'Return True

View File

@@ -159,13 +159,15 @@ Public Class SQLVariable
Private primaryParam As Boolean Private primaryParam As Boolean
Private onlyForLoad As Boolean Private onlyForLoad As Boolean
Private onlyForSave As Boolean Private onlyForSave As Boolean
Public Property DbType As SqlDbType = SqlDbType.Variant
Public Sub New(ByVal Text As String, ByVal Value As Object, Optional Scalarvariablename As String = "", Optional primaryParam As Boolean = False, Optional onlyForLoad As Boolean = False, Optional onlyForSave As Boolean = False) Public Sub New(ByVal Text As String, ByVal Value As Object, Optional Scalarvariablename As String = "", Optional primaryParam As Boolean = False, Optional onlyForLoad As Boolean = False, Optional onlyForSave As Boolean = False, Optional DbType As SqlDbType = SqlDbType.Variant)
Me.TextSQLName = Text Me.TextSQLName = Text
Me.ValueSQLVALUE = Value Me.ValueSQLVALUE = Value
Me.primaryParam = primaryParam Me.primaryParam = primaryParam
Me.onlyForLoad = onlyForLoad Me.onlyForLoad = onlyForLoad
Me.onlyForSave = onlyForSave Me.onlyForSave = onlyForSave
Me.DbType = DbType
If Scalarvariablename <> "" Then Me.Scalarvariablename = Scalarvariablename Else Me.Scalarvariablename = Text If Scalarvariablename <> "" Then Me.Scalarvariablename = Scalarvariablename Else Me.Scalarvariablename = Text
End Sub End Sub

View File

@@ -309,7 +309,7 @@ Public Class cRechnungsausgang
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Lastschrift", Lastschrift)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Lastschrift", Lastschrift))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kunden-SVS", Kunden_SVS, "Kunden_SVS")) '!!!!- list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kunden-SVS", Kunden_SVS, "Kunden_SVS")) '!!!!-
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Steuerschlüssel", Steuerschlüssel)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Steuerschlüssel", Steuerschlüssel))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Steuersatz %", Steuersatz_Proz, "Steuersatz_Proz")) '!!!! % list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Steuersatz %", Steuersatz_Proz, "Steuersatz_Proz") With {.DbType = SqlDbType.Real}) '!!!! %
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LKW Kennzeichen", LKW_Kennzeichen, "LKW_Kennzeichen")) '!!!! list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LKW Kennzeichen", LKW_Kennzeichen, "LKW_Kennzeichen")) '!!!!
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("WährungsNr", WährungsNr)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("WährungsNr", WährungsNr))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Wert", Wert)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Wert", Wert))
@@ -324,8 +324,8 @@ Public Class cRechnungsausgang
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Anlage 5", Anlage_5, "Anlage_5")) '!!!! list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Anlage 5", Anlage_5, "Anlage_5")) '!!!!
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Anlage 6", Anlage_6, "Anlage_6")) '!!!! list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Anlage 6", Anlage_6, "Anlage_6")) '!!!!
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("OffertenNr", OffertenNr)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("OffertenNr", OffertenNr))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Vorlageprovision %", Vorlageprovision_Proz, "Vorlageprovision_Proz")) '!!!!% list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Vorlageprovision %", Vorlageprovision_Proz, "Vorlageprovision_Proz") With {.DbType = SqlDbType.Real}) '!!!!%
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kreditaufwendungen %", Kreditaufwendungen_Proz, "Kreditaufwendungen_Proz")) '!!!!% list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Kreditaufwendungen %", Kreditaufwendungen_Proz, "Kreditaufwendungen_Proz") With {.DbType = SqlDbType.Real}) '!!!!%
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Besonderheiten", Besonderheiten)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Besonderheiten", Besonderheiten))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Vorkasse", Vorkasse)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Vorkasse", Vorkasse))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Text", Text)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Text", Text))

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.8.0.0"), _ Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.14.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Public NotInheritable Class MySettings Partial Public NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -406,6 +406,18 @@ Namespace My
Return CType(Me("AsfinagConnectionStringPROD"),String) Return CType(Me("AsfinagConnectionStringPROD"),String)
End Get End Get
End Property End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=VERAG;Integrated Security=fa"& _
"lse;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=5;Max Poo"& _
"l Size=200")> _
Public ReadOnly Property VERAGConnectionStringPROD() As String
Get
Return CType(Me("VERAGConnectionStringPROD"),String)
End Get
End Property
End Class End Class
End Namespace End Namespace

View File

@@ -183,5 +183,12 @@
&lt;/SerializableConnectionString&gt;</DesignTimeValue> &lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ASFINAG;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;TransparentNetworkIPResolution=False;Pooling=true;Min Pool Size=20;Max Pool Size=250</Value> <Value Profile="(Default)">Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=ASFINAG;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;TransparentNetworkIPResolution=False;Pooling=true;Min Pool Size=20;Max Pool Size=250</Value>
</Setting> </Setting>
<Setting Name="VERAGConnectionStringPROD" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;ConnectionString&gt;Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=VERAG;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=5;Max Pool Size=200&lt;/ConnectionString&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SQLGUIDE01.verag.ost.dmn;Initial Catalog=VERAG;Integrated Security=false;User ID=AppUser;Password=yp/THDd?xM+pZ$;Pooling=true;Min Pool Size=5;Max Pool Size=200</Value>
</Setting>
</Settings> </Settings>
</SettingsFile> </SettingsFile>

View File

@@ -0,0 +1,292 @@
' ============================================================================
' GreenPulse CBAM Carbon Cost API
' Single-file VB.NET implementation using Chilkat
' --------------------------------------------------------------------------
' Contains:
' - cATEZ_Greenpulse_CBAM_CostCalculation (main API class)
' - Request / Response DTO classes
' - Error handling & JSON parsing
'
' Requirements:
' - Chilkat.Http
' - Chilkat.JsonObject
' ============================================================================
Imports Chilkat
Imports System.Globalization
' ============================================================================
' MAIN API CLASS
' ============================================================================
Public Class cATEZ_Greenpulse_CBAM_CostCalculation
Private ReadOnly _baseUrl As String = "https://test-greenpulse-api.singlewindow.io/api/v1-0/public"
' Private ReadOnly _baseUrl As String = "https://greenpulse-api.singlewindow.io/api/v1-0/public"
Private ReadOnly _http As Http
Public Sub New()
'_baseUrl = baseUrl.TrimEnd("/"c)
_http = New Http()
_http.SetRequestHeader("Content-Type", "application/json")
End Sub
' ------------------------------------------------------------------------
' GET /carbon-cost/cn-codes
' Returns raw JSON (ideal for dropdowns / caching)
' ------------------------------------------------------------------------
Public Function GetCnCodesRaw() As String
Dim url As String = _baseUrl & "/carbon-cost/cn-codes"
Dim resp As HttpResponse = _http.QuickGetObj(url)
If resp Is Nothing Then
Throw New Exception(_http.LastErrorText)
End If
Return resp.BodyStr
End Function
' ------------------------------------------------------------------------
' POST /carbon-cost/calculate
' ------------------------------------------------------------------------
Public Function CalculateCost(req As cCBAM_CostCalculation_Request) As cCBAM_CostCalculation_Response
VERAG_PROG_ALLGEMEIN.cChilkat_Helper.UnlockCilkat()
Dim url As String = _baseUrl & "/carbon-cost/calculate"
Dim resp As HttpResponse = _http.PostJson2(
url,
"application/json",
req.ToJson()
)
If resp Is Nothing Then
Throw New Exception(_http.LastErrorText)
End If
Return ParseResponse(resp.BodyStr)
End Function
' ------------------------------------------------------------------------
' JSON → Object mapping
' ------------------------------------------------------------------------
Private Function ParseResponse(jsonStr As String) _
As cCBAM_CostCalculation_Response
Dim json As New JsonObject()
json.Load(jsonStr)
Dim result As New cCBAM_CostCalculation_Response()
result.success = json.BoolOf("success")
If result.success Then
Dim d = json.ObjectOf("data")
result.data = New cCBAM_CostCalculation_Data With {
.cost = GetDec(d, "cost"),
.cbam_emission = GetDec(d, "cbam_emission"),
.benchmark = GetDec(d, "benchmark"),
.phase_factor = GetDec(d, "phase_factor"),
.carbon_price = GetDec(d, "carbon_price"),
.currency = d.StringOf("currency")
}
Dim det = d.ObjectOf("calculation_details")
result.data.calculation_details = New cCBAM_CostCalculation_Details With {
.cbam_emission = GetDec(det, "cbam_emission"),
.benchmark = GetDec(det, "benchmark"),
.adjusted_benchmark = GetDec(det, "adjusted_benchmark"),
.emission_difference = GetDec(det, "emission_difference"),
.weight = GetDec(det, "weight"),
.carbon_price = GetDec(det, "carbon_price")
}
Else
Dim e = json.ObjectOf("error")
result.error = New cCBAM_Error With {
.code = e.StringOf("code"),
.message = e.StringOf("message"),
.statusCode = e.IntOf("statusCode")
}
End If
Return result
End Function
' ------------------------------------------------------------------------
' Robust numeric parsing across Chilkat versions:
' Many Chilkat builds don't expose DoubleOf/NumberOf in the .NET wrapper.
' Any JSON value (incl. numbers) can be read via StringOf and converted.
' ------------------------------------------------------------------------
Private Shared Function GetDec(obj As JsonObject, name As String) As Decimal
Dim s As String = obj.StringOf(name)
If String.IsNullOrWhiteSpace(s) Then Return 0D
' Ensure dot decimal separator
s = s.Trim().Replace(",", ".")
Dim v As Decimal
If Decimal.TryParse(s, NumberStyles.Any, CultureInfo.InvariantCulture, v) Then
Return v
End If
' Fallback: try current culture (last resort)
If Decimal.TryParse(s, NumberStyles.Any, CultureInfo.CurrentCulture, v) Then
Return v
End If
Return 0D
End Function
Shared Function calcCBAM(cn_code, weight, Optional see_total = "", Optional year = "", Optional country = "") As String
If cn_code = "" Or Not IsNumeric(cn_code) Then
Return "Fehler: ungültiger CN-Code"
End If
If weight = "" Or Not IsNumeric(weight) Then
Return "Fehler: ungültiges Gewicht"
End If
If see_total <> "" AndAlso Not IsNumeric(see_total) Then
Return "Fehler: ungültige echten Emissionen"
End If
If year <> "" AndAlso Not IsNumeric(year) Then
If Not IsNumeric(year) Then Return "Fehler: ungültiges Phase-in Jahr"
If year.length <> 4 Then Return "Fehler: ungültiges Phase-in Jahr"
End If
If country <> "" AndAlso country.length > 2 Then
' Derzeit nicht unterstützt
Return "Fehler: Land wird derzeit nicht unterstützt"
End If
' ------------------------------------------------------------
' 1) API initialisieren
' ------------------------------------------------------------
Dim api As New cATEZ_Greenpulse_CBAM_CostCalculation()
' ------------------------------------------------------------
' 2) Request aufbauen
' ------------------------------------------------------------
Dim req As New cCBAM_CostCalculation_Request With {
.cn_code = cn_code,
.weight = CDbl(weight), ' Tonnen
.see_total = If(see_total = "", Nothing, see_total), ' optionale echte Emissionen
.year = If(year = "", Nothing, CInt(year)) ' Phase-in Jahr
}
' ------------------------------------------------------------
' 3) Request ausführen
' ------------------------------------------------------------
Dim resp As cCBAM_CostCalculation_Response = api.CalculateCost(req)
Dim erg = ""
' ------------------------------------------------------------
' 4) Ergebnis auswerten
' ------------------------------------------------------------
If resp.success Then
erg &= "CBAM Kostenberechnung erfolgreich" & vbNewLine
erg &= "--------------------------------" & vbNewLine
erg &= $"Kosten: {CDbl(resp.data.cost).ToString("N2")} {resp.data.currency}" & vbNewLine
erg &= $"CBAM Emission: {resp.data.cbam_emission}" & vbNewLine
erg &= $"Benchmark: {resp.data.benchmark}" & vbNewLine
erg &= $"Phase-Faktor: {resp.data.phase_factor}" & vbNewLine
erg &= $"CO2 Preis: {resp.data.carbon_price}" & vbNewLine
erg &= "" & vbNewLine
erg &= "Details:" & vbNewLine
erg &= $" Adjusted Benchmark: {resp.data.calculation_details.adjusted_benchmark}" & vbNewLine
erg &= $" Emission Difference: {resp.data.calculation_details.emission_difference}" & vbNewLine
erg &= $" Gewicht: {CDbl(resp.data.calculation_details.weight).ToString("N2")} t" & vbNewLine
Else
erg &= "CBAM Kostenberechnung FEHLER" & vbNewLine
erg &= "--------------------------------" & vbNewLine
erg &= $"Code: {resp.error.code}" & vbNewLine
erg &= $"Message: {resp.error.message}" & vbNewLine
erg &= $"HTTP Status: {resp.error.statusCode}" & vbNewLine
End If
' Console.ReadKey()
Return erg
End Function
End Class
' ============================================================================
' REQUEST DTO
' ============================================================================
Public Class cCBAM_CostCalculation_Request
Public Property cn_code As String
Public Property weight As Decimal
Public Property see_total As Nullable(Of Decimal)
Public Property year As Nullable(Of Integer)
Public Function ToJson() As String
Dim json As New JsonObject()
json.UpdateString("cn_code", cn_code)
json.UpdateNumber("weight", weight.ToString(CultureInfo.InvariantCulture))
If see_total.HasValue Then
json.UpdateNumber("see_total", see_total.Value.ToString(CultureInfo.InvariantCulture))
End If
If year.HasValue Then
json.UpdateInt("year", year.Value)
End If
Return json.Emit()
End Function
End Class
' ============================================================================
' RESPONSE ROOT
' ============================================================================
Public Class cCBAM_CostCalculation_Response
Public Property success As Boolean
Public Property data As cCBAM_CostCalculation_Data
Public Property [error] As cCBAM_Error
End Class
' ============================================================================
' RESPONSE DATA
' ============================================================================
Public Class cCBAM_CostCalculation_Data
Public Property cost As Decimal
Public Property cbam_emission As Decimal
Public Property benchmark As Decimal
Public Property phase_factor As Decimal
Public Property carbon_price As Decimal
Public Property currency As String
Public Property calculation_details As cCBAM_CostCalculation_Details
End Class
' ============================================================================
' RESPONSE DETAILS
' ============================================================================
Public Class cCBAM_CostCalculation_Details
Public Property cbam_emission As Decimal
Public Property benchmark As Decimal
Public Property adjusted_benchmark As Decimal
Public Property emission_difference As Decimal
Public Property weight As Decimal
Public Property carbon_price As Decimal
End Class
' ============================================================================
' ERROR OBJECT
' ============================================================================
Public Class cCBAM_Error
Public Property code As String
Public Property message As String
Public Property statusCode As Integer
End Class

View File

@@ -407,6 +407,7 @@
<Compile Include="frmDatumsabfrage.vb"> <Compile Include="frmDatumsabfrage.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
<Compile Include="Schnittstellen\ATEZ\GREENPULSE\cATEZ_Greenpulse_CBAM_CostCalculation.vb" />
<Compile Include="Schnittstellen\ATEZ\GREENPULSE\cATEZ_Greenpulse_KafkaDecs.vb" /> <Compile Include="Schnittstellen\ATEZ\GREENPULSE\cATEZ_Greenpulse_KafkaDecs.vb" />
<Compile Include="Schnittstellen\ATEZ\GREENPULSE\cATEZ_Greenpulse_KafkaInvoices.vb" /> <Compile Include="Schnittstellen\ATEZ\GREENPULSE\cATEZ_Greenpulse_KafkaInvoices.vb" />
<Compile Include="Schnittstellen\ATEZ\Read_T1\cATEZ_Read_T1.vb" /> <Compile Include="Schnittstellen\ATEZ\Read_T1\cATEZ_Read_T1.vb" />

View File

@@ -23,8 +23,13 @@ Public Class cAllgemein
' Public Shared AVISO_SERVER As String = "[BUCHHALTUNG\SQLEXPRESS]" ' Public Shared AVISO_SERVER As String = "[BUCHHALTUNG\SQLEXPRESS]"
'Public Shared AVISO_SERVER As String = "[SQL01.verag.ost.dmn\VERAG]" 'Public Shared AVISO_SERVER As String = "[SQL01.verag.ost.dmn\VERAG]"
'Public Shared AVISO_SERVER As String = "[SQLGUIDE.verag.ost.dmn\VERAG]" 'Public Shared AVISO_SERVER As String = "[SQLGUIDE.verag.ost.dmn\VERAG]"
Public Shared AVISO_SERVER As String = "[SQLGUIDE01.verag.ost.dmn]" '"[SQLGUIDE01.verag.ost.dmn]" Public Shared AVISO_SERVER As String = "[SQLGUIDE01.verag.ost.dmn]" '"[SQLGUIDE01.verag.ost.dmn]"
Public Shared FMZOLL_SERVER As String = "[FMZOLL\SQLFMZOLL]" '"[SQLGUIDE01.verag.ost.dmn]" Public Shared FMZOLL_SERVER As String = "[FMZOLL\SQLFMZOLL]" '"[SQLGUIDE01.verag.ost.dmn]"
Public Shared SQLGUIDE01_USED As Boolean = False 'FM-ZOLL Ablöse!!!!
'Public Shared FMZOLL_ATLAS_Datensicherung As String = "\\192.168.0.91\f\FMZoll\Datensicherung\atlas\atlas\fssouzb" 'Public Shared FMZOLL_ATLAS_Datensicherung As String = "\\192.168.0.91\f\FMZoll\Datensicherung\atlas\atlas\fssouzb"
Public Shared FMZOLL_ATLAS_Datensicherung_OLD As String = "\\share01\F\FMZoll\Datensicherung\atlas\atlas\fssouzb" Public Shared FMZOLL_ATLAS_Datensicherung_OLD As String = "\\share01\F\FMZoll\Datensicherung\atlas\atlas\fssouzb"