ms suchen

This commit is contained in:
2022-05-18 11:42:01 +02:00
parent 63736e83d3
commit 36e645ed84
4 changed files with 1005 additions and 1478 deletions

View File

@@ -407,6 +407,7 @@ Public Class frmValidatorSearch
Return MyGridView
Catch ex As Exception
LOGGER.Error(ex)
Return Nothing
End Try
End Function
Private Sub frmValidatorSearch_FormClosing(sender As Object, e As FormClosingEventArgs) Handles Me.FormClosing
@@ -503,38 +504,48 @@ Public Class frmValidatorSearch
Next
End Sub
Sub Refresh_DocID(myGrid As GridView)
clsWMDocGrid.ActiveDocGrid = myGrid
clsWMDocGrid.ActiveDocGrid.EndSelection()
clsWMDocGrid.GetDocItems()
If ToolStripDropDownButtonFile.Visible = False Then
ToolStripDropDownButtonFile.Visible = True
End If
If clsWMDocGrid.SELECTED_DOC_ID <> 0 Then
Dim msg = "DocID: " & clsWMDocGrid.SELECTED_DOC_ID.ToString
tslblDocID.Text = msg
ToolStripDropDownButtonFile.Enabled = True
Dim oDocument As DocumentResultList.Document = Nothing
' Load DocumentInfo
oDocument = Documentloader.Load(clsWMDocGrid.SELECTED_DOC_ID, clsWMDocGrid.SELECTED_DOC_PATH)
Try
clsWMDocGrid.ActiveDocGrid = myGrid
clsWMDocGrid.ActiveDocGrid.EndSelection()
clsWMDocGrid.GetDocItems()
If ToolStripDropDownButtonFile.Visible = False Then
ToolStripDropDownButtonFile.Visible = True
End If
If clsWMDocGrid.SELECTED_DOC_ID <> 0 Then
Dim msg = "DocID: " & clsWMDocGrid.SELECTED_DOC_ID.ToString
tslblDocID.Text = msg
ToolStripDropDownButtonFile.Enabled = True
Dim oDocument As DocumentResultList.Document = Nothing
' Load DocumentInfo
oDocument = Documentloader.Load(clsWMDocGrid.SELECTED_DOC_ID, clsWMDocGrid.SELECTED_DOC_PATH)
If Not IsNothing(DocumentViewer1) Then
' DocumentViewer1.LoadFile(clsWMDocGrid.SELECTED_DOC_PATH)
Dim oFileName = $"{clsWMDocGrid.SELECTED_DOC_ID}.{oDocument.Extension}"
If Not IsNothing(oDocument.Contents) Then
DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocument.Contents))
DocumentViewer1.RightViewOnly(USER_RIGHT_VIEW_ONLY)
If USER_RIGHT_VIEW_ONLY = True Then
ToolStripDropDownButtonFile.Visible = False
Else
ToolStripDropDownButtonFile.Visible = True
End If
Else
statlbl.Text = "odocument.content is nothing, Check Your log"
End If
If Not IsNothing(DocumentViewer1) Then
' DocumentViewer1.LoadFile(clsWMDocGrid.SELECTED_DOC_PATH)
Dim oFileName = $"{clsWMDocGrid.SELECTED_DOC_ID}.{oDocument.Extension}"
DocumentViewer1.LoadFile(oFileName, New MemoryStream(oDocument.Contents))
DocumentViewer1.RightViewOnly(USER_RIGHT_VIEW_ONLY)
If USER_RIGHT_VIEW_ONLY = True Then
ToolStripDropDownButtonFile.Visible = False
Else
ToolStripDropDownButtonFile.Visible = True
End If
Else
tslblDocID.Text = "DocRow not selected"
ToolStripDropDownButtonFile.Enabled = False
End If
Catch ex As Exception
LOGGER.Error(ex)
End Try
Else
tslblDocID.Text = "DocRow not selected"
ToolStripDropDownButtonFile.Enabled = False
End If
End Sub
Private Sub GridViewDocSearch1_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles GridViewDocSearch1.FocusedRowChanged
Refresh_DocID(GridViewDocSearch1)