Monorepo/GUIs.ZooFlow/Search/frmSearchNeu.vb
2021-11-15 16:30:12 +01:00

32 lines
1.1 KiB
VB.net

Imports DevExpress.XtraEditors
Public Class frmSearchNeu
Public Class Attribute
Public Name As String
Public Overrides Function ToString() As String
Return Name
End Function
End Class
Private Sub frmSearchNeu_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Dim oSQL As String = "SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE DEFAULT_SEARCH_ATTRIBUTE = 1 AND LANG_CODE = 'de-DE'"
Dim oAttributeList As DataTable = My.DatabaseIDB.GetDatatable(oSQL)
Dim oAttributes As New List(Of Attribute)
For Each oRow As DataRow In oAttributeList.Rows
Dim oAttr = New Attribute With {.Name = oRow.Item("ATTR_TITLE")}
oAttributes.Add(oAttr)
cmbOperator.Properties.Items.Add(oAttr)
cmbOperator.Properties.Items.Add(oAttr)
Next
lookupValue.Properties.DataSource = oAttributes
lookupValue.Properties.DisplayMember = "TITLE"
lookupValue.Properties.DataSource = oAttributes
lookupValue.Properties.DisplayMember = "TITLE"
End Sub
End Class