jj: Revert ChoiceList Method, Add WMCC Start Check, Only use a single instance of ClassPMWindream in Application
This commit is contained in:
@@ -62,33 +62,33 @@ Public Class ClassPMWindream
|
||||
End Function
|
||||
Public Function GetValuesfromAuswahlliste(ByVal listname As String)
|
||||
Try
|
||||
Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, listname)
|
||||
Dim vType = oAttribute.getVariableValue("vItems")
|
||||
Return vType
|
||||
'Dim oChoiceList = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityChoiceList, listname)
|
||||
'If Err.Number = 0 And TypeName(oChoiceList) <> "Nothing" Then
|
||||
' Dim Values = oChoiceList
|
||||
' Values = oChoiceList.GetVariableValue("vItems")
|
||||
' Dim anz As Integer = 0
|
||||
'Dim oAttribute = Me.oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityAttribute, listname)
|
||||
'Dim vType = oAttribute.getVariableValue("vItems")
|
||||
'Return vType
|
||||
Dim oChoiceList = oSession.GetWMObjectByName(WINDREAMLib.WMEntity.WMEntityChoiceList, listname)
|
||||
If Err.Number = 0 And TypeName(oChoiceList) <> "Nothing" Then
|
||||
Dim Values = oChoiceList
|
||||
Values = oChoiceList.GetVariableValue("vItems")
|
||||
Dim anz As Integer = 0
|
||||
|
||||
' For Each CLItem In Values
|
||||
' If oChoiceList.aName IsNot Nothing Then
|
||||
' anz += 1
|
||||
' End If
|
||||
' Next
|
||||
' Dim strListe(anz - 1)
|
||||
' Dim zahl As Integer = 0
|
||||
' For Each CLItem In Values
|
||||
' If oChoiceList.aName IsNot Nothing Then
|
||||
' strListe(zahl) = CLItem
|
||||
' zahl += 1
|
||||
' End If
|
||||
' Next
|
||||
' Return strListe
|
||||
'Else
|
||||
' MsgBox("Auswahlliste: " & listname & " nicht gefunden!", MsgBoxStyle.Critical, "Fehler:")
|
||||
' Return Nothing
|
||||
'End If
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
anz += 1
|
||||
End If
|
||||
Next
|
||||
Dim strListe(anz - 1)
|
||||
Dim zahl As Integer = 0
|
||||
For Each CLItem In Values
|
||||
If oChoiceList.aName IsNot Nothing Then
|
||||
strListe(zahl) = CLItem
|
||||
zahl += 1
|
||||
End If
|
||||
Next
|
||||
Return strListe
|
||||
Else
|
||||
MsgBox("Auswahlliste: " & listname & " nicht gefunden!", MsgBoxStyle.Critical, "Fehler:")
|
||||
Return Nothing
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Critical, "Fehler in GetValuesfromAuswahlliste:")
|
||||
|
||||
Reference in New Issue
Block a user