Files
EDOKA_DMS/DataAccess/Config.vb
2022-12-25 10:09:49 +01:00

26 lines
959 B
VB.net

Public Class Config
Private Shared _nullReplacer As Integer
Private Shared _firstTime As Boolean = True
Public Shared ReadOnly Property NullReplacer() As Integer
Get
Try
If _firstTime Then 'load from db
Dim ds As New DataSet()
Parameter.GetParameter(ds, 0, "NullReplaceValue")
If ds.Tables.Count > 0 Then
If ds.Tables(0).Rows.Count > 0 Then
_nullReplacer = CInt(ds.Tables(0).Rows(0)("Wert"))
End If
End If
End If
Return _nullReplacer
Catch ex As Exception
TKBLib.Errorhandling.TraceHelper.Msg("EDOKALib.DA.Config.NullReplacer", ex.Message + " " + ex.StackTrace, TraceLevel.Error)
Throw ex
End Try
End Get
End Property
End Class