neu
This commit is contained in:
@@ -408,6 +408,42 @@ Public Class cTelotec_Anmeldung
|
||||
End Try
|
||||
End Sub
|
||||
|
||||
Public Shared Function LOAD_ByBezugsNr(BezugsNr, Optional loadALL = True) As cTelotec_Anmeldung
|
||||
Try
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
Dim TC As New cTelotec_Anmeldung
|
||||
TC.POSITIONSDATEN.Clear()
|
||||
TC.SICHERHEIT.Clear()
|
||||
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand("SELECT * FROM tblTelotec_Anmeldung WHERE telanm_BezugsNr=@BezugsNr AND [telnam_aktuellsteNachricht]=1 ", conn)
|
||||
cmd.Parameters.AddWithValue("@BezugsNr", BezugsNr)
|
||||
Dim dr = cmd.ExecuteReader()
|
||||
If dr.Read Then
|
||||
For Each l In TC.getParameterList()
|
||||
Dim propInfo As PropertyInfo = TC.GetType.GetProperty(l.Scalarvariable)
|
||||
|
||||
If dr.Item(l.Text) Is DBNull.Value Then
|
||||
propInfo.SetValue(TC, Nothing)
|
||||
Else
|
||||
propInfo.SetValue(TC, dr.Item(l.Text))
|
||||
End If
|
||||
|
||||
Next
|
||||
If loadALL Then
|
||||
TC.LOAD_Positionsdaten()
|
||||
TC.LOAD_Sicherheit()
|
||||
End If
|
||||
Return TC
|
||||
End If
|
||||
dr.Close()
|
||||
End Using
|
||||
End Using
|
||||
Catch ex As Exception
|
||||
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
|
||||
End Try
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Function UPDATE_Status(status As Integer) As String
|
||||
If telanm_id > 0 Then
|
||||
|
||||
Reference in New Issue
Block a user