jj 28.04.16
This commit is contained in:
@@ -158,7 +158,9 @@ Public Class ClassControlBuilder
|
||||
Continue For
|
||||
End If
|
||||
|
||||
' Versuchen, die RecordId zu ersetzen, falls eine existiert
|
||||
sqlcommand = sqlcommand.ToUpper.Replace("@RECORD_ID", CURRENT_RECORD_ID)
|
||||
' ControlId Platzhalter suchen und ersetzen
|
||||
Dim regex As New System.Text.RegularExpressions.Regex("(@(\d+)@)")
|
||||
Dim match As System.Text.RegularExpressions.Match = regex.Match(sqlcommand)
|
||||
If match.Success Then
|
||||
@@ -169,13 +171,15 @@ Public Class ClassControlBuilder
|
||||
Dim dependingControl As Control = panel.Controls.OfType(Of Control)().Where(Function(c As Control)
|
||||
Return DirectCast(c.Tag, ClassControlMetadata).Id = dependingControlId
|
||||
End Function).SingleOrDefault()
|
||||
|
||||
' Wir ersetzen den platzhalter im sql command mit dem übergebenen wert
|
||||
sqlcommand = sqlcommand.Replace(match.Groups(1).Value, value)
|
||||
If LogErrorsOnly = False Then ClassLogger.Add(" >> " & String.Format("Executing SQL_COMMAND: '{0}' for controlID '{1}'", sqlcommand, dependingControlId))
|
||||
|
||||
' Jetzt wird das SQL Command ausgeführt, es MUSS einen Boolschen Wert zurückgeben, True, False, 0, 1
|
||||
Dim dt As DataTable = ClassDatabase.Return_Datatable(sqlcommand)
|
||||
Dim type = dependingControl.GetType().Name
|
||||
If dt.Rows.Count = 1 Then
|
||||
' Jetzt können wir das dependingControl enablen/disablen
|
||||
Select Case type
|
||||
Case "DateEdit"
|
||||
Try
|
||||
|
||||
Reference in New Issue
Block a user