Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo
This commit is contained in:
commit
4cd801003b
@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.0.2.2")>
|
||||
<Assembly: AssemblyVersion("1.0.2.3")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
@ -10,86 +10,89 @@ Public Class frmLookupGrid
|
||||
Public Property DataSource As DataTable
|
||||
Public Property SelectedValues As List(Of String)
|
||||
|
||||
Private dataColumn As Integer
|
||||
Private dataSourceTemp As DataTable
|
||||
Private view As GridView
|
||||
Private grid As GridControl
|
||||
Private _DataColumn As Integer
|
||||
Private _DataSourceTemp As DataTable
|
||||
Private _View As GridView
|
||||
Private _Grid As GridControl
|
||||
|
||||
Private Sub frmLookupGrid_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
view = viewLookup
|
||||
grid = gridLookup
|
||||
|
||||
If DataSource Is Nothing Then
|
||||
Exit Sub
|
||||
End If
|
||||
_View = viewLookup
|
||||
_Grid = gridLookup
|
||||
|
||||
' Original Datasource soll nicht verändert werden
|
||||
dataSourceTemp = DataSource.Copy()
|
||||
If DataSource Is Nothing Then
|
||||
_DataSourceTemp = New DataTable("TEMP")
|
||||
_DataSourceTemp.Columns.Add(New DataColumn("VALUE"))
|
||||
Else
|
||||
_DataSourceTemp = DataSource.Copy()
|
||||
End If
|
||||
|
||||
If MultiSelect Then
|
||||
If Not dataSourceTemp.Columns.Contains("SELECTED") Then
|
||||
If Not _DataSourceTemp.Columns.Contains("SELECTED") Then
|
||||
Dim selectedColumn = New DataColumn() With {
|
||||
.ColumnName = "SELECTED",
|
||||
.DataType = GetType(Boolean),
|
||||
.DefaultValue = False
|
||||
}
|
||||
dataSourceTemp.Columns.Add(selectedColumn)
|
||||
_DataSourceTemp.Columns.Add(selectedColumn)
|
||||
selectedColumn.SetOrdinal(0)
|
||||
End If
|
||||
End If
|
||||
|
||||
' Datasource setzen
|
||||
grid.DataSource = dataSourceTemp
|
||||
_Grid.DataSource = _DataSourceTemp
|
||||
|
||||
' Anzeige Eigeschaften setzen
|
||||
view.OptionsFind.Condition = DevExpress.Data.Filtering.FilterCondition.Contains
|
||||
view.OptionsFind.AlwaysVisible = True
|
||||
view.OptionsSelection.MultiSelect = False
|
||||
_View.OptionsFind.Condition = DevExpress.Data.Filtering.FilterCondition.Contains
|
||||
_View.OptionsFind.AlwaysVisible = True
|
||||
_View.OptionsSelection.MultiSelect = False
|
||||
|
||||
If MultiSelect Then
|
||||
' Selected Spalte anpassen
|
||||
Dim checkboxColumn = view.Columns.Item(0)
|
||||
checkboxColumn.Caption = " "
|
||||
checkboxColumn.MaxWidth = 10
|
||||
Dim oCheckboxColumn = _View.Columns.Item(0)
|
||||
oCheckboxColumn.Caption = " "
|
||||
oCheckboxColumn.MaxWidth = 10
|
||||
|
||||
Text = "Wählen Sie einen oder mehrere Werte:"
|
||||
dataColumn = 1
|
||||
_DataColumn = 1
|
||||
Else
|
||||
Text = "Wählen Sie einen Wert:"
|
||||
dataColumn = 0
|
||||
_DataColumn = 0
|
||||
End If
|
||||
|
||||
If AddNewValues Then
|
||||
view.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True
|
||||
view.OptionsView.NewItemRowPosition = NewItemRowPosition.Top
|
||||
_View.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.True
|
||||
_View.OptionsView.NewItemRowPosition = NewItemRowPosition.Top
|
||||
Else
|
||||
view.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False
|
||||
view.OptionsView.NewItemRowPosition = NewItemRowPosition.None
|
||||
_View.OptionsBehavior.AllowAddRows = DevExpress.Utils.DefaultBoolean.False
|
||||
_View.OptionsView.NewItemRowPosition = NewItemRowPosition.None
|
||||
End If
|
||||
|
||||
If SelectedValues Is Nothing Then
|
||||
SelectedValues = New List(Of String)
|
||||
Else
|
||||
SelectedValues = SelectedValues.Where(Function(v) Not (IsDBNull(v) OrElse String.IsNullOrWhiteSpace(v))).ToList()
|
||||
End If
|
||||
|
||||
' Bereits ausgewählte Werte im grid auswählen
|
||||
SyncItemsWithView(view)
|
||||
SyncItemsWithView(_View)
|
||||
|
||||
' Focus auf Find panel setzen
|
||||
view.ShowFindPanel()
|
||||
_View.ShowFindPanel()
|
||||
|
||||
' Spaltenbreite anpassen
|
||||
view.BestFitColumns()
|
||||
_View.BestFitColumns()
|
||||
End Sub
|
||||
|
||||
Private Sub SaveSelectedValues()
|
||||
' Filter vor dem Auslesen entfernen, damit alle Werte erfasst werden
|
||||
view.FindFilterText = String.Empty
|
||||
_View.FindFilterText = String.Empty
|
||||
|
||||
If MultiSelect Then
|
||||
Dim oValues As New List(Of String)
|
||||
|
||||
For oIndex = 0 To viewLookup.DataRowCount - 1
|
||||
Dim oRow As DataRow = view.GetDataRow(oIndex)
|
||||
Dim oRow As DataRow = _View.GetDataRow(oIndex)
|
||||
Dim oSelected As Boolean = oRow.Item(0)
|
||||
Dim oValue As Object = oRow.Item(1)
|
||||
|
||||
@ -105,8 +108,8 @@ Public Class frmLookupGrid
|
||||
|
||||
SelectedValues = oValues
|
||||
Else
|
||||
Dim oRowHandle As Integer = view.GetSelectedRows().ToList().FirstOrDefault()
|
||||
Dim oRow As DataRow = view.GetDataRow(oRowHandle)
|
||||
Dim oRowHandle As Integer = _View.GetSelectedRows().ToList().FirstOrDefault()
|
||||
Dim oRow As DataRow = _View.GetDataRow(oRowHandle)
|
||||
Dim oValues As New List(Of String)
|
||||
|
||||
If oRow IsNot Nothing Then
|
||||
@ -128,8 +131,9 @@ Public Class frmLookupGrid
|
||||
|
||||
If rowView IsNot Nothing Then
|
||||
Dim row As DataRow = rowView.Row
|
||||
Dim value = row.Item(dataColumn)
|
||||
Dim value = row.Item(_DataColumn)
|
||||
|
||||
If Not (IsDBNull(value) OrElse String.IsNullOrWhiteSpace(value)) Then
|
||||
If SelectedValues.Contains(value) Then
|
||||
If MultiSelect Then
|
||||
row.Item(0) = True
|
||||
@ -138,6 +142,9 @@ Public Class frmLookupGrid
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
Next
|
||||
End If
|
||||
End Sub
|
||||
@ -187,8 +194,8 @@ Public Class frmLookupGrid
|
||||
End Sub
|
||||
|
||||
Private Sub viewLookup_ShowingEditor(sender As Object, e As System.ComponentModel.CancelEventArgs) Handles viewLookup.ShowingEditor
|
||||
Dim rowHandleIsNewItemRow = (view.FocusedRowHandle = GridControl.NewItemRowHandle)
|
||||
Dim columnIsCheckboxColumn = view.FocusedColumn.FieldName = "SELECTED"
|
||||
Dim rowHandleIsNewItemRow = (_View.FocusedRowHandle = GridControl.NewItemRowHandle)
|
||||
Dim columnIsCheckboxColumn = _View.FocusedColumn.FieldName = "SELECTED"
|
||||
|
||||
' Prevent editing of Data Column/allow editing for Checkbox Column and NewValue Row
|
||||
If rowHandleIsNewItemRow Or columnIsCheckboxColumn Then
|
||||
@ -206,10 +213,10 @@ Public Class frmLookupGrid
|
||||
' If multiselect is true, check the current row
|
||||
' If multiselect is false, select the current row and close the window
|
||||
If MultiSelect = True Then
|
||||
Dim row As DataRow = view.GetDataRow(e.RowHandle)
|
||||
Dim row As DataRow = _View.GetDataRow(e.RowHandle)
|
||||
row.Item(0) = Not CBool(row.Item(0))
|
||||
Else
|
||||
Dim row As DataRow = view.GetDataRow(e.RowHandle)
|
||||
Dim row As DataRow = _View.GetDataRow(e.RowHandle)
|
||||
Dim value = row.Item(0)
|
||||
|
||||
SelectedValues = New List(Of String) From {value}
|
||||
|
||||
54
LookupControlGui/Form1.Designer.vb
generated
54
LookupControlGui/Form1.Designer.vb
generated
@ -63,6 +63,16 @@ Partial Class Form1
|
||||
Dim SerializableAppearanceObject30 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject31 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject32 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim EditorButtonImageOptions9 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions()
|
||||
Dim SerializableAppearanceObject33 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject34 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject35 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject36 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim EditorButtonImageOptions10 As DevExpress.XtraEditors.Controls.EditorButtonImageOptions = New DevExpress.XtraEditors.Controls.EditorButtonImageOptions()
|
||||
Dim SerializableAppearanceObject37 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject38 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject39 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Dim SerializableAppearanceObject40 As DevExpress.Utils.SerializableAppearanceObject = New DevExpress.Utils.SerializableAppearanceObject()
|
||||
Me.Button1 = New System.Windows.Forms.Button()
|
||||
Me.LookupControl = New DigitalData.Controls.LookupGrid.LookupControl2()
|
||||
Me.LookupControl21View = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
@ -76,6 +86,9 @@ Partial Class Form1
|
||||
Me.LookupControl23 = New DigitalData.Controls.LookupGrid.LookupControl2()
|
||||
Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.Label4 = New System.Windows.Forms.Label()
|
||||
Me.LookupControl24 = New DigitalData.Controls.LookupGrid.LookupControl2()
|
||||
Me.GridView4 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||
Me.Label5 = New System.Windows.Forms.Label()
|
||||
CType(Me.LookupControl.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LookupControl21View, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LookupControl21.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
@ -84,6 +97,8 @@ Partial Class Form1
|
||||
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LookupControl23.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.LookupControl24.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GridView4, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'Button1
|
||||
@ -223,14 +238,48 @@ Partial Class Form1
|
||||
Me.Label4.TabIndex = 4
|
||||
Me.Label4.Text = "100.000 Records"
|
||||
'
|
||||
'LookupControl24
|
||||
'
|
||||
Me.LookupControl24.AllowAddNewValues = True
|
||||
Me.LookupControl24.DataSource = Nothing
|
||||
Me.LookupControl24.Location = New System.Drawing.Point(393, 251)
|
||||
Me.LookupControl24.MultiSelect = False
|
||||
Me.LookupControl24.Name = "LookupControl24"
|
||||
Me.LookupControl24.PreventDuplicates = False
|
||||
Me.LookupControl24.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo, "", -1, True, True, False, EditorButtonImageOptions9, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject33, SerializableAppearanceObject34, SerializableAppearanceObject35, SerializableAppearanceObject36, "", "openDropdown", Nothing, DevExpress.Utils.ToolTipAnchor.[Default]), New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Ellipsis, "", -1, True, True, False, EditorButtonImageOptions10, New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.None), SerializableAppearanceObject37, SerializableAppearanceObject38, SerializableAppearanceObject39, SerializableAppearanceObject40, "", "openLookupForm", Nothing, DevExpress.Utils.ToolTipAnchor.[Default])})
|
||||
Me.LookupControl24.Properties.DataSource = CType(resources.GetObject("LookupControl24.Properties.DataSource"), Object)
|
||||
Me.LookupControl24.Properties.NullText = ""
|
||||
Me.LookupControl24.Properties.PopupView = Me.GridView4
|
||||
Me.LookupControl24.SelectedValues = CType(resources.GetObject("LookupControl24.SelectedValues"), System.Collections.Generic.List(Of String))
|
||||
Me.LookupControl24.Size = New System.Drawing.Size(342, 20)
|
||||
Me.LookupControl24.TabIndex = 3
|
||||
'
|
||||
'GridView4
|
||||
'
|
||||
Me.GridView4.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
|
||||
Me.GridView4.Name = "GridView4"
|
||||
Me.GridView4.OptionsSelection.EnableAppearanceFocusedCell = False
|
||||
Me.GridView4.OptionsView.ShowGroupPanel = False
|
||||
'
|
||||
'Label5
|
||||
'
|
||||
Me.Label5.AutoSize = True
|
||||
Me.Label5.Location = New System.Drawing.Point(390, 235)
|
||||
Me.Label5.Name = "Label5"
|
||||
Me.Label5.Size = New System.Drawing.Size(167, 13)
|
||||
Me.Label5.TabIndex = 4
|
||||
Me.Label5.Text = "Empty List but New Values = True"
|
||||
'
|
||||
'Form1
|
||||
'
|
||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.ClientSize = New System.Drawing.Size(800, 450)
|
||||
Me.Controls.Add(Me.Label5)
|
||||
Me.Controls.Add(Me.Label4)
|
||||
Me.Controls.Add(Me.Label3)
|
||||
Me.Controls.Add(Me.Label2)
|
||||
Me.Controls.Add(Me.LookupControl24)
|
||||
Me.Controls.Add(Me.LookupControl23)
|
||||
Me.Controls.Add(Me.LookupControl22)
|
||||
Me.Controls.Add(Me.Label1)
|
||||
@ -247,6 +296,8 @@ Partial Class Form1
|
||||
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LookupControl23.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.LookupControl24.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GridView4, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.ResumeLayout(False)
|
||||
Me.PerformLayout()
|
||||
|
||||
@ -264,4 +315,7 @@ Partial Class Form1
|
||||
Friend WithEvents LookupControl23 As DigitalData.Controls.LookupGrid.LookupControl2
|
||||
Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents Label4 As Label
|
||||
Friend WithEvents LookupControl24 As DigitalData.Controls.LookupGrid.LookupControl2
|
||||
Friend WithEvents GridView4 As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents Label5 As Label
|
||||
End Class
|
||||
|
||||
@ -187,6 +187,24 @@
|
||||
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
|
||||
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
|
||||
ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="LookupControl24.Properties.DataSource" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
|
||||
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
|
||||
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
|
||||
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
|
||||
ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="LookupControl24.SelectedValues" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAJoBbXNjb3JsaWIsIFZlcnNpb249NC4wLjAuMCwgQ3VsdHVyZT1u
|
||||
ZXV0cmFsLCBQdWJsaWNLZXlUb2tlbj1iNzdhNWM1NjE5MzRlMDg5XV0sIG1zY29ybGliLCBWZXJzaW9u
|
||||
PTQuMC4wLjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjc3YTVjNTYxOTM0ZTA4OQUB
|
||||
AAAAMFN5c3RlbS5Db2xsZWN0aW9ucy5HZW5lcmljLkxpc3RgMVtbU3lzdGVtLlN0cmluZwMAAAAGX2l0
|
||||
ZW1zBV9zaXplCF92ZXJzaW9uBgAACAgCAAAACQMAAAAAAAAAAAAAABEDAAAAAAAAAAs=
|
||||
</value>
|
||||
</data>
|
||||
</root>
|
||||
@ -26,7 +26,7 @@ Public Class GraphQLInterface
|
||||
_userEmail = Email
|
||||
_userPassword = Password
|
||||
|
||||
Dim oStore As New X509Store(StoreName.My, StoreLocation.CurrentUser)
|
||||
Dim oStore As New X509Store(StoreName.Root, StoreLocation.CurrentUser)
|
||||
oStore.Open(OpenFlags.ReadOnly)
|
||||
|
||||
|
||||
|
||||
@ -172,6 +172,10 @@ Public Class Windream
|
||||
_sessionDomain = SessionDomain
|
||||
End Sub
|
||||
|
||||
Public Function GetCleanedPath(Path As String) As String
|
||||
Return Regex.Replace(Path, Constants.REGEX_CLEAN_FILENAME, String.Empty)
|
||||
End Function
|
||||
|
||||
Public Function GetChoiceListItems(ChoiceListName As String) As List(Of String)
|
||||
Dim oItems As New List(Of String)
|
||||
Dim oChoicelist As WMObject
|
||||
@ -1448,10 +1452,6 @@ Public Class Windream
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function GetCleanedPath(Path As String) As String
|
||||
Return Regex.Replace(Path, Constants.REGEX_CLEAN_FILENAME, String.Empty)
|
||||
End Function
|
||||
|
||||
Private Function GetObjectTypes() As WMObjects
|
||||
Dim oObjectTypes As WMObjects
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user