DocCount und anderes

This commit is contained in:
Digital Data - Marlon Schreiber
2019-07-12 11:03:46 +02:00
parent feafd96cb6
commit 6d9f41ea09
20 changed files with 1315 additions and 66 deletions

View File

@@ -40,7 +40,8 @@ Public Class frmResultDoc
Private Shared CurrSearchID As Integer
Private DTDocSearchDefinition As DataTable
Private _frmDocView As frmDocView 'You need a reference to Form1
Private _frmProfileMatch As frmDocView 'You need a reference to Form1
Private _frmProfileMatch As frmProfileMatch 'You need a reference to Form1
Private _frmSQL As frmResultSQL 'You need a reference to Form1
Private _activeGridView As GridView
#End Region
Public Sub New()
@@ -49,6 +50,8 @@ Public Class frmResultDoc
InitializeComponent()
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
_frmDocView = frmDocView
_frmSQL = frmResultSQL
_frmProfileMatch = frmProfileMatch
End Sub
Sub RefreshTabDoc(PROFILE_ID As Integer, ConID As Integer, SQLCommand As String, TabIndex As Integer, TabCaption As String)
Try
@@ -402,12 +405,17 @@ Public Class frmResultDoc
End With
End If
Catch ex As Exception
Dim newDocView As New frmDocView
With newDocView
.Show()
.Load_File_from_Path(clsWMDocGrid.SELECTED_DOC_PATH)
End With
_frmDocView = newDocView
If My.Settings.LoadDocView = True Then
Dim newDocView As New frmDocView
With newDocView
.Show()
.Load_File_from_Path(clsWMDocGrid.SELECTED_DOC_PATH)
End With
_frmDocView = newDocView
ToolStripButtonDocView.Checked = True
Else
ToolStripButtonDocView.Checked = False
End If
End Try
Me.BringToFront()
Else
@@ -445,12 +453,12 @@ Public Class frmResultDoc
Load_Searches()
End Sub
Sub Load_Searches()
If Not IsNothing(CurrSearch2Load) Then
Dim oSQL = $"SELECT * FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({CurrSearch2Load}) ORDER BY TAB_INDEX"
If Not IsNothing(CurrDocSearch2Load) Then
Dim oSQL = $"SELECT * FROM TBCW_PROF_DOC_SEARCH WHERE ACTIVE = 1 AND PROFILE_ID in ({CurrDocSearch2Load}) ORDER BY TAB_INDEX"
DTDocSearchDefinition = clsDatabase.Return_Datatable(oSQL)
Dim oindex As Integer
Dim ocounter As Integer = 0
If CurrSearch2Load.ToString.Contains(",") Then
If CurrDocSearch2Load.ToString.Contains(",") Then
End If
For Each oRow As DataRow In DTDocSearchDefinition.Rows
@@ -475,15 +483,29 @@ Public Class frmResultDoc
Try
Dim frmCollection As New FormCollection()
frmCollection = Application.OpenForms()
If frmCollection.Item("frmDocView").IsHandleCreated Then
_frmDocView.Close()
End If
Try
If frmCollection.Item("frmDocView").IsHandleCreated Then
_frmDocView.Close()
End If
Catch ex As Exception
End Try
Try
If frmCollection.Item("frmResultSQL").IsHandleCreated Then
frmResultSQL.Close()
End If
Catch ex As Exception
End Try
If frmCollection.Item("frmProfileMatch").IsHandleCreated Then
frmProfileMatch.Show()
frmProfileMatch.BringToFront()
End If
Catch ex As Exception
_frmProfileMatch.Show()
_frmProfileMatch.BringToFront()
End Try
End Sub
@@ -614,4 +636,40 @@ Public Class frmResultDoc
MsgBox("Folder '" & oFilepath & "' not existing or accessible!", MsgBoxStyle.Exclamation)
End If
End Sub
Private Sub ToolStripButtonDocView_Click(sender As Object, e As EventArgs) Handles ToolStripButtonDocView.Click
If My.Settings.LoadDocView = False Then
Dim newDocView As New frmDocView
With newDocView
.Show()
.Load_File_from_Path(clsWMDocGrid.SELECTED_DOC_PATH)
End With
_frmDocView = newDocView
ToolStripButtonDocView.Checked = True
My.Settings.LoadDocView = True
Else
ToolStripButtonDocView.Checked = False
My.Settings.LoadDocView = False
Try
_frmDocView.Close()
Catch ex As Exception
End Try
End If
My.Settings.Save()
End Sub
Private Sub ToolStripButtonDocView_CheckedChanged(sender As Object, e As EventArgs) Handles ToolStripButtonDocView.CheckedChanged
If ToolStripButtonDocView.Checked Then
ToolStripButtonDocView.Text = "DocView (Active)"
Else
ToolStripButtonDocView.Text = "DocView (Inactive)"
End If
End Sub
Private Sub frmResultDoc_Shown(sender As Object, e As EventArgs) Handles Me.Shown
Me.BringToFront()
CurrSearchOpen = True
End Sub
End Class