Public Class MyListItem
Private mText As String
Private mValue As String
Public Sub New(ByVal pText As String, ByVal pValue As String)
mText = pText
mValue = pValue
End Sub
Public ReadOnly Property Text() As String
Get
Return mText
End Get
End Property
Public ReadOnly Property Value() As String
Get
Return mValue
End Get
End Property
Public Overrides Function ToString() As String
Return mText
End Function
End Class
Public Class MyListItem2
Private mText As Object
Private mValue As Object
Public Sub New(ByVal pText As Object, ByVal pValue As Object)
mText = pText
mValue = pValue
End Sub
Public ReadOnly Property Text() As Object
Get
Return mText
End Get
End Property
Public ReadOnly Property Value() As Object
Get
Return mValue
End Get
End Property
' Public Overrides Function ToString() As Object
' Return mText
' End Function
End Class
'Public Class SQLVariable
' Private ReadOnly TextSQLName As String
' Private ReadOnly ValueSQLVALUE As Object
' Private ReadOnly ScalarvariablenameIntern As String
' Private ReadOnly primaryParam As Boolean
' Private ReadOnly onlyForLoad As Boolean
' Private ReadOnly onlyForSave As Boolean
' '''
' ''' Erstellt eine neue SQLVariable für Parameterübergaben an SQL-Befehle.
' '''
' ''' Spaltenname in der Datenbank
' ''' Wert, der gespeichert oder gelesen werden soll
' ''' Parametername für SQL-Bindung (optional, sonst = Text)
' ''' Kennzeichnet Primärschlüssel für WHERE-Klausel
' ''' Wird nur beim Laden verwendet
' ''' Wird nur beim Speichern verwendet
' Public Sub New(ByVal Text As String,
' ByVal Value As Object,
' Optional Scalarvariablename As String = "",
' Optional primaryParam As Boolean = False,
' Optional onlyForLoad As Boolean = False,
' Optional onlyForSave As Boolean = False)
' If String.IsNullOrWhiteSpace(Text) Then
' Throw New ArgumentException("❌ SQLVariable: Text darf nicht leer sein!")
' End If
' Me.TextSQLName = Text
' Me.ValueSQLVALUE = Value
' Me.primaryParam = primaryParam
' Me.onlyForLoad = onlyForLoad
' Me.onlyForSave = onlyForSave
' Me.ScalarvariablenameIntern = If(String.IsNullOrWhiteSpace(Scalarvariablename), Text, Scalarvariablename)
' End Sub
' '''
' ''' Name der SQL-Spalte
' '''
' Public ReadOnly Property Text() As String
' Get
' Return TextSQLName
' End Get
' End Property
' '''
' ''' Wert der SQL-Spalte
' '''
' Public ReadOnly Property Value() As Object
' Get
' Return ValueSQLVALUE
' End Get
' End Property
' '''
' ''' Parametername für die SQL-Zuweisung (z. B. @Bezeichnung)
' '''
' Public ReadOnly Property Scalarvariable() As String
' Get
' Return ScalarvariablenameIntern
' End Get
' End Property
' '''
' ''' True, wenn es sich um einen Primärschlüssel handelt
' '''
' Public ReadOnly Property isPrimaryParam() As Boolean
' Get
' Return primaryParam
' End Get
' End Property
' '''
' ''' True, wenn nur für Lade-Operationen verwenden
' '''
' Public ReadOnly Property isOnlyForLoad() As Boolean
' Get
' Return onlyForLoad
' End Get
' End Property
' '''
' ''' True, wenn nur für Speicher-Operationen verwenden
' '''
' Public ReadOnly Property isOnlyForSave() As Boolean
' Get
' Return onlyForSave
' End Get
' End Property
'End Class
Public Class SQLVariable
Private TextSQLName As String
Private ValueSQLVALUE As Object
Private Scalarvariablename As String
Private primaryParam As Boolean
Private onlyForLoad As Boolean
Private onlyForSave As Boolean
Public Sub New(ByVal Text As String, ByVal Value As Object, Optional Scalarvariablename As String = "", Optional primaryParam As Boolean = False, Optional onlyForLoad As Boolean = False, Optional onlyForSave As Boolean = False)
Me.TextSQLName = Text
Me.ValueSQLVALUE = Value
Me.primaryParam = primaryParam
Me.onlyForLoad = onlyForLoad
Me.onlyForSave = onlyForSave
If Scalarvariablename <> "" Then Me.Scalarvariablename = Scalarvariablename Else Me.Scalarvariablename = Text
End Sub
Public ReadOnly Property Text() As String
Get
Return TextSQLName
End Get
End Property
Public ReadOnly Property Value() As Object
Get
Return ValueSQLVALUE
End Get
End Property
Public ReadOnly Property Scalarvariable() As Object
Get
Return Scalarvariablename
End Get
End Property
Public ReadOnly Property isPrimaryParam() As Boolean
Get
Return primaryParam
End Get
End Property
Public ReadOnly Property isonlyForLoad() As Boolean
Get
Return onlyForLoad
End Get
End Property
Public ReadOnly Property isonlyForSave() As Boolean
Get
Return onlyForSave
End Get
End Property
' Public Overrides Function ToString() As Object
' Return mText
' End Function
End Class