improve documentresultlist
This commit is contained in:
parent
9f270d93c9
commit
9f2fb02619
@ -207,7 +207,7 @@ Public Class frmMatch
|
|||||||
Dim oNameSlug = Language.Utils.ConvertTextToSlug(Profile.Name)
|
Dim oNameSlug = Language.Utils.ConvertTextToSlug(Profile.Name)
|
||||||
Dim oSearchGuids = Searches.Select(Function(s) s.Guid).ToArray
|
Dim oSearchGuids = Searches.Select(Function(s) s.Guid).ToArray
|
||||||
Dim oWindowGuid = $"{Profile.Guid}-{oNameSlug}-{String.Join("-", oSearchGuids)}"
|
Dim oWindowGuid = $"{Profile.Guid}-{oNameSlug}-{String.Join("-", oSearchGuids)}"
|
||||||
Dim oParams = New ResultListParams() With {
|
Dim oParams = New DocumentResultParams() With {
|
||||||
.WindowGuid = oWindowGuid
|
.WindowGuid = oWindowGuid
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -246,24 +246,24 @@ Public Class frmMatch
|
|||||||
Dim oShouldOpenAgain As Boolean = False
|
Dim oShouldOpenAgain As Boolean = False
|
||||||
Dim oThisForm = New List(Of IResultForm) From {sender}
|
Dim oThisForm = New List(Of IResultForm) From {sender}
|
||||||
|
|
||||||
If TypeOf sender Is frmResult Then
|
'If TypeOf sender Is frmResult Then
|
||||||
For Each oForm As IResultForm In OpenForms
|
' For Each oForm As IResultForm In OpenForms
|
||||||
' Determine if frmProfileMatch should be shown
|
' ' Determine if frmProfileMatch should be shown
|
||||||
If oForm.ShouldReturnToMatchForm Then
|
' If oForm.ShouldReturnToMatchForm Then
|
||||||
oShouldOpenAgain = True
|
' oShouldOpenAgain = True
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
' If frmProfileMatch should be shown, close all windows of this profile
|
'' If frmProfileMatch should be shown, close all windows of this profile
|
||||||
If oShouldOpenAgain Then
|
'If oShouldOpenAgain Then
|
||||||
For Each oForm As Form In OpenForms.Except(oThisForm)
|
' For Each oForm As Form In OpenForms.Except(oThisForm)
|
||||||
' Remove the Handler to prevent a loop
|
' ' Remove the Handler to prevent a loop
|
||||||
RemoveHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed
|
' RemoveHandler oForm.FormClosed, AddressOf ProfileResultForm_Closed
|
||||||
oForm.Close()
|
' oForm.Close()
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
Show()
|
' Show()
|
||||||
End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
67
Common/Base/ClassMessageBox.vb
Normal file
67
Common/Base/ClassMessageBox.vb
Normal file
@ -0,0 +1,67 @@
|
|||||||
|
Imports System.Reflection
|
||||||
|
Imports System.Windows.Forms
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
|
||||||
|
Namespace Base
|
||||||
|
Public Class ClassMessageBox
|
||||||
|
Private _Logger As Logger
|
||||||
|
Private _Form As Form
|
||||||
|
|
||||||
|
Private Const UNKNOWN_METHOD = "Unknown Method"
|
||||||
|
Private Const UNKNOWN_FORM = "Unknown Form"
|
||||||
|
|
||||||
|
Public Sub New(Logger As Logger, Form As Form)
|
||||||
|
_Logger = Logger
|
||||||
|
_Form = Form
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Sub ShowErrorMessage(Exception As Exception)
|
||||||
|
_Logger.Error(Exception)
|
||||||
|
MsgBox(GetMessage(Exception), MsgBoxStyle.Critical, _Form.Text)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GetMessage(Exception As Exception) As String
|
||||||
|
Dim oTargetSite = Exception.TargetSite
|
||||||
|
Dim oMethodName = GetMethodName(Exception)
|
||||||
|
Dim oFormName = GetFormName(Exception)
|
||||||
|
Dim oMessage As String = String.Empty
|
||||||
|
|
||||||
|
oMessage &= $"Form: {oFormName}{vbNewLine}"
|
||||||
|
oMessage &= $"Method: {oMethodName}{vbNewLine}"
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(Exception.StackTrace) Then
|
||||||
|
oMessage &= $"Message: {Exception.Message}{vbNewLine}{vbNewLine}"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(Exception.StackTrace) Then
|
||||||
|
oMessage &= $"Stacktrace: {Exception.StackTrace}{vbNewLine}"
|
||||||
|
End If
|
||||||
|
|
||||||
|
oMessage &= $"{vbNewLine}"
|
||||||
|
oMessage &= $"Please report this error to error@digitaldata.works"
|
||||||
|
|
||||||
|
Return oMessage
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetMethodName(Exception As Exception) As String
|
||||||
|
Dim oMethodName = Exception.TargetSite?.ReflectedType?.Name
|
||||||
|
|
||||||
|
If oMethodName Is Nothing Then
|
||||||
|
Return UNKNOWN_METHOD
|
||||||
|
Else
|
||||||
|
Return oMethodName
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Private Function GetFormName(Exception As Exception) As String
|
||||||
|
Dim oFormName = Exception.TargetSite?.ReflectedType?.ReflectedType?.Name
|
||||||
|
|
||||||
|
If oFormName Is Nothing Then
|
||||||
|
Return UNKNOWN_FORM
|
||||||
|
Else
|
||||||
|
Return oFormName
|
||||||
|
End If
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
|
||||||
|
End Namespace
|
||||||
@ -85,17 +85,13 @@
|
|||||||
<Import Include="System.Threading.Tasks" />
|
<Import Include="System.Threading.Tasks" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="DocumentResultConfig.vb" />
|
<Compile Include="Base\ClassMessageBox.vb" />
|
||||||
<Compile Include="frmDocumentResultList.Designer.vb">
|
<Compile Include="DocumentResultList\DocumentResultConfig.vb" />
|
||||||
|
<Compile Include="DocumentResultList\DocumentResultParams.vb" />
|
||||||
|
<Compile Include="DocumentResultList\frmDocumentResultList.Designer.vb">
|
||||||
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="frmDocumentResultList.vb">
|
<Compile Include="DocumentResultList\frmDocumentResultList.vb">
|
||||||
<SubType>Form</SubType>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="frmResult.Designer.vb">
|
|
||||||
<DependentUpon>frmResult.vb</DependentUpon>
|
|
||||||
</Compile>
|
|
||||||
<Compile Include="frmResult.vb">
|
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="IResultForm.vb" />
|
<Compile Include="IResultForm.vb" />
|
||||||
@ -117,12 +113,9 @@
|
|||||||
<Compile Include="ResultListParams.vb" />
|
<Compile Include="ResultListParams.vb" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<EmbeddedResource Include="frmDocumentResultList.resx">
|
<EmbeddedResource Include="DocumentResultList\frmDocumentResultList.resx">
|
||||||
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
<DependentUpon>frmDocumentResultList.vb</DependentUpon>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmResult.resx">
|
|
||||||
<DependentUpon>frmResult.vb</DependentUpon>
|
|
||||||
</EmbeddedResource>
|
|
||||||
<EmbeddedResource Include="My Project\licenses.licx" />
|
<EmbeddedResource Include="My Project\licenses.licx" />
|
||||||
<EmbeddedResource Include="My Project\Resources.resx">
|
<EmbeddedResource Include="My Project\Resources.resx">
|
||||||
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
<Generator>VbMyResourcesResXFileCodeGenerator</Generator>
|
||||||
|
|||||||
12
Common/DocumentResultList/DocumentResultParams.vb
Normal file
12
Common/DocumentResultList/DocumentResultParams.vb
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
Public Class DocumentResultParams
|
||||||
|
''' <summary>
|
||||||
|
''' WindowGuid is used to save layout data
|
||||||
|
''' </summary>
|
||||||
|
Public WindowGuid As String
|
||||||
|
Public Results As New List(Of DocumentResult)
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Class DocumentResult
|
||||||
|
Public Title As String
|
||||||
|
Public Datatable As DataTable
|
||||||
|
End Class
|
||||||
@ -20,7 +20,7 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
Private _IsLoading As Boolean = True
|
Private _IsLoading As Boolean = True
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ResultListParams)
|
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As DocumentResultParams)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
InitializeComponent()
|
InitializeComponent()
|
||||||
|
|
||||||
@ -1,12 +1,12 @@
|
|||||||
Public Class ResultListParams
|
Public Class DataResultListParams
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' WindowGuid is used to save layout data
|
''' WindowGuid is used to save layout data
|
||||||
''' </summary>
|
''' </summary>
|
||||||
Public WindowGuid As String
|
Public WindowGuid As String
|
||||||
Public Results As New List(Of DocumentResult)
|
Public Results As New List(Of DataResult)
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class DocumentResult
|
Public Class DataResult
|
||||||
Public Title As String
|
Public Title As String
|
||||||
Public Datatable As DataTable
|
Public Datatable As DataTable
|
||||||
End Class
|
End Class
|
||||||
335
Common/frmResult.Designer.vb
generated
335
Common/frmResult.Designer.vb
generated
@ -1,335 +0,0 @@
|
|||||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
|
||||||
Partial Class frmResult
|
|
||||||
Inherits DevExpress.XtraEditors.XtraForm
|
|
||||||
|
|
||||||
'Form overrides dispose to clean up the component list.
|
|
||||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
|
||||||
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.
|
|
||||||
<System.Diagnostics.DebuggerStepThrough()> _
|
|
||||||
Private Sub InitializeComponent()
|
|
||||||
Me.components = New System.ComponentModel.Container()
|
|
||||||
Me.XtraTabControl = New DevExpress.XtraTab.XtraTabControl()
|
|
||||||
Me.XtraTabPage1 = New DevExpress.XtraTab.XtraTabPage()
|
|
||||||
Me.GridControl1 = New DevExpress.XtraGrid.GridControl()
|
|
||||||
Me.GridView1 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
|
||||||
Me.BarManager1 = New DevExpress.XtraBars.BarManager(Me.components)
|
|
||||||
Me.Bar2 = New DevExpress.XtraBars.Bar()
|
|
||||||
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
|
|
||||||
Me.Bar3 = New DevExpress.XtraBars.Bar()
|
|
||||||
Me.LabelStatus = New DevExpress.XtraBars.BarStaticItem()
|
|
||||||
Me.barDockControlTop = New DevExpress.XtraBars.BarDockControl()
|
|
||||||
Me.barDockControlBottom = New DevExpress.XtraBars.BarDockControl()
|
|
||||||
Me.barDockControlLeft = New DevExpress.XtraBars.BarDockControl()
|
|
||||||
Me.barDockControlRight = New DevExpress.XtraBars.BarDockControl()
|
|
||||||
Me.XtraTabPage2 = New DevExpress.XtraTab.XtraTabPage()
|
|
||||||
Me.GridControl2 = New DevExpress.XtraGrid.GridControl()
|
|
||||||
Me.GridView2 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
|
||||||
Me.XtraTabPage3 = New DevExpress.XtraTab.XtraTabPage()
|
|
||||||
Me.GridControl3 = New DevExpress.XtraGrid.GridControl()
|
|
||||||
Me.GridView3 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
|
||||||
Me.XtraTabPage4 = New DevExpress.XtraTab.XtraTabPage()
|
|
||||||
Me.GridControl4 = New DevExpress.XtraGrid.GridControl()
|
|
||||||
Me.GridView4 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
|
||||||
Me.XtraTabPage5 = New DevExpress.XtraTab.XtraTabPage()
|
|
||||||
Me.GridControl5 = New DevExpress.XtraGrid.GridControl()
|
|
||||||
Me.GridView5 = New DevExpress.XtraGrid.Views.Grid.GridView()
|
|
||||||
CType(Me.XtraTabControl, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.XtraTabControl.SuspendLayout()
|
|
||||||
Me.XtraTabPage1.SuspendLayout()
|
|
||||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.XtraTabPage2.SuspendLayout()
|
|
||||||
CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.XtraTabPage3.SuspendLayout()
|
|
||||||
CType(Me.GridControl3, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.GridView3, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.XtraTabPage4.SuspendLayout()
|
|
||||||
CType(Me.GridControl4, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.GridView4, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.XtraTabPage5.SuspendLayout()
|
|
||||||
CType(Me.GridControl5, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
CType(Me.GridView5, System.ComponentModel.ISupportInitialize).BeginInit()
|
|
||||||
Me.SuspendLayout()
|
|
||||||
'
|
|
||||||
'XtraTabControl
|
|
||||||
'
|
|
||||||
Me.XtraTabControl.Dock = System.Windows.Forms.DockStyle.Fill
|
|
||||||
Me.XtraTabControl.Location = New System.Drawing.Point(0, 20)
|
|
||||||
Me.XtraTabControl.Name = "XtraTabControl"
|
|
||||||
Me.XtraTabControl.SelectedTabPage = Me.XtraTabPage1
|
|
||||||
Me.XtraTabControl.Size = New System.Drawing.Size(796, 483)
|
|
||||||
Me.XtraTabControl.TabIndex = 0
|
|
||||||
Me.XtraTabControl.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPage3, Me.XtraTabPage4, Me.XtraTabPage5})
|
|
||||||
'
|
|
||||||
'XtraTabPage1
|
|
||||||
'
|
|
||||||
Me.XtraTabPage1.Controls.Add(Me.GridControl1)
|
|
||||||
Me.XtraTabPage1.Name = "XtraTabPage1"
|
|
||||||
Me.XtraTabPage1.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.XtraTabPage1.Text = "XtraTabPage1"
|
|
||||||
'
|
|
||||||
'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.MenuManager = Me.BarManager1
|
|
||||||
Me.GridControl1.Name = "GridControl1"
|
|
||||||
Me.GridControl1.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.GridControl1.TabIndex = 0
|
|
||||||
Me.GridControl1.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView1})
|
|
||||||
'
|
|
||||||
'GridView1
|
|
||||||
'
|
|
||||||
Me.GridView1.GridControl = Me.GridControl1
|
|
||||||
Me.GridView1.Name = "GridView1"
|
|
||||||
'
|
|
||||||
'BarManager1
|
|
||||||
'
|
|
||||||
Me.BarManager1.Bars.AddRange(New DevExpress.XtraBars.Bar() {Me.Bar2, Me.Bar3})
|
|
||||||
Me.BarManager1.DockControls.Add(Me.barDockControlTop)
|
|
||||||
Me.BarManager1.DockControls.Add(Me.barDockControlBottom)
|
|
||||||
Me.BarManager1.DockControls.Add(Me.barDockControlLeft)
|
|
||||||
Me.BarManager1.DockControls.Add(Me.barDockControlRight)
|
|
||||||
Me.BarManager1.Form = Me
|
|
||||||
Me.BarManager1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.BarButtonItem1, Me.LabelStatus})
|
|
||||||
Me.BarManager1.MainMenu = Me.Bar2
|
|
||||||
Me.BarManager1.MaxItemId = 2
|
|
||||||
Me.BarManager1.StatusBar = Me.Bar3
|
|
||||||
'
|
|
||||||
'Bar2
|
|
||||||
'
|
|
||||||
Me.Bar2.BarName = "Hauptmenü"
|
|
||||||
Me.Bar2.DockCol = 0
|
|
||||||
Me.Bar2.DockRow = 0
|
|
||||||
Me.Bar2.DockStyle = DevExpress.XtraBars.BarDockStyle.Top
|
|
||||||
Me.Bar2.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.BarButtonItem1)})
|
|
||||||
Me.Bar2.OptionsBar.DisableClose = True
|
|
||||||
Me.Bar2.OptionsBar.DrawBorder = False
|
|
||||||
Me.Bar2.OptionsBar.UseWholeRow = True
|
|
||||||
Me.Bar2.Text = "Hauptmenü"
|
|
||||||
'
|
|
||||||
'BarButtonItem1
|
|
||||||
'
|
|
||||||
Me.BarButtonItem1.Caption = "Zurück zur Profilauswahl"
|
|
||||||
Me.BarButtonItem1.Id = 0
|
|
||||||
Me.BarButtonItem1.Name = "BarButtonItem1"
|
|
||||||
'
|
|
||||||
'Bar3
|
|
||||||
'
|
|
||||||
Me.Bar3.BarName = "Statusleiste"
|
|
||||||
Me.Bar3.CanDockStyle = DevExpress.XtraBars.BarCanDockStyle.Bottom
|
|
||||||
Me.Bar3.DockCol = 0
|
|
||||||
Me.Bar3.DockRow = 0
|
|
||||||
Me.Bar3.DockStyle = DevExpress.XtraBars.BarDockStyle.Bottom
|
|
||||||
Me.Bar3.LinksPersistInfo.AddRange(New DevExpress.XtraBars.LinkPersistInfo() {New DevExpress.XtraBars.LinkPersistInfo(Me.LabelStatus)})
|
|
||||||
Me.Bar3.OptionsBar.AllowQuickCustomization = False
|
|
||||||
Me.Bar3.OptionsBar.DrawDragBorder = False
|
|
||||||
Me.Bar3.OptionsBar.UseWholeRow = True
|
|
||||||
Me.Bar3.Text = "Statusleiste"
|
|
||||||
'
|
|
||||||
'LabelStatus
|
|
||||||
'
|
|
||||||
Me.LabelStatus.Caption = "Status"
|
|
||||||
Me.LabelStatus.Id = 1
|
|
||||||
Me.LabelStatus.Name = "LabelStatus"
|
|
||||||
'
|
|
||||||
'barDockControlTop
|
|
||||||
'
|
|
||||||
Me.barDockControlTop.CausesValidation = False
|
|
||||||
Me.barDockControlTop.Dock = System.Windows.Forms.DockStyle.Top
|
|
||||||
Me.barDockControlTop.Location = New System.Drawing.Point(0, 0)
|
|
||||||
Me.barDockControlTop.Manager = Me.BarManager1
|
|
||||||
Me.barDockControlTop.Size = New System.Drawing.Size(796, 20)
|
|
||||||
'
|
|
||||||
'barDockControlBottom
|
|
||||||
'
|
|
||||||
Me.barDockControlBottom.CausesValidation = False
|
|
||||||
Me.barDockControlBottom.Dock = System.Windows.Forms.DockStyle.Bottom
|
|
||||||
Me.barDockControlBottom.Location = New System.Drawing.Point(0, 503)
|
|
||||||
Me.barDockControlBottom.Manager = Me.BarManager1
|
|
||||||
Me.barDockControlBottom.Size = New System.Drawing.Size(796, 25)
|
|
||||||
'
|
|
||||||
'barDockControlLeft
|
|
||||||
'
|
|
||||||
Me.barDockControlLeft.CausesValidation = False
|
|
||||||
Me.barDockControlLeft.Dock = System.Windows.Forms.DockStyle.Left
|
|
||||||
Me.barDockControlLeft.Location = New System.Drawing.Point(0, 20)
|
|
||||||
Me.barDockControlLeft.Manager = Me.BarManager1
|
|
||||||
Me.barDockControlLeft.Size = New System.Drawing.Size(0, 483)
|
|
||||||
'
|
|
||||||
'barDockControlRight
|
|
||||||
'
|
|
||||||
Me.barDockControlRight.CausesValidation = False
|
|
||||||
Me.barDockControlRight.Dock = System.Windows.Forms.DockStyle.Right
|
|
||||||
Me.barDockControlRight.Location = New System.Drawing.Point(796, 20)
|
|
||||||
Me.barDockControlRight.Manager = Me.BarManager1
|
|
||||||
Me.barDockControlRight.Size = New System.Drawing.Size(0, 483)
|
|
||||||
'
|
|
||||||
'XtraTabPage2
|
|
||||||
'
|
|
||||||
Me.XtraTabPage2.Controls.Add(Me.GridControl2)
|
|
||||||
Me.XtraTabPage2.Name = "XtraTabPage2"
|
|
||||||
Me.XtraTabPage2.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.XtraTabPage2.Text = "XtraTabPage2"
|
|
||||||
'
|
|
||||||
'GridControl2
|
|
||||||
'
|
|
||||||
Me.GridControl2.Dock = System.Windows.Forms.DockStyle.Fill
|
|
||||||
Me.GridControl2.Location = New System.Drawing.Point(0, 0)
|
|
||||||
Me.GridControl2.MainView = Me.GridView2
|
|
||||||
Me.GridControl2.MenuManager = Me.BarManager1
|
|
||||||
Me.GridControl2.Name = "GridControl2"
|
|
||||||
Me.GridControl2.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.GridControl2.TabIndex = 0
|
|
||||||
Me.GridControl2.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView2})
|
|
||||||
'
|
|
||||||
'GridView2
|
|
||||||
'
|
|
||||||
Me.GridView2.GridControl = Me.GridControl2
|
|
||||||
Me.GridView2.Name = "GridView2"
|
|
||||||
'
|
|
||||||
'XtraTabPage3
|
|
||||||
'
|
|
||||||
Me.XtraTabPage3.Controls.Add(Me.GridControl3)
|
|
||||||
Me.XtraTabPage3.Name = "XtraTabPage3"
|
|
||||||
Me.XtraTabPage3.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.XtraTabPage3.Text = "XtraTabPage3"
|
|
||||||
'
|
|
||||||
'GridControl3
|
|
||||||
'
|
|
||||||
Me.GridControl3.Dock = System.Windows.Forms.DockStyle.Fill
|
|
||||||
Me.GridControl3.Location = New System.Drawing.Point(0, 0)
|
|
||||||
Me.GridControl3.MainView = Me.GridView3
|
|
||||||
Me.GridControl3.MenuManager = Me.BarManager1
|
|
||||||
Me.GridControl3.Name = "GridControl3"
|
|
||||||
Me.GridControl3.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.GridControl3.TabIndex = 0
|
|
||||||
Me.GridControl3.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView3})
|
|
||||||
'
|
|
||||||
'GridView3
|
|
||||||
'
|
|
||||||
Me.GridView3.GridControl = Me.GridControl3
|
|
||||||
Me.GridView3.Name = "GridView3"
|
|
||||||
'
|
|
||||||
'XtraTabPage4
|
|
||||||
'
|
|
||||||
Me.XtraTabPage4.Controls.Add(Me.GridControl4)
|
|
||||||
Me.XtraTabPage4.Name = "XtraTabPage4"
|
|
||||||
Me.XtraTabPage4.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.XtraTabPage4.Text = "XtraTabPage4"
|
|
||||||
'
|
|
||||||
'GridControl4
|
|
||||||
'
|
|
||||||
Me.GridControl4.Dock = System.Windows.Forms.DockStyle.Fill
|
|
||||||
Me.GridControl4.Location = New System.Drawing.Point(0, 0)
|
|
||||||
Me.GridControl4.MainView = Me.GridView4
|
|
||||||
Me.GridControl4.MenuManager = Me.BarManager1
|
|
||||||
Me.GridControl4.Name = "GridControl4"
|
|
||||||
Me.GridControl4.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.GridControl4.TabIndex = 0
|
|
||||||
Me.GridControl4.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView4})
|
|
||||||
'
|
|
||||||
'GridView4
|
|
||||||
'
|
|
||||||
Me.GridView4.GridControl = Me.GridControl4
|
|
||||||
Me.GridView4.Name = "GridView4"
|
|
||||||
'
|
|
||||||
'XtraTabPage5
|
|
||||||
'
|
|
||||||
Me.XtraTabPage5.Controls.Add(Me.GridControl5)
|
|
||||||
Me.XtraTabPage5.Name = "XtraTabPage5"
|
|
||||||
Me.XtraTabPage5.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.XtraTabPage5.Text = "XtraTabPage5"
|
|
||||||
'
|
|
||||||
'GridControl5
|
|
||||||
'
|
|
||||||
Me.GridControl5.Dock = System.Windows.Forms.DockStyle.Fill
|
|
||||||
Me.GridControl5.Location = New System.Drawing.Point(0, 0)
|
|
||||||
Me.GridControl5.MainView = Me.GridView5
|
|
||||||
Me.GridControl5.MenuManager = Me.BarManager1
|
|
||||||
Me.GridControl5.Name = "GridControl5"
|
|
||||||
Me.GridControl5.Size = New System.Drawing.Size(790, 455)
|
|
||||||
Me.GridControl5.TabIndex = 0
|
|
||||||
Me.GridControl5.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridView5})
|
|
||||||
'
|
|
||||||
'GridView5
|
|
||||||
'
|
|
||||||
Me.GridView5.GridControl = Me.GridControl5
|
|
||||||
Me.GridView5.Name = "GridView5"
|
|
||||||
'
|
|
||||||
'frmResult
|
|
||||||
'
|
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
|
||||||
Me.ClientSize = New System.Drawing.Size(796, 528)
|
|
||||||
Me.Controls.Add(Me.XtraTabControl)
|
|
||||||
Me.Controls.Add(Me.barDockControlLeft)
|
|
||||||
Me.Controls.Add(Me.barDockControlRight)
|
|
||||||
Me.Controls.Add(Me.barDockControlBottom)
|
|
||||||
Me.Controls.Add(Me.barDockControlTop)
|
|
||||||
Me.Name = "frmResult"
|
|
||||||
Me.Text = "Ergebnis"
|
|
||||||
CType(Me.XtraTabControl, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.XtraTabControl.ResumeLayout(False)
|
|
||||||
Me.XtraTabPage1.ResumeLayout(False)
|
|
||||||
CType(Me.GridControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.GridView1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.BarManager1, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.XtraTabPage2.ResumeLayout(False)
|
|
||||||
CType(Me.GridControl2, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.GridView2, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.XtraTabPage3.ResumeLayout(False)
|
|
||||||
CType(Me.GridControl3, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.GridView3, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.XtraTabPage4.ResumeLayout(False)
|
|
||||||
CType(Me.GridControl4, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.GridView4, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.XtraTabPage5.ResumeLayout(False)
|
|
||||||
CType(Me.GridControl5, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
CType(Me.GridView5, System.ComponentModel.ISupportInitialize).EndInit()
|
|
||||||
Me.ResumeLayout(False)
|
|
||||||
Me.PerformLayout()
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Friend WithEvents XtraTabControl As DevExpress.XtraTab.XtraTabControl
|
|
||||||
Friend WithEvents XtraTabPage1 As DevExpress.XtraTab.XtraTabPage
|
|
||||||
Friend WithEvents XtraTabPage2 As DevExpress.XtraTab.XtraTabPage
|
|
||||||
Friend WithEvents BarManager1 As DevExpress.XtraBars.BarManager
|
|
||||||
Friend WithEvents Bar2 As DevExpress.XtraBars.Bar
|
|
||||||
Friend WithEvents Bar3 As DevExpress.XtraBars.Bar
|
|
||||||
Friend WithEvents barDockControlTop As DevExpress.XtraBars.BarDockControl
|
|
||||||
Friend WithEvents barDockControlBottom As DevExpress.XtraBars.BarDockControl
|
|
||||||
Friend WithEvents barDockControlLeft As DevExpress.XtraBars.BarDockControl
|
|
||||||
Friend WithEvents barDockControlRight As DevExpress.XtraBars.BarDockControl
|
|
||||||
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
|
|
||||||
Friend WithEvents GridControl1 As DevExpress.XtraGrid.GridControl
|
|
||||||
Friend WithEvents GridView1 As DevExpress.XtraGrid.Views.Grid.GridView
|
|
||||||
Friend WithEvents GridControl2 As DevExpress.XtraGrid.GridControl
|
|
||||||
Friend WithEvents GridView2 As DevExpress.XtraGrid.Views.Grid.GridView
|
|
||||||
Friend WithEvents XtraTabPage3 As DevExpress.XtraTab.XtraTabPage
|
|
||||||
Friend WithEvents GridControl3 As DevExpress.XtraGrid.GridControl
|
|
||||||
Friend WithEvents GridView3 As DevExpress.XtraGrid.Views.Grid.GridView
|
|
||||||
Friend WithEvents XtraTabPage4 As DevExpress.XtraTab.XtraTabPage
|
|
||||||
Friend WithEvents GridControl4 As DevExpress.XtraGrid.GridControl
|
|
||||||
Friend WithEvents GridView4 As DevExpress.XtraGrid.Views.Grid.GridView
|
|
||||||
Friend WithEvents XtraTabPage5 As DevExpress.XtraTab.XtraTabPage
|
|
||||||
Friend WithEvents GridControl5 As DevExpress.XtraGrid.GridControl
|
|
||||||
Friend WithEvents GridView5 As DevExpress.XtraGrid.Views.Grid.GridView
|
|
||||||
Friend WithEvents LabelStatus As DevExpress.XtraBars.BarStaticItem
|
|
||||||
End Class
|
|
||||||
@ -1,123 +0,0 @@
|
|||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<root>
|
|
||||||
<!--
|
|
||||||
Microsoft ResX Schema
|
|
||||||
|
|
||||||
Version 2.0
|
|
||||||
|
|
||||||
The primary goals of this format is to allow a simple XML format
|
|
||||||
that is mostly human readable. The generation and parsing of the
|
|
||||||
various data types are done through the TypeConverter classes
|
|
||||||
associated with the data types.
|
|
||||||
|
|
||||||
Example:
|
|
||||||
|
|
||||||
... ado.net/XML headers & schema ...
|
|
||||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
|
||||||
<resheader name="version">2.0</resheader>
|
|
||||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
|
||||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
|
||||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
|
||||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
|
||||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
|
||||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
|
||||||
</data>
|
|
||||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
|
||||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
|
||||||
<comment>This is a comment</comment>
|
|
||||||
</data>
|
|
||||||
|
|
||||||
There are any number of "resheader" rows that contain simple
|
|
||||||
name/value pairs.
|
|
||||||
|
|
||||||
Each data row contains a name, and value. The row also contains a
|
|
||||||
type or mimetype. Type corresponds to a .NET class that support
|
|
||||||
text/value conversion through the TypeConverter architecture.
|
|
||||||
Classes that don't support this are serialized and stored with the
|
|
||||||
mimetype set.
|
|
||||||
|
|
||||||
The mimetype is used for serialized objects, and tells the
|
|
||||||
ResXResourceReader how to depersist the object. This is currently not
|
|
||||||
extensible. For a given mimetype the value must be set accordingly:
|
|
||||||
|
|
||||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
|
||||||
that the ResXResourceWriter will generate, however the reader can
|
|
||||||
read any of the formats listed below.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.binary.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.soap.base64
|
|
||||||
value : The object must be serialized with
|
|
||||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
|
|
||||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
|
||||||
value : The object must be serialized into a byte array
|
|
||||||
: using a System.ComponentModel.TypeConverter
|
|
||||||
: and then encoded with base64 encoding.
|
|
||||||
-->
|
|
||||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
|
||||||
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
|
||||||
<xsd:element name="root" msdata:IsDataSet="true">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:choice maxOccurs="unbounded">
|
|
||||||
<xsd:element name="metadata">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" use="required" type="xsd:string" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="assembly">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:attribute name="alias" type="xsd:string" />
|
|
||||||
<xsd:attribute name="name" type="xsd:string" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="data">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
|
||||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
|
||||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
|
||||||
<xsd:attribute ref="xml:space" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
<xsd:element name="resheader">
|
|
||||||
<xsd:complexType>
|
|
||||||
<xsd:sequence>
|
|
||||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
|
||||||
</xsd:sequence>
|
|
||||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:choice>
|
|
||||||
</xsd:complexType>
|
|
||||||
</xsd:element>
|
|
||||||
</xsd:schema>
|
|
||||||
<resheader name="resmimetype">
|
|
||||||
<value>text/microsoft-resx</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="version">
|
|
||||||
<value>2.0</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="reader">
|
|
||||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<resheader name="writer">
|
|
||||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
|
||||||
</resheader>
|
|
||||||
<metadata name="BarManager1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
|
|
||||||
<value>17, 17</value>
|
|
||||||
</metadata>
|
|
||||||
</root>
|
|
||||||
@ -1,355 +0,0 @@
|
|||||||
Imports System.Drawing
|
|
||||||
Imports DevExpress.Utils
|
|
||||||
Imports DevExpress.XtraGrid
|
|
||||||
Imports DevExpress.XtraGrid.Columns
|
|
||||||
Imports DevExpress.XtraGrid.Views.Grid
|
|
||||||
Imports DigitalData.GUIs.Common
|
|
||||||
Imports DigitalData.Modules.Database
|
|
||||||
Imports DigitalData.Modules.Logging
|
|
||||||
Imports DigitalData.Modules.ZooFlow
|
|
||||||
Imports DigitalData.Modules.ZooFlow.Params
|
|
||||||
Imports Patterns.ClassPatterns
|
|
||||||
|
|
||||||
Public Class frmResult
|
|
||||||
Implements IResultForm
|
|
||||||
|
|
||||||
Private _LogConfig As LogConfig
|
|
||||||
Private _Logger As Logger
|
|
||||||
Private _Params As ClipboardWatcherParams
|
|
||||||
Private _Environment As Environment
|
|
||||||
Private _DocumentSearches As DataTable
|
|
||||||
Private _MatchingProfiles As List(Of ProfileData)
|
|
||||||
Private _Database As MSSQLServer
|
|
||||||
Private _ResultType As ResultType
|
|
||||||
|
|
||||||
Private Class Search
|
|
||||||
Public DataTable As DataTable
|
|
||||||
Public TabIndex As Integer
|
|
||||||
Public TabCaption As String
|
|
||||||
Public ProfileId As Integer
|
|
||||||
Public SQLCommand As String
|
|
||||||
End Class
|
|
||||||
|
|
||||||
Public Enum ResultType
|
|
||||||
Data
|
|
||||||
Document
|
|
||||||
End Enum
|
|
||||||
|
|
||||||
Public Property ShouldReturnToMatchForm As Boolean = False Implements IResultForm.ShouldReturnToMatchForm
|
|
||||||
|
|
||||||
Public Sub New(LogConfig As LogConfig, Environment As Environment, Params As ClipboardWatcherParams, ResultType As ResultType)
|
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
|
||||||
InitializeComponent()
|
|
||||||
|
|
||||||
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
|
||||||
_MatchingProfiles = Params.MatchingProfiles
|
|
||||||
_LogConfig = LogConfig
|
|
||||||
_Logger = LogConfig.GetLogger
|
|
||||||
_Database = Environment.Database
|
|
||||||
_Environment = Environment
|
|
||||||
_Params = Params
|
|
||||||
_ResultType = ResultType
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Async Sub frmResult_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
|
||||||
GridView1.ShowLoadingPanel()
|
|
||||||
|
|
||||||
Dim oSearches As New List(Of Search)
|
|
||||||
|
|
||||||
If _ResultType = ResultType.Data Then
|
|
||||||
oSearches = Await LoadDataSearchesAsync()
|
|
||||||
Else
|
|
||||||
oSearches = Await LoadDocumentSearchesAsync()
|
|
||||||
End If
|
|
||||||
|
|
||||||
For Each oSearch As Search In oSearches
|
|
||||||
RefreshTabDoc(oSearch.ProfileId, oSearch.DataTable, oSearch.TabIndex, oSearch.TabCaption)
|
|
||||||
Next
|
|
||||||
|
|
||||||
GridView1.HideLoadingPanel()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Async Function LoadDocumentSearchesAsync() As Task(Of List(Of Search))
|
|
||||||
Return Await Task.Run(AddressOf DoLoadDocumentSearches)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Function DoLoadDocumentSearches() As List(Of Search)
|
|
||||||
Dim oMatchingIds = String.Join(",", _MatchingProfiles.Select(Function(p) p.Guid).ToArray())
|
|
||||||
Dim oSQL As String = $"SELECT * FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({oMatchingIds}) ORDER BY TAB_INDEX"
|
|
||||||
Dim oSearchesDataTable = _Database.GetDatatable(oSQL)
|
|
||||||
Dim oDocSearches As New List(Of Search)
|
|
||||||
Dim oCounter As Integer = 0
|
|
||||||
Dim oPatterns As New Patterns.ClassPatterns(_LogConfig)
|
|
||||||
|
|
||||||
_DocumentSearches = oSearchesDataTable
|
|
||||||
|
|
||||||
For Each oRow As DataRow In oSearchesDataTable.Rows
|
|
||||||
Dim oProfileId As Integer = oRow.Item("PROFILE_ID")
|
|
||||||
Dim oTabTitle As String = oRow.Item("TAB_TITLE")
|
|
||||||
Dim oConnectionId As Integer = oRow.Item("CONN_ID")
|
|
||||||
|
|
||||||
oSQL = oRow.Item("SQL_COMMAND")
|
|
||||||
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
|
|
||||||
oSQL = oPatterns.ReplaceInternalValues(oSQL)
|
|
||||||
|
|
||||||
Dim oDatatable As DataTable = _Database.GetDatatable(oSQL, oConnectionId)
|
|
||||||
oDocSearches.Add(New Search() With {
|
|
||||||
.DataTable = oDatatable,
|
|
||||||
.ProfileId = oProfileId,
|
|
||||||
.TabCaption = oTabTitle,
|
|
||||||
.TabIndex = oCounter,
|
|
||||||
.SQLCommand = oSQL
|
|
||||||
})
|
|
||||||
|
|
||||||
oCounter += 1
|
|
||||||
Next
|
|
||||||
|
|
||||||
Return oDocSearches
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Async Function LoadDataSearchesAsync() As Task(Of List(Of Search))
|
|
||||||
Return Await Task.Run(AddressOf DoLoadDataSearches)
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function DoLoadDataSearches() As List(Of Search)
|
|
||||||
Dim oMatchingIds = String.Join(",", _MatchingProfiles.Select(Function(p) p.Guid).ToArray())
|
|
||||||
Dim oSQL As String = $"SELECT * FROM TBCW_PROF_DATA_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({oMatchingIds}) ORDER BY TAB_INDEX"
|
|
||||||
Dim oSearchesDataTable = _Database.GetDatatable(oSQL)
|
|
||||||
Dim oDataSearches As New List(Of Search)
|
|
||||||
Dim oCounter As Integer = 0
|
|
||||||
Dim oPatterns As New Patterns.ClassPatterns(_LogConfig)
|
|
||||||
|
|
||||||
_DocumentSearches = oSearchesDataTable
|
|
||||||
|
|
||||||
For Each oRow As DataRow In oSearchesDataTable.Rows
|
|
||||||
Dim oProfileId As Integer = oRow.Item("PROFILE_ID")
|
|
||||||
Dim oTabTitle As String = oRow.Item("TAB_TITLE")
|
|
||||||
Dim oConnectionId As Integer = oRow.Item("CONN_ID")
|
|
||||||
|
|
||||||
oSQL = oRow.Item("SQL_COMMAND")
|
|
||||||
oSQL = oPatterns.ReplaceUserValues(oSQL, _Environment.User)
|
|
||||||
oSQL = oPatterns.ReplaceInternalValues(oSQL)
|
|
||||||
|
|
||||||
Dim oDatatable As DataTable = _Database.GetDatatable(oSQL, oConnectionId)
|
|
||||||
oDataSearches.Add(New Search() With {
|
|
||||||
.DataTable = oDatatable,
|
|
||||||
.ProfileId = oProfileId,
|
|
||||||
.TabCaption = oTabTitle,
|
|
||||||
.TabIndex = oCounter,
|
|
||||||
.SQLCommand = oSQL
|
|
||||||
})
|
|
||||||
|
|
||||||
oCounter += 1
|
|
||||||
Next
|
|
||||||
|
|
||||||
Return oDataSearches
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Sub RefreshTabDoc(ProfileId As Integer, Datatable As DataTable, TabIndex As Integer, TabCaption As String)
|
|
||||||
Try
|
|
||||||
Dim oSelectedGridControl As GridControl = GridControl1
|
|
||||||
Dim oSelectedGridView As GridView = GridView1
|
|
||||||
|
|
||||||
Select Case TabIndex
|
|
||||||
Case 0
|
|
||||||
GridControl1.DataSource = Nothing
|
|
||||||
GridView1.Columns.Clear()
|
|
||||||
oSelectedGridView = GridView1
|
|
||||||
oSelectedGridControl = GridControl1
|
|
||||||
Case 1
|
|
||||||
GridControl2.DataSource = Nothing
|
|
||||||
GridView2.Columns.Clear()
|
|
||||||
oSelectedGridView = GridView2
|
|
||||||
oSelectedGridControl = GridControl2
|
|
||||||
Case 2
|
|
||||||
GridControl3.DataSource = Nothing
|
|
||||||
GridView3.Columns.Clear()
|
|
||||||
oSelectedGridView = GridView3
|
|
||||||
oSelectedGridControl = GridControl3
|
|
||||||
Case 3
|
|
||||||
GridControl4.DataSource = Nothing
|
|
||||||
GridView4.Columns.Clear()
|
|
||||||
oSelectedGridControl = GridControl4
|
|
||||||
oSelectedGridView = GridView4
|
|
||||||
Case 4
|
|
||||||
GridControl5.DataSource = Nothing
|
|
||||||
GridView5.Columns.Clear()
|
|
||||||
oSelectedGridControl = GridControl5
|
|
||||||
oSelectedGridView = GridView5
|
|
||||||
End Select
|
|
||||||
|
|
||||||
'oSelectedGridControl.ContextMenuStrip = ContextMenuStripWMFile
|
|
||||||
|
|
||||||
If Not IsNothing(Datatable) Then
|
|
||||||
XtraTabControl.TabPages(TabIndex).Text = $"{TabCaption} ({Datatable.Rows.Count})"
|
|
||||||
'clsWMDocGrid.DTDocuments = Datatable
|
|
||||||
|
|
||||||
If _ResultType = ResultType.Document Then
|
|
||||||
CreateDocumentGrid(oSelectedGridView, Datatable)
|
|
||||||
Else
|
|
||||||
CreateDataGrid(oSelectedGridView, Datatable)
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Dim oxmlPath As String = Get_DocGrid_Layout_Filename(XtraTabControlDocs.SelectedTabPageIndex)
|
|
||||||
'If File.Exists(oxmlPath) Then
|
|
||||||
' oSelectedGridView.RestoreLayoutFromXml(oxmlPath)
|
|
||||||
' oSelectedGridView.GuessAutoFilterRowValuesFromFilter()
|
|
||||||
'End If
|
|
||||||
LabelStatus.Caption = $"Tab [{TabCaption}] refreshed - {Now}"
|
|
||||||
XtraTabControl.TabPages(TabIndex).PageVisible = True
|
|
||||||
Else
|
|
||||||
'clsWMDocGrid.DTDocuments = Nothing
|
|
||||||
End If
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Error(ex)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CreateDataGrid(GridView As GridView, Datatable As DataTable)
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CreateDocumentGrid(MyGridView As GridView, _datatable As DataTable)
|
|
||||||
Dim oMyDocDatatable As New DataTable
|
|
||||||
Try
|
|
||||||
'Die Icon Colum erstellen und konfigurieren
|
|
||||||
Dim oColIcon As New DataColumn() With {
|
|
||||||
.DataType = GetType(Image),
|
|
||||||
.ColumnName = "ICON",
|
|
||||||
.Caption = ""
|
|
||||||
}
|
|
||||||
oMyDocDatatable.Columns.Add(oColIcon)
|
|
||||||
|
|
||||||
Dim oColPath As New DataColumn() With {
|
|
||||||
.DataType = GetType(String),
|
|
||||||
.ColumnName = "FULL_FILENAME",
|
|
||||||
.Caption = "Fullpath"
|
|
||||||
}
|
|
||||||
oMyDocDatatable.Columns.Add(oColPath)
|
|
||||||
|
|
||||||
Dim oColDocID As New DataColumn() With {
|
|
||||||
.DataType = GetType(Int32),
|
|
||||||
.ColumnName = "DocID",
|
|
||||||
.Caption = "DocID"
|
|
||||||
}
|
|
||||||
oMyDocDatatable.Columns.Add(oColDocID)
|
|
||||||
|
|
||||||
Dim oRestColArray As New List(Of String)
|
|
||||||
For Each oCol As DataColumn In _datatable.Columns
|
|
||||||
Dim onewColumn As New DataColumn()
|
|
||||||
If oCol.ColumnName <> "DocID" And oCol.ColumnName <> "FULL_FILENAME" And oCol.ColumnName <> "Filename" Then
|
|
||||||
onewColumn.DataType = GetType(String)
|
|
||||||
onewColumn.ColumnName = oCol.ColumnName
|
|
||||||
onewColumn.Caption = oCol.Caption
|
|
||||||
oMyDocDatatable.Columns.Add(onewColumn)
|
|
||||||
oRestColArray.Add(onewColumn.ColumnName)
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
For Each FILE_ROW As DataRow In _datatable.Rows
|
|
||||||
Dim oFullpath = FILE_ROW.Item("FULL_FILENAME")
|
|
||||||
Dim oDocID = FILE_ROW.Item("DocID")
|
|
||||||
'Dim Folderpath = Path.GetDirectoryName(fullpath)
|
|
||||||
Dim oFilename = IO.Path.GetFileName(oFullpath)
|
|
||||||
Dim oFileextension = IO.Path.GetExtension(oFullpath)
|
|
||||||
Dim oNewRow As DataRow
|
|
||||||
oNewRow = oMyDocDatatable.NewRow()
|
|
||||||
'Icon zuweisen
|
|
||||||
Select Case oFileextension.ToUpper
|
|
||||||
Case ".csv".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.xls
|
|
||||||
Case ".txt".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.txt
|
|
||||||
Case ".pdf".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.pdf
|
|
||||||
Case ".doc".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.doc
|
|
||||||
Case ".docx".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.doc
|
|
||||||
Case ".xls".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.xls
|
|
||||||
Case ".xlsx".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.xls
|
|
||||||
Case ".xlsm".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.xls
|
|
||||||
Case ".ppt".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.ppt
|
|
||||||
Case ".pptx".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.ppt
|
|
||||||
Case ".dwg".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.dwg
|
|
||||||
Case ".dxf".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.dxf
|
|
||||||
Case ".msg".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources._page
|
|
||||||
Case ".msg".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources._page
|
|
||||||
Case ".tif".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.tiff
|
|
||||||
Case ".tiff".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.tiff
|
|
||||||
Case ".jpg".ToUpper
|
|
||||||
oNewRow.Item(0) = My.Resources.jpg
|
|
||||||
Case Else
|
|
||||||
oNewRow.Item(0) = My.Resources._blank
|
|
||||||
End Select
|
|
||||||
'Den Filepath mitgeben
|
|
||||||
oNewRow.Item(1) = oFullpath
|
|
||||||
oNewRow.Item(2) = oDocID
|
|
||||||
|
|
||||||
Dim i = 3 'Fängt bei 3 an, um die definierten Spalten zu überspringen
|
|
||||||
For Each Colname As String In oRestColArray
|
|
||||||
Dim oRowValue
|
|
||||||
oRowValue = FILE_ROW.Item(Colname)
|
|
||||||
oNewRow.Item(i) = oRowValue.ToString
|
|
||||||
i += 1
|
|
||||||
Next
|
|
||||||
oMyDocDatatable.Rows.Add(oNewRow)
|
|
||||||
Next
|
|
||||||
|
|
||||||
Dim oGridControl As GridControl = MyGridView.GridControl
|
|
||||||
oGridControl.DataSource = oMyDocDatatable
|
|
||||||
oGridControl.ForceInitialize()
|
|
||||||
Try
|
|
||||||
MyGridView.Columns.Item("DocID").Visible = False
|
|
||||||
Catch ex As Exception
|
|
||||||
End Try
|
|
||||||
Try
|
|
||||||
MyGridView.Columns.Item("FULL_FILENAME").Visible = False
|
|
||||||
Catch ex As Exception
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Dim created, changed As String
|
|
||||||
If _Environment.User.Language <> "de-DE" Then
|
|
||||||
changed = "Changed"
|
|
||||||
created = "Created"
|
|
||||||
Else
|
|
||||||
changed = "Geändert"
|
|
||||||
created = "Erstellt"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim createdColumn = MyGridView.Columns(created)
|
|
||||||
If Not IsNothing(createdColumn) Then
|
|
||||||
createdColumn.DisplayFormat.FormatType = FormatType.DateTime
|
|
||||||
createdColumn.DisplayFormat.FormatString = _Environment.User.DateFormat & " HH:MM:ss"
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim changedColumn = MyGridView.Columns(changed)
|
|
||||||
If Not IsNothing(changedColumn) Then
|
|
||||||
changedColumn.DisplayFormat.FormatType = FormatType.DateTime
|
|
||||||
changedColumn.DisplayFormat.FormatString = _Environment.User.DateFormat & " HH:MM:ss"
|
|
||||||
End If
|
|
||||||
' Alle Spalten aus ReadOnly setzen, danach werden alle passenden auf nicht ReadOnly gesetzt
|
|
||||||
For Each column As GridColumn In MyGridView.Columns
|
|
||||||
column.OptionsColumn.AllowEdit = False
|
|
||||||
Next
|
|
||||||
MyGridView.Columns.Item("ICON").MaxWidth = 24
|
|
||||||
MyGridView.Columns.Item("ICON").MinWidth = 24
|
|
||||||
MyGridView.OptionsView.BestFitMaxRowCount = -1
|
|
||||||
MyGridView.BestFitColumns(True)
|
|
||||||
Catch ex As Exception
|
|
||||||
_Logger.Error(ex)
|
|
||||||
End Try
|
|
||||||
End Sub
|
|
||||||
End Class
|
|
||||||
@ -1,60 +0,0 @@
|
|||||||
Imports System.Reflection
|
|
||||||
Imports DigitalData.Modules.Logging
|
|
||||||
|
|
||||||
Public Class ClassErrorHandler
|
|
||||||
Private _Logger As Logger
|
|
||||||
|
|
||||||
Private Const UNKNOWN_METHOD = "Unknown Method"
|
|
||||||
Private Const UNKNOWN_FORM = "Unknown Form"
|
|
||||||
|
|
||||||
Public Sub New(Logger As Logger)
|
|
||||||
_Logger = Logger
|
|
||||||
End Sub
|
|
||||||
Public Sub ShowErrorMessage(Exception As Exception)
|
|
||||||
_Logger.Error(Exception)
|
|
||||||
MsgBox(GetMessage(Exception), MsgBoxStyle.Critical, "Unexpected Error")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Function GetMessage(Exception As Exception) As String
|
|
||||||
Dim oTargetSite = Exception.TargetSite
|
|
||||||
Dim oMethodName = GetMethodName(Exception)
|
|
||||||
Dim oFormName = GetFormName(Exception)
|
|
||||||
Dim oMessage As String = String.Empty
|
|
||||||
|
|
||||||
oMessage &= $"Form: {oFormName}{vbNewLine}"
|
|
||||||
oMessage &= $"Method: {oMethodName}{vbNewLine}"
|
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(Exception.StackTrace) Then
|
|
||||||
oMessage &= $"Message: {Exception.Message}{vbNewLine}{vbNewLine}"
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not String.IsNullOrEmpty(Exception.StackTrace) Then
|
|
||||||
oMessage &= $"Stacktrace: {Exception.StackTrace}{vbNewLine}"
|
|
||||||
End If
|
|
||||||
|
|
||||||
oMessage &= $"{vbNewLine}"
|
|
||||||
oMessage &= $"Please report this error to error@digitaldata.works"
|
|
||||||
|
|
||||||
Return oMessage
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function GetMethodName(Exception As Exception) As String
|
|
||||||
Dim oMethodName = Exception.TargetSite?.ReflectedType?.Name
|
|
||||||
|
|
||||||
If oMethodName Is Nothing Then
|
|
||||||
Return UNKNOWN_METHOD
|
|
||||||
Else
|
|
||||||
Return oMethodName
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Private Function GetFormName(Exception As Exception) As String
|
|
||||||
Dim oFormName = Exception.TargetSite?.ReflectedType?.ReflectedType?.Name
|
|
||||||
|
|
||||||
If oFormName Is Nothing Then
|
|
||||||
Return UNKNOWN_FORM
|
|
||||||
Else
|
|
||||||
Return oFormName
|
|
||||||
End If
|
|
||||||
End Function
|
|
||||||
End Class
|
|
||||||
@ -97,7 +97,6 @@
|
|||||||
<Compile Include="Config\ClassConfig.vb" />
|
<Compile Include="Config\ClassConfig.vb" />
|
||||||
<Compile Include="ClassConstants.vb" />
|
<Compile Include="ClassConstants.vb" />
|
||||||
<Compile Include="ClassEnvironment.vb" />
|
<Compile Include="ClassEnvironment.vb" />
|
||||||
<Compile Include="ClassErrorHandler.vb" />
|
|
||||||
<Compile Include="ClassFlowForm.vb" />
|
<Compile Include="ClassFlowForm.vb" />
|
||||||
<Compile Include="ClassInitLoader.vb" />
|
<Compile Include="ClassInitLoader.vb" />
|
||||||
<Compile Include="Config\ClassUIConfig.vb" />
|
<Compile Include="Config\ClassUIConfig.vb" />
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user