This commit is contained in:
2020-03-23 11:37:40 +01:00
parent cc28d5a6cf
commit 00c51ba4a4
23 changed files with 862 additions and 143 deletions

View File

@@ -117,6 +117,13 @@ Public Class cRechnungsausgang
LOAD() : LOAD_POSITIONEN()
End Sub
Sub New(FilialenNr, AbfertigungsNr)
Me.FilialenNr = FilialenNr
Me.AbfertigungsNr = AbfertigungsNr
LOAD(FilialenNr, AbfertigungsNr)
End Sub
Public Function getMaxRGUnterNr() As Integer
Return getMaxRGUnterNr(FilialenNr, AbfertigungsNr, SpeditionsbuchUnterNr)
@@ -237,6 +244,35 @@ Public Class cRechnungsausgang
Public Sub LOAD(FilialeNr As Integer, AbfertigungsNr As Integer, Optional loadPos As Boolean = True)
Try
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
Using cmd As New SqlCommand("SELECT * FROM Rechnungsausgang WHERE FilialeNr=@FilialeNr AND AbfertigungsNr=@AbfertigungsNr ", conn)
cmd.Parameters.AddWithValue("@FilialeNr", FilialeNr)
cmd.Parameters.AddWithValue("@AbfertigungsNr", AbfertigungsNr)
Dim dr = cmd.ExecuteReader()
If dr.Read Then
For Each l In getParameterList()
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(l.Scalarvariable)
If dr.Item(l.Text) Is DBNull.Value Then
propInfo.SetValue(Me, Nothing)
Else
propInfo.SetValue(Me, dr.Item(l.Text))
End If
Next
If loadPos Then LOAD_POSITIONEN()
End If
dr.Close()
End Using
doVorzeichen()
End Using
Catch ex As Exception
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
End Try
End Sub
Public Shared Function LOADByFilialeAbfNrsssasdssssssssss(FilialeNr As Integer, AbfertigungsNr As Integer) As cVorauskasse
Try
Dim VK As New cVorauskasse

View File

@@ -81,6 +81,7 @@ Public Class cSendungen
Property tblSnd_Frachtfuehrer As Object = Nothing
Property tblSnd_DakosyRef As Object = Nothing
Property tblSnd_TeamId As Object = Nothing
Property tblSnd_Fakturiert As Object = Nothing
Public saveSachbearbeiter As Boolean = False
@@ -264,6 +265,7 @@ Public Class cSendungen
Me.tblSnd_Frachtfuehrer = SQL.checkNullReturnValue(dr.Item("tblSnd_Frachtfuehrer"), Nothing)
Me.tblSnd_DakosyRef = SQL.checkNullReturnValue(dr.Item("tblSnd_DakosyRef"), Nothing)
Me.tblSnd_TeamId = SQL.checkNullReturnValue(dr.Item("tblSnd_TeamId"), Nothing)
Me.tblSnd_Fakturiert = SQL.checkNullReturnValue(dr.Item("tblSnd_Fakturiert"), Nothing)
End If
@@ -427,6 +429,7 @@ Public Class cSendungen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Frachtfuehrer", tblSnd_Frachtfuehrer))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_DakosyRef", tblSnd_DakosyRef))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_TeamId", tblSnd_TeamId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("tblSnd_Fakturiert", tblSnd_Fakturiert))
Return list

View File

@@ -213,7 +213,14 @@ Public Class cSpeditionsbuch
End Function
Public Shared Function existsSpedBuch(FilialenNr As Integer, AbfertigungsNr As Integer) As Boolean 'obj As Object, tablename As String, where As String) As Boolean
If FilialenNr <= 0 Then Return False
If AbfertigungsNr <= 0 Then Return False
Dim SQL As New SQL
Return (CInt(SQL.getValueTxtBySql(" SELECT COUNT(*) FROM [Speditionsbuch] WHERE [FilialenNr]='" & FilialenNr & "' AND AbfertigungsNr='" & AbfertigungsNr & "' ", "FMZOLL")) > 0)
End Function
Public Function SAVE() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
Dim list As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable) = getParameterList()