MS_1705
This commit is contained in:
@@ -203,29 +203,34 @@
|
||||
If ControlId = 272 Then
|
||||
Console.WriteLine("272")
|
||||
End If
|
||||
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
||||
Dim autoValue
|
||||
|
||||
If IsNothing(autoValue) Then
|
||||
If VARIABLE_VALUE = True Then
|
||||
control.Text = value
|
||||
Dim drarray() As DataRow = CURRENT_SQL_AUTO_VALUES_DT.Select("CONTROL_ID = " & ControlId)
|
||||
If drarray.Length > 0 Then
|
||||
Dim ID = drarray(0)("CONNECTION_ID").ToString
|
||||
Dim Sql
|
||||
If Not IsNothing(ID) Then
|
||||
Sql = drarray(0)("SQL_COMMAND").ToString
|
||||
Sql = ClassControlValues.ReplaceSqlCommandPlaceholders(Sql, recordId, parentRecordId, entity_ID)
|
||||
autoValue = ClassDatabase.Execute_ScalarWithConnection(ID, Sql)
|
||||
Else
|
||||
|
||||
|
||||
If ControlId = 272 Then
|
||||
Console.WriteLine("VertragsNr")
|
||||
End If
|
||||
Dim SQL = String.Format("SELECT GUID FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0} AND SCREEN_ID = {1}", ControlId, CURRENT_SCREEN_ID)
|
||||
Dim ctrl_screen_id = ClassDatabase.Execute_Scalar(SQL, True)
|
||||
If ctrl_screen_id > 0 Then
|
||||
SQL = String.Format("SELECT CAPTION FROM TBPMO_CONTROL_LANGUAGE WHERE CONTROL_SCREEN_ID = {0} AND LANGUAGE_TYPE = '{1}'", ctrl_screen_id, USER_LANGUAGE)
|
||||
Dim labelText As String = ClassDatabase.Execute_Scalar(SQL)
|
||||
control.Text = labelText
|
||||
End If
|
||||
autoValue = ClassDatabase.Execute_Scalar(Sql, True)
|
||||
End If
|
||||
If IsNothing(autoValue) Then
|
||||
If VARIABLE_VALUE = True Then
|
||||
control.Text = value
|
||||
Else
|
||||
Sql = String.Format("SELECT GUID FROM TBPMO_CONTROL_SCREEN WHERE CONTROL_ID = {0} AND SCREEN_ID = {1}", ControlId, CURRENT_SCREEN_ID)
|
||||
Dim ctrl_screen_id = ClassDatabase.Execute_Scalar(Sql, True)
|
||||
If ctrl_screen_id > 0 Then
|
||||
Sql = String.Format("SELECT CAPTION FROM TBPMO_CONTROL_LANGUAGE WHERE CONTROL_SCREEN_ID = {0} AND LANGUAGE_TYPE = '{1}'", ctrl_screen_id, USER_LANGUAGE)
|
||||
Dim labelText As String = ClassDatabase.Execute_Scalar(Sql)
|
||||
control.Text = labelText
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
control.Text = autoValue
|
||||
End If
|
||||
|
||||
|
||||
Else
|
||||
control.Text = autoValue
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox("Unexpected Error in LoadValueMain:" & vbNewLine & ex.Message)
|
||||
@@ -279,16 +284,39 @@
|
||||
If CURRENT_RECORD_ENABLED = False Then
|
||||
control.Text = value
|
||||
Else
|
||||
|
||||
If VARIABLE_VALUE = True Then
|
||||
control.Text = value
|
||||
Else
|
||||
Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
||||
If IsNothing(autoValue) Then
|
||||
control.Text = value
|
||||
Else
|
||||
control.Text = autoValue
|
||||
Dim drarray() As DataRow = CURRENT_SQL_AUTO_VALUES_DT.Select("CONTROL_ID = " & ControlId)
|
||||
If drarray.Length > 0 Then
|
||||
Dim autoValue
|
||||
Dim ID = drarray(0)("CONNECTION_ID").ToString
|
||||
Dim Sql = drarray(0)("SQL_COMMAND").ToString
|
||||
If Not IsNothing(ID) Then
|
||||
autoValue = ClassDatabase.Execute_ScalarWithConnection(ID, Sql)
|
||||
Else
|
||||
autoValue = ClassDatabase.Execute_Scalar(Sql, True)
|
||||
End If
|
||||
' AutoValue = ClassDatabase.Execute_Scalar(SQL)
|
||||
|
||||
If String.IsNullOrEmpty(autoValue) Or IsDBNull(autoValue) Then
|
||||
control.Text = value
|
||||
Else
|
||||
control.Text = autoValue
|
||||
End If
|
||||
|
||||
End If
|
||||
'If USER_WAN = True Then 'WENN in einer WAN-Umgebung betrieben
|
||||
|
||||
'Else 'in LAN-Umgebung
|
||||
' Dim autoValue = LoadAutoValue(control, recordId, parentRecordId, entity_ID)
|
||||
' If IsNothing(autoValue) Then
|
||||
' control.Text = value
|
||||
' Else
|
||||
' control.Text = autoValue
|
||||
' End If
|
||||
'End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -376,7 +404,10 @@
|
||||
End If
|
||||
|
||||
For Each v As String In values
|
||||
' Alle Werte, die v entsprechen, anhaken
|
||||
'For i As Integer = 0 To control.ItemCount - 1
|
||||
|
||||
' Console.WriteLine(control.GetItemText(i))
|
||||
'Next i
|
||||
Dim posBefore As Integer = 0
|
||||
While (control.FindStringExact(v, posBefore) > -1)
|
||||
Dim pos = control.FindStringExact(v, posBefore)
|
||||
@@ -391,11 +422,7 @@
|
||||
End If
|
||||
End While
|
||||
|
||||
'Dim pos = control.FindStringExact(v)
|
||||
|
||||
'If pos >= 0 Then
|
||||
' control.SetItemCheckState(pos, CheckState.Checked)
|
||||
'End If
|
||||
Next
|
||||
End Sub
|
||||
|
||||
|
||||
Reference in New Issue
Block a user