Maut, QU-Kontrolle, MAhnlauf, Kundebearbeiten, etc.

This commit is contained in:
2024-09-06 15:40:58 +02:00
parent ad7fa10999
commit a9228921e0
32 changed files with 6225 additions and 1100 deletions

View File

@@ -22,15 +22,15 @@ Partial Class usrCntlQualitaetskontrolle
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle9 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()
Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Me.Label46 = New System.Windows.Forms.Label()
Me.Button2 = New System.Windows.Forms.Button()
Me.Label40 = New System.Windows.Forms.Label()
@@ -62,6 +62,12 @@ Partial Class usrCntlQualitaetskontrolle
Me.txtFirma = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label30 = New System.Windows.Forms.Label()
Me.dgvPositionen = New System.Windows.Forms.DataGridView()
Me.pos = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.anZ_pkgstk = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.art_pkgstk = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.erzeugnis = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.gewicht = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.KNCode = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.txtPackAdresse2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtPackAdresse1 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtPackFirma = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -103,12 +109,8 @@ Partial Class usrCntlQualitaetskontrolle
Me.cbxVerzicht = New System.Windows.Forms.CheckBox()
Me.txtSumme = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Label18 = New System.Windows.Forms.Label()
Me.pos = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.anZ_pkgstk = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.art_pkgstk = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.erzeugnis = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.gewicht = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.KNCode = New System.Windows.Forms.DataGridViewTextBoxColumn()
Me.btnVermarktungsnorman = New System.Windows.Forms.Button()
Me.btnPreise = New System.Windows.Forms.Button()
CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvPositionen, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvGebuehren, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -561,6 +563,50 @@ Partial Class usrCntlQualitaetskontrolle
Me.dgvPositionen.Size = New System.Drawing.Size(791, 345)
Me.dgvPositionen.TabIndex = 156
'
'pos
'
DataGridViewCellStyle10.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle10.Format = "N0"
DataGridViewCellStyle10.NullValue = Nothing
Me.pos.DefaultCellStyle = DataGridViewCellStyle10
Me.pos.Frozen = True
Me.pos.HeaderText = "Position"
Me.pos.MaxInputLength = 3
Me.pos.Name = "pos"
Me.pos.ReadOnly = True
Me.pos.Width = 50
'
'anZ_pkgstk
'
Me.anZ_pkgstk.HeaderText = "Anz-Packs."
Me.anZ_pkgstk.Name = "anZ_pkgstk"
'
'art_pkgstk
'
Me.art_pkgstk.HeaderText = "Art-Packs"
Me.art_pkgstk.Name = "art_pkgstk"
'
'erzeugnis
'
Me.erzeugnis.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill
Me.erzeugnis.HeaderText = "Art des Erzeugnisses"
Me.erzeugnis.Name = "erzeugnis"
'
'gewicht
'
DataGridViewCellStyle11.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle11.Format = "N2"
DataGridViewCellStyle11.NullValue = Nothing
Me.gewicht.DefaultCellStyle = DataGridViewCellStyle11
Me.gewicht.HeaderText = "Gewicht"
Me.gewicht.MaxInputLength = 100
Me.gewicht.Name = "gewicht"
'
'KNCode
'
Me.KNCode.HeaderText = "KNCode"
Me.KNCode.Name = "KNCode"
'
'txtPackAdresse2
'
Me.txtPackAdresse2._DateTimeOnly = False
@@ -802,10 +848,10 @@ Partial Class usrCntlQualitaetskontrolle
'
'DataGridViewTextBoxColumn1
'
DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle3.Format = "N0"
DataGridViewCellStyle3.NullValue = Nothing
Me.DataGridViewTextBoxColumn1.DefaultCellStyle = DataGridViewCellStyle3
DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle12.Format = "N0"
DataGridViewCellStyle12.NullValue = Nothing
Me.DataGridViewTextBoxColumn1.DefaultCellStyle = DataGridViewCellStyle12
Me.DataGridViewTextBoxColumn1.Frozen = True
Me.DataGridViewTextBoxColumn1.HeaderText = "Position"
Me.DataGridViewTextBoxColumn1.MaxInputLength = 3
@@ -827,20 +873,20 @@ Partial Class usrCntlQualitaetskontrolle
'DataGridViewTextBoxColumn4
'
Me.DataGridViewTextBoxColumn4.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill
DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle4.Format = "N2"
DataGridViewCellStyle4.NullValue = Nothing
Me.DataGridViewTextBoxColumn4.DefaultCellStyle = DataGridViewCellStyle4
DataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle13.Format = "N2"
DataGridViewCellStyle13.NullValue = Nothing
Me.DataGridViewTextBoxColumn4.DefaultCellStyle = DataGridViewCellStyle13
Me.DataGridViewTextBoxColumn4.HeaderText = "Gewicht"
Me.DataGridViewTextBoxColumn4.MaxInputLength = 100
Me.DataGridViewTextBoxColumn4.Name = "DataGridViewTextBoxColumn4"
'
'DataGridViewTextBoxColumn5
'
DataGridViewCellStyle5.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle5.Format = "N2"
DataGridViewCellStyle5.NullValue = Nothing
Me.DataGridViewTextBoxColumn5.DefaultCellStyle = DataGridViewCellStyle5
DataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle14.Format = "N2"
DataGridViewCellStyle14.NullValue = Nothing
Me.DataGridViewTextBoxColumn5.DefaultCellStyle = DataGridViewCellStyle14
Me.DataGridViewTextBoxColumn5.HeaderText = "Gewicht"
Me.DataGridViewTextBoxColumn5.MaxInputLength = 100
Me.DataGridViewTextBoxColumn5.Name = "DataGridViewTextBoxColumn5"
@@ -959,37 +1005,37 @@ Partial Class usrCntlQualitaetskontrolle
'
'gew
'
DataGridViewCellStyle6.Format = "N2"
DataGridViewCellStyle6.NullValue = Nothing
Me.gew.DefaultCellStyle = DataGridViewCellStyle6
DataGridViewCellStyle15.Format = "N2"
DataGridViewCellStyle15.NullValue = Nothing
Me.gew.DefaultCellStyle = DataGridViewCellStyle15
Me.gew.HeaderText = "Gewicht"
Me.gew.Name = "gew"
Me.gew.ReadOnly = True
'
'Preis
'
DataGridViewCellStyle7.Format = "C2"
DataGridViewCellStyle7.NullValue = Nothing
Me.Preis.DefaultCellStyle = DataGridViewCellStyle7
DataGridViewCellStyle16.Format = "C2"
DataGridViewCellStyle16.NullValue = Nothing
Me.Preis.DefaultCellStyle = DataGridViewCellStyle16
Me.Preis.HeaderText = "Preis"
Me.Preis.Name = "Preis"
Me.Preis.ReadOnly = True
'
'Faktor
'
DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
DataGridViewCellStyle8.Format = "N0"
DataGridViewCellStyle8.NullValue = Nothing
Me.Faktor.DefaultCellStyle = DataGridViewCellStyle8
DataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleCenter
DataGridViewCellStyle17.Format = "N0"
DataGridViewCellStyle17.NullValue = Nothing
Me.Faktor.DefaultCellStyle = DataGridViewCellStyle17
Me.Faktor.HeaderText = "Faktor"
Me.Faktor.Name = "Faktor"
Me.Faktor.ReadOnly = True
'
'Betrag
'
DataGridViewCellStyle9.Format = "C2"
DataGridViewCellStyle9.NullValue = Nothing
Me.Betrag.DefaultCellStyle = DataGridViewCellStyle9
DataGridViewCellStyle18.Format = "C2"
DataGridViewCellStyle18.NullValue = Nothing
Me.Betrag.DefaultCellStyle = DataGridViewCellStyle18
Me.Betrag.HeaderText = "Betrag"
Me.Betrag.Name = "Betrag"
Me.Betrag.ReadOnly = True
@@ -1051,49 +1097,27 @@ Partial Class usrCntlQualitaetskontrolle
Me.Label18.TabIndex = 192
Me.Label18.Text = "Betrag:"
'
'pos
'btnVermarktungsnorman
'
DataGridViewCellStyle1.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle1.Format = "N0"
DataGridViewCellStyle1.NullValue = Nothing
Me.pos.DefaultCellStyle = DataGridViewCellStyle1
Me.pos.Frozen = True
Me.pos.HeaderText = "Position"
Me.pos.MaxInputLength = 3
Me.pos.Name = "pos"
Me.pos.ReadOnly = True
Me.pos.Width = 50
Me.btnVermarktungsnorman.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnVermarktungsnorman.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnVermarktungsnorman.Location = New System.Drawing.Point(24, 736)
Me.btnVermarktungsnorman.Name = "btnVermarktungsnorman"
Me.btnVermarktungsnorman.Size = New System.Drawing.Size(127, 24)
Me.btnVermarktungsnorman.TabIndex = 194
Me.btnVermarktungsnorman.Text = "Vermarktungsnormen"
Me.btnVermarktungsnorman.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnVermarktungsnorman.UseVisualStyleBackColor = True
'
'anZ_pkgstk
'btnPreise
'
Me.anZ_pkgstk.HeaderText = "Anz-Packs."
Me.anZ_pkgstk.Name = "anZ_pkgstk"
'
'art_pkgstk
'
Me.art_pkgstk.HeaderText = "Art-Packs"
Me.art_pkgstk.Name = "art_pkgstk"
'
'erzeugnis
'
Me.erzeugnis.AutoSizeMode = System.Windows.Forms.DataGridViewAutoSizeColumnMode.Fill
Me.erzeugnis.HeaderText = "Art des Erzeugnisses"
Me.erzeugnis.Name = "erzeugnis"
'
'gewicht
'
DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleRight
DataGridViewCellStyle2.Format = "N2"
DataGridViewCellStyle2.NullValue = Nothing
Me.gewicht.DefaultCellStyle = DataGridViewCellStyle2
Me.gewicht.HeaderText = "Gewicht"
Me.gewicht.MaxInputLength = 100
Me.gewicht.Name = "gewicht"
'
'KNCode
'
Me.KNCode.HeaderText = "KNCode"
Me.KNCode.Name = "KNCode"
Me.btnPreise.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnPreise.Location = New System.Drawing.Point(24, 766)
Me.btnPreise.Name = "btnPreise"
Me.btnPreise.Size = New System.Drawing.Size(127, 24)
Me.btnPreise.TabIndex = 195
Me.btnPreise.Text = "Preise"
Me.btnPreise.UseVisualStyleBackColor = True
'
'usrCntlQualitaetskontrolle
'
@@ -1101,6 +1125,8 @@ Partial Class usrCntlQualitaetskontrolle
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.WhiteSmoke
Me.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.Controls.Add(Me.btnPreise)
Me.Controls.Add(Me.btnVermarktungsnorman)
Me.Controls.Add(Me.txtSumme)
Me.Controls.Add(Me.Label18)
Me.Controls.Add(Me.cbxVerzicht)
@@ -1250,4 +1276,6 @@ Partial Class usrCntlQualitaetskontrolle
Friend WithEvents erzeugnis As DataGridViewTextBoxColumn
Friend WithEvents gewicht As DataGridViewTextBoxColumn
Friend WithEvents KNCode As DataGridViewTextBoxColumn
Friend WithEvents btnVermarktungsnorman As Button
Friend WithEvents btnPreise As Button
End Class

View File

@@ -135,6 +135,39 @@
<metadata name="KNCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="pos.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="anZ_pkgstk.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="art_pkgstk.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="erzeugnis.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="gewicht.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="KNCode.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Art.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="gew.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Preis.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Faktor.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Betrag.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>
<metadata name="Art.UserAddedColumn" type="System.Boolean, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>True</value>
</metadata>

View File

@@ -1,4 +1,5 @@
Imports DAKOSY_Worker.DEXPSD
Imports System.Security.Claims
Imports DAKOSY_Worker.DEXPSD
Imports DocumentFormat.OpenXml.Drawing.Diagrams
Imports VERAG_PROG_ALLGEMEIN
@@ -437,97 +438,170 @@ Public Class usrCntlQualitaetskontrolle
End Sub
Private Sub btnVermarktungsnorman_Click(sender As Object, e As EventArgs) Handles btnVermarktungsnorman.Click
Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim frm As New Form
Dim dgv As New DataGridView()
Dim dt As DataTable = SQL.loadDgvBySql("SELECT * from tblVermarktungsnormen order by kncode ", "FMZOLL")
dgv.DataSource = dt
If dgv IsNot Nothing Then
frm.Size = New Size(300, 700)
dgv.Size = New Size(frm.Size.Width - 10, frm.Size.Height - 10)
dgv.Dock = DockStyle.Fill
dgv.Anchor = AnchorStyles.Left
dgv.Anchor = AnchorStyles.Top
dgv.ReadOnly = True
frm.Controls.Add(dgv)
frm.StartPosition = FormStartPosition.CenterScreen
frm.ShowDialog()
End If
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub btnPreise_Click(sender As Object, e As EventArgs) Handles btnPreise.Click
Try
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim frm As New Form
Dim dgv As New DataGridView()
Dim dt As DataTable = SQL.loadDgvBySql("SELECT * from tblVermarktungsnormenGebuehren ", "FMZOLL")
dgv.DataSource = dt
If dgv IsNot Nothing Then
frm.Size = New Size(500, 200)
dgv.Size = New Size(frm.Size.Width - 10, frm.Size.Height - 10)
dgv.Dock = DockStyle.Fill
dgv.Anchor = AnchorStyles.Left
dgv.Anchor = AnchorStyles.Top
dgv.ReadOnly = True
frm.Controls.Add(dgv)
frm.StartPosition = FormStartPosition.CenterScreen
frm.ShowDialog()
End If
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Private Sub initdgvGebuehren()
If dgvGebuehren.Rows.Count > 0 Then dgvGebuehren.Rows.Clear()
Dim posVorhanden As Boolean = False
If dgvPositionen.Rows.Count < 1 Then Exit Sub
If normenSpeziell.Rows.Count < 1 Or normenSpeziell.Rows.Count < 1 Then Exit Sub
Try
Dim sumNormenAllg As Double = 0
Dim sumNormenSpez As Double = 0
If dgvGebuehren.Rows.Count > 0 Then dgvGebuehren.Rows.Clear()
Dim posVorhanden As Boolean = False
Dim antrag, verzicht, idk As Double
antrag = 40.7
verzicht = 9.3
idk = 39.4
If dgvPositionen.Rows.Count < 1 Then Exit Sub
If normenSpeziell.Rows.Count < 1 Or normenSpeziell.Rows.Count < 1 Then Exit Sub
For Each r As DataGridViewRow In dgvPositionen.Rows
Dim sumNormenAllg As Double = 0
Dim sumNormenSpez As Double = 0
Dim found As Boolean = False
Dim antrag, verzicht, idk As Double
antrag = 40.7
verzicht = 9.3
idk = 39.4
If r IsNot Nothing And IsNumeric(r.Cells(4).Value) AndAlso r.Cells(4).Value >= 1000 Then
posVorhanden = True
If r.Cells(5).Value <> "" Then
For Each row As DataRow In normenSpeziell.Rows
Dim code = row("kncode").trim()
Dim searchedCode = r.Cells(5).Value
searchedCode = searchedCode.ToString.Substring(0, code.Length)
If row("kncode") = searchedCode Then
sumNormenSpez += r.Cells(4).Value
found = True
Exit For
End If
For Each r As DataGridViewRow In dgvPositionen.Rows
Next
If Not found Then
Dim found As Boolean = False
For Each row As DataRow In normenAllg.Rows
Dim code = row("kncode").trim()
If r IsNot Nothing And IsNumeric(r.Cells(4).Value) AndAlso r.Cells(4).Value >= 1000 Then
posVorhanden = True
If r.Cells(5).Value <> "" Then
For Each row As DataRow In normenSpeziell.Rows
Dim code = row("kncode").ToString.Trim().Replace(" ", "")
Dim searchedCode = r.Cells(5).Value
If searchedCode = searchedCode.ToString.Substring(0, code.Length) Then
sumNormenAllg += r.Cells(4).Value
searchedCode = searchedCode.ToString.Substring(0, code.Length)
If code = searchedCode Then
sumNormenSpez += r.Cells(4).Value
found = True
Exit For
End If
Next
If Not found Then
For Each row As DataRow In normenAllg.Rows
Dim code = row("kncode").ToString.Trim().Replace(" ", "")
Dim searchedCode = r.Cells(5).Value
searchedCode = searchedCode.ToString.Substring(0, code.Length)
If code = searchedCode Then
sumNormenAllg += r.Cells(4).Value
found = True
Exit For
End If
Next
End If
End If
End If
Next
If Not posVorhanden Then Exit Sub
If sumNormenAllg > 0 Then
Dim anzAllg As Integer
anzAllg = Math.Ceiling(sumNormenAllg / 1000)
dgvGebuehren.Rows.Add("Allgemein", sumNormenAllg, NormenpreisAllg, anzAllg, anzAllg * NormenpreisAllg)
End If
If sumNormenSpez > 0 Then
Dim anzSpez As Integer
anzSpez = Math.Ceiling(sumNormenSpez / 1000)
dgvGebuehren.Rows.Add("Speziell", sumNormenSpez, NormenpreisSpez, anzSpez, anzSpez * NormenpreisSpez)
End If
Next
If Not posVorhanden Then Exit Sub
If sumNormenAllg > 0 Then
Dim anzAllg As Integer
anzAllg = Math.Ceiling(sumNormenAllg / 1000)
dgvGebuehren.Rows.Add("Allgemein", sumNormenAllg, NormenpreisAllg, anzAllg, anzAllg * NormenpreisAllg)
End If
If sumNormenSpez > 0 Then
Dim anzSpez As Integer
anzSpez = Math.Ceiling(sumNormenSpez / 1000)
dgvGebuehren.Rows.Add("Speziell", sumNormenSpez, NormenpreisSpez, anzSpez, anzSpez * NormenpreisSpez)
End If
If cbxVerzicht.Checked Then
dgvGebuehren.Rows.Clear()
dgvGebuehren.Rows.Add("Antrag", "", antrag, "", antrag)
dgvGebuehren.Rows.Add("Verzicht", "", verzicht, "", verzicht)
Else
dgvGebuehren.Rows.Add("Antrag", "", antrag, "", antrag)
dgvGebuehren.Rows.Add("Identitätskontrolle", "", idk, "", idk)
End If
If cbxVerzicht.Checked Then
dgvGebuehren.Rows.Clear()
dgvGebuehren.Rows.Add("Antrag", "", antrag, "", antrag)
dgvGebuehren.Rows.Add("Verzicht", "", verzicht, "", verzicht)
Else
dgvGebuehren.Rows.Add("Antrag", "", antrag, "", antrag)
dgvGebuehren.Rows.Add("Identitätskontrolle", "", idk, "", idk)
End If
Dim sumBetrag As Double = 0
For Each r As DataGridViewRow In dgvGebuehren.Rows
If IsNumeric(r.Cells(4).Value) Then sumBetrag += r.Cells(4).Value
Next
Dim sumBetrag As Double = 0
For Each r As DataGridViewRow In dgvGebuehren.Rows
If IsNumeric(r.Cells(4).Value) Then sumBetrag += r.Cells(4).Value
Next
txtSumme.Text = CDbl(sumBetrag)
txtSumme.Text = CDbl(sumBetrag)
Catch ex As System.Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub

View File

@@ -1626,48 +1626,55 @@ Public Class FormularManagerNEU
End Function
Shared Function VM_MDM_BHI(usrCntl As usrcntlVollmacht_MDM_BHI) As String
'aktuell nur als PDF
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
Dim fm As New VERAG_PROG_ALLGEMEIN.cFormularManager
list = fm.getPDFFields_Editierbar("DOKUMENTE", "VORLAGEN", "VOLLMACHTEN", "MDM", "", "VM_BHI_" & usrCntl.cboLand._value)
Try
Dim listTowrite As New List(Of VERAG_PROG_ALLGEMEIN.cPDFWriteValues)
Dim listItem2 As New List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
For Each item In list
'aktuell nur als PDF
Select Case item.Text.ToLower().Trim()
Case "name" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtFirma.Text))
Case "company" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtFirma.Text))
Case "address" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtAdresse1.Text & " " & usrCntl.txtAdresse2.Text & " " & usrCntl.txtAdresse3.Text))
Case "zipcode" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtAdresse2.Text))
Case "country" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.cbxLandKz.Text))
Case "vatno" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtUid.Text))
Case "vatnr" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtUid.Text))
Case "surname_firstname" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txt_GF_Name.Text))
Case "surname" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txt_GF_Name.Text))
Case "firstname" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txt_GF_Name.Text))
Case "place" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtOrt.Text))
Case "place_date" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtOrt.Text & " " & usrCntl.datDatum.ToString("ddMMyyyy")))
Case "capital" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtKapital.Text & " " & usrCntl.cbxKapitalWahrung._value))
Case "crnumber" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtHRNr.Text))
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
Dim fm As New VERAG_PROG_ALLGEMEIN.cFormularManager
list = fm.getPDFFields_Editierbar("DOKUMENTE", "VORLAGEN", "VOLLMACHTEN", "MDM", "", "VM_BHI_" & usrCntl.cboLand._value)
End Select
'surname_firstname
'surname
'lastname
'place_date
'vat_country
'place
'c_mailcontact
Dim listTowrite As New List(Of VERAG_PROG_ALLGEMEIN.cPDFWriteValues)
Dim listItem2 As New List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
For Each item In list
Next
Select Case item.Text.ToLower().Trim()
Case "name" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtFirma.Text))
Case "company" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtFirma.Text))
Case "address" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtAdresse1.Text & " " & usrCntl.txtAdresse2.Text & " " & usrCntl.txtAdresse3.Text))
Case "zipcode" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtAdresse2.Text))
Case "country" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.cbxLandKz._value))
Case "vatno" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtUid.Text))
Case "vatnr" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtUid.Text))
Case "taxno" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtSteuerNr.Text))
Case "surname_firstname" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txt_GF_Name.Text))
Case "function" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, IIf(usrCntl.txt_GF_Name.Text <> "", "CEO", "")))
Case "surname" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txt_GF_Name.Text))
Case "firstname" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txt_GF_Name.Text))
Case "place" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtOrt.Text))
'Case "place_date" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtOrt.Text & " " & IIf(IsDate(usrCntl.datDatum.Text), usrCntl.datDatum.Text, ""))) -> soll nicht gesetzt werden
Case "capital" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtKapital.Text & " " & usrCntl.cbxKapitalWahrung._value))
Case "crnumber" : listItem2.Add(New VERAG_PROG_ALLGEMEIN.MyListItem(item.Text, usrCntl.txtHRNr.Text))
Return fm.fillPDF_Editierbar("DOKUMENTE", "VORLAGEN", "VOLLMACHTEN", "MDM", "", "VM_BHI_" & usrCntl.cboLand._value, listItem2, listTowrite,,,,,, False)
End Select
'surname_firstname
'surname
'lastname
'place_date
'vat_country
'place
'c_mailcontact
Next
Return fm.fillPDF_Editierbar("DOKUMENTE", "VORLAGEN", "VOLLMACHTEN", "MDM", "", "VM_BHI_" & usrCntl.cboLand._value, listItem2, listTowrite,,,,,, False)
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Function
@@ -1708,7 +1715,7 @@ Public Class FormularManagerNEU
Case "name_2" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtFirma.Text
Case "address" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtAdresse1.Text & " " & usrCntl.cbxLandKz.Text & "-" & usrCntl.txtAdresse2.Text & " " & usrCntl.txtAdresse3.Text
Case "zipcode" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtAdresse2.Text
Case "country" : odoc.FormFields(fieldName).Range.Text = usrCntl.cbxLandKz.Text
Case "country" : odoc.FormFields(fieldName).Range.Text = usrCntl.cbxLandKz._value
Case "place" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtAdresse3.Text
Case "street" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtAdresse1.Text
Case "surname_firstname" : odoc.FormFields(fieldName).Range.Text = IIf(usrCntl.txt_GF_Name.Text <> "", usrCntl.txt_GF_Name.Text, "")
@@ -1716,6 +1723,7 @@ Public Class FormularManagerNEU
Case "mailcontact" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtEmail.Text ' TODO: neues Feld im formular
Case "phone" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtEmail.Text ' TODO: neues Feld im formular
Case "taxno" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtSteuerNr.Text
Case "function" : odoc.FormFields(fieldName).Range.Text = IIf(usrCntl.txt_GF_Name.Text <> "", "CEO", "")
Case "c_name" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Bez
Case "c_name1" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Bez
Case "c_name2" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Bez
@@ -1728,11 +1736,11 @@ Public Class FormularManagerNEU
Case "c_zipcode" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Ort
Case "c_vatno" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_UID
Case "c_phone" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Telefon & " " & FIRMA.Firma_Telefax
Case "c_mailcontact" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtEmail.Text
Case "c_mailcontact" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtEmailzurueck.Text
Case "c_bank" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Bankverbindung1
Case "c_iban" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_IBAN1.Replace("IBAN:", "")
Case "c_bic" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_BIC1.Replace("BIC:", "")
Case "place_date" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtOrt.Text & ", " & usrCntl.datDatum.Value.ToString("dd-MM-yyyy")
Case "place_date" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtOrt.Text & ", " & IIf(IsDate(usrCntl.datDatum.Text), usrCntl.datDatum.Text, "")
Case "capital" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtKapital.Text & " " & usrCntl.cbxKapitalWahrung._value
Case "crnumber" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtHRNr.Text
@@ -1790,7 +1798,7 @@ Public Class FormularManagerNEU
End If
Catch ex As Exception
MessageBox.Show(ex.ToString & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return striList
@@ -1857,11 +1865,11 @@ Public Class FormularManagerNEU
Case "c_zipcode" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Ort
Case "c_vatno" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_UID
Case "c_phone" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Telefon & " " & FIRMA.Firma_Telefax
Case "c_mailcontact" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtEmail.Text
Case "c_mailcontact" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtEmailzurueck.Text
Case "c_bank" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_Bankverbindung1
Case "c_iban" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_IBAN1.Replace("IBAN:", "")
Case "c_bic" : odoc.FormFields(fieldName).Range.Text = FIRMA.Firma_BIC1.Replace("BIC:", "")
Case "place_date" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtOrt.Text & ", " & usrCntl.datDatum.Value.ToString("dd-MM-yyyy")
Case "place_date" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtOrt.Text & ", " & IIf(IsDate(usrCntl.datDatum.Text), usrCntl.datDatum.Text, "")
Case "capital" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtKapital.Text & " " & usrCntl.cbxKapitalWahrung._value
Case "crnumber" : odoc.FormFields(fieldName).Range.Text = usrCntl.txtHRNr.Text