neu
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user