Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/Monorepo
This commit is contained in:
commit
c2b81af556
@ -32,6 +32,7 @@ Namespace DocumentResultList
|
|||||||
Public Property TempPath As String = Nothing
|
Public Property TempPath As String = Nothing
|
||||||
Public Property FileHash As String = Nothing
|
Public Property FileHash As String = Nothing
|
||||||
Public Property DocumentType As String = Nothing
|
Public Property DocumentType As String = Nothing
|
||||||
|
Public Property DisplayFileName As String = Nothing
|
||||||
|
|
||||||
Public Sub New(pPrimaryKey As Long)
|
Public Sub New(pPrimaryKey As Long)
|
||||||
Id = pPrimaryKey
|
Id = pPrimaryKey
|
||||||
|
|||||||
@ -56,15 +56,17 @@ Namespace DocumentResultList
|
|||||||
Dim oDocumentInfo As DocumentInfo = Client.GetDocumentInfo(User.UserId, pObjectId)
|
Dim oDocumentInfo As DocumentInfo = Client.GetDocumentInfo(User.UserId, pObjectId)
|
||||||
Dim oFileInfo As New FileInfo(oDocumentInfo.FullPath)
|
Dim oFileInfo As New FileInfo(oDocumentInfo.FullPath)
|
||||||
|
|
||||||
' Load Doctype Attribute
|
' Load System Attributes
|
||||||
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
|
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
|
||||||
|
Dim oDisplayFileName As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DISPLAY_FILENAME)
|
||||||
|
|
||||||
Dim oResultDocumentInfo As New Document(pObjectId) With {
|
Dim oResultDocumentInfo As New Document(pObjectId) With {
|
||||||
.Contents = Load_FromDisk(oDocumentInfo.FullPath),
|
.Contents = Load_FromDisk(oDocumentInfo.FullPath),
|
||||||
.AccessRight = oDocumentInfo.AccessRight,
|
.AccessRight = oDocumentInfo.AccessRight,
|
||||||
.FullPath = oDocumentInfo.FullPath,
|
.FullPath = oDocumentInfo.FullPath,
|
||||||
.Extension = oFileInfo.Extension.Substring(1),
|
.Extension = oFileInfo.Extension.Substring(1),
|
||||||
.DocumentType = oDoctype.Value
|
.DocumentType = oDoctype.Value,
|
||||||
|
.DisplayFileName = oDisplayFileName.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
Return oResultDocumentInfo
|
Return oResultDocumentInfo
|
||||||
@ -81,8 +83,9 @@ Namespace DocumentResultList
|
|||||||
Return Nothing
|
Return Nothing
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Load Doctype Attribute
|
' Load System Attributes
|
||||||
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
|
Dim oDoctype As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DOCTYPE)
|
||||||
|
Dim oDisplayFileName As VariableValue = Client.GetVariableValue(pObjectId, Attributes.ATTRIBUTE_DISPLAY_FILENAME)
|
||||||
|
|
||||||
Dim oResultDocumentInfo As New Document(pObjectId) With {
|
Dim oResultDocumentInfo As New Document(pObjectId) With {
|
||||||
.Contents = oFileObject._FileContents,
|
.Contents = oFileObject._FileContents,
|
||||||
@ -90,7 +93,8 @@ Namespace DocumentResultList
|
|||||||
.AccessRight = Rights.AccessRight.FULL,
|
.AccessRight = Rights.AccessRight.FULL,
|
||||||
.FileHash = oFileObject._FileHash,
|
.FileHash = oFileObject._FileHash,
|
||||||
.FullPath = Nothing,
|
.FullPath = Nothing,
|
||||||
.DocumentType = oDoctype.Value
|
.DocumentType = oDoctype.Value,
|
||||||
|
.DisplayFileName = oDisplayFileName.Value
|
||||||
}
|
}
|
||||||
|
|
||||||
Return oResultDocumentInfo
|
Return oResultDocumentInfo
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
|
||||||
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraEditors.ProgressBarControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.Repository.RepositoryItemTextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
DevExpress.XtraLayout.LayoutControl, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.Repository.RepositoryItemComboBox, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraEditors.TextEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
DevExpress.XtraBars.Ribbon.RibbonControl, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a
|
||||||
|
|||||||
@ -71,7 +71,7 @@ Public Class frmObjectPropertyDialog
|
|||||||
|
|
||||||
Private Async Function GetAttributesForBusinessEntity(EntityId As Long) As Task(Of List(Of Attribute))
|
Private Async Function GetAttributesForBusinessEntity(EntityId As Long) As Task(Of List(Of Attribute))
|
||||||
Try
|
Try
|
||||||
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE BE_ID = {EntityId}"
|
Dim oSQL = $"SELECT * FROM VWIDB_BE_ATTRIBUTE WHERE BE_ID = {EntityId} AND LANG_CODE = '{_Environment.User.Language}'"
|
||||||
Dim oResult = Await _Client.GetDatatableFromIDBAsync(oSQL)
|
Dim oResult = Await _Client.GetDatatableFromIDBAsync(oSQL)
|
||||||
|
|
||||||
If oResult.OK = False Then
|
If oResult.OK = False Then
|
||||||
|
|||||||
8
GUIs.Common/frmDocumentResultList.Designer.vb
generated
8
GUIs.Common/frmDocumentResultList.Designer.vb
generated
@ -113,7 +113,7 @@ Partial Class frmDocumentResultList
|
|||||||
'
|
'
|
||||||
Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerControl2)
|
Me.SplitContainerControl1.Panel2.Controls.Add(Me.SplitContainerControl2)
|
||||||
resources.ApplyResources(Me.SplitContainerControl1.Panel2, "SplitContainerControl1.Panel2")
|
resources.ApplyResources(Me.SplitContainerControl1.Panel2, "SplitContainerControl1.Panel2")
|
||||||
Me.SplitContainerControl1.SplitterPosition = 382
|
Me.SplitContainerControl1.SplitterPosition = 389
|
||||||
'
|
'
|
||||||
'GridControl1
|
'GridControl1
|
||||||
'
|
'
|
||||||
@ -296,12 +296,12 @@ Partial Class frmDocumentResultList
|
|||||||
Me.MenuItemPropertiesZooFlow.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.editcolors
|
Me.MenuItemPropertiesZooFlow.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.editcolors
|
||||||
Me.MenuItemPropertiesZooFlow.Name = "MenuItemPropertiesZooFlow"
|
Me.MenuItemPropertiesZooFlow.Name = "MenuItemPropertiesZooFlow"
|
||||||
'
|
'
|
||||||
'BarButtonItem1
|
'ButtonRefresh
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.ButtonRefresh, "BarButtonItem1")
|
resources.ApplyResources(Me.ButtonRefresh, "ButtonRefresh")
|
||||||
Me.ButtonRefresh.Id = 29
|
Me.ButtonRefresh.Id = 29
|
||||||
Me.ButtonRefresh.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.refreshallpivottable
|
Me.ButtonRefresh.ImageOptions.SvgImage = Global.DigitalData.GUIs.Common.My.Resources.Resources.refreshallpivottable
|
||||||
Me.ButtonRefresh.Name = "BarButtonItem1"
|
Me.ButtonRefresh.Name = "ButtonRefresh"
|
||||||
'
|
'
|
||||||
'RibbonPage1
|
'RibbonPage1
|
||||||
'
|
'
|
||||||
|
|||||||
@ -426,7 +426,7 @@
|
|||||||
<data name="MenuItemPropertiesZooFlow.Caption" xml:space="preserve">
|
<data name="MenuItemPropertiesZooFlow.Caption" xml:space="preserve">
|
||||||
<value>Eigenschaften</value>
|
<value>Eigenschaften</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BarButtonItem1.Caption" xml:space="preserve">
|
<data name="ButtonRefresh.Caption" xml:space="preserve">
|
||||||
<value>Ergebnisse aktualisieren</value>
|
<value>Ergebnisse aktualisieren</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
@ -455,10 +455,10 @@
|
|||||||
<value>1189, 132</value>
|
<value>1189, 132</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RibbonStatusBar.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="RibbonStatusBar.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 647</value>
|
<value>0, 649</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RibbonStatusBar.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="RibbonStatusBar.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1189, 24</value>
|
<value>1189, 22</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>RibbonStatusBar.Name" xml:space="preserve">
|
<data name=">>RibbonStatusBar.Name" xml:space="preserve">
|
||||||
<value>RibbonStatusBar</value>
|
<value>RibbonStatusBar</value>
|
||||||
@ -485,7 +485,7 @@
|
|||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>382, 511</value>
|
<value>389, 513</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridControl1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -539,7 +539,7 @@
|
|||||||
<value>GridBand2</value>
|
<value>GridBand2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>370, 223</value>
|
<value>363, 223</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridControl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -587,7 +587,7 @@
|
|||||||
<value>GridBand3</value>
|
<value>GridBand3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControl3.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridControl3.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>370, 278</value>
|
<value>363, 280</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControl3.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridControl3.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -620,7 +620,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>370, 511</value>
|
<value>363, 513</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -656,7 +656,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>762, 511</value>
|
<value>762, 513</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
@ -704,7 +704,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>413, 511</value>
|
<value>413, 513</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
|
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@ -737,7 +737,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl3.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="SplitContainerControl3.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1189, 515</value>
|
<value>1189, 517</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl3.TabIndex" type="System.Int32, mscorlib">
|
<data name="SplitContainerControl3.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>5</value>
|
<value>5</value>
|
||||||
@ -978,10 +978,10 @@
|
|||||||
<data name=">>MenuItemPropertiesZooFlow.Type" xml:space="preserve">
|
<data name=">>MenuItemPropertiesZooFlow.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarButtonItem1.Name" xml:space="preserve">
|
<data name=">>ButtonRefresh.Name" xml:space="preserve">
|
||||||
<value>BarButtonItem1</value>
|
<value>ButtonRefresh</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarButtonItem1.Type" xml:space="preserve">
|
<data name=">>ButtonRefresh.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
||||||
|
|||||||
@ -77,7 +77,8 @@ Public Class frmDocumentResultList
|
|||||||
Public Event NeedsRefresh As EventHandler(Of Integer) Implements IResultForm.NeedsRefresh
|
Public Event NeedsRefresh As EventHandler(Of Integer) Implements IResultForm.NeedsRefresh
|
||||||
Public Event ResultsRefreshed As EventHandler(Of List(Of DocumentResultList.DocumentResult))
|
Public Event ResultsRefreshed As EventHandler(Of List(Of DocumentResultList.DocumentResult))
|
||||||
|
|
||||||
Public Delegate Sub SetDatasourceCallback(pDatatable As DataTable)
|
Private Delegate Sub DatasourceDelegate(View As GridView, Datasource As Object)
|
||||||
|
Private Delegate Function RefreshResultsDelegate(Results As IEnumerable(Of BaseResult)) As Boolean
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pParams As DocumentResultList.Params)
|
Public Sub New(pLogConfig As LogConfig, pEnvironment As Environment, pParams As DocumentResultList.Params)
|
||||||
' Dieser Aufruf ist für den Designer erforderlich.
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
@ -315,6 +316,7 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task
|
Private Async Function Watcher_UpdateFile(pFile As DocumentResultList.Watcher.OpenFile, pCreateNewVersion As Boolean) As Task
|
||||||
Dim oFileInfo As New FileInfo(pFile.FilePath)
|
Dim oFileInfo As New FileInfo(pFile.FilePath)
|
||||||
|
Dim oDisplayName As String = pFile.Document.DisplayFileName
|
||||||
Dim oObjectId = Await _IDBClient.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
Dim oObjectId = Await _IDBClient.UpdateFileAsync(pFile.Document.Id, pFile.FilePath, New Options.UpdateFileOptions With {
|
||||||
.CreateNewFileVersion = pCreateNewVersion,
|
.CreateNewFileVersion = pCreateNewVersion,
|
||||||
.Language = Environment.User.Language,
|
.Language = Environment.User.Language,
|
||||||
@ -322,16 +324,17 @@ Public Class frmDocumentResultList
|
|||||||
})
|
})
|
||||||
|
|
||||||
If IsNothing(oObjectId) Then
|
If IsNothing(oObjectId) Then
|
||||||
MsgBox($"Beim Speichern der Datei '{oFileInfo.Name}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
|
MsgBox($"Beim Speichern der Datei '{oDisplayName}' Fehler ist ein Fehler aufgetreten!", MsgBoxStyle.Critical, Text)
|
||||||
Else
|
Else
|
||||||
MsgBox($"Die Datei '{oFileInfo.Name}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
|
'MsgBox($"Die Datei '{oDisplayName}' wurde erfolgreich gespeichert!", MsgBoxStyle.Information, Text)
|
||||||
RaiseEvent NeedsRefresh(Me, Params.ProfileGuid)
|
RaiseEvent NeedsRefresh(Me, Params.ProfileGuid)
|
||||||
End If
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Async Function Watcher_Ask(pFile As DocumentResultList.Watcher.OpenFile) As Task
|
Private Async Function Watcher_Ask(pFile As DocumentResultList.Watcher.OpenFile) As Task
|
||||||
Dim oFileInfo = New FileInfo(pFile.FilePath)
|
Dim oFileInfo = New FileInfo(pFile.FilePath)
|
||||||
Dim oMessage = $"Die Datei '{oFileInfo.Name}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
|
Dim oDisplayName = pFile.Document.DisplayFileName
|
||||||
|
Dim oMessage = $"Die Datei '{oDisplayName}' wurde außerhalb des Systems verändert. Wollen Sie diese Änderung als neue Version in das System übernehmen oder überschreiben?"
|
||||||
|
|
||||||
Dim oMessageBox As New MsgBoxEx(oMessage, "Datei verändert", MessageBoxIcon.Question)
|
Dim oMessageBox As New MsgBoxEx(oMessage, "Datei verändert", MessageBoxIcon.Question)
|
||||||
oMessageBox.SetButtons("Überschreiben", "Neue Version", "Abbrechen")
|
oMessageBox.SetButtons("Überschreiben", "Neue Version", "Abbrechen")
|
||||||
@ -370,23 +373,32 @@ Public Class frmDocumentResultList
|
|||||||
|
|
||||||
|
|
||||||
Public Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean Implements IResultForm.RefreshResults
|
Public Function RefreshResults(pResults As IEnumerable(Of BaseResult)) As Boolean Implements IResultForm.RefreshResults
|
||||||
_IsLoading = True
|
' This is needed to update the grid from another form like frmMatch
|
||||||
Try
|
' Another form means another thread, so we need a delegate here
|
||||||
UpdateTotalResults()
|
If InvokeRequired Then
|
||||||
UpdateGridData()
|
Dim oDelegate As New RefreshResultsDelegate(AddressOf RefreshResults)
|
||||||
|
Return GridControl1.Invoke(oDelegate, pResults)
|
||||||
|
Else
|
||||||
|
_IsLoading = True
|
||||||
|
Try
|
||||||
|
_ResultLists = pResults
|
||||||
|
|
||||||
Return True
|
UpdateTotalResults()
|
||||||
Catch ex As Exception
|
UpdateGridData()
|
||||||
Logger.Error(ex)
|
|
||||||
|
|
||||||
MessageBox.Show("Error while loading results:" & vbNewLine & vbNewLine & ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
|
Return True
|
||||||
Return False
|
Catch ex As Exception
|
||||||
Finally
|
Logger.Error(ex)
|
||||||
_IsLoading = False
|
|
||||||
End Try
|
MessageBox.Show("Error while refreshing results:" & vbNewLine & vbNewLine & ex.Message, Text, MessageBoxButtons.OK, MessageBoxIcon.Error)
|
||||||
|
Return False
|
||||||
|
Finally
|
||||||
|
_IsLoading = False
|
||||||
|
End Try
|
||||||
|
End If
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub LoadGridData(Result As DocumentResultList.DocumentResult)
|
Private Sub LoadGridData(View As GridView, Result As DocumentResultList.DocumentResult)
|
||||||
If Result.Datatable.Columns.Contains(COLUMN_DOCID) = False Then
|
If Result.Datatable.Columns.Contains(COLUMN_DOCID) = False Then
|
||||||
Throw New ApplicationException($"Datatable is missing DocId Column [{COLUMN_DOCID}] for search {Result.Title}!")
|
Throw New ApplicationException($"Datatable is missing DocId Column [{COLUMN_DOCID}] for search {Result.Title}!")
|
||||||
End If
|
End If
|
||||||
@ -395,22 +407,26 @@ Public Class frmDocumentResultList
|
|||||||
Throw New ApplicationException($"Datatable is missing Filepath Column [{COLUMN_FILEPATH}] for search {Result.Title}!")
|
Throw New ApplicationException($"Datatable is missing Filepath Column [{COLUMN_FILEPATH}] for search {Result.Title}!")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' This is needed to update the grid from another form like frmMatch
|
SetGridDataSource(View, Result.Datatable)
|
||||||
' Another form means another thread, so we need a delegate here
|
|
||||||
If GridControl1.InvokeRequired Then
|
|
||||||
Dim oCallback As New SetDatasourceCallback(AddressOf SetGridDataSource)
|
|
||||||
Invoke(oCallback, Result.Datatable)
|
|
||||||
|
|
||||||
Else
|
|
||||||
SetGridDataSource(Result.Datatable)
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SetGridDataSource(pTable As DataTable)
|
|
||||||
GridControl1.DataSource = Nothing
|
Private Sub SetGridDataSource(pView As GridView, pTable As DataTable)
|
||||||
GridControl1.DataSource = pTable
|
Dim oSavedRowHandle As Integer = pView.FocusedRowHandle
|
||||||
|
pView.BeginDataUpdate()
|
||||||
|
|
||||||
|
Try
|
||||||
|
pView.FocusedRowHandle = GridControl.AutoFilterRowHandle
|
||||||
|
pView.GridControl.DataSource = Nothing
|
||||||
|
pView.GridControl.DataSource = pTable
|
||||||
|
pView.FocusedRowHandle = oSavedRowHandle
|
||||||
|
Finally
|
||||||
|
pView.EndDataUpdate()
|
||||||
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Private Sub UpdateGridData()
|
Private Sub UpdateGridData()
|
||||||
' Load Grids
|
' Load Grids
|
||||||
For oIndex = 0 To _ResultLists.Count - 1
|
For oIndex = 0 To _ResultLists.Count - 1
|
||||||
@ -418,7 +434,7 @@ Public Class frmDocumentResultList
|
|||||||
Case 0
|
Case 0
|
||||||
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(0)
|
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(0)
|
||||||
|
|
||||||
LoadGridData(oResult)
|
LoadGridData(GridView1, oResult)
|
||||||
CreateDocumentGrid(GridView1, oResult)
|
CreateDocumentGrid(GridView1, oResult)
|
||||||
RestoreLayout(GridView1)
|
RestoreLayout(GridView1)
|
||||||
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
||||||
@ -426,7 +442,7 @@ Public Class frmDocumentResultList
|
|||||||
Case 1
|
Case 1
|
||||||
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(1)
|
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(1)
|
||||||
|
|
||||||
LoadGridData(oResult)
|
LoadGridData(GridView2, oResult)
|
||||||
CreateDocumentGrid(GridView2, oResult)
|
CreateDocumentGrid(GridView2, oResult)
|
||||||
RestoreLayout(GridView2)
|
RestoreLayout(GridView2)
|
||||||
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
||||||
@ -434,7 +450,7 @@ Public Class frmDocumentResultList
|
|||||||
Case 2
|
Case 2
|
||||||
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(2)
|
Dim oResult As DocumentResultList.DocumentResult = _ResultLists.Item(2)
|
||||||
|
|
||||||
LoadGridData(oResult)
|
LoadGridData(GridView3, oResult)
|
||||||
CreateDocumentGrid(GridView3, oResult)
|
CreateDocumentGrid(GridView3, oResult)
|
||||||
RestoreLayout(GridView3)
|
RestoreLayout(GridView3)
|
||||||
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
UpdateGridHeader(_ResultLists, oIndex, oResult.Datatable.Rows.Count)
|
||||||
|
|||||||
@ -1,6 +1,15 @@
|
|||||||
Namespace IDB
|
Namespace IDB
|
||||||
Public Class Attributes
|
Public Class Attributes
|
||||||
Public Const ATTRIBUTE_DOCTYPE = "Doctype"
|
Public Const ATTRIBUTE_DOCTYPE = "Doctype"
|
||||||
|
Public Const ATTRIBUTE_DYNAMIC_FOLDER = "Dynamic Folder"
|
||||||
|
|
||||||
|
Public Const ATTRIBUTE_ORIGIN_FILENAME = "OriginFileName"
|
||||||
|
Public Const ATTRIBUTE_ORIGIN_CHANGED = "OriginChangedDatetime"
|
||||||
|
Public Const ATTRIBUTE_ORIGIN_CREATED = "OriginCreationDatetime"
|
||||||
|
|
||||||
|
Public Const ATTRIBUTE_DISPLAY_FILENAME = "DisplayFileName"
|
||||||
|
Public Const ATTRIBUTE_DISPLAY_FILENAME1 = "DisplayFileName1"
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
End Namespace
|
End Namespace
|
||||||
@ -242,6 +242,10 @@
|
|||||||
<None Include="packages.config" />
|
<None Include="packages.config" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\Modules.Base\Base\Base.vbproj">
|
||||||
|
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
||||||
|
<Name>Base</Name>
|
||||||
|
</ProjectReference>
|
||||||
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
<ProjectReference Include="..\Modules.Config\Config.vbproj">
|
||||||
<Project>{44982F9B-6116-44E2-85D0-F39650B1EF99}</Project>
|
<Project>{44982F9B-6116-44E2-85D0-F39650B1EF99}</Project>
|
||||||
<Name>Config</Name>
|
<Name>Config</Name>
|
||||||
|
|||||||
@ -6,6 +6,7 @@ Imports DigitalData.Modules.Language
|
|||||||
Imports DigitalData.Services.EDMIService.Methods.Database
|
Imports DigitalData.Services.EDMIService.Methods.Database
|
||||||
Imports DigitalData.Services.EDMIService.Methods.IDB
|
Imports DigitalData.Services.EDMIService.Methods.IDB
|
||||||
Imports DigitalData.Modules.ZooFlow.State
|
Imports DigitalData.Modules.ZooFlow.State
|
||||||
|
Imports DigitalData.Modules.Base.IDB
|
||||||
|
|
||||||
Namespace Methods.GlobalIndexer.ImportFile
|
Namespace Methods.GlobalIndexer.ImportFile
|
||||||
Public Class ImportFileMethod
|
Public Class ImportFileMethod
|
||||||
@ -86,9 +87,10 @@ Namespace Methods.GlobalIndexer.ImportFile
|
|||||||
Logger.Info("Collecting Attributes for ObjectId [{0}]", oResponse.ObjectId)
|
Logger.Info("Collecting Attributes for ObjectId [{0}]", oResponse.ObjectId)
|
||||||
|
|
||||||
Dim oFinalAttributes As New Dictionary(Of String, List(Of String)) From {
|
Dim oFinalAttributes As New Dictionary(Of String, List(Of String)) From {
|
||||||
{"DisplayFileName", New List(Of String) From {oDisplayFilename}},
|
{Attributes.ATTRIBUTE_DISPLAY_FILENAME, New List(Of String) From {oDisplayFilename}},
|
||||||
{"Dynamic Folder", New List(Of String) From {oDynamicFilePath}}
|
{Attributes.ATTRIBUTE_DYNAMIC_FOLDER, New List(Of String) From {oDynamicFilePath}}
|
||||||
}
|
}
|
||||||
|
|
||||||
oFinalAttributes = oFinalAttributes.
|
oFinalAttributes = oFinalAttributes.
|
||||||
Concat(Helpers.UserAttributesToDictionary(oUserAttributes)).
|
Concat(Helpers.UserAttributesToDictionary(oUserAttributes)).
|
||||||
Concat(Helpers.UserAttributesToDictionary(oAutoAttributes)).
|
Concat(Helpers.UserAttributesToDictionary(oAutoAttributes)).
|
||||||
|
|||||||
@ -1,4 +1,5 @@
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
|
Imports DigitalData.Modules.Base.IDB
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Database.MSSQLServer.TransactionMode
|
Imports DigitalData.Modules.Database.MSSQLServer.TransactionMode
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
@ -105,9 +106,9 @@ Namespace Methods.IDB.NewFile
|
|||||||
'---------------------------------------------------------------------------
|
'---------------------------------------------------------------------------
|
||||||
|
|
||||||
Dim oSystemAttributes As New Dictionary(Of String, Object) From {
|
Dim oSystemAttributes As New Dictionary(Of String, Object) From {
|
||||||
{"OriginFileName", pData.File.FileName},
|
{Attributes.ATTRIBUTE_ORIGIN_FILENAME, pData.File.FileName},
|
||||||
{"OriginCreationDatetime", pData.File.FileCreatedAt},
|
{Attributes.ATTRIBUTE_ORIGIN_CREATED, pData.File.FileCreatedAt},
|
||||||
{"OriginChangedDatetime", pData.File.FileChangedAt}
|
{Attributes.ATTRIBUTE_ORIGIN_CHANGED, pData.File.FileChangedAt}
|
||||||
}
|
}
|
||||||
|
|
||||||
For Each oAttribute As KeyValuePair(Of String, Object) In oSystemAttributes
|
For Each oAttribute As KeyValuePair(Of String, Object) In oSystemAttributes
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user