Celeg Korr
This commit is contained in:
@@ -115,6 +115,36 @@ Public Class cUIDPruefung
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Shared Function LOADByKdNrNewestDate(uid_KundenNr As Integer) As cUIDPruefung
|
||||
Try
|
||||
Dim UID As New cUIDPruefung
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT Top 1 * FROM tblUIDPruefung WHERE [uid_KundenNr]=@uid_KundenNr AND [uid_valid]=1 ORDER BY [uid_Datum] DESC", conn)
|
||||
cmd.Parameters.AddWithValue("@uid_KundenNr", uid_KundenNr)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each li In UID.getParameterList()
|
||||
Dim propInfo As PropertyInfo = UID.GetType.GetProperty(li.Scalarvariable)
|
||||
|
||||
If dr.Item(li.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(UID, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(UID, dr.Item(li.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
dr.Close()
|
||||
Return UID
|
||||
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
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
Public Shared Function doUIDPruefungALL(Optional datum As Object = Nothing, Optional SaveErgInAdressen As Boolean = True, Optional Sciherheitsabfrage As Boolean = True, Optional MaxEintraege As Integer = -1, Optional showErr As Boolean = True) As DataTable
|
||||
Dim dt As DataTable = Nothing
|
||||
|
||||
Reference in New Issue
Block a user