move clientsuite to GUIs.ClientSuite folder

This commit is contained in:
Jonathan Jenne
2019-04-15 14:30:00 +02:00
parent b4151e8b81
commit ddec69bc05
124 changed files with 8 additions and 6 deletions

View File

@@ -0,0 +1,41 @@
Imports DevExpress.XtraEditors
Imports DigitalData.Controls.LookupGrid
Imports DigitalData.GUIs.ClientSuite.Base
Imports DigitalData.Modules.Logging
Namespace Controls
Public Class ControlData
Inherits BaseClass
Public Sub New(LogConfig As LogConfig)
MyBase.New(LogConfig)
End Sub
Public Sub LoadControlData(ByRef Controls As List(Of BaseEdit), Data As DataTable)
Dim oCounter = 0
' TODO: Do we need databinding and does it work with lookup control
For Each oControl As BaseEdit In Controls
Dim oBindingSource As New BindingSource(Data, Nothing)
Select Case oControl.GetType
Case GetType(TextEdit)
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
Case GetType(MemoEdit)
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
Case GetType(DateEdit)
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
Case GetType(LookupControl2)
oControl.DataBindings.Add("Text", oBindingSource, "CTRLVALUE", True, DataSourceUpdateMode.OnPropertyChanged)
Case Else
End Select
oBindingSource.Position = oCounter
oCounter += 1
Next
End Sub
End Class
End Namespace