Typo ausgebessert, Sendungsvermerke limit Anzahl Zeichen.

This commit is contained in:
2023-07-24 17:18:44 +02:00
parent 0d7a9fd476
commit 23d09774c0
7 changed files with 65 additions and 31 deletions

View File

@@ -3,6 +3,7 @@
Public Property _beteiligter As String = ""
Dim SENDUNG As VERAG_PROG_ALLGEMEIN.cSendungen
Dim maxInputLenght As Integer = 30
Sub New(SENDUNG, _beteiligter)
@@ -32,7 +33,9 @@
Dim preis As Object = Nothing
If IsNumeric(r.Cells("Preis").Value) Then preis = CDbl(r.Cells("Preis").Value)
If leistung <> "" Then
SENDUNG.ABRECHNUNG.Add(New VERAG_PROG_ALLGEMEIN.cSendungAbrechnung(SENDUNG.tblSnd_SendungID, _beteiligter, "", "", leistung, 1, preis, preis))
End If
Next
@@ -58,7 +61,11 @@
For Each a In SENDUNG.ABRECHNUNG
If a.sndabr_beteiligter = _beteiligter Then
If a.sndabr_abrArt = "" Then
dgv.Rows.Add(a.sndabr_bezeichnung, If(a.sndabr_preis, ""))
If a.sndabr_bezeichnung.Length > maxInputLenght Then
dgv.Rows.Add(a.sndabr_bezeichnung.Substring(0, maxInputLenght), If(a.sndabr_preis, ""))
Else
dgv.Rows.Add(a.sndabr_bezeichnung, If(a.sndabr_preis, ""))
End If
End If
End If
Next
@@ -68,6 +75,9 @@
For cnt = dgv.RowCount To 2
dgv.Rows.Add("", "")
Next
CType(dgv.Columns("Leistung"), DataGridViewTextBoxColumn).MaxInputLength = maxInputLenght
End Sub
End Class