plose, etc.
This commit is contained in:
@@ -44,6 +44,17 @@ Public Class cPLOSE_Inv_Data
|
||||
Me.plInv_Id = plInv_Id
|
||||
LOAD()
|
||||
End Sub
|
||||
|
||||
Sub New(plInv_Dateiname, plInv_PLOSEKundennummer, plInv_SupplierRechnungsNr, plInv_SupplierRechnungsDatum)
|
||||
|
||||
Me.plInv_Dateiname = plInv_Dateiname
|
||||
Me.plInv_PLOSEKundennummer = plInv_PLOSEKundennummer
|
||||
Me.plInv_SupplierRechnungsNr = plInv_SupplierRechnungsNr
|
||||
Me.plInv_SupplierRechnungsDatum = plInv_SupplierRechnungsDatum
|
||||
LOADINVOICESWITHOUTPDF()
|
||||
|
||||
|
||||
End Sub
|
||||
Function getParameterList(Optional withPrimaryKey As Boolean = True) As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
|
||||
|
||||
@@ -143,6 +154,38 @@ Public Class cPLOSE_Inv_Data
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub LOADINVOICESWITHOUTPDF()
|
||||
Try
|
||||
hasEntry = False
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblPLOSE_Inv_Data WHERE plInv_PLOSEKundennummer=@plInv_PLOSEKundennummer AND plInv_SupplierRechnungsNr=@plInv_SupplierRechnungsNr AND plInv_SupplierRechnungsDatum=@plInv_SupplierRechnungsDatum AND plInv_Datensatztyp = 'PDF' and plInv_PdfFileName is null ", conn)
|
||||
'cmd.Parameters.AddWithValue("@plInv_Dateiname", plInv_Dateiname)
|
||||
cmd.Parameters.AddWithValue("@plInv_PLOSEKundennummer", plInv_PLOSEKundennummer)
|
||||
cmd.Parameters.AddWithValue("@plInv_SupplierRechnungsNr", plInv_SupplierRechnungsNr)
|
||||
cmd.Parameters.AddWithValue("@plInv_SupplierRechnungsDatum", plInv_SupplierRechnungsDatum)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In getParameterList()
|
||||
Dim propInfo As PropertyInfo = Me.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(Me, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(Me, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
hasEntry = True
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
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 Function getUpdateCmd() As String
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user