Revert "MS"

This reverts commit 50b69e5d88.
This commit is contained in:
Jonathan Jenne
2022-11-08 08:38:20 +01:00
parent 90ec7b70ab
commit 456a729f46
36 changed files with 2314 additions and 5169 deletions

View File

@@ -35,6 +35,34 @@ Public Class LookupControl3
Private Sub LookupControl3_EditValueChanging(sender As Object, e As ChangingEventArgs) Handles Me.EditValueChanging
e.Cancel = True
End Sub
Friend WithEvents fProperties As RepositoryItemGridLookUpEdit
Friend WithEvents fPropertiesView As DevExpress.XtraGrid.Views.Grid.GridView
Private Sub InitializeComponent()
Me.fProperties = New DevExpress.XtraEditors.Repository.RepositoryItemGridLookUpEdit()
Me.fPropertiesView = New DevExpress.XtraGrid.Views.Grid.GridView()
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'fProperties
'
Me.fProperties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)})
Me.fProperties.Name = "fProperties"
Me.fProperties.PopupView = Me.fPropertiesView
'
'fPropertiesView
'
Me.fPropertiesView.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus
Me.fPropertiesView.Name = "fPropertiesView"
Me.fPropertiesView.OptionsSelection.EnableAppearanceFocusedCell = False
Me.fPropertiesView.OptionsView.ShowGroupPanel = False
CType(Me.fProperties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.fPropertiesView, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
End Class
<UserRepositoryItem("RegisterLookupControl3")>
@@ -51,10 +79,6 @@ Public Class RepositoryItemLookupControl3
UpdateSelectedValues(New List(Of String))
End Sub
Private Class S
Inherits My.Resources.Strings
End Class
Private Const NAME_DATATABLE_INTERNAL = "__INTERNAL_DATATABLE__"
Private Const TAG_DROPDOWN = "openDropdown"
Private Const TAG_BUTTON_LOOKUP_FORM = "openLookupForm"
@@ -164,17 +188,17 @@ Public Class RepositoryItemLookupControl3
If MultiSelect = True Then
Select Case Values.Count
Case 0
NullText = S.LookupControl_NoRecords
NullText = String.Format(_R.GetString("LookupControl_NoRecords"))
Case 1
NullText = Values.FirstOrDefault()
OwnerEdit.EditValue = Values.FirstOrDefault()
Case Else
NullText = String.Format(S.LookupControl_NRecords, Values.Count)
NullText = String.Format(_R.GetString("LookupControl_NRecords"), Values.Count)
End Select
Else
Select Case Values.Count
Case 0
NullText = S.LookupControl_NoRecords
NullText = String.Format(_R.GetString("LookupControl_NoRecords"))
Case Else
NullText = Values.FirstOrDefault()
' JJ at 07.05.2021
@@ -185,9 +209,7 @@ Public Class RepositoryItemLookupControl3
' If No external Datasource is supplied, create one containing the currently selected values
' If the current datasource is the internal one, update it
Dim oIsInternalDataTable = TypeOf DataSource Is DataTable AndAlso DirectCast(DataSource, DataTable).TableName = NAME_DATATABLE_INTERNAL
If DataSource Is Nothing OrElse oIsInternalDataTable Then
If DataSource Is Nothing OrElse (TypeOf DataSource Is DataTable AndAlso DirectCast(DataSource, DataTable).TableName = NAME_DATATABLE_INTERNAL) Then
Dim oDataTable As New DataTable() With {
.TableName = NAME_DATATABLE_INTERNAL
}