ZooFlow: NotNull from Modules.Language
This commit is contained in:
parent
7b68b622ff
commit
2202f90914
@ -2,6 +2,7 @@
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraLayout
|
||||
Imports DevExpress.XtraTab
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
|
||||
Public Class ClassDetailPages
|
||||
Public Items As New Dictionary(Of String, DetailPage)
|
||||
@ -62,7 +63,7 @@ Public Class ClassDetailPages
|
||||
|
||||
Dim oNullable As Boolean = oColumn.AllowDBNull
|
||||
|
||||
If oNullable = False And NotNull(oControl.EditValue, String.Empty) = String.Empty Then
|
||||
If oNullable = False And NotNull(oControl.EditValue.ToString, String.Empty) = String.Empty Then
|
||||
Throw New NoNullAllowedException()
|
||||
End If
|
||||
End If
|
||||
|
||||
@ -4,6 +4,7 @@ Imports DevExpress.XtraEditors.Repository
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.GUIs.ZooFlow.Administration.ClassConstants
|
||||
Imports DevExpress.XtraGrid
|
||||
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
Imports DigitalData.Modules.EDMI.API.EDMIServiceReference
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
|
||||
Public Class ClassDataASorDB
|
||||
Private _Logger As Logger
|
||||
|
||||
@ -7,6 +7,7 @@ Imports System.Security.Principal
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DigitalData.GUIs.GlobalIndexer
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Controls.LookupGrid
|
||||
Imports Independentsoft
|
||||
|
||||
|
||||
@ -2,19 +2,6 @@
|
||||
Imports System.Text.RegularExpressions
|
||||
|
||||
Module ModuleHelpers
|
||||
''' <summary>
|
||||
''' Überprüft einen Wert auf verschiedene Arten von "Null" und gibt einen Standard-Wert zurück, wenn der Wert "Null" ist.
|
||||
''' </summary>
|
||||
''' <param name="value">Der zu überprüfende Wert</param>
|
||||
''' <param name="defaultValue">Der Standard Wert</param>
|
||||
''' <returns>value oder wenn dieser "Null" ist, defaultValue</returns>
|
||||
Public Function NotNull(Of T)(ByVal value As T, ByVal defaultValue As T) As T
|
||||
If IsNothing(value) OrElse String.IsNullOrEmpty(value.ToString) OrElse IsDBNull(value) Then
|
||||
Return defaultValue
|
||||
Else
|
||||
Return value
|
||||
End If
|
||||
End Function
|
||||
Public Function encode_utf8(ByVal str As String) As String
|
||||
Try
|
||||
'supply True as the construction parameter to indicate
|
||||
|
||||
@ -8,6 +8,7 @@ Imports DigitalData.GUIs.ZooFlow.ClassConstants
|
||||
Imports DigitalData.GUIs.ZooFlow.ClipboardWatcher
|
||||
Imports DigitalData.Modules
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Language.Utils
|
||||
Imports DigitalData.Modules.Messaging
|
||||
Imports DigitalData.Modules.Windows
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user