Vorkosten, Spedbuch

This commit is contained in:
2025-12-16 09:46:13 +01:00
parent 96b25afaf6
commit f168d0323e
3 changed files with 22 additions and 4 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.5.0.3")> <Assembly: AssemblyVersion("1.5.0.4")>
<Assembly: AssemblyFileVersion("1.5.0.3")> <Assembly: AssemblyFileVersion("1.5.0.4")>

View File

@@ -21,12 +21,18 @@
'Next 'Next
VORKOSTEN.Clear() VORKOSTEN.Clear()
Dim LeistungsBez As String = ""
For i = 0 To dgvVorkosten.RowCount - 1 For i = 0 To dgvVorkosten.RowCount - 1
Dim r As DataGridViewRow = dgvVorkosten.Rows(i) Dim r As DataGridViewRow = dgvVorkosten.Rows(i)
If Not IsNumeric(r.Cells("LeistungsNr").Value) Then MsgBox("Leistungsnummer muss eine Zahl sein!") : Me.DialogResult = Windows.Forms.DialogResult.None : Exit Sub If Not IsNumeric(r.Cells("LeistungsNr").Value) Then MsgBox("Leistungsnummer muss eine Zahl sein!") : Me.DialogResult = Windows.Forms.DialogResult.None : Exit Sub
If Not IsNumeric(r.Cells("Preis").Value) Then MsgBox("Preis muss eine Zahl sein!") : Me.DialogResult = Windows.Forms.DialogResult.None : Exit Sub If Not IsNumeric(r.Cells("Preis").Value) Then MsgBox("Preis muss eine Zahl sein!") : Me.DialogResult = Windows.Forms.DialogResult.None : Exit Sub
If r.Cells("LeistungsBez").Value.ToString.Length > 30 Then MsgBox("Leistungbezeichnung zu lang (max 30 Zeichen)!") : Me.DialogResult = Windows.Forms.DialogResult.None : Exit Sub If r.Cells("LeistungsBez").Value.ToString.Length > 256 Then MsgBox("Leistungbezeichnung zu lang (max 256 Zeichen)!") : Me.DialogResult = Windows.Forms.DialogResult.None : Exit Sub
VORKOSTEN.Add(New VERAG_PROG_ALLGEMEIN.cVorkosten(FilialenNr, AbfertigungsNr, UnterNr, CInt(r.Cells("LeistungsNr").Value), CStr(r.Cells("Leistungsbez").Value), CDbl(r.Cells("Preis").Value))) If CStr(r.Cells("Leistungsbez").Value).ToString.Length > 30 Then
LeistungsBez = CStr(r.Cells("Leistungsbez").Value).ToString.Substring(0, 30)
Else
LeistungsBez = CStr(r.Cells("Leistungsbez").Value)
End If
VORKOSTEN.Add(New VERAG_PROG_ALLGEMEIN.cVorkosten(FilialenNr, AbfertigungsNr, UnterNr, CInt(r.Cells("LeistungsNr").Value), LeistungsBez, CDbl(r.Cells("Preis").Value), CStr(r.Cells("Leistungsbez").Value)))
Next Next
Me.Close() Me.Close()

View File

@@ -770,6 +770,7 @@ Public Class cVorkosten
Property LeistungsNr As Integer Property LeistungsNr As Integer
Property LeistungsBez As Object = Nothing Property LeistungsBez As Object = Nothing
Property Preis As Double = 0 Property Preis As Double = 0
Property Bezeichnung As Object = Nothing
' Property Abfertigungsbezeichnung As String = "-" ' Property Abfertigungsbezeichnung As String = "-"
Dim SQL As New SQL Dim SQL As New SQL
@@ -786,6 +787,16 @@ Public Class cVorkosten
Me.Preis = Preis Me.Preis = Preis
End Sub End Sub
Sub New(FilialenNr, AbfertigungsNr, UnterNr, LeistungsNr, LeistungsBez, Preis, Bezeichnung)
Me.FilialenNr = FilialenNr
Me.AbfertigungsNr = AbfertigungsNr
Me.UnterNr = UnterNr
Me.LeistungsNr = LeistungsNr
Me.LeistungsBez = LeistungsBez
Me.Preis = Preis
Me.Bezeichnung = Bezeichnung
End Sub
Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) Function getParameterList() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("FilialenNr", FilialenNr)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("FilialenNr", FilialenNr))
@@ -794,6 +805,7 @@ Public Class cVorkosten
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LeistungsNr", LeistungsNr)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LeistungsNr", LeistungsNr))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LeistungsBez", LeistungsBez)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("LeistungsBez", LeistungsBez))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Preis", Preis)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Preis", Preis))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Bezeichnung", Bezeichnung))
Return list Return list
End Function End Function