This commit is contained in:
2019-11-06 16:31:56 +01:00
parent e2c05a5ea3
commit d4dfcd1744
46 changed files with 3412 additions and 678 deletions

View File

@@ -10,7 +10,7 @@
<AssemblyName>TELOTEC_Worker</AssemblyName>
<FileAlignment>512</FileAlignment>
<MyType>Windows</MyType>
<TargetFrameworkVersion>v4.5</TargetFrameworkVersion>
<TargetFrameworkVersion>v4.7</TargetFrameworkVersion>
<Deterministic>true</Deterministic>
<TargetFrameworkProfile />
</PropertyGroup>

View File

@@ -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