From e5f7fcd05a726a7da3d4f1e493b9644f7ea76386 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Nov 2021 10:40:56 +0100 Subject: [PATCH 1/9] Patterns: WIP Pattern2 --- Modules.Patterns/Modules/Clipboard.vb | 1 - Modules.Patterns/Modules/Internal.vb | 1 - Modules.Patterns/Modules/User.vb | 1 - Modules.Patterns/Patterns2.vb | 10 +++------- 4 files changed, 3 insertions(+), 10 deletions(-) diff --git a/Modules.Patterns/Modules/Clipboard.vb b/Modules.Patterns/Modules/Clipboard.vb index b175dc04..db25641e 100644 --- a/Modules.Patterns/Modules/Clipboard.vb +++ b/Modules.Patterns/Modules/Clipboard.vb @@ -11,7 +11,6 @@ Namespace [PatternModule] Public Const CLIPBOARD_VALUE_EN = "@Clipboard" Public Property PatternIdentifier As String = "CLIP" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = False Implements IModule.IsComplex Public Sub New(pLogConfig As LogConfig) diff --git a/Modules.Patterns/Modules/Internal.vb b/Modules.Patterns/Modules/Internal.vb index f3807049..539e530f 100644 --- a/Modules.Patterns/Modules/Internal.vb +++ b/Modules.Patterns/Modules/Internal.vb @@ -14,7 +14,6 @@ Namespace [PatternModule] Public Const INT_VALUE_DATE = "DATE" Public Property PatternIdentifier As String = "INT" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = False Implements IModule.IsComplex Public Sub New(pLogConfig As LogConfig) diff --git a/Modules.Patterns/Modules/User.vb b/Modules.Patterns/Modules/User.vb index 18ea6e15..6a823774 100644 --- a/Modules.Patterns/Modules/User.vb +++ b/Modules.Patterns/Modules/User.vb @@ -14,7 +14,6 @@ Namespace [PatternModule] Public Const USER_VALUE_USER_NAME = "USER_NAME" Public Property PatternIdentifier As String = "USER" Implements IModule.PatternIdentifier - Public Property IsComplex As Boolean = True Implements IModule.IsComplex Public Sub New(pLogConfig As LogConfig) diff --git a/Modules.Patterns/Patterns2.vb b/Modules.Patterns/Patterns2.vb index 1c7c1d87..5dcc70ef 100644 --- a/Modules.Patterns/Patterns2.vb +++ b/Modules.Patterns/Patterns2.vb @@ -94,13 +94,6 @@ Public Class Patterns2 Private Function GetReplaceMapForModule(pModule As IModule, pPanel As Panel, pUser As State.UserState) As Dictionary(Of String, Object) Dim oArgs As New Dictionary(Of String, Object) - Select Case pModule.GetType() - Case GetType(PatternModule.Clipboard) - - - End Select - - If TypeOf pModule Is PatternModule.Clipboard Then oArgs.Add(PatternModule.Clipboard.CLIP_VALUE_BOARD, My.Computer.Clipboard.GetText()) @@ -109,6 +102,7 @@ Public Class Patterns2 oArgs.Add(PatternModule.Internal.INT_VALUE_MACHINE, System.Environment.MachineName) oArgs.Add(PatternModule.Internal.INT_VALUE_DOMAIN, System.Environment.UserDomainName) oArgs.Add(PatternModule.Internal.INT_VALUE_DATE, Now.ToShortDateString) + ElseIf TypeOf pModule Is PatternModule.User Then oArgs.Add(PatternModule.User.USER_VALUE_EMAIL, pUser.Email) oArgs.Add(PatternModule.User.USER_VALUE_LANGUAGE, pUser.Language) @@ -117,8 +111,10 @@ Public Class Patterns2 oArgs.Add(PatternModule.User.USER_VALUE_SURNAME, pUser.Surname) oArgs.Add(PatternModule.User.USER_VALUE_USER_ID, pUser.UserId) oArgs.Add(PatternModule.User.USER_VALUE_USER_NAME, pUser.UserName) + ElseIf TypeOf pModule Is PatternModule.Controls Then oArgs.Add(PatternModule.Controls.CTRL_VALUE_PANEL, pPanel) + End If Return oArgs From bd176e3de02570c95686647544a6870dfb7d1ecc Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Nov 2021 14:19:21 +0100 Subject: [PATCH 2/9] Patterns: Add Controls and Windream Modules --- Modules.Patterns/Modules/BaseModule.vb | 56 ++++++++----- Modules.Patterns/Modules/Controls.vb | 67 ++++++++------- Modules.Patterns/Modules/Windream.vb | 53 ++++++++++++ Modules.Patterns/Patterns.vbproj | 1 + Modules.Patterns/Patterns2.vb | 112 +++++++++++++++++++++---- 5 files changed, 225 insertions(+), 64 deletions(-) create mode 100644 Modules.Patterns/Modules/Windream.vb diff --git a/Modules.Patterns/Modules/BaseModule.vb b/Modules.Patterns/Modules/BaseModule.vb index f6829e7e..39ca4da4 100644 --- a/Modules.Patterns/Modules/BaseModule.vb +++ b/Modules.Patterns/Modules/BaseModule.vb @@ -3,9 +3,11 @@ Imports System.Text.RegularExpressions Namespace [PatternModule] Public Class BaseModule - Friend ReadOnly Logger As Logger - + Private ReadOnly Logger As Logger Private ReadOnly MyRegex As Regex = New Regex("{#(\w+)#([\:\.\w\s_-]+)}+") + Private ReadOnly SqlPhrases As New List(Of String) From { + "SELECT ", "UPDATE ", "DELETE ", "EXEC " + } Private Const MAX_TRY_COUNT = 500 @@ -21,23 +23,37 @@ Namespace [PatternModule] pCounter += 1 End Sub - Public Function ReplacePattern(input As String, type As String, replacement As String) As String - Dim elements As MatchCollection = MyRegex.Matches(input) + Public Function ReplacePattern(pInput As String, pType As String, pReplacement As String) As String + Dim oElements As MatchCollection = MyRegex.Matches(pInput) - If IsNothing(replacement) Then - Return input + If IsNothing(pReplacement) Then + Return pInput End If - For Each element As Match In elements + Dim oIsSQL As Boolean = False + For Each oPhrase In SqlPhrases + If pInput.Contains(oPhrase) Then + oIsSQL = True + Exit For + End If + Next + + If oIsSQL = True Then + Logger.Debug("Input string is most likely an SQL Query, masking quotes in replacement string.") + pReplacement = pReplacement.Replace("'", "''") + End If + + For Each oElement As Match In oElements ' if group 1 contains the 'pattern' the replace whole group with 'replacement' ' and return it - If element.Groups(1).Value = type Then - Return Regex.Replace(input, element.Groups(0).Value, replacement) + If oElement.Groups(1).Value = pType Then + Logger.Debug("Replacing Placeholder with [{0}]", pReplacement) + Return Regex.Replace(pInput, oElement.Groups(0).Value, pReplacement) End If Next ' no replacement made - Return input + Return pInput End Function Public Function ContainsPatternAndValue(pInput As String, pType As String, pValue As String) As Boolean @@ -45,10 +61,10 @@ Namespace [PatternModule] For Each oElement As Match In oElements ' Pattern in pInput - Dim t As String = oElement.Groups(1).Value - Dim v As String = oElement.Groups(2).Value + Dim oType As String = oElement.Groups(1).Value + Dim oValue As String = oElement.Groups(2).Value - If t = pType And v = pValue Then + If oType = pType And oValue = pValue Then Return True End If Next @@ -84,16 +100,16 @@ Namespace [PatternModule] Return False End Function - Public Function GetNextPattern(input As String, type As String) As Pattern - Dim elements As MatchCollection = MyRegex.Matches(input) + Public Function GetNextPattern(pInput As String, pType As String) As Pattern + Dim oElements As MatchCollection = MyRegex.Matches(pInput) - For Each element As Match In elements + For Each oElement As Match In oElements ' Pattern in pInput - Dim t As String = element.Groups(1).Value - Dim v As String = element.Groups(2).Value + Dim oType As String = oElement.Groups(1).Value + Dim oValue As String = oElement.Groups(2).Value - If t = type Then - Return New Pattern(t, v) + If oType = pType Then + Return New Pattern(oType, oValue) End If Next diff --git a/Modules.Patterns/Modules/Controls.vb b/Modules.Patterns/Modules/Controls.vb index 738b78f8..1e9cb880 100644 --- a/Modules.Patterns/Modules/Controls.vb +++ b/Modules.Patterns/Modules/Controls.vb @@ -4,55 +4,62 @@ Imports DigitalData.Modules.Logging Namespace [PatternModule] ''' - ''' Simple patterns that only rely on .NET functions + ''' Patterns for control values on a panel ''' Public Class Controls Inherits BaseModule Implements IModule - Public Const CTRL_VALUE_PANEL = "PANEL" + Public Const CTRL_VALUE_PANEL = "CTRL_VALUE_PANEL" Public Property PatternIdentifier As String = "CTRL" Implements IModule.PatternIdentifier Public Property IsComplex As Boolean = True Implements IModule.IsComplex + Private ReadOnly Logger As Logger Public Sub New(pLogConfig As LogConfig) MyBase.New(pLogConfig) + Logger = pLogConfig.GetLogger() End Sub Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace Dim oResult = pInput Dim oCounter = 0 - Dim oPanel As Panel = pReplaceMap.Item("CTRL_VALUE_PANEL") + Dim oPanel As Panel = pReplaceMap.Item(CTRL_VALUE_PANEL) While ContainsPattern(oResult, PatternIdentifier) - Dim oControlName As String = GetNextPattern(oResult, PatternIdentifier).Value - Dim oControl As Control = oPanel.Controls.Find(oControlName, False).FirstOrDefault() - - If oControl IsNot Nothing Then - Dim oReplaceValue As String - Select Case oControl.GetType.ToString - Case GetType(TextBox).ToString - oReplaceValue = oControl.Text - Case GetType(LookupControl3).ToString - Dim oLookupControl3 As LookupControl3 = oControl - If oLookupControl3.Properties.SelectedValues.Count = 1 Then - oReplaceValue = oLookupControl3.Properties.SelectedValues.Item(0) - Else + Try + Dim oControlName As String = GetNextPattern(oResult, PatternIdentifier).Value + Dim oControl As Control = oPanel.Controls.Find(oControlName, False).FirstOrDefault() + + If oControl IsNot Nothing Then + Dim oReplaceValue As String + Select Case oControl.GetType.ToString + Case GetType(TextBox).ToString + oReplaceValue = oControl.Text + Case GetType(LookupControl3).ToString + Dim oLookupControl3 As LookupControl3 = oControl + If oLookupControl3.Properties.SelectedValues.Count = 1 Then + oReplaceValue = oLookupControl3.Properties.SelectedValues.Item(0) + Else + oReplaceValue = "0" + End If + Case GetType(ComboBox).ToString + oReplaceValue = oControl.Text + Case GetType(CheckBox).ToString + Dim oCheckBox As CheckBox = oControl + oReplaceValue = oCheckBox.Checked + Case Else oReplaceValue = "0" - End If - Case GetType(ComboBox).ToString - oReplaceValue = oControl.Text - Case GetType(CheckBox).ToString - Dim oCheckBox As CheckBox = oControl - oReplaceValue = oCheckBox.Checked - Case Else - oReplaceValue = "0" - End Select - - oResult = ReplacePattern(oResult, PatternIdentifier, oReplaceValue) - End If - - IncrementCounterOrThrow(oCounter) + End Select + + oResult = ReplacePattern(oResult, PatternIdentifier, oReplaceValue) + End If + Catch ex As Exception + Logger.Error(ex) + Finally + IncrementCounterOrThrow(oCounter) + End Try + End While Return oResult diff --git a/Modules.Patterns/Modules/Windream.vb b/Modules.Patterns/Modules/Windream.vb new file mode 100644 index 00000000..f7557e2b --- /dev/null +++ b/Modules.Patterns/Modules/Windream.vb @@ -0,0 +1,53 @@ +Imports System.Windows.Forms +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.Modules.Logging + +Namespace [PatternModule] + ''' + ''' Patterns for Windream Indicies + ''' + Public Class Windream + Inherits BaseModule + Implements IModule + + Public Const WM_VALUE_DOCUMENT = "WM_DOCUMENT" + + Public Property PatternIdentifier As String = "WMI" Implements IModule.PatternIdentifier + Public Property IsComplex As Boolean = True Implements IModule.IsComplex + + Private ReadOnly Logger As Logger + + Public Sub New(pLogConfig As LogConfig) + MyBase.New(pLogConfig) + Logger = pLogConfig.GetLogger() + End Sub + + Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace + Dim oResult = pInput + Dim oCounter = 0 + Dim pWMObject As WINDREAMLib.WMObject = pReplaceMap.Item(WM_VALUE_DOCUMENT) + + While ContainsPattern(oResult, PatternIdentifier) + Try + Dim oIndexName As String = GetNextPattern(oResult, PatternIdentifier).Value + Dim oWMValue As Object = pWMObject.GetVariableValue(oIndexName) + + If oWMValue Is Nothing Then + Logger.Warn("Value for Index [{0}] is empty and will not be used for replacing. Skipping.") + Return oResult + End If + + oResult = ReplacePattern(oResult, PatternIdentifier, oWMValue.ToString) + + Catch ex As Exception + Logger.Error(ex) + Return oResult + Finally + IncrementCounterOrThrow(oCounter) + End Try + End While + + Return oResult + End Function + End Class +End Namespace diff --git a/Modules.Patterns/Patterns.vbproj b/Modules.Patterns/Patterns.vbproj index 1e8c7443..eefd03d6 100644 --- a/Modules.Patterns/Patterns.vbproj +++ b/Modules.Patterns/Patterns.vbproj @@ -81,6 +81,7 @@ + diff --git a/Modules.Patterns/Patterns2.vb b/Modules.Patterns/Patterns2.vb index 5dcc70ef..27b55a86 100644 --- a/Modules.Patterns/Patterns2.vb +++ b/Modules.Patterns/Patterns2.vb @@ -91,29 +91,113 @@ Public Class Patterns2 Return oResult End Function - Private Function GetReplaceMapForModule(pModule As IModule, pPanel As Panel, pUser As State.UserState) As Dictionary(Of String, Object) + Public Function ReplaceUserValues(pInput As String, pUser As State.UserState) As String + Dim oResult = pInput + + Dim oModule = GetModule(Of PatternModule.User)() + Dim oArgs = GetReplaceMapForModule(oModule, pUser:=pUser) + oResult = DoReplaceForModule(oResult, oModule, oArgs) + + Return oResult + End Function + + Public Function ReplaceControlValues(pInput As String, pPanel As Panel) As String + Dim oResult = pInput + + Dim oModule = GetModule(Of PatternModule.Controls)() + Dim oArgs = GetReplaceMapForModule(oModule, pPanel:=pPanel) + oResult = DoReplaceForModule(oResult, oModule, oArgs) + + Return oResult + End Function + + Public Function ReplaceWindreamValues(pInput As String, pWMObject As WMObject) As String + Dim oResult = pInput + + Dim oModule = GetModule(Of PatternModule.Windream)() + Dim oArgs = GetReplaceMapForModule(oModule, pWMObject:=pWMObject) + oResult = DoReplaceForModule(oResult, oModule, oArgs) + + Return oResult + End Function + + Public Function ReplaceInternalValues(pInput As String) As String + Dim oResult = pInput + + Dim oInternalModule = GetModule(Of PatternModule.Internal)() + Dim oInternalArgs = GetReplaceMapForModule(oInternalModule) + oResult = DoReplaceForModule(oResult, oInternalModule, oInternalArgs) + + Dim oClipboardModule = GetModule(Of PatternModule.Clipboard)() + Dim oClipboardArgs = GetReplaceMapForModule(oClipboardModule) + oResult = DoReplaceForModule(oResult, oClipboardModule, oClipboardArgs) + + Return oResult + End Function + + Private Function DoReplaceForModule(pInput As String, pModule As IModule, pArgs As Dictionary(Of String, Object)) As String + Try + pInput = pModule.Replace(pInput, pArgs) + Catch ex As Exception + Logger.Warn("Placeholders for String [{0}] could not be replaced completely in Module [{1}]. Skipping.", pInput, pModule.GetType.Name) + Logger.Error(ex) + End Try + + Return pInput + End Function + + Private Function GetModule(Of ModuleT)() As IModule + Return Modules. + Where(Function(m) TypeOf m Is ModuleT). + SingleOrDefault() + End Function + + Private Function GetReplaceMapForModule(pModule As IModule, Optional pPanel As Panel = Nothing, Optional pUser As State.UserState = Nothing, Optional pWMObject As WMObject = Nothing) As Dictionary(Of String, Object) Dim oArgs As New Dictionary(Of String, Object) If TypeOf pModule Is PatternModule.Clipboard Then - oArgs.Add(PatternModule.Clipboard.CLIP_VALUE_BOARD, My.Computer.Clipboard.GetText()) + Try + oArgs.Add(PatternModule.Clipboard.CLIP_VALUE_BOARD, My.Computer.Clipboard.GetText()) + Catch ex As Exception + Logger.Error(ex) + End Try ElseIf TypeOf pModule Is PatternModule.Internal Then - oArgs.Add(PatternModule.Internal.INT_VALUE_USERNAME, System.Environment.UserName) - oArgs.Add(PatternModule.Internal.INT_VALUE_MACHINE, System.Environment.MachineName) - oArgs.Add(PatternModule.Internal.INT_VALUE_DOMAIN, System.Environment.UserDomainName) - oArgs.Add(PatternModule.Internal.INT_VALUE_DATE, Now.ToShortDateString) + Try + oArgs.Add(PatternModule.Internal.INT_VALUE_USERNAME, System.Environment.UserName) + oArgs.Add(PatternModule.Internal.INT_VALUE_MACHINE, System.Environment.MachineName) + oArgs.Add(PatternModule.Internal.INT_VALUE_DOMAIN, System.Environment.UserDomainName) + oArgs.Add(PatternModule.Internal.INT_VALUE_DATE, Now.ToShortDateString) + Catch ex As Exception + Logger.Error(ex) + End Try ElseIf TypeOf pModule Is PatternModule.User Then - oArgs.Add(PatternModule.User.USER_VALUE_EMAIL, pUser.Email) - oArgs.Add(PatternModule.User.USER_VALUE_LANGUAGE, pUser.Language) - oArgs.Add(PatternModule.User.USER_VALUE_PRENAME, pUser.GivenName) - oArgs.Add(PatternModule.User.USER_VALUE_SHORTNAME, pUser.ShortName) - oArgs.Add(PatternModule.User.USER_VALUE_SURNAME, pUser.Surname) - oArgs.Add(PatternModule.User.USER_VALUE_USER_ID, pUser.UserId) - oArgs.Add(PatternModule.User.USER_VALUE_USER_NAME, pUser.UserName) + Try + oArgs.Add(PatternModule.User.USER_VALUE_EMAIL, pUser.Email) + oArgs.Add(PatternModule.User.USER_VALUE_LANGUAGE, pUser.Language) + oArgs.Add(PatternModule.User.USER_VALUE_PRENAME, pUser.GivenName) + oArgs.Add(PatternModule.User.USER_VALUE_SHORTNAME, pUser.ShortName) + oArgs.Add(PatternModule.User.USER_VALUE_SURNAME, pUser.Surname) + oArgs.Add(PatternModule.User.USER_VALUE_USER_ID, pUser.UserId) + oArgs.Add(PatternModule.User.USER_VALUE_USER_NAME, pUser.UserName) + Catch ex As Exception + Logger.Error(ex) + End Try ElseIf TypeOf pModule Is PatternModule.Controls Then - oArgs.Add(PatternModule.Controls.CTRL_VALUE_PANEL, pPanel) + Try + oArgs.Add(PatternModule.Controls.CTRL_VALUE_PANEL, pPanel) + Catch ex As Exception + Logger.Error(ex) + End Try + + ElseIf TypeOf pModule Is PatternModule.Windream Then + Try + oArgs.Add(PatternModule.Windream.WM_VALUE_DOCUMENT, pWMObject) + Catch ex As Exception + Logger.Error(ex) + End Try End If From a90037970445a51c88b756e8aac270a561838034 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Nov 2021 14:28:13 +0100 Subject: [PATCH 3/9] EDMIAPI: First usable version of DatabaseWithFallback --- Modules.EDMIAPI/DatabaseWithFallback.vb | 37 +++---------------- .../DatabaseWithFallback/UserData.vb | 14 ------- Modules.EDMIAPI/EDMI.API.vbproj | 1 - 3 files changed, 5 insertions(+), 47 deletions(-) delete mode 100644 Modules.EDMIAPI/DatabaseWithFallback/UserData.vb diff --git a/Modules.EDMIAPI/DatabaseWithFallback.vb b/Modules.EDMIAPI/DatabaseWithFallback.vb index ffb76cfe..78326af2 100644 --- a/Modules.EDMIAPI/DatabaseWithFallback.vb +++ b/Modules.EDMIAPI/DatabaseWithFallback.vb @@ -47,15 +47,15 @@ Public Class DatabaseWithFallback End If End Function - Public Function GetDatatable(DataTable As String, FallbackSQL As String, FallbackType As Constants.DatabaseType, Optional FilterExpression As String = "", Optional SortByColumn As String = "", Optional ForceFallback As Boolean = False) As DataTable + Public Function GetDatatable(pDataTableName As String, pFallbackSQL As String, pFallbackType As Constants.DatabaseType, Optional pFilterExpression As String = "", Optional pSortByColumn As String = "", Optional pForceFallback As Boolean = False) As DataTable Try Dim oResult As DataTable = Nothing - If ForceFallback = False Then + If pForceFallback = False Then Dim oTableResult As TableResult Try - oTableResult = _Client.GetDatatableByName(DataTable, FilterExpression, SortByColumn) + oTableResult = _Client.GetDatatableByName(pDataTableName, pFilterExpression, pSortByColumn) Catch ex As Exception _Logger.Error(ex) oTableResult = Nothing @@ -63,12 +63,12 @@ Public Class DatabaseWithFallback If oTableResult Is Nothing OrElse oTableResult.OK = False Then _Logger.Warn("Datatable [{0}] could not be fetched from AppServer Cache. Falling back to direct Database Access.") - Return GetDatatableFromDatabase(FallbackSQL, FallbackType) + Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType) End If Return oTableResult.Table Else - Return GetDatatableFromDatabase(FallbackSQL, FallbackType) + Return GetDatatableFromDatabase(pFallbackSQL, pFallbackType) End If Catch ex As Exception _Logger.Error(ex) @@ -95,32 +95,5 @@ Public Class DatabaseWithFallback End Try End Function - - Public Function GetUserData(UserName As String, ModuleCode As String, Client As Integer) As UserData - 'Dim oSQL = $"SELECT * FROM FNDD_CHECK_USER_MODULE('{UserName}','{ModuleCode}',{Client})" - 'Dim oTable As DataTable = GetDatatable("TBDD_USER_MODULE", $"USERNAME = '{UserName.ToLower}' AND MODULE_SHORT = '{ModuleCode}'", "", oSQL, DatabaseType.ECM) - - 'If oTable Is Nothing Then - ' Return Nothing - 'End If - - 'If oTable.Rows.Count = 0 Then - ' Return Nothing - 'End If - - 'Dim oRow As DataRow = oTable.Rows.Item(0) - 'Dim oUserData As New UserData With { - ' .Id = NotNull(oRow, "USER_ID", -1), - ' .Surname = NotNull(oRow, "USER_SURNAME", String.Empty), - ' .Prename = NotNull(oRow, "USER_PRENAME", String.Empty), - ' .Shortname = NotNull(oRow, "USER_SHORTNAME", String.Empty), - ' .Email = NotNull(oRow, "USER_EMAIL", String.Empty), - ' .Language = NotNull(oRow, "USER_LANGUAGE", "de-DE"), - ' .DateFormat = NotNull(oRow, "USER_DATE_FORMAT", "dd.MM.yyyy") - '} - - Throw New NotImplementedException() - End Function - End Class diff --git a/Modules.EDMIAPI/DatabaseWithFallback/UserData.vb b/Modules.EDMIAPI/DatabaseWithFallback/UserData.vb deleted file mode 100644 index ae8e6120..00000000 --- a/Modules.EDMIAPI/DatabaseWithFallback/UserData.vb +++ /dev/null @@ -1,14 +0,0 @@ -Public Class UserData - Public Id As Integer - Public Surname As String - Public Prename As String - Public Shortname As String - Public Email As String - Public Language As String - Public DateFormat As String - - Public IsAdmin As Boolean - Public HasAccess As Boolean - - Public ModuleName As String -End Class diff --git a/Modules.EDMIAPI/EDMI.API.vbproj b/Modules.EDMIAPI/EDMI.API.vbproj index f32d7915..5a2c4f1a 100644 --- a/Modules.EDMIAPI/EDMI.API.vbproj +++ b/Modules.EDMIAPI/EDMI.API.vbproj @@ -97,7 +97,6 @@ Settings.settings True - From fe3f9c5156c6b30f093b72eeb5d7fe2bad8b3799 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Nov 2021 14:28:29 +0100 Subject: [PATCH 4/9] Patterns: Begin IDB Module --- Modules.Patterns/Modules/IDB.vb | 31 +++++++++++++++++++++ Modules.Patterns/My Project/AssemblyInfo.vb | 2 +- Modules.Patterns/Patterns.vbproj | 1 + 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 Modules.Patterns/Modules/IDB.vb diff --git a/Modules.Patterns/Modules/IDB.vb b/Modules.Patterns/Modules/IDB.vb new file mode 100644 index 00000000..5b95ff70 --- /dev/null +++ b/Modules.Patterns/Modules/IDB.vb @@ -0,0 +1,31 @@ +Imports System.Windows.Forms +Imports DigitalData.Controls.LookupGrid +Imports DigitalData.Modules.Logging + +Namespace [PatternModule] + ''' + ''' Patterns for Windream Indicies + ''' + Public Class IDB + Inherits BaseModule + Implements IModule + + Public Const IDB_OBJECT_ID = "IDB_OBJECT_ID" + + Public Property PatternIdentifier As String = "IDB" Implements IModule.PatternIdentifier + Public Property IsComplex As Boolean = True Implements IModule.IsComplex + + Private ReadOnly Logger As Logger + + Public Sub New(pLogConfig As LogConfig) + MyBase.New(pLogConfig) + Logger = pLogConfig.GetLogger() + End Sub + + Public Function Replace(pInput As String, pReplaceMap As Dictionary(Of String, Object)) As String Implements IModule.Replace + 'TODO: Implement, depends on IDB Data, which is not in monorepo yet + + Return pInput + End Function + End Class +End Namespace diff --git a/Modules.Patterns/My Project/AssemblyInfo.vb b/Modules.Patterns/My Project/AssemblyInfo.vb index 7fc8ac9c..478f1c21 100644 --- a/Modules.Patterns/My Project/AssemblyInfo.vb +++ b/Modules.Patterns/My Project/AssemblyInfo.vb @@ -12,7 +12,7 @@ Imports System.Runtime.InteropServices - + diff --git a/Modules.Patterns/Patterns.vbproj b/Modules.Patterns/Patterns.vbproj index eefd03d6..30f90ec2 100644 --- a/Modules.Patterns/Patterns.vbproj +++ b/Modules.Patterns/Patterns.vbproj @@ -81,6 +81,7 @@ + From cbab70c288b63031f7d07e132e48e44e821fe583 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 4 Nov 2021 14:29:16 +0100 Subject: [PATCH 5/9] EDMIAPI: Version 1.2.4 --- Modules.EDMIAPI/My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Modules.EDMIAPI/My Project/AssemblyInfo.vb b/Modules.EDMIAPI/My Project/AssemblyInfo.vb index 1ea84e11..97ec105b 100644 --- a/Modules.EDMIAPI/My Project/AssemblyInfo.vb +++ b/Modules.EDMIAPI/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + From 5d7398101c1f901e6d80e4bece76e2f268173393 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Mon, 15 Nov 2021 16:30:12 +0100 Subject: [PATCH 6/9] Zooflow: new search form --- GUIs.ZooFlow/ClassInit.vb | 3 +- GUIs.ZooFlow/My Project/licenses.licx | 33 +- GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb | 477 +++++++++++++++++++ GUIs.ZooFlow/Search/frmSearchNeu.resx | 120 +++++ GUIs.ZooFlow/Search/frmSearchNeu.vb | 32 ++ GUIs.ZooFlow/ZooFlow.vbproj | 10 + GUIs.ZooFlow/frmFlowForm.vb | 7 +- Modules.Database/Adapters/MSSQLServer.vb | 18 +- Modules.Patterns/Modules/BaseModule.vb | 2 +- 9 files changed, 670 insertions(+), 32 deletions(-) create mode 100644 GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb create mode 100644 GUIs.ZooFlow/Search/frmSearchNeu.resx create mode 100644 GUIs.ZooFlow/Search/frmSearchNeu.vb diff --git a/GUIs.ZooFlow/ClassInit.vb b/GUIs.ZooFlow/ClassInit.vb index d7153d26..c388b6a1 100644 --- a/GUIs.ZooFlow/ClassInit.vb +++ b/GUIs.ZooFlow/ClassInit.vb @@ -105,7 +105,8 @@ Public Class ClassInit oDataRow.Item("PASSWORD").ToString ) - My.DatabaseIDB = New MSSQLServer(My.LogConfig, oConString) + Dim oDecryptedConnectionString = MSSQLServer.DecryptConnectionString(oConString) + My.DatabaseIDB = New MSSQLServer(My.LogConfig, oDecryptedConnectionString) End If If My.DatabaseIDB.DBInitialized = False Then diff --git a/GUIs.ZooFlow/My Project/licenses.licx b/GUIs.ZooFlow/My Project/licenses.licx index 9a16001b..4b26483b 100644 --- a/GUIs.ZooFlow/My Project/licenses.licx +++ b/GUIs.ZooFlow/My Project/licenses.licx @@ -1,23 +1,24 @@ -DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraNavBar.NavBarControl, DevExpress.XtraNavBar.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.FormAssistant, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.SearchLookUpEdit, DevExpress.XtraGrid.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.LookUpEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemDateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.TileControl, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Docking.DockManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraTreeList.TreeList, DevExpress.XtraTreeList.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.ButtonEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraBars.Docking2010.DocumentManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraSpreadsheet.SpreadsheetFormulaBar, DevExpress.XtraSpreadsheet.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Navigation.TileNavPane, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraDataLayout.DataLayoutControl, DevExpress.XtraLayout.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a -DevExpress.XtraEditors.PictureEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Docking2010.DocumentManager, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.DateEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a DevExpress.XtraEditors.ComboBoxEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.FormAssistant, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraSpreadsheet.SpreadsheetFormulaBar, DevExpress.XtraSpreadsheet.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a +DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v19.2, Version=19.2.3.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a diff --git a/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb b/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb new file mode 100644 index 00000000..c5e53027 --- /dev/null +++ b/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb @@ -0,0 +1,477 @@ +Imports DevExpress.XtraEditors +Imports DevExpress.XtraGrid +Imports DevExpress.XtraGrid.Views.Grid + + +Partial Class frmSearchNeu + Inherits DevExpress.XtraBars.Ribbon.RibbonForm + + 'Form overrides dispose to clean up the component list. + _ + Protected Overrides Sub Dispose(ByVal disposing As Boolean) + If disposing AndAlso components IsNot Nothing Then + components.Dispose() + End If + MyBase.Dispose(disposing) + End Sub + + 'Required by the Windows Form Designer + Private components As System.ComponentModel.IContainer + + 'NOTE: The following procedure is required by the Windows Form Designer + 'It can be modified using the Windows Form Designer. + 'Do not modify it using the code editor. + _ + Private Sub InitializeComponent() + Me.cmbOperator = New DevExpress.XtraEditors.ComboBoxEdit() + Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() + Me.cmbMandator = New DevExpress.XtraEditors.ComboBoxEdit() + Me.lookupAttribute = New DevExpress.XtraEditors.SearchLookUpEdit() + Me.SearchLookUpEdit2View = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.lookupValue = New DevExpress.XtraEditors.SearchLookUpEdit() + Me.SearchLookUpEdit1View = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() + Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() + Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() + Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() + Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() + Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem() + Me.NavBarControl1 = New DevExpress.XtraNavBar.NavBarControl() + Me.NavBarGroup1 = New DevExpress.XtraNavBar.NavBarGroup() + Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl() + Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl() + Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl() + Me.GridControl1 = New DevExpress.XtraGrid.GridControl() + Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() + Me.colParenLeft = New DevExpress.XtraGrid.Columns.GridColumn() + Me.colAttribute = New DevExpress.XtraGrid.Columns.GridColumn() + Me.colOperator = New DevExpress.XtraGrid.Columns.GridColumn() + Me.colValue = New DevExpress.XtraGrid.Columns.GridColumn() + Me.colParenRight = New DevExpress.XtraGrid.Columns.GridColumn() + Me.RibbonControl1 = New DevExpress.XtraBars.Ribbon.RibbonControl() + Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() + Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() + Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() + Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() + Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() + CType(Me.cmbOperator.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.LayoutControl1.SuspendLayout() + CType(Me.cmbMandator.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.lookupAttribute.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SearchLookUpEdit2View, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.lookupValue.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerControl1.SuspendLayout() + CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerControl2.SuspendLayout() + CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerControl3.SuspendLayout() + CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SuspendLayout() + ' + 'cmbOperator + ' + Me.cmbOperator.Location = New System.Drawing.Point(410, 12) + Me.cmbOperator.Name = "cmbOperator" + Me.cmbOperator.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmbOperator.Properties.Appearance.Options.UseFont = True + Me.cmbOperator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.cmbOperator.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor + Me.cmbOperator.Size = New System.Drawing.Size(234, 24) + Me.cmbOperator.StyleController = Me.LayoutControl1 + Me.cmbOperator.TabIndex = 1 + ' + 'LayoutControl1 + ' + Me.LayoutControl1.Controls.Add(Me.cmbMandator) + Me.LayoutControl1.Controls.Add(Me.lookupAttribute) + Me.LayoutControl1.Controls.Add(Me.lookupValue) + Me.LayoutControl1.Controls.Add(Me.cmbOperator) + Me.LayoutControl1.Controls.Add(Me.SimpleButton1) + Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.LayoutControl1.Location = New System.Drawing.Point(0, 0) + Me.LayoutControl1.Name = "LayoutControl1" + Me.LayoutControl1.Root = Me.Root + Me.LayoutControl1.Size = New System.Drawing.Size(984, 55) + Me.LayoutControl1.TabIndex = 8 + Me.LayoutControl1.Text = "LayoutControl1" + ' + 'cmbMandator + ' + Me.cmbMandator.EditValue = "Mandant" + Me.cmbMandator.Location = New System.Drawing.Point(12, 12) + Me.cmbMandator.Name = "cmbMandator" + Me.cmbMandator.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmbMandator.Properties.Appearance.Options.UseFont = True + Me.cmbMandator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.cmbMandator.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor + Me.cmbMandator.Size = New System.Drawing.Size(105, 24) + Me.cmbMandator.StyleController = Me.LayoutControl1 + Me.cmbMandator.TabIndex = 6 + ' + 'lookupAttribute + ' + Me.lookupAttribute.Location = New System.Drawing.Point(121, 12) + Me.lookupAttribute.Name = "lookupAttribute" + Me.lookupAttribute.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lookupAttribute.Properties.Appearance.Options.UseFont = True + Me.lookupAttribute.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.lookupAttribute.Properties.NullText = "" + Me.lookupAttribute.Properties.PopupView = Me.SearchLookUpEdit2View + Me.lookupAttribute.Size = New System.Drawing.Size(285, 24) + Me.lookupAttribute.StyleController = Me.LayoutControl1 + Me.lookupAttribute.TabIndex = 5 + ' + 'SearchLookUpEdit2View + ' + Me.SearchLookUpEdit2View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus + Me.SearchLookUpEdit2View.Name = "SearchLookUpEdit2View" + Me.SearchLookUpEdit2View.OptionsSelection.EnableAppearanceFocusedCell = False + Me.SearchLookUpEdit2View.OptionsView.ShowGroupPanel = False + ' + 'lookupValue + ' + Me.lookupValue.EditValue = "" + Me.lookupValue.Location = New System.Drawing.Point(648, 12) + Me.lookupValue.Name = "lookupValue" + Me.lookupValue.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.lookupValue.Properties.Appearance.Options.UseFont = True + Me.lookupValue.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.lookupValue.Properties.CloseUpKey = New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.F5) + Me.lookupValue.Properties.NullText = "" + Me.lookupValue.Properties.PopupView = Me.SearchLookUpEdit1View + Me.lookupValue.Properties.ShowClearButton = False + Me.lookupValue.Properties.ShowFooter = False + Me.lookupValue.Size = New System.Drawing.Size(188, 24) + Me.lookupValue.StyleController = Me.LayoutControl1 + Me.lookupValue.TabIndex = 2 + ' + 'SearchLookUpEdit1View + ' + Me.SearchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus + Me.SearchLookUpEdit1View.Name = "SearchLookUpEdit1View" + Me.SearchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = False + Me.SearchLookUpEdit1View.OptionsView.ShowGroupPanel = False + ' + 'SimpleButton1 + ' + Me.SimpleButton1.Appearance.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.SimpleButton1.Appearance.Options.UseFont = True + Me.SimpleButton1.Location = New System.Drawing.Point(840, 12) + Me.SimpleButton1.Name = "SimpleButton1" + Me.SimpleButton1.Size = New System.Drawing.Size(115, 24) + Me.SimpleButton1.StyleController = Me.LayoutControl1 + Me.SimpleButton1.TabIndex = 7 + Me.SimpleButton1.Text = "SimpleButton1" + ' + 'Root + ' + Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] + Me.Root.GroupBordersVisible = False + Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.EmptySpaceItem1, Me.LayoutControlItem2, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem3}) + Me.Root.Name = "Root" + Me.Root.Size = New System.Drawing.Size(967, 58) + Me.Root.TextVisible = False + ' + 'LayoutControlItem1 + ' + Me.LayoutControlItem1.Control = Me.cmbMandator + Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 0) + Me.LayoutControlItem1.Name = "LayoutControlItem1" + Me.LayoutControlItem1.Size = New System.Drawing.Size(109, 28) + Me.LayoutControlItem1.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem1.TextVisible = False + ' + 'EmptySpaceItem1 + ' + Me.EmptySpaceItem1.AllowHotTrack = False + Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 28) + Me.EmptySpaceItem1.Name = "EmptySpaceItem1" + Me.EmptySpaceItem1.Size = New System.Drawing.Size(828, 10) + Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) + ' + 'LayoutControlItem2 + ' + Me.LayoutControlItem2.Control = Me.lookupValue + Me.LayoutControlItem2.Location = New System.Drawing.Point(636, 0) + Me.LayoutControlItem2.Name = "LayoutControlItem2" + Me.LayoutControlItem2.Size = New System.Drawing.Size(192, 28) + Me.LayoutControlItem2.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem2.TextVisible = False + ' + 'LayoutControlItem4 + ' + Me.LayoutControlItem4.Control = Me.lookupAttribute + Me.LayoutControlItem4.Location = New System.Drawing.Point(109, 0) + Me.LayoutControlItem4.Name = "LayoutControlItem4" + Me.LayoutControlItem4.Size = New System.Drawing.Size(289, 28) + Me.LayoutControlItem4.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem4.TextVisible = False + ' + 'LayoutControlItem3 + ' + Me.LayoutControlItem3.Control = Me.cmbOperator + Me.LayoutControlItem3.Location = New System.Drawing.Point(398, 0) + Me.LayoutControlItem3.Name = "LayoutControlItem3" + Me.LayoutControlItem3.Size = New System.Drawing.Size(238, 28) + Me.LayoutControlItem3.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem3.TextVisible = False + ' + 'LayoutControlItem5 + ' + Me.LayoutControlItem5.Control = Me.SimpleButton1 + Me.LayoutControlItem5.Location = New System.Drawing.Point(828, 0) + Me.LayoutControlItem5.Name = "LayoutControlItem5" + Me.LayoutControlItem5.Size = New System.Drawing.Size(119, 38) + Me.LayoutControlItem5.TextSize = New System.Drawing.Size(0, 0) + Me.LayoutControlItem5.TextVisible = False + ' + 'NavBarControl1 + ' + Me.NavBarControl1.ActiveGroup = Me.NavBarGroup1 + Me.NavBarControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.NavBarControl1.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarGroup1}) + Me.NavBarControl1.Location = New System.Drawing.Point(0, 0) + Me.NavBarControl1.Name = "NavBarControl1" + Me.NavBarControl1.OptionsNavPane.ExpandedWidth = 163 + Me.NavBarControl1.Size = New System.Drawing.Size(163, 196) + Me.NavBarControl1.TabIndex = 4 + Me.NavBarControl1.Text = "NavBarControl1" + ' + 'NavBarGroup1 + ' + Me.NavBarGroup1.Caption = "NavBarGroup1" + Me.NavBarGroup1.Expanded = True + Me.NavBarGroup1.Name = "NavBarGroup1" + ' + 'SplitContainerControl1 + ' + Me.SplitContainerControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainerControl1.Location = New System.Drawing.Point(0, 0) + Me.SplitContainerControl1.Name = "SplitContainerControl1" + Me.SplitContainerControl1.Panel1.Controls.Add(Me.NavBarControl1) + Me.SplitContainerControl1.Panel1.Text = "Panel1" + Me.SplitContainerControl1.Panel2.Text = "Panel2" + Me.SplitContainerControl1.Size = New System.Drawing.Size(984, 196) + Me.SplitContainerControl1.SplitterPosition = 163 + Me.SplitContainerControl1.TabIndex = 7 + ' + 'SplitContainerControl2 + ' + Me.SplitContainerControl2.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainerControl2.Horizontal = False + Me.SplitContainerControl2.Location = New System.Drawing.Point(0, 89) + Me.SplitContainerControl2.Name = "SplitContainerControl2" + Me.SplitContainerControl2.Panel1.Controls.Add(Me.SplitContainerControl3) + Me.SplitContainerControl2.Panel1.Text = "Panel1" + Me.SplitContainerControl2.Panel2.Controls.Add(Me.SplitContainerControl1) + Me.SplitContainerControl2.Panel2.Text = "Panel2" + Me.SplitContainerControl2.Size = New System.Drawing.Size(984, 496) + Me.SplitContainerControl2.SplitterPosition = 290 + Me.SplitContainerControl2.TabIndex = 8 + ' + 'SplitContainerControl3 + ' + Me.SplitContainerControl3.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainerControl3.Horizontal = False + Me.SplitContainerControl3.IsSplitterFixed = True + Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 0) + Me.SplitContainerControl3.Name = "SplitContainerControl3" + Me.SplitContainerControl3.Panel1.Controls.Add(Me.LayoutControl1) + Me.SplitContainerControl3.Panel1.Text = "Panel1" + Me.SplitContainerControl3.Panel2.Controls.Add(Me.GridControl1) + Me.SplitContainerControl3.Panel2.Text = "Panel2" + Me.SplitContainerControl3.Size = New System.Drawing.Size(984, 290) + Me.SplitContainerControl3.SplitterPosition = 55 + Me.SplitContainerControl3.TabIndex = 9 + ' + 'GridControl1 + ' + Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill + Me.GridControl1.Location = New System.Drawing.Point(0, 0) + Me.GridControl1.MainView = Me.GridView1 + Me.GridControl1.Name = "GridControl1" + Me.GridControl1.Size = New System.Drawing.Size(984, 225) + Me.GridControl1.TabIndex = 8 + Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1}) + ' + 'GridView1 + ' + Me.GridView1.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colParenLeft, Me.colAttribute, Me.colOperator, Me.colValue, Me.colParenRight}) + Me.GridView1.GridControl = Me.GridControl1 + Me.GridView1.Name = "GridView1" + ' + 'colParenLeft + ' + Me.colParenLeft.Caption = "(" + Me.colParenLeft.Name = "colParenLeft" + Me.colParenLeft.Visible = True + Me.colParenLeft.VisibleIndex = 0 + ' + 'colAttribute + ' + Me.colAttribute.Caption = "Attribut" + Me.colAttribute.Name = "colAttribute" + Me.colAttribute.Visible = True + Me.colAttribute.VisibleIndex = 1 + ' + 'colOperator + ' + Me.colOperator.Caption = "Operand" + Me.colOperator.Name = "colOperator" + Me.colOperator.Visible = True + Me.colOperator.VisibleIndex = 2 + ' + 'colValue + ' + Me.colValue.Caption = "Wert" + Me.colValue.Name = "colValue" + Me.colValue.Visible = True + Me.colValue.VisibleIndex = 3 + ' + 'colParenRight + ' + Me.colParenRight.Caption = ")" + Me.colParenRight.Name = "colParenRight" + Me.colParenRight.Visible = True + Me.colParenRight.VisibleIndex = 4 + ' + 'RibbonControl1 + ' + Me.RibbonControl1.CommandLayout = DevExpress.XtraBars.Ribbon.CommandLayout.Simplified + Me.RibbonControl1.ExpandCollapseItem.Id = 0 + Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.BarButtonItem1}) + Me.RibbonControl1.Location = New System.Drawing.Point(0, 0) + Me.RibbonControl1.MaxItemId = 2 + Me.RibbonControl1.Name = "RibbonControl1" + Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) + Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] + Me.RibbonControl1.Size = New System.Drawing.Size(984, 89) + Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 + ' + 'BarButtonItem1 + ' + Me.BarButtonItem1.Caption = "BarButtonItem1" + Me.BarButtonItem1.Id = 1 + Me.BarButtonItem1.Name = "BarButtonItem1" + ' + 'RibbonPage1 + ' + Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroup2}) + Me.RibbonPage1.Name = "RibbonPage1" + Me.RibbonPage1.Text = "RibbonPage1" + ' + 'RibbonPageGroup1 + ' + Me.RibbonPageGroup1.ItemLinks.Add(Me.BarButtonItem1) + Me.RibbonPageGroup1.Name = "RibbonPageGroup1" + Me.RibbonPageGroup1.Text = "RibbonPageGroup1" + ' + 'RibbonPageGroup2 + ' + Me.RibbonPageGroup2.Name = "RibbonPageGroup2" + Me.RibbonPageGroup2.Text = "RibbonPageGroup2" + ' + 'RibbonStatusBar1 + ' + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 585) + Me.RibbonStatusBar1.Name = "RibbonStatusBar1" + Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 + Me.RibbonStatusBar1.Size = New System.Drawing.Size(984, 24) + ' + 'RibbonPage2 + ' + Me.RibbonPage2.Name = "RibbonPage2" + Me.RibbonPage2.Text = "RibbonPage2" + ' + 'frmSearchNeu + ' + Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) + Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font + Me.ClientSize = New System.Drawing.Size(984, 609) + Me.Controls.Add(Me.SplitContainerControl2) + Me.Controls.Add(Me.RibbonStatusBar1) + Me.Controls.Add(Me.RibbonControl1) + Me.Name = "frmSearchNeu" + Me.Ribbon = Me.RibbonControl1 + Me.StatusBar = Me.RibbonStatusBar1 + Me.Text = "frmSearchNeu" + CType(Me.cmbOperator.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.LayoutControl1.ResumeLayout(False) + CType(Me.cmbMandator.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.lookupAttribute.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SearchLookUpEdit2View, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.lookupValue.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerControl1.ResumeLayout(False) + CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerControl2.ResumeLayout(False) + CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerControl3.ResumeLayout(False) + CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() + Me.ResumeLayout(False) + Me.PerformLayout() + + End Sub + Friend WithEvents cmbOperator As DevExpress.XtraEditors.ComboBoxEdit + Friend WithEvents lookupValue As DevExpress.XtraEditors.SearchLookUpEdit + Friend WithEvents SearchLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView + Friend WithEvents NavBarControl1 As DevExpress.XtraNavBar.NavBarControl + Friend WithEvents NavBarGroup1 As DevExpress.XtraNavBar.NavBarGroup + Friend WithEvents lookupAttribute As SearchLookUpEdit + Friend WithEvents SearchLookUpEdit2View As GridView + Friend WithEvents cmbMandator As ComboBoxEdit + Friend WithEvents SplitContainerControl1 As SplitContainerControl + Friend WithEvents SplitContainerControl2 As SplitContainerControl + Friend WithEvents SplitContainerControl3 As SplitContainerControl + Friend WithEvents GridControl1 As GridControl + Friend WithEvents GridView1 As GridView + Friend WithEvents RibbonControl1 As DevExpress.XtraBars.Ribbon.RibbonControl + Friend WithEvents RibbonPage1 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents RibbonPageGroup1 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup + Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar + Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage + Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl + Friend WithEvents SimpleButton1 As SimpleButton + Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup + Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem + Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents LayoutControlItem5 As DevExpress.XtraLayout.LayoutControlItem + Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem + Friend WithEvents colParenLeft As Columns.GridColumn + Friend WithEvents colAttribute As Columns.GridColumn + Friend WithEvents colOperator As Columns.GridColumn + Friend WithEvents colValue As Columns.GridColumn + Friend WithEvents colParenRight As Columns.GridColumn +End Class diff --git a/GUIs.ZooFlow/Search/frmSearchNeu.resx b/GUIs.ZooFlow/Search/frmSearchNeu.resx new file mode 100644 index 00000000..1af7de15 --- /dev/null +++ b/GUIs.ZooFlow/Search/frmSearchNeu.resx @@ -0,0 +1,120 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/frmSearchNeu.vb b/GUIs.ZooFlow/Search/frmSearchNeu.vb new file mode 100644 index 00000000..741ebcb6 --- /dev/null +++ b/GUIs.ZooFlow/Search/frmSearchNeu.vb @@ -0,0 +1,32 @@ +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 \ No newline at end of file diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 3cbc7293..16e3edcf 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -285,6 +285,12 @@ Form + + frmSearchNeu.vb + + + Form + frmSearchPredefined.vb @@ -335,6 +341,7 @@ True Application.myapp + True @@ -392,6 +399,9 @@ frmGlobix_Index.vb + + frmSearchNeu.vb + frmSearchPredefined.vb diff --git a/GUIs.ZooFlow/frmFlowForm.vb b/GUIs.ZooFlow/frmFlowForm.vb index 5f044837..8f18b43f 100644 --- a/GUIs.ZooFlow/frmFlowForm.vb +++ b/GUIs.ZooFlow/frmFlowForm.vb @@ -206,9 +206,8 @@ Public Class frmFlowForm AddHandler Watcher.ClipboardChanged, AddressOf Watcher_ClipboardChanged Dim oSQL = My.Queries.Common.FNIDB_GET_SEARCH_PROFILES(My.Application.User.UserId, My.Application.User.Language) - Dim oDatatable As DataTable = My.DatabaseIDB.GetDatatable(oSQL) + Dim oDatatable As DataTable = My.DatabaseIDB.GetDatatable(oSql) PictureBoxSearch1.Visible = False - If Not IsNothing(oDatatable) OrElse oDatatable.Rows.Count > 0 Then IDBSearchActive = True DTIDB_SEARCHES = oDatatable @@ -256,8 +255,6 @@ Public Class frmFlowForm Logger.Info("Clipboard Watcher Module is not active. Hotkey Monitoring will be disabled!") End If - - If My.Application.ModulesActive.Contains(MODULE_GLOBAL_INDEXER) Then FileDrop = New ClassFileDrop(My.LogConfig) FileHandle = New ClassFilehandle() @@ -403,7 +400,7 @@ Public Class frmFlowForm Logger.Debug("OnEvent called!") End Sub Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click - frmSearch2021.Show() + frmSearchNeu.Show() 'Open_FlowSearch() End Sub diff --git a/Modules.Database/Adapters/MSSQLServer.vb b/Modules.Database/Adapters/MSSQLServer.vb index 910ee5b2..5f8daebe 100644 --- a/Modules.Database/Adapters/MSSQLServer.vb +++ b/Modules.Database/Adapters/MSSQLServer.vb @@ -225,7 +225,7 @@ Public Class MSSQLServer ''' ''' ''' - + ' Private Function OpenSQLConnection(Connection As SqlConnection) As SqlConnection If Connection.State = ConnectionState.Closed Then Connection.Open() @@ -234,12 +234,12 @@ Public Class MSSQLServer Return Connection End Function - + ' Private Function GetSQLConnection() As SqlConnection Return GetConnection(CurrentSQLConnectionString) End Function - + ' Private Function GetConnection(ConnectionString As String) As SqlConnection Try Dim oConnection As New SqlConnection(ConnectionString) @@ -272,7 +272,7 @@ Public Class MSSQLServer End Try End Function - + ' Public Function GetDatatable(SqlCommand As String) As DataTable Implements IDatabase.GetDatatable Return GetDatatable(SqlCommand, _Timeout) End Function @@ -282,33 +282,33 @@ Public Class MSSQLServer ''' ''' sqlcommand for datatable (select XYZ from TableORView) ''' Returns a datatable - + ' Public Function GetDatatable(SqlCommand As String, Timeout As Integer) As DataTable Implements IDatabase.GetDatatable Using oSqlConnection = GetSQLConnection() Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.WithTransaction, Nothing, Timeout) End Using End Function - + ' Public Function GetDatatable(SqlCommand As String, Transaction As SqlTransaction, Optional Timeout As Integer = 120) As DataTable Using oSqlConnection = GetSQLConnection() Return GetDatatableWithConnectionObject(SqlCommand, oSqlConnection, TransactionMode.ExternalTransaction, Transaction, Timeout) End Using End Function - + ' Public Async Function GetDatatableAsync(SqlCommand As String, Optional Timeout As Integer = 120) As Task(Of DataTable) Return Await Task.Run(Function() GetDatatable(SqlCommand, Timeout)) End Function - + ' Public Function GetDatatableWithConnection(SqlCommand As String, ConnectionString As String, Optional Timeout As Integer = 120) As DataTable Using oConnection = GetConnection(ConnectionString) Return GetDatatableWithConnectionObject(SqlCommand, oConnection, Timeout:=Timeout) End Using End Function - + ' Public Function GetDatatableWithConnectionObject(SqlCommand As String, SqlConnection As SqlConnection, Optional TransactionMode As TransactionMode = TransactionMode.WithTransaction, Optional Transaction As SqlTransaction = Nothing, diff --git a/Modules.Patterns/Modules/BaseModule.vb b/Modules.Patterns/Modules/BaseModule.vb index 39ca4da4..172bc770 100644 --- a/Modules.Patterns/Modules/BaseModule.vb +++ b/Modules.Patterns/Modules/BaseModule.vb @@ -3,7 +3,7 @@ Imports System.Text.RegularExpressions Namespace [PatternModule] Public Class BaseModule - Private ReadOnly Logger As Logger + Friend ReadOnly Logger As Logger Private ReadOnly MyRegex As Regex = New Regex("{#(\w+)#([\:\.\w\s_-]+)}+") Private ReadOnly SqlPhrases As New List(Of String) From { "SELECT ", "UPDATE ", "DELETE ", "EXEC " From eeb1930f29f256ed6c83e345927a4ed87993d15e Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Wed, 17 Nov 2021 14:41:59 +0100 Subject: [PATCH 7/9] ZooFlow: Update ZooFlow Search --- GUIs.ZooFlow/Search/SearchCriteria.vb | 8 + GUIs.ZooFlow/Search/SearchToken.vb | 64 ++++ GUIs.ZooFlow/Search/frmSearch2021.Designer.vb | 171 ---------- GUIs.ZooFlow/Search/frmSearch2021.resx | 120 ------- GUIs.ZooFlow/Search/frmSearch2021.vb | 138 --------- GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb | 293 ++++-------------- GUIs.ZooFlow/Search/frmSearchNeu.vb | 140 +++++++-- GUIs.ZooFlow/ZooFlow.vbproj | 15 +- 8 files changed, 266 insertions(+), 683 deletions(-) create mode 100644 GUIs.ZooFlow/Search/SearchCriteria.vb create mode 100644 GUIs.ZooFlow/Search/SearchToken.vb delete mode 100644 GUIs.ZooFlow/Search/frmSearch2021.Designer.vb delete mode 100644 GUIs.ZooFlow/Search/frmSearch2021.resx delete mode 100644 GUIs.ZooFlow/Search/frmSearch2021.vb diff --git a/GUIs.ZooFlow/Search/SearchCriteria.vb b/GUIs.ZooFlow/Search/SearchCriteria.vb new file mode 100644 index 00000000..c611dc85 --- /dev/null +++ b/GUIs.ZooFlow/Search/SearchCriteria.vb @@ -0,0 +1,8 @@ +Public Class SearchCriteria + Public Property ParenLeft As String = "" + Public Property Key As String + Public Property Op As SearchToken.OperatorToken = SearchToken.OperatorToken.Equals + Public Property Value As Object + Public Property ParentRight As String = "" +End Class + diff --git a/GUIs.ZooFlow/Search/SearchToken.vb b/GUIs.ZooFlow/Search/SearchToken.vb new file mode 100644 index 00000000..0a33bd18 --- /dev/null +++ b/GUIs.ZooFlow/Search/SearchToken.vb @@ -0,0 +1,64 @@ +Public Class SearchToken + + Public Enum [ValueType] + AttributeName + AttributeValue + AttributeOperator + End Enum + + Public Enum [InputMode] + [Default] + [Operator] + Value + End Enum + + Public Enum [OperatorToken] + Equals + NotEquals + End Enum + + Public MustInherit Class TokenValue + Public Value As Object + Public Type As [ValueType] + + Public Overrides Function ToString() As String + Return Value.ToString() + End Function + End Class + + Public Class AttributeKeyToken + Inherits TokenValue + + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeName + End Sub + End Class + + Public Class AttributeOperatorToken + Inherits TokenValue + + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeOperator + End Sub + End Class + + Public Class AttributeValueToken + Inherits TokenValue + + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeValue + End Sub + End Class + + Public Class DateToken + Inherits TokenValue + + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeValue + End Sub + End Class +End Class diff --git a/GUIs.ZooFlow/Search/frmSearch2021.Designer.vb b/GUIs.ZooFlow/Search/frmSearch2021.Designer.vb deleted file mode 100644 index 9ed9ba22..00000000 --- a/GUIs.ZooFlow/Search/frmSearch2021.Designer.vb +++ /dev/null @@ -1,171 +0,0 @@ - -Partial Class frmSearch2021 - Inherits DevExpress.XtraEditors.XtraForm - - 'Form overrides dispose to clean up the component list. - - Protected Overrides Sub Dispose(ByVal disposing As Boolean) - If disposing AndAlso components IsNot Nothing Then - components.Dispose() - End If - MyBase.Dispose(disposing) - End Sub - - 'Required by the Windows Form Designer - Private components As System.ComponentModel.IContainer - - 'NOTE: The following procedure is required by the Windows Form Designer - 'It can be modified using the Windows Form Designer. - 'Do not modify it using the code editor. - - Private Sub InitializeComponent() - Me.SearchControl2 = New DevExpress.XtraEditors.TokenEdit() - Me.ComboBoxEdit1 = New DevExpress.XtraEditors.ComboBoxEdit() - Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl() - Me.SidePanel1 = New DevExpress.XtraEditors.SidePanel() - Me.NavBarControl1 = New DevExpress.XtraNavBar.NavBarControl() - Me.NavBarGroup1 = New DevExpress.XtraNavBar.NavBarGroup() - Me.NavBarItem1 = New DevExpress.XtraNavBar.NavBarItem() - Me.NavBarItem2 = New DevExpress.XtraNavBar.NavBarItem() - Me.NavBarItem3 = New DevExpress.XtraNavBar.NavBarItem() - Me.NavBarGroup2 = New DevExpress.XtraNavBar.NavBarGroup() - Me.NavBarGroup3 = New DevExpress.XtraNavBar.NavBarGroup() - CType(Me.SearchControl2.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.ComboBoxEdit1.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.PanelControl1.SuspendLayout() - Me.SidePanel1.SuspendLayout() - CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SuspendLayout() - ' - 'SearchControl2 - ' - Me.SearchControl2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.SearchControl2.Location = New System.Drawing.Point(227, 5) - Me.SearchControl2.Name = "SearchControl2" - Me.SearchControl2.Properties.Appearance.BackColor = System.Drawing.Color.Transparent - Me.SearchControl2.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.SearchControl2.Properties.Appearance.Options.UseBackColor = True - Me.SearchControl2.Properties.Appearance.Options.UseFont = True - Me.SearchControl2.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple - Me.SearchControl2.Properties.EditMode = DevExpress.XtraEditors.TokenEditMode.Manual - Me.SearchControl2.Properties.PopupFilterMode = DevExpress.XtraEditors.TokenEditPopupFilterMode.Contains - Me.SearchControl2.Properties.Separators.AddRange(New String() {",", "-", "ODER", "OR", "AND", "UND"}) - Me.SearchControl2.Size = New System.Drawing.Size(894, 44) - Me.SearchControl2.TabIndex = 0 - ' - 'ComboBoxEdit1 - ' - Me.ComboBoxEdit1.Location = New System.Drawing.Point(5, 5) - Me.ComboBoxEdit1.Name = "ComboBoxEdit1" - Me.ComboBoxEdit1.Properties.Appearance.BackColor = System.Drawing.Color.Transparent - Me.ComboBoxEdit1.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.ComboBoxEdit1.Properties.Appearance.Options.UseBackColor = True - Me.ComboBoxEdit1.Properties.Appearance.Options.UseFont = True - Me.ComboBoxEdit1.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple - Me.ComboBoxEdit1.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.ComboBoxEdit1.Properties.Items.AddRange(New Object() {"Alle", "Belege", "Rechnungen", "Lieferscheine", "Aufträge", "Angebote", "Kunde Schaum", "Kunde medacom"}) - Me.ComboBoxEdit1.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor - Me.ComboBoxEdit1.Size = New System.Drawing.Size(223, 44) - Me.ComboBoxEdit1.TabIndex = 1 - ' - 'PanelControl1 - ' - Me.PanelControl1.AutoSize = True - Me.PanelControl1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.PanelControl1.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.NoBorder - Me.PanelControl1.Controls.Add(Me.ComboBoxEdit1) - Me.PanelControl1.Controls.Add(Me.SearchControl2) - Me.PanelControl1.Dock = System.Windows.Forms.DockStyle.Top - Me.PanelControl1.Location = New System.Drawing.Point(0, 0) - Me.PanelControl1.Name = "PanelControl1" - Me.PanelControl1.Size = New System.Drawing.Size(1126, 52) - Me.PanelControl1.TabIndex = 2 - ' - 'SidePanel1 - ' - Me.SidePanel1.Controls.Add(Me.NavBarControl1) - Me.SidePanel1.Dock = System.Windows.Forms.DockStyle.Left - Me.SidePanel1.Location = New System.Drawing.Point(0, 52) - Me.SidePanel1.Name = "SidePanel1" - Me.SidePanel1.Size = New System.Drawing.Size(228, 566) - Me.SidePanel1.TabIndex = 3 - Me.SidePanel1.Text = "SidePanel1" - ' - 'NavBarControl1 - ' - Me.NavBarControl1.ActiveGroup = Me.NavBarGroup1 - Me.NavBarControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.NavBarControl1.Groups.AddRange(New DevExpress.XtraNavBar.NavBarGroup() {Me.NavBarGroup1, Me.NavBarGroup2, Me.NavBarGroup3}) - Me.NavBarControl1.Items.AddRange(New DevExpress.XtraNavBar.NavBarItem() {Me.NavBarItem1, Me.NavBarItem2, Me.NavBarItem3}) - Me.NavBarControl1.Location = New System.Drawing.Point(0, 0) - Me.NavBarControl1.Name = "NavBarControl1" - Me.NavBarControl1.OptionsNavPane.ExpandedWidth = 227 - Me.NavBarControl1.Size = New System.Drawing.Size(227, 566) - Me.NavBarControl1.TabIndex = 0 - Me.NavBarControl1.Text = "NavBarControl1" - ' - 'NavBarGroup1 - ' - Me.NavBarGroup1.Caption = "NavBarGroup1" - Me.NavBarGroup1.Expanded = True - Me.NavBarGroup1.ItemLinks.AddRange(New DevExpress.XtraNavBar.NavBarItemLink() {New DevExpress.XtraNavBar.NavBarItemLink(Me.NavBarItem1), New DevExpress.XtraNavBar.NavBarItemLink(Me.NavBarItem2), New DevExpress.XtraNavBar.NavBarItemLink(Me.NavBarItem3)}) - Me.NavBarGroup1.Name = "NavBarGroup1" - ' - 'NavBarItem1 - ' - Me.NavBarItem1.Caption = "NavBarItem1" - Me.NavBarItem1.Name = "NavBarItem1" - ' - 'NavBarItem2 - ' - Me.NavBarItem2.Caption = "NavBarItem2" - Me.NavBarItem2.Name = "NavBarItem2" - ' - 'NavBarItem3 - ' - Me.NavBarItem3.Caption = "NavBarItem3" - Me.NavBarItem3.Name = "NavBarItem3" - ' - 'NavBarGroup2 - ' - Me.NavBarGroup2.Caption = "NavBarGroup2" - Me.NavBarGroup2.Name = "NavBarGroup2" - ' - 'NavBarGroup3 - ' - Me.NavBarGroup3.Caption = "NavBarGroup3" - Me.NavBarGroup3.Name = "NavBarGroup3" - ' - 'XtraForm1 - ' - Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) - Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(1126, 618) - Me.Controls.Add(Me.SidePanel1) - Me.Controls.Add(Me.PanelControl1) - Me.Name = "XtraForm1" - Me.Text = "XtraForm1" - CType(Me.SearchControl2.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.ComboBoxEdit1.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.PanelControl1.ResumeLayout(False) - Me.SidePanel1.ResumeLayout(False) - CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.ResumeLayout(False) - Me.PerformLayout() - - End Sub - Friend WithEvents SearchControl2 As DevExpress.XtraEditors.TokenEdit - Friend WithEvents ComboBoxEdit1 As DevExpress.XtraEditors.ComboBoxEdit - Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl - Friend WithEvents SidePanel1 As DevExpress.XtraEditors.SidePanel - Friend WithEvents NavBarControl1 As DevExpress.XtraNavBar.NavBarControl - Friend WithEvents NavBarGroup1 As DevExpress.XtraNavBar.NavBarGroup - Friend WithEvents NavBarItem1 As DevExpress.XtraNavBar.NavBarItem - Friend WithEvents NavBarItem2 As DevExpress.XtraNavBar.NavBarItem - Friend WithEvents NavBarItem3 As DevExpress.XtraNavBar.NavBarItem - Friend WithEvents NavBarGroup2 As DevExpress.XtraNavBar.NavBarGroup - Friend WithEvents NavBarGroup3 As DevExpress.XtraNavBar.NavBarGroup -End Class diff --git a/GUIs.ZooFlow/Search/frmSearch2021.resx b/GUIs.ZooFlow/Search/frmSearch2021.resx deleted file mode 100644 index 1af7de15..00000000 --- a/GUIs.ZooFlow/Search/frmSearch2021.resx +++ /dev/null @@ -1,120 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/frmSearch2021.vb b/GUIs.ZooFlow/Search/frmSearch2021.vb deleted file mode 100644 index 5699dbb1..00000000 --- a/GUIs.ZooFlow/Search/frmSearch2021.vb +++ /dev/null @@ -1,138 +0,0 @@ -Imports DevExpress.Utils -Imports DevExpress.XtraEditors -Imports DevExpress.XtraEditors.Repository - -Public Class frmSearch2021 - Private ReadOnly TokenListAttributes As New Dictionary(Of String, Object) From { - {"Rechnungsnummer", New AttributeToken(7411)}, - {"Rechnungsdatum", New AttributeToken(7412)}, - {"Kundennummer", New AttributeToken(7413)} - } - - Private ReadOnly TokenListAttrValues As New Dictionary(Of String, Object) From { - {"{1233}", New AttributeValueToken(1233)}, - {"{1234}", New AttributeValueToken(1234)}, - {"{1235}", New AttributeValueToken(1235)} - } - - Private ReadOnly TokenListDate As New Dictionary(Of String, Object) From { - {"heute", New DateToken(Date.Now)}, - {"gestern", New DateToken(Date.Now.AddDays(-1))}, - {"letzte Woche", New DateToken(TimeSpan.FromDays(-7))}, - {"letzter Monat", New DateToken(TimeSpan.FromDays(-30))} - } - - Private TokenListDefault As Dictionary(Of String, Object) - Private TokenListAll As Dictionary(Of String, Object) - - Private Sub XtraForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load - Dim TokenList As New Dictionary(Of String, Object) - TokenListAll = TokenList. - Concat(TokenListAttributes). - Concat(TokenListAttrValues). - Concat(TokenListDate). - ToDictionary(Function(a) a.Key, Function(a) a.Value) - - TokenListDefault = TokenList. - Concat(TokenListAttributes). - Concat(TokenListDate). - ToDictionary(Function(a) a.Key, Function(a) a.Value) - - AddTokens(SearchControl2, TokenListDefault) - - ComboBoxEdit1.SelectedIndex = 0 - End Sub - - Public Enum [ValueType] - AttributeName - AttributeValue - End Enum - - Public Enum [InputMode] - [Default] - Value - End Enum - - Public Class TokenValue - Public Value As Object - Public Type As [ValueType] - - Public Overrides Function ToString() As String - Return Value.ToString() - End Function - End Class - - Public Class AttributeToken - Inherits TokenValue - - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeName - End Sub - End Class - - Public Class AttributeValueToken - Inherits TokenValue - - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeValue - End Sub - End Class - - Public Class DateToken - Inherits TokenValue - - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeValue - End Sub - End Class - - - - Private Sub AddTokens(Editor As TokenEdit, Tokens As Dictionary(Of String, Object)) - For Each oToken In Tokens - Editor.Properties.Tokens.Add(New DevExpress.XtraEditors.TokenEditToken With { - .Description = oToken.Key, - .Value = oToken.Value - }) - Next - End Sub - - Private Sub SearchControl2_Properties_TokenAdded(sender As Object, e As DevExpress.XtraEditors.TokenEditTokenAddedEventArgs) Handles SearchControl2.Properties.TokenAdded - Dim oEditor As TokenEdit = sender - SetNewTokens(oEditor) - End Sub - - Private Sub SearchControl2_Properties_TokenRemoved(sender As Object, e As TokenEditTokenRemovedEventArgs) Handles SearchControl2.Properties.TokenRemoved - Dim oEditor As TokenEdit = sender - SetNewTokens(oEditor) - End Sub - - Private Sub SetNewTokens(pEditor As TokenEdit) - Dim oLastToken = pEditor.GetTokenList().LastOrDefault() - pEditor.Properties.BeginUpdate() - - If oLastToken IsNot Nothing Then - pEditor.Properties.Tokens.Clear() - - Select Case oLastToken.Value.GetType - Case GetType(AttributeToken) - AddTokens(pEditor, TokenListAttrValues) - - Case GetType(AttributeValueToken) - AddTokens(pEditor, TokenListAll) - - Case Else - AddTokens(pEditor, TokenListDefault) - - End Select - - pEditor.Properties.EndUpdate() - Else - pEditor.Properties.Tokens.Clear() - AddTokens(pEditor, TokenListDefault) - End If - End Sub -End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb b/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb index c5e53027..d5428ae2 100644 --- a/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb +++ b/GUIs.ZooFlow/Search/frmSearchNeu.Designer.vb @@ -23,26 +23,14 @@ Partial Class frmSearchNeu 'Do not modify it using the code editor. _ Private Sub InitializeComponent() - Me.cmbOperator = New DevExpress.XtraEditors.ComboBoxEdit() - Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() - Me.cmbMandator = New DevExpress.XtraEditors.ComboBoxEdit() - Me.lookupAttribute = New DevExpress.XtraEditors.SearchLookUpEdit() - Me.SearchLookUpEdit2View = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.lookupValue = New DevExpress.XtraEditors.SearchLookUpEdit() - Me.SearchLookUpEdit1View = New DevExpress.XtraGrid.Views.Grid.GridView() - Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton() - Me.Root = New DevExpress.XtraLayout.LayoutControlGroup() - Me.LayoutControlItem1 = New DevExpress.XtraLayout.LayoutControlItem() - Me.EmptySpaceItem1 = New DevExpress.XtraLayout.EmptySpaceItem() - Me.LayoutControlItem2 = New DevExpress.XtraLayout.LayoutControlItem() - Me.LayoutControlItem4 = New DevExpress.XtraLayout.LayoutControlItem() - Me.LayoutControlItem3 = New DevExpress.XtraLayout.LayoutControlItem() - Me.LayoutControlItem5 = New DevExpress.XtraLayout.LayoutControlItem() Me.NavBarControl1 = New DevExpress.XtraNavBar.NavBarControl() Me.NavBarGroup1 = New DevExpress.XtraNavBar.NavBarGroup() Me.SplitContainerControl1 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl() Me.SplitContainerControl3 = New DevExpress.XtraEditors.SplitContainerControl() + Me.Button1 = New System.Windows.Forms.Button() + Me.cmbSelect = New DevExpress.XtraEditors.ComboBoxEdit() + Me.SearchControl2 = New DevExpress.XtraEditors.TokenEdit() Me.GridControl1 = New DevExpress.XtraGrid.GridControl() Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView() Me.colParenLeft = New DevExpress.XtraGrid.Columns.GridColumn() @@ -57,21 +45,6 @@ Partial Class frmSearchNeu Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() - CType(Me.cmbOperator.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.LayoutControl1.SuspendLayout() - CType(Me.cmbMandator.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.lookupAttribute.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SearchLookUpEdit2View, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.lookupValue.Properties, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.Root, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerControl1.SuspendLayout() @@ -79,168 +52,13 @@ Partial Class frmSearchNeu Me.SplitContainerControl2.SuspendLayout() CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerControl3.SuspendLayout() + CType(Me.cmbSelect.Properties, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SearchControl2.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() ' - 'cmbOperator - ' - Me.cmbOperator.Location = New System.Drawing.Point(410, 12) - Me.cmbOperator.Name = "cmbOperator" - Me.cmbOperator.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.cmbOperator.Properties.Appearance.Options.UseFont = True - Me.cmbOperator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.cmbOperator.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor - Me.cmbOperator.Size = New System.Drawing.Size(234, 24) - Me.cmbOperator.StyleController = Me.LayoutControl1 - Me.cmbOperator.TabIndex = 1 - ' - 'LayoutControl1 - ' - Me.LayoutControl1.Controls.Add(Me.cmbMandator) - Me.LayoutControl1.Controls.Add(Me.lookupAttribute) - Me.LayoutControl1.Controls.Add(Me.lookupValue) - Me.LayoutControl1.Controls.Add(Me.cmbOperator) - Me.LayoutControl1.Controls.Add(Me.SimpleButton1) - Me.LayoutControl1.Dock = System.Windows.Forms.DockStyle.Fill - Me.LayoutControl1.Location = New System.Drawing.Point(0, 0) - Me.LayoutControl1.Name = "LayoutControl1" - Me.LayoutControl1.Root = Me.Root - Me.LayoutControl1.Size = New System.Drawing.Size(984, 55) - Me.LayoutControl1.TabIndex = 8 - Me.LayoutControl1.Text = "LayoutControl1" - ' - 'cmbMandator - ' - Me.cmbMandator.EditValue = "Mandant" - Me.cmbMandator.Location = New System.Drawing.Point(12, 12) - Me.cmbMandator.Name = "cmbMandator" - Me.cmbMandator.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.cmbMandator.Properties.Appearance.Options.UseFont = True - Me.cmbMandator.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.cmbMandator.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor - Me.cmbMandator.Size = New System.Drawing.Size(105, 24) - Me.cmbMandator.StyleController = Me.LayoutControl1 - Me.cmbMandator.TabIndex = 6 - ' - 'lookupAttribute - ' - Me.lookupAttribute.Location = New System.Drawing.Point(121, 12) - Me.lookupAttribute.Name = "lookupAttribute" - Me.lookupAttribute.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lookupAttribute.Properties.Appearance.Options.UseFont = True - Me.lookupAttribute.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.lookupAttribute.Properties.NullText = "" - Me.lookupAttribute.Properties.PopupView = Me.SearchLookUpEdit2View - Me.lookupAttribute.Size = New System.Drawing.Size(285, 24) - Me.lookupAttribute.StyleController = Me.LayoutControl1 - Me.lookupAttribute.TabIndex = 5 - ' - 'SearchLookUpEdit2View - ' - Me.SearchLookUpEdit2View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.SearchLookUpEdit2View.Name = "SearchLookUpEdit2View" - Me.SearchLookUpEdit2View.OptionsSelection.EnableAppearanceFocusedCell = False - Me.SearchLookUpEdit2View.OptionsView.ShowGroupPanel = False - ' - 'lookupValue - ' - Me.lookupValue.EditValue = "" - Me.lookupValue.Location = New System.Drawing.Point(648, 12) - Me.lookupValue.Name = "lookupValue" - Me.lookupValue.Properties.Appearance.Font = New System.Drawing.Font("Tahoma", 11.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lookupValue.Properties.Appearance.Options.UseFont = True - Me.lookupValue.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) - Me.lookupValue.Properties.CloseUpKey = New DevExpress.Utils.KeyShortcut(System.Windows.Forms.Keys.F5) - Me.lookupValue.Properties.NullText = "" - Me.lookupValue.Properties.PopupView = Me.SearchLookUpEdit1View - Me.lookupValue.Properties.ShowClearButton = False - Me.lookupValue.Properties.ShowFooter = False - Me.lookupValue.Size = New System.Drawing.Size(188, 24) - Me.lookupValue.StyleController = Me.LayoutControl1 - Me.lookupValue.TabIndex = 2 - ' - 'SearchLookUpEdit1View - ' - Me.SearchLookUpEdit1View.FocusRectStyle = DevExpress.XtraGrid.Views.Grid.DrawFocusRectStyle.RowFocus - Me.SearchLookUpEdit1View.Name = "SearchLookUpEdit1View" - Me.SearchLookUpEdit1View.OptionsSelection.EnableAppearanceFocusedCell = False - Me.SearchLookUpEdit1View.OptionsView.ShowGroupPanel = False - ' - 'SimpleButton1 - ' - Me.SimpleButton1.Appearance.Font = New System.Drawing.Font("Tahoma", 12.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.SimpleButton1.Appearance.Options.UseFont = True - Me.SimpleButton1.Location = New System.Drawing.Point(840, 12) - Me.SimpleButton1.Name = "SimpleButton1" - Me.SimpleButton1.Size = New System.Drawing.Size(115, 24) - Me.SimpleButton1.StyleController = Me.LayoutControl1 - Me.SimpleButton1.TabIndex = 7 - Me.SimpleButton1.Text = "SimpleButton1" - ' - 'Root - ' - Me.Root.EnableIndentsWithoutBorders = DevExpress.Utils.DefaultBoolean.[True] - Me.Root.GroupBordersVisible = False - Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem1, Me.EmptySpaceItem1, Me.LayoutControlItem2, Me.LayoutControlItem4, Me.LayoutControlItem5, Me.LayoutControlItem3}) - Me.Root.Name = "Root" - Me.Root.Size = New System.Drawing.Size(967, 58) - Me.Root.TextVisible = False - ' - 'LayoutControlItem1 - ' - Me.LayoutControlItem1.Control = Me.cmbMandator - Me.LayoutControlItem1.Location = New System.Drawing.Point(0, 0) - Me.LayoutControlItem1.Name = "LayoutControlItem1" - Me.LayoutControlItem1.Size = New System.Drawing.Size(109, 28) - Me.LayoutControlItem1.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem1.TextVisible = False - ' - 'EmptySpaceItem1 - ' - Me.EmptySpaceItem1.AllowHotTrack = False - Me.EmptySpaceItem1.Location = New System.Drawing.Point(0, 28) - Me.EmptySpaceItem1.Name = "EmptySpaceItem1" - Me.EmptySpaceItem1.Size = New System.Drawing.Size(828, 10) - Me.EmptySpaceItem1.TextSize = New System.Drawing.Size(0, 0) - ' - 'LayoutControlItem2 - ' - Me.LayoutControlItem2.Control = Me.lookupValue - Me.LayoutControlItem2.Location = New System.Drawing.Point(636, 0) - Me.LayoutControlItem2.Name = "LayoutControlItem2" - Me.LayoutControlItem2.Size = New System.Drawing.Size(192, 28) - Me.LayoutControlItem2.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem2.TextVisible = False - ' - 'LayoutControlItem4 - ' - Me.LayoutControlItem4.Control = Me.lookupAttribute - Me.LayoutControlItem4.Location = New System.Drawing.Point(109, 0) - Me.LayoutControlItem4.Name = "LayoutControlItem4" - Me.LayoutControlItem4.Size = New System.Drawing.Size(289, 28) - Me.LayoutControlItem4.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem4.TextVisible = False - ' - 'LayoutControlItem3 - ' - Me.LayoutControlItem3.Control = Me.cmbOperator - Me.LayoutControlItem3.Location = New System.Drawing.Point(398, 0) - Me.LayoutControlItem3.Name = "LayoutControlItem3" - Me.LayoutControlItem3.Size = New System.Drawing.Size(238, 28) - Me.LayoutControlItem3.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem3.TextVisible = False - ' - 'LayoutControlItem5 - ' - Me.LayoutControlItem5.Control = Me.SimpleButton1 - Me.LayoutControlItem5.Location = New System.Drawing.Point(828, 0) - Me.LayoutControlItem5.Name = "LayoutControlItem5" - Me.LayoutControlItem5.Size = New System.Drawing.Size(119, 38) - Me.LayoutControlItem5.TextSize = New System.Drawing.Size(0, 0) - Me.LayoutControlItem5.TextVisible = False - ' 'NavBarControl1 ' Me.NavBarControl1.ActiveGroup = Me.NavBarGroup1 @@ -249,7 +67,7 @@ Partial Class frmSearchNeu Me.NavBarControl1.Location = New System.Drawing.Point(0, 0) Me.NavBarControl1.Name = "NavBarControl1" Me.NavBarControl1.OptionsNavPane.ExpandedWidth = 163 - Me.NavBarControl1.Size = New System.Drawing.Size(163, 196) + Me.NavBarControl1.Size = New System.Drawing.Size(163, 193) Me.NavBarControl1.TabIndex = 4 Me.NavBarControl1.Text = "NavBarControl1" ' @@ -267,7 +85,7 @@ Partial Class frmSearchNeu Me.SplitContainerControl1.Panel1.Controls.Add(Me.NavBarControl1) Me.SplitContainerControl1.Panel1.Text = "Panel1" Me.SplitContainerControl1.Panel2.Text = "Panel2" - Me.SplitContainerControl1.Size = New System.Drawing.Size(984, 196) + Me.SplitContainerControl1.Size = New System.Drawing.Size(984, 193) Me.SplitContainerControl1.SplitterPosition = 163 Me.SplitContainerControl1.TabIndex = 7 ' @@ -275,13 +93,13 @@ Partial Class frmSearchNeu ' Me.SplitContainerControl2.Dock = System.Windows.Forms.DockStyle.Fill Me.SplitContainerControl2.Horizontal = False - Me.SplitContainerControl2.Location = New System.Drawing.Point(0, 89) + Me.SplitContainerControl2.Location = New System.Drawing.Point(0, 94) Me.SplitContainerControl2.Name = "SplitContainerControl2" Me.SplitContainerControl2.Panel1.Controls.Add(Me.SplitContainerControl3) Me.SplitContainerControl2.Panel1.Text = "Panel1" Me.SplitContainerControl2.Panel2.Controls.Add(Me.SplitContainerControl1) Me.SplitContainerControl2.Panel2.Text = "Panel2" - Me.SplitContainerControl2.Size = New System.Drawing.Size(984, 496) + Me.SplitContainerControl2.Size = New System.Drawing.Size(984, 493) Me.SplitContainerControl2.SplitterPosition = 290 Me.SplitContainerControl2.TabIndex = 8 ' @@ -292,7 +110,9 @@ Partial Class frmSearchNeu Me.SplitContainerControl3.IsSplitterFixed = True Me.SplitContainerControl3.Location = New System.Drawing.Point(0, 0) Me.SplitContainerControl3.Name = "SplitContainerControl3" - Me.SplitContainerControl3.Panel1.Controls.Add(Me.LayoutControl1) + Me.SplitContainerControl3.Panel1.Controls.Add(Me.Button1) + Me.SplitContainerControl3.Panel1.Controls.Add(Me.cmbSelect) + Me.SplitContainerControl3.Panel1.Controls.Add(Me.SearchControl2) Me.SplitContainerControl3.Panel1.Text = "Panel1" Me.SplitContainerControl3.Panel2.Controls.Add(Me.GridControl1) Me.SplitContainerControl3.Panel2.Text = "Panel2" @@ -300,6 +120,49 @@ Partial Class frmSearchNeu Me.SplitContainerControl3.SplitterPosition = 55 Me.SplitContainerControl3.TabIndex = 9 ' + 'Button1 + ' + Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button1.Location = New System.Drawing.Point(886, 6) + Me.Button1.Name = "Button1" + Me.Button1.Size = New System.Drawing.Size(95, 44) + Me.Button1.TabIndex = 5 + Me.Button1.Text = "Suchen" + Me.Button1.UseVisualStyleBackColor = True + ' + 'cmbSelect + ' + Me.cmbSelect.Location = New System.Drawing.Point(3, 6) + Me.cmbSelect.Name = "cmbSelect" + Me.cmbSelect.Properties.Appearance.BackColor = System.Drawing.Color.Transparent + Me.cmbSelect.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cmbSelect.Properties.Appearance.Options.UseBackColor = True + Me.cmbSelect.Properties.Appearance.Options.UseFont = True + Me.cmbSelect.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple + Me.cmbSelect.Properties.Buttons.AddRange(New DevExpress.XtraEditors.Controls.EditorButton() {New DevExpress.XtraEditors.Controls.EditorButton(DevExpress.XtraEditors.Controls.ButtonPredefines.Combo)}) + Me.cmbSelect.Properties.Items.AddRange(New Object() {"Alle", "Belege", "Rechnungen", "Lieferscheine", "Aufträge", "Angebote", "Kunde Schaum", "Kunde medacom"}) + Me.cmbSelect.Properties.TextEditStyle = DevExpress.XtraEditors.Controls.TextEditStyles.DisableTextEditor + Me.cmbSelect.Size = New System.Drawing.Size(113, 44) + Me.cmbSelect.TabIndex = 4 + ' + 'SearchControl2 + ' + Me.SearchControl2.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.SearchControl2.Location = New System.Drawing.Point(115, 6) + Me.SearchControl2.Name = "SearchControl2" + Me.SearchControl2.Properties.Appearance.BackColor = System.Drawing.Color.Transparent + Me.SearchControl2.Properties.Appearance.Font = New System.Drawing.Font("Segoe UI", 20.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.SearchControl2.Properties.Appearance.Options.UseBackColor = True + Me.SearchControl2.Properties.Appearance.Options.UseFont = True + Me.SearchControl2.Properties.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple + Me.SearchControl2.Properties.EditMode = DevExpress.XtraEditors.TokenEditMode.Manual + Me.SearchControl2.Properties.EditValueType = DevExpress.XtraEditors.TokenEditValueType.List + Me.SearchControl2.Properties.PopupFilterMode = DevExpress.XtraEditors.TokenEditPopupFilterMode.Contains + Me.SearchControl2.Properties.Separators.AddRange(New String() {",", "-", "ODER", "OR", "AND", "UND"}) + Me.SearchControl2.Size = New System.Drawing.Size(772, 44) + Me.SearchControl2.TabIndex = 3 + ' 'GridControl1 ' Me.GridControl1.Dock = System.Windows.Forms.DockStyle.Fill @@ -319,6 +182,7 @@ Partial Class frmSearchNeu 'colParenLeft ' Me.colParenLeft.Caption = "(" + Me.colParenLeft.FieldName = "ParentLeft" Me.colParenLeft.Name = "colParenLeft" Me.colParenLeft.Visible = True Me.colParenLeft.VisibleIndex = 0 @@ -326,6 +190,7 @@ Partial Class frmSearchNeu 'colAttribute ' Me.colAttribute.Caption = "Attribut" + Me.colAttribute.FieldName = "Key" Me.colAttribute.Name = "colAttribute" Me.colAttribute.Visible = True Me.colAttribute.VisibleIndex = 1 @@ -333,6 +198,7 @@ Partial Class frmSearchNeu 'colOperator ' Me.colOperator.Caption = "Operand" + Me.colOperator.FieldName = "Op" Me.colOperator.Name = "colOperator" Me.colOperator.Visible = True Me.colOperator.VisibleIndex = 2 @@ -340,6 +206,7 @@ Partial Class frmSearchNeu 'colValue ' Me.colValue.Caption = "Wert" + Me.colValue.FieldName = "Value" Me.colValue.Name = "colValue" Me.colValue.Visible = True Me.colValue.VisibleIndex = 3 @@ -347,6 +214,7 @@ Partial Class frmSearchNeu 'colParenRight ' Me.colParenRight.Caption = ")" + Me.colParenRight.FieldName = "ParenRight" Me.colParenRight.Name = "colParenRight" Me.colParenRight.Visible = True Me.colParenRight.VisibleIndex = 4 @@ -361,7 +229,7 @@ Partial Class frmSearchNeu Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] - Me.RibbonControl1.Size = New System.Drawing.Size(984, 89) + Me.RibbonControl1.Size = New System.Drawing.Size(984, 94) Me.RibbonControl1.StatusBar = Me.RibbonStatusBar1 ' 'BarButtonItem1 @@ -389,10 +257,10 @@ Partial Class frmSearchNeu ' 'RibbonStatusBar1 ' - Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 585) + Me.RibbonStatusBar1.Location = New System.Drawing.Point(0, 587) Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 - Me.RibbonStatusBar1.Size = New System.Drawing.Size(984, 24) + Me.RibbonStatusBar1.Size = New System.Drawing.Size(984, 22) ' 'RibbonPage2 ' @@ -411,21 +279,6 @@ Partial Class frmSearchNeu Me.Ribbon = Me.RibbonControl1 Me.StatusBar = Me.RibbonStatusBar1 Me.Text = "frmSearchNeu" - CType(Me.cmbOperator.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() - Me.LayoutControl1.ResumeLayout(False) - CType(Me.cmbMandator.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.lookupAttribute.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.SearchLookUpEdit2View, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.lookupValue.Properties, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.SearchLookUpEdit1View, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.Root, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.EmptySpaceItem1, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem2, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem4, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem3, System.ComponentModel.ISupportInitialize).EndInit() - CType(Me.LayoutControlItem5, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.NavBarControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerControl1.ResumeLayout(False) @@ -433,6 +286,8 @@ Partial Class frmSearchNeu Me.SplitContainerControl2.ResumeLayout(False) CType(Me.SplitContainerControl3, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerControl3.ResumeLayout(False) + CType(Me.cmbSelect.Properties, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SearchControl2.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.RibbonControl1, System.ComponentModel.ISupportInitialize).EndInit() @@ -440,14 +295,8 @@ Partial Class frmSearchNeu Me.PerformLayout() End Sub - Friend WithEvents cmbOperator As DevExpress.XtraEditors.ComboBoxEdit - Friend WithEvents lookupValue As DevExpress.XtraEditors.SearchLookUpEdit - Friend WithEvents SearchLookUpEdit1View As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents NavBarControl1 As DevExpress.XtraNavBar.NavBarControl Friend WithEvents NavBarGroup1 As DevExpress.XtraNavBar.NavBarGroup - Friend WithEvents lookupAttribute As SearchLookUpEdit - Friend WithEvents SearchLookUpEdit2View As GridView - Friend WithEvents cmbMandator As ComboBoxEdit Friend WithEvents SplitContainerControl1 As SplitContainerControl Friend WithEvents SplitContainerControl2 As SplitContainerControl Friend WithEvents SplitContainerControl3 As SplitContainerControl @@ -459,19 +308,13 @@ Partial Class frmSearchNeu Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonStatusBar1 As DevExpress.XtraBars.Ribbon.RibbonStatusBar Friend WithEvents RibbonPage2 As DevExpress.XtraBars.Ribbon.RibbonPage - Friend WithEvents LayoutControl1 As DevExpress.XtraLayout.LayoutControl - Friend WithEvents SimpleButton1 As SimpleButton - Friend WithEvents Root As DevExpress.XtraLayout.LayoutControlGroup - Friend WithEvents LayoutControlItem1 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents EmptySpaceItem1 As DevExpress.XtraLayout.EmptySpaceItem - Friend WithEvents LayoutControlItem2 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem4 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem3 As DevExpress.XtraLayout.LayoutControlItem - Friend WithEvents LayoutControlItem5 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem Friend WithEvents colParenLeft As Columns.GridColumn Friend WithEvents colAttribute As Columns.GridColumn Friend WithEvents colOperator As Columns.GridColumn Friend WithEvents colValue As Columns.GridColumn Friend WithEvents colParenRight As Columns.GridColumn + Friend WithEvents Button1 As Button + Friend WithEvents cmbSelect As ComboBoxEdit + Friend WithEvents SearchControl2 As TokenEdit End Class diff --git a/GUIs.ZooFlow/Search/frmSearchNeu.vb b/GUIs.ZooFlow/Search/frmSearchNeu.vb index 741ebcb6..c9194a7b 100644 --- a/GUIs.ZooFlow/Search/frmSearchNeu.vb +++ b/GUIs.ZooFlow/Search/frmSearchNeu.vb @@ -1,32 +1,132 @@ -Imports DevExpress.XtraEditors +Imports System.Collections +Imports System.ComponentModel +Imports DevExpress.XtraEditors +Imports DigitalData.GUIs.ZooFlow.SearchToken Public Class frmSearchNeu - Public Class Attribute - Public Name As String + Private ReadOnly TokenListAttributes As New Dictionary(Of String, Object) From { + {"Rechnungsnummer", New SearchToken.AttributeKeyToken("InvoiceNo")}, + {"Rechnungsdatum", New SearchToken.AttributeKeyToken("InvoiceDate")}, + {"Kundennummer", New SearchToken.AttributeKeyToken("CustNo")} + } + Private ReadOnly TokenListAttrValues As New Dictionary(Of String, Object) From { + {"1233", New SearchToken.AttributeValueToken(1233)}, + {"1234", New SearchToken.AttributeValueToken(1234)}, + {"1235", New SearchToken.AttributeValueToken(1235)}, + {"4711", New SearchToken.AttributeValueToken(4711)}, + {"4712", New SearchToken.AttributeValueToken(4712)} + } + Private ReadOnly TokenListDate As New Dictionary(Of String, Object) From { + {"heute", New SearchToken.DateToken(Date.Now)}, + {"gestern", New SearchToken.DateToken(Date.Now.AddDays(-1))}, + {"letzte Woche", New SearchToken.DateToken(TimeSpan.FromDays(-7))}, + {"letzter Monat", New SearchToken.DateToken(TimeSpan.FromDays(-30))} + } + Private ReadOnly TokenListOperands As New Dictionary(Of String, Object) From { + {"gleich", New AttributeOperatorToken(OperatorToken.Equals)}, + {"nicht gleich", New AttributeOperatorToken(OperatorToken.NotEquals)} + } + Private TokenListDefault As Dictionary(Of String, Object) - Public Overrides Function ToString() As String - Return Name - End Function - End Class + Private InputMode As InputMode = InputMode.Default + Private SearchQuery As New BindingList(Of SearchCriteria) - 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) + Private Sub XtraForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load + TokenListDefault = TokenListAttributes + AddTokens(SearchControl2, TokenListDefault) - 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) + GridControl1.DataSource = SearchQuery + cmbSelect.SelectedIndex = 0 + End Sub + + Private Sub SetTokens(Editor As TokenEdit, Tokens As Dictionary(Of String, Object)) + Editor.Properties.Tokens.Clear() + AddTokens(Editor, Tokens) + End Sub - cmbOperator.Properties.Items.Add(oAttr) - cmbOperator.Properties.Items.Add(oAttr) + Private Sub AddTokens(Editor As TokenEdit, Tokens As Dictionary(Of String, Object)) + For Each oToken In Tokens + Dim oTokenEditToken = New TokenEditToken With { + .Description = oToken.Key, + .Value = oToken.Value + } + Editor.Properties.Tokens.Add(oTokenEditToken) Next + End Sub + + Private Sub SearchControl2_Properties_TokenAdded(sender As Object, e As DevExpress.XtraEditors.TokenEditTokenAddedEventArgs) Handles SearchControl2.Properties.TokenAdded + Dim oEditor As TokenEdit = sender + SetNewTokens(oEditor) + End Sub + + Private Sub SearchControl2_Properties_TokenRemoved(sender As Object, e As TokenEditTokenRemovedEventArgs) Handles SearchControl2.Properties.TokenRemoved + Dim oEditor As TokenEdit = sender + SetNewTokens(oEditor) + End Sub + + Private Sub SetNewTokens(pEditor As TokenEdit) + Dim oLastToken = pEditor.GetTokenList().LastOrDefault() + pEditor.Properties.BeginUpdate() + + If oLastToken IsNot Nothing Then + Select Case oLastToken.Value.GetType - lookupValue.Properties.DataSource = oAttributes - lookupValue.Properties.DisplayMember = "TITLE" + Case GetType(AttributeKeyToken) + ' After the attribute key comes an operator + SetTokens(pEditor, TokenListOperands) + InputMode = InputMode.Operator + Case GetType(AttributeOperatorToken) + ' After the attribute operator comes a value + SetTokens(pEditor, TokenListAttrValues) + InputMode = InputMode.Value + + Case GetType(AttributeValueToken) + ' After the attribute value comes another value + SetTokens(pEditor, TokenListAttrValues) + InputMode = InputMode.Value + + Case Else + SetTokens(pEditor, TokenListDefault) + InputMode = InputMode.Default + + End Select + Else + SetTokens(pEditor, TokenListDefault) + InputMode = InputMode.Default + End If + + pEditor.Properties.EndUpdate() + End Sub + + Private Sub SearchControl2_CustomDrawTokenGlyph(sender As Object, e As TokenEditCustomDrawTokenGlyphEventArgs) Handles SearchControl2.CustomDrawTokenGlyph + ' Set Background according to token type + Select Case e.Value.GetType() + Case GetType(AttributeKeyToken) + e.Graphics.FillRectangle(New SolidBrush(ColorTranslator.FromHtml("#F87171")), e.Bounds) + + Case GetType(AttributeOperatorToken) + e.Graphics.FillRectangle(New SolidBrush(ColorTranslator.FromHtml("#34D399")), e.Bounds) + + Case GetType(AttributeValueToken) + e.Graphics.FillRectangle(New SolidBrush(ColorTranslator.FromHtml("#60A5FA")), e.Bounds) + Case Else + End Select + + ' Draw the glyph on top + ' This fixes: https://supportcenter.devexpress.com/ticket/details/t215578/tokenedit-glyph-is-not-visible-when-customdrawtokentext-is-used + e.DefaultDraw() + End Sub - lookupValue.Properties.DataSource = oAttributes - lookupValue.Properties.DisplayMember = "TITLE" + Private Sub SearchControl2_KeyUp(sender As Object, e As KeyEventArgs) Handles SearchControl2.KeyUp + If InputMode = InputMode.Value And e.KeyCode = Keys.Enter And e.Control = True Then + SearchQuery.Add(New SearchCriteria With { + .ParenLeft = False, + .Key = "test", + .Op = OperatorToken.Equals, + .Value = "test", + .ParentRight = False + }) + End If End Sub End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 16e3edcf..995e3b2a 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -70,6 +70,10 @@ + + False + D:\ProgramFiles\DevExpress 19.2\Components\Bin\Framework\DevExpress.Images.v19.2.dll + @@ -346,14 +350,10 @@ + + - - frmSearch2021.vb - - - Form - frmAdmin_ClipboardWatcher.vb @@ -421,9 +421,6 @@ Designer Resources.Designer.vb - - frmSearch2021.vb - DBCW_Stammdaten.xsd From 96d77e9f681d77cd42a3d98734b85130223c5a91 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 25 Nov 2021 11:01:20 +0100 Subject: [PATCH 8/9] ZUGFeRD: Add Marke in Assembly --- Services.ZUGFeRDService/My Project/AssemblyInfo.vb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Services.ZUGFeRDService/My Project/AssemblyInfo.vb b/Services.ZUGFeRDService/My Project/AssemblyInfo.vb index 4adf3ad7..3410833b 100644 --- a/Services.ZUGFeRDService/My Project/AssemblyInfo.vb +++ b/Services.ZUGFeRDService/My Project/AssemblyInfo.vb @@ -13,7 +13,7 @@ Imports System.Runtime.InteropServices - + From 297a8d144bce80350b81f35730a6af0364a95c93 Mon Sep 17 00:00:00 2001 From: Jonathan Jenne Date: Thu, 25 Nov 2021 15:48:00 +0100 Subject: [PATCH 9/9] ZooFlow: WIP Search --- GUIs.ZooFlow/Search/Search.vb | 107 ++++++++++++++++++++++++++ GUIs.ZooFlow/Search/SearchCriteria.vb | 18 +++-- GUIs.ZooFlow/Search/SearchFilter.vb | 27 ++++--- GUIs.ZooFlow/Search/SearchToken.vb | 106 +++++++++++++------------ GUIs.ZooFlow/Search/frmSearchNeu.vb | 67 +++++++--------- GUIs.ZooFlow/Search/frmSearchStart.vb | 2 +- GUIs.ZooFlow/ZooFlow.vbproj | 1 + GUIs.ZooFlow/frmtest.vb | 1 + 8 files changed, 221 insertions(+), 108 deletions(-) create mode 100644 GUIs.ZooFlow/Search/Search.vb diff --git a/GUIs.ZooFlow/Search/Search.vb b/GUIs.ZooFlow/Search/Search.vb new file mode 100644 index 00000000..636012f2 --- /dev/null +++ b/GUIs.ZooFlow/Search/Search.vb @@ -0,0 +1,107 @@ +Imports System.ComponentModel +Imports DevExpress.XtraEditors +Imports DigitalData.GUIs.ZooFlow.Search.SearchToken +Imports DigitalData.Modules.EDMI.API +Imports DigitalData.Modules.Logging +Imports DigitalData.Modules.ZooFlow.State + +Namespace Search + Public Class Search + Private ReadOnly _SearchQuery As New BindingList(Of SearchCriteria) + Private ReadOnly _LogConfig As LogConfig + Private ReadOnly _Database As DatabaseWithFallback + Private ReadOnly _UserState As UserState + + Private ReadOnly _OpEquals As New KeyValuePair(Of String, Object)("gleich", New AttributeOperatorToken(OperatorToken.Equals)) + Private ReadOnly _OpNotEquals As New KeyValuePair(Of String, Object)("nicht gleich", New AttributeOperatorToken(OperatorToken.NotEquals)) + Private ReadOnly _OpGreaterThan As New KeyValuePair(Of String, Object)("größer als", New AttributeOperatorToken(OperatorToken.GreaterThan)) + Private ReadOnly _OpLessThan As New KeyValuePair(Of String, Object)("kleiner als", New AttributeOperatorToken(OperatorToken.LessThan)) + Private ReadOnly _OpContains As New KeyValuePair(Of String, Object)("enthält", New AttributeOperatorToken(OperatorToken.Contains)) + + Public ReadOnly Property Query As BindingList(Of SearchCriteria) + + + + Private ReadOnly TokenListAttributes As New Dictionary(Of String, Object) + 'Private ReadOnly TokenListAttributes As New Dictionary(Of String, Object) From { + ' {"Rechnungsnummer", New AttributeKeyToken("InvoiceNo")}, + ' {"Rechnungsdatum", New AttributeKeyToken("InvoiceDate")}, + ' {"Kundennummer", New AttributeKeyToken("CustNo")} + '} + Private ReadOnly TokenListOperands As New Dictionary(Of String, Object) From { + {"gleich", New AttributeOperatorToken(OperatorToken.Equals)}, + {"nicht gleich", New AttributeOperatorToken(OperatorToken.NotEquals)}, + {"größer als", New AttributeOperatorToken(OperatorToken.Equals)}, + {"kleiner als", New AttributeOperatorToken(OperatorToken.Equals)}, + {"enthält", New AttributeOperatorToken(OperatorToken.Equals)} + } + Private ReadOnly TokenListAttrValues As New Dictionary(Of String, Object) + 'Private ReadOnly TokenListAttrValues As New Dictionary(Of String, Object) From { + ' {"1233", New AttributeValueToken(1233)}, + ' {"1234", New AttributeValueToken(1234)}, + ' {"1235", New AttributeValueToken(1235)}, + ' {"4711", New AttributeValueToken(4711)}, + ' {"4712", New AttributeValueToken(4712)} + '} + Private ReadOnly TokenListDate As New Dictionary(Of String, Object) From { + {"heute", New DateToken(Date.Now)}, + {"gestern", New DateToken(Date.Now.AddDays(-1))}, + {"letzte Woche", New DateToken(TimeSpan.FromDays(-7))}, + {"letzter Monat", New DateToken(TimeSpan.FromDays(-30))} + } + + Public InputMode As InputMode = InputMode.Default + + Public Sub New(pLogConfig As LogConfig, pUserState As UserState, pDatabase As DatabaseWithFallback) + _LogConfig = pLogConfig + _Database = pDatabase + _UserState = pUserState + End Sub + + Public Function GetAttributeTokens() As Dictionary(Of String, Object) + Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE DEFAULT_SEARCH_ATTRIBUTE = 1 AND LANG_CODE = '{_UserState.Language}'" + Dim oTable = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, Constants.DatabaseType.IDB, $"DEFAULT_SEARCH_ATTRIBUTE = 1 AND LANG_CODE = '{_UserState.Language}'") + Dim oTokens As New Dictionary(Of String, Object) + + For Each oRow As DataRow In oTable.rows + oTokens.Add(oRow.Item("ATTR_TITLE"), New AttributeKeyToken(oRow.Item("ATTR_ID"))) + Next + + Return oTokens + End Function + + Public Function GetValueTokensForAttribute() As Dictionary(Of String, Object) + Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE DEFAULT_SEARCH_ATTRIBUTE = 1 AND LANG_CODE = '{_UserState.Language}'" + Dim oTable = _Database.GetDatatable("VWIDB_BE_ATTRIBUTE", oSQL, Constants.DatabaseType.IDB, $"DEFAULT_SEARCH_ATTRIBUTE = 1 AND LANG_CODE = '{_UserState.Language}'") + Dim oTokens As New Dictionary(Of String, Object) + End Function + + Public Function GetOperatorTokens(pDataType As Type) As Dictionary(Of String, Object) + Dim oResult = New Dictionary(Of String, Object) + + Select Case pDataType.GetType + Case GetType(Date) + oResult.Add(_OpEquals.Key, _OpEquals.Value) + + Case GetType(Integer) + oResult.Add(_OpEquals.Key, _OpEquals.Value) + oResult.Add(_OpNotEquals.Key, _OpNotEquals.Value) + oResult.Add(_OpGreaterThan.Key, _OpGreaterThan.Value) + oResult.Add(_OpLessThan.Key, _OpLessThan.Value) + + Case GetType(Boolean) + oResult.Add(_OpEquals.Key, _OpEquals.Value) + oResult.Add(_OpNotEquals.Key, _OpNotEquals.Value) + + Case Else + oResult.Add(_OpEquals.Key, _OpEquals.Value) + oResult.Add(_OpNotEquals.Key, _OpNotEquals.Value) + oResult.Add(_OpContains.Key, _OpContains.Value) + + End Select + + Return oResult + End Function + + End Class +End Namespace diff --git a/GUIs.ZooFlow/Search/SearchCriteria.vb b/GUIs.ZooFlow/Search/SearchCriteria.vb index c611dc85..007c8cfe 100644 --- a/GUIs.ZooFlow/Search/SearchCriteria.vb +++ b/GUIs.ZooFlow/Search/SearchCriteria.vb @@ -1,8 +1,12 @@ -Public Class SearchCriteria - Public Property ParenLeft As String = "" - Public Property Key As String - Public Property Op As SearchToken.OperatorToken = SearchToken.OperatorToken.Equals - Public Property Value As Object - Public Property ParentRight As String = "" -End Class +Namespace Search + Public Class SearchCriteria + Public Property ParenLeft As String = "" + Public Property Key As String + Public Property Op As SearchToken.OperatorToken = SearchToken.OperatorToken.Equals + Public Property Value As Object + Public Property ParentRight As String = "" + Public Property JoinOperator As String = "AND" + End Class + +End Namespace \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/SearchFilter.vb b/GUIs.ZooFlow/Search/SearchFilter.vb index c9f89c1d..de768ada 100644 --- a/GUIs.ZooFlow/Search/SearchFilter.vb +++ b/GUIs.ZooFlow/Search/SearchFilter.vb @@ -1,6 +1,7 @@ -Public Class SearchFilter +Namespace Search + Public Class SearchFilter - Public Shared Property DefaultFilters As New List(Of FilterTimeframe) From { + Public Shared Property DefaultFilters As New List(Of FilterTimeframe) From { New FilterTimeframe() With {.Name = "Kein", .DisableFilter = True, .[To] = Nothing}, New FilterTimeframe() With {.Name = "Eigener", .CustomFilter = True, .[To] = Date.Now, .From = Date.Now}, New FilterTimeframe() With { @@ -21,15 +22,17 @@ } } - Public Class FilterTimeframe - Public Property Name As String - Public Property From As Date - Public Property [To] As Date = Date.Now - Public Property DisableFilter As Boolean = False - Public Property CustomFilter As Boolean = False + Public Class FilterTimeframe + Public Property Name As String + Public Property From As Date + Public Property [To] As Date = Date.Now + Public Property DisableFilter As Boolean = False + Public Property CustomFilter As Boolean = False - Public Overrides Function ToString() As String - Return Name.ToString - End Function + Public Overrides Function ToString() As String + Return Name.ToString + End Function + End Class End Class -End Class + +End Namespace \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/SearchToken.vb b/GUIs.ZooFlow/Search/SearchToken.vb index 0a33bd18..431f2662 100644 --- a/GUIs.ZooFlow/Search/SearchToken.vb +++ b/GUIs.ZooFlow/Search/SearchToken.vb @@ -1,64 +1,70 @@ -Public Class SearchToken +Namespace Search + Public Class SearchToken - Public Enum [ValueType] - AttributeName - AttributeValue - AttributeOperator - End Enum + Public Enum [ValueType] + AttributeName + AttributeValue + AttributeOperator + End Enum - Public Enum [InputMode] - [Default] - [Operator] - Value - End Enum + Public Enum [InputMode] + [Default] + [Operator] + Value + End Enum - Public Enum [OperatorToken] - Equals - NotEquals - End Enum + Public Enum [OperatorToken] + Equals + NotEquals + GreaterThan + LessThan + Contains + End Enum - Public MustInherit Class TokenValue - Public Value As Object - Public Type As [ValueType] + Public MustInherit Class TokenValue + Public Value As Object + Public Type As [ValueType] - Public Overrides Function ToString() As String - Return Value.ToString() - End Function - End Class + Public Overrides Function ToString() As String + Return Value.ToString() + End Function + End Class - Public Class AttributeKeyToken - Inherits TokenValue + Public Class AttributeKeyToken + Inherits TokenValue - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeName - End Sub - End Class + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeName + End Sub + End Class - Public Class AttributeOperatorToken - Inherits TokenValue + Public Class AttributeOperatorToken + Inherits TokenValue - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeOperator - End Sub - End Class + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeOperator + End Sub + End Class - Public Class AttributeValueToken - Inherits TokenValue + Public Class AttributeValueToken + Inherits TokenValue - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeValue - End Sub - End Class + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeValue + End Sub + End Class - Public Class DateToken - Inherits TokenValue + Public Class DateToken + Inherits TokenValue - Public Sub New(pValue As Object) - Value = pValue - Type = ValueType.AttributeValue - End Sub + Public Sub New(pValue As Object) + Value = pValue + Type = ValueType.AttributeValue + End Sub + End Class End Class -End Class + +End Namespace \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/frmSearchNeu.vb b/GUIs.ZooFlow/Search/frmSearchNeu.vb index c9194a7b..cc964b1d 100644 --- a/GUIs.ZooFlow/Search/frmSearchNeu.vb +++ b/GUIs.ZooFlow/Search/frmSearchNeu.vb @@ -1,41 +1,28 @@ Imports System.Collections Imports System.ComponentModel Imports DevExpress.XtraEditors -Imports DigitalData.GUIs.ZooFlow.SearchToken +Imports DigitalData.GUIs.ZooFlow.Search +Imports DigitalData.GUIs.ZooFlow.Search.SearchToken +Imports DigitalData.Modules.EDMI.API Public Class frmSearchNeu - Private ReadOnly TokenListAttributes As New Dictionary(Of String, Object) From { - {"Rechnungsnummer", New SearchToken.AttributeKeyToken("InvoiceNo")}, - {"Rechnungsdatum", New SearchToken.AttributeKeyToken("InvoiceDate")}, - {"Kundennummer", New SearchToken.AttributeKeyToken("CustNo")} - } - Private ReadOnly TokenListAttrValues As New Dictionary(Of String, Object) From { - {"1233", New SearchToken.AttributeValueToken(1233)}, - {"1234", New SearchToken.AttributeValueToken(1234)}, - {"1235", New SearchToken.AttributeValueToken(1235)}, - {"4711", New SearchToken.AttributeValueToken(4711)}, - {"4712", New SearchToken.AttributeValueToken(4712)} - } - Private ReadOnly TokenListDate As New Dictionary(Of String, Object) From { - {"heute", New SearchToken.DateToken(Date.Now)}, - {"gestern", New SearchToken.DateToken(Date.Now.AddDays(-1))}, - {"letzte Woche", New SearchToken.DateToken(TimeSpan.FromDays(-7))}, - {"letzter Monat", New SearchToken.DateToken(TimeSpan.FromDays(-30))} - } - Private ReadOnly TokenListOperands As New Dictionary(Of String, Object) From { - {"gleich", New AttributeOperatorToken(OperatorToken.Equals)}, - {"nicht gleich", New AttributeOperatorToken(OperatorToken.NotEquals)} - } - Private TokenListDefault As Dictionary(Of String, Object) - - Private InputMode As InputMode = InputMode.Default - Private SearchQuery As New BindingList(Of SearchCriteria) + Private Search As Search.Search + Private Database As DatabaseWithFallback + + Private TokenListDefault As New Dictionary(Of String, Object) + Private TokenListOperands As New Dictionary(Of String, Object) + Private TokenListAttrValues As New Dictionary(Of String, Object) + + Private Sub XtraForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load - TokenListDefault = TokenListAttributes - AddTokens(SearchControl2, TokenListDefault) + Database = New DatabaseWithFallback(My.LogConfig, My.Application.Service.Client, My.DatabaseECM, My.DatabaseIDB) + Search = New Search.Search(My.LogConfig, My.Application.User, Database) + + Dim oTokens = Search.GetAttributeTokens() + AddTokens(SearchControl2, oTokens) - GridControl1.DataSource = SearchQuery + GridControl1.DataSource = Search.Query cmbSelect.SelectedIndex = 0 End Sub @@ -73,27 +60,27 @@ Public Class frmSearchNeu Case GetType(AttributeKeyToken) ' After the attribute key comes an operator - SetTokens(pEditor, TokenListOperands) - InputMode = InputMode.Operator + SetTokens(pEditor, Search.GetOperatorTokens(GetType(String))) + Search.InputMode = InputMode.Operator Case GetType(AttributeOperatorToken) ' After the attribute operator comes a value SetTokens(pEditor, TokenListAttrValues) - InputMode = InputMode.Value + Search.InputMode = InputMode.Value Case GetType(AttributeValueToken) ' After the attribute value comes another value SetTokens(pEditor, TokenListAttrValues) - InputMode = InputMode.Value + Search.InputMode = InputMode.Value Case Else SetTokens(pEditor, TokenListDefault) - InputMode = InputMode.Default + Search.InputMode = InputMode.Default End Select Else SetTokens(pEditor, TokenListDefault) - InputMode = InputMode.Default + Search.InputMode = InputMode.Default End If pEditor.Properties.EndUpdate() @@ -119,8 +106,8 @@ Public Class frmSearchNeu End Sub Private Sub SearchControl2_KeyUp(sender As Object, e As KeyEventArgs) Handles SearchControl2.KeyUp - If InputMode = InputMode.Value And e.KeyCode = Keys.Enter And e.Control = True Then - SearchQuery.Add(New SearchCriteria With { + If Search.InputMode = InputMode.Value And e.KeyCode = Keys.Enter And SearchControl2.IsPopupOpen Then + Search.Query.Add(New SearchCriteria With { .ParenLeft = False, .Key = "test", .Op = OperatorToken.Equals, @@ -129,4 +116,8 @@ Public Class frmSearchNeu }) End If End Sub + + Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click + + End Sub End Class \ No newline at end of file diff --git a/GUIs.ZooFlow/Search/frmSearchStart.vb b/GUIs.ZooFlow/Search/frmSearchStart.vb index 82bfbdbd..b31a8900 100644 --- a/GUIs.ZooFlow/Search/frmSearchStart.vb +++ b/GUIs.ZooFlow/Search/frmSearchStart.vb @@ -9,7 +9,7 @@ Imports DevExpress.XtraEditors Imports DevExpress.XtraSplashScreen Imports DigitalData.GUIs.Common Imports DigitalData.GUIs.ZooFlow.ClassConstants -Imports DigitalData.GUIs.ZooFlow.SearchFilter +Imports DigitalData.GUIs.ZooFlow.Search.SearchFilter Imports System.Threading.Tasks diff --git a/GUIs.ZooFlow/ZooFlow.vbproj b/GUIs.ZooFlow/ZooFlow.vbproj index 995e3b2a..7d2c9028 100644 --- a/GUIs.ZooFlow/ZooFlow.vbproj +++ b/GUIs.ZooFlow/ZooFlow.vbproj @@ -350,6 +350,7 @@ + diff --git a/GUIs.ZooFlow/frmtest.vb b/GUIs.ZooFlow/frmtest.vb index e5aa79c0..2d3cc8dc 100644 --- a/GUIs.ZooFlow/frmtest.vb +++ b/GUIs.ZooFlow/frmtest.vb @@ -99,6 +99,7 @@ Public Class frmtest Dim oResult As Long = Await My.Application.Service.Client.NewFileAsync( txtFile2Import.Text, "WORK", + "DOC", "DEFAULT", New NewFileOptions With { .KeepExtension = CheckBoxKeepExtension.Checked,