neu
This commit is contained in:
@@ -251,6 +251,15 @@ Public Class SQL
|
||||
End Function
|
||||
|
||||
|
||||
Function IsNull(o) As Boolean
|
||||
Try
|
||||
If o Is Nothing Then Return True
|
||||
If o Is DBNull.Value Then Return True
|
||||
If o.ToString.Trim = "" Then Return True
|
||||
Catch : End Try
|
||||
Return False
|
||||
End Function
|
||||
|
||||
Function isleernothingDateFormatstring(o) As Object
|
||||
If o Is Nothing Then Return o
|
||||
If o.ToString = "" Then Return Nothing
|
||||
@@ -788,6 +797,30 @@ Public Class SQL
|
||||
Return ""
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
Public Shared Function isDbnullEmpty(o As Object, return_value As Object) As String
|
||||
If IsDBNull(o) Then : isDbnullEmpty = return_value
|
||||
ElseIf IsNothing(o) Then : isDbnullEmpty = return_value
|
||||
Else : isDbnullEmpty = o.ToString
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function isDbnullEmptyCurr(o As Object, return_value As Object) As String
|
||||
If IsDBNull(o) Then : isDbnullEmptyCurr = return_value
|
||||
ElseIf IsNothing(o) Then : isDbnullEmptyCurr = return_value
|
||||
Else : isDbnullEmptyCurr = CDbl(o).ToString("C")
|
||||
End If
|
||||
End Function
|
||||
Public Shared Function isDbnullEmptyDbl(o As Object, kommastellen As Integer, return_value As Object) As String
|
||||
If IsDBNull(o) Then : isDbnullEmptyDbl = return_value
|
||||
ElseIf IsNothing(o) Then : isDbnullEmptyDbl = return_value
|
||||
Else : isDbnullEmptyDbl = CDbl(o).ToString("N" & If(kommastellen > 0, kommastellen, ""))
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Shared Function VarToBool(ByVal wert As Object) As Boolean
|
||||
Try
|
||||
If wert Is Nothing OrElse wert Is DBNull.Value Then
|
||||
|
||||
Reference in New Issue
Block a user