Bugfix Emailversand, kurli. Schriftart aus Email/Anhang entfernen, Prüfung für dopp. Positionen

This commit is contained in:
2024-04-10 15:11:49 +02:00
parent 67bfd2783e
commit eba128614d
2 changed files with 30 additions and 7 deletions

View File

@@ -518,6 +518,29 @@ Public Class cRechnungsausgang
End If
End If
If dgv Is Nothing Then
errMsg = "ERROR: Keine Positionen angegeben!" : Return False
Else
If dgv.Rows.Count > 1 Then
'Prüfung für doppelte Positionen mit PK: Bezeichnung und LeistungNr!
Dim dt As New DataTable
dt.Columns.Add("name", GetType(String))
For Each row As DataGridViewRow In dgv.Rows
Dim R As DataRow = dt.NewRow
R("name") = row.Cells(0).Value
dt.Rows.Add(R)
Next
Dim dv As New DataView(dt)
Dim distinct As DataTable = dv.ToTable(True, New String() {"name"})
If distinct.Rows.Count <> dt.Rows.Count Then
errMsg = "ERROR: Doppelte Positionen vorhanden!" : Return False
End If
End If
End If
Return True
End Function