ZooFlow: Switch to new database

This commit is contained in:
Jonathan Jenne
2021-06-15 14:28:57 +02:00
parent bb7153f6c1
commit 5e3c65e90c
22 changed files with 252 additions and 267 deletions

View File

@@ -41,6 +41,8 @@ Public Class frmGlobix_Index
Private _idbdata As ClassIDBData
Private _Patterns As GlobixPatterns
Private _Controls As DigitalData.GUIs.GlobalIndexer.ControlCreator
Private _FileEx As DigitalData.Modules.Filesystem.File
Public Class DocType
Public Property Guid
Public Property Name
@@ -69,11 +71,14 @@ Public Class frmGlobix_Index
clsPostProcessing = New GlobixPostprocessing(LogConfig)
_idbdata = New ClassIDBData(LogConfig)
_Patterns = New GlobixPatterns(LogConfig)
_FileEx = New Modules.Filesystem.File(LogConfig)
Localizer.Active = New LookupGridLocalizer()
End Sub
Private Sub frmGlobix_Index_Load(sender As Object, e As EventArgs) Handles MyBase.Load
Me.ColorizeInactiveIcon = False
' Abbruchzähler zurücksetzen
CancelAttempts = 0
@@ -174,16 +179,15 @@ Public Class frmGlobix_Index
My.Application.Globix.MULTIINDEXING_ACTIVE = False
If MULTIFILES > 0 Then
If My.Application.User.Language = "de-DE" Then
RibbonPageGroupMultiIndex.Text = "Alle nachfolgenden Dateien (" & MULTIFILES & ") identisch indexieren"
chkMultiindexing.Caption = "Alle nachfolgenden Dateien (" & MULTIFILES & ") identisch indexieren"
Else
RibbonPageGroupMultiIndex.Text = "All following files (" & MULTIFILES & ") will be indexed identically"
chkMultiindexing.Caption = "All following files (" & MULTIFILES & ") will be indexed identically"
End If
chkMultiindexing.Checked = False
chkMultiindexing.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
Else
chkMultiindexing.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
End If
@@ -223,19 +227,6 @@ Public Class frmGlobix_Index
End If
End Sub
Private Sub BarCheckItem5_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles PreviewItem.CheckedChanged
End Sub
Private Sub SourceDeleteItem_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SourceDeleteItem.CheckedChanged
End Sub
'Private Sub SaveProfileItem_CheckedChanged(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SaveProfileItem.CheckedChanged
' My.UIConfig.Globix.ProfilePreselection = SaveProfileItem.Checked
' My.SystemConfigManager.Save()
'End Sub
Private Sub SkipItem_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles SkipItem.ItemClick
My.Database.ExecuteNonQuery($"DELETE FROM TBGI_FILES_USER WHERE GUID = {My.Application.Globix.CURRENT_WORKFILE_GUID}")
CancelAttempts = 2
@@ -314,12 +305,7 @@ Public Class frmGlobix_Index
Dim oSql = String.Format("select * from VWGI_DOCTYPE where UPPER(USERNAME) = UPPER('{0}') ORDER BY SEQUENCE", My.Application.User.UserName)
Dim oFilter = $"USERNAME like '%{My.Application.User.UserName}%'"
DT_DOKART = _DataASorDB.GetDatatable("DD_ECM", oSql, "VWGI_DOCTYPE", oFilter, "SEQUENCE")
'cmbDoctype.DataSource = DT_DOKART
'cmbDoctype.ValueMember = DT_DOKART.Columns("DOCTYPE_ID").ColumnName
'cmbDoctype.DisplayMember = DT_DOKART.Columns("DOCTYPE").ColumnName
'cmbDoctype.AutoCompleteMode = AutoCompleteMode.Suggest
'cmbDoctype.AutoCompleteSource = AutoCompleteSource.ListItems
'cmbDoctype.SelectedIndex = -1
For Each oRow As DataRow In DT_DOKART.Rows
ComboBoxEdit1.Properties.Items.Add(New DocType With {
.Guid = oRow.Item("DOCTYPE_ID"),
@@ -871,7 +857,7 @@ Public Class frmGlobix_Index
Dim oDokart As DocType = ComboBoxEdit1.SelectedItem
My.Application.Globix.CURRENT_DOCTYPE_ID = oDokart.Guid
If CheckWrite_IndexeMan(ComboBoxEdit1.SelectedItem) = True Then
If CheckWrite_IndexeMan(oDokart.Guid) = True Then
'##### Manuelle Indexe indexiert #####
_Logger.Info("Datei [" & My.Application.Globix.CURRENT_WORKFILE & "] wird nun indexiert...")
If FillIndexe_Autom(oDokart.Guid) = True Then
@@ -1249,29 +1235,12 @@ Public Class frmGlobix_Index
End Function
Function Move_File(Quelle As String, _NewFilename As String, extension As String, _versionTz As String) As Boolean
'Überprüfen ob File existiert
If File.Exists(_NewFilename) = False Then
My.Application.Globix.CURRENT_NEWFILENAME = _NewFilename
Else
'Versionieren
Dim version As Integer = 1
Dim Stammname As String = _NewFilename
Dim neuername As String = _NewFilename
Do While File.Exists(neuername)
version = version + 1
neuername = Stammname.Replace(extension, "") & _versionTz & version & extension
My.Application.Globix.CURRENT_NEWFILENAME = neuername
Loop
End If
My.Application.Globix.CURRENT_NEWFILENAME = _FileEx.GetVersionedFilename(_NewFilename)
Dim opath = Path.GetDirectoryName(My.Application.Globix.CURRENT_NEWFILENAME)
If Directory.Exists(opath) = False Then
Directory.CreateDirectory(opath)
End If
''Die Datei wird nun verschoben
'If My.Application.Globix.CURR_DELETE_ORIGIN = True Then
' My.Computer.FileSystem.MoveFile(My.Application.Globix.CURRENT_WORKFILE, My.Application.Globix.CURRENT_NEWFILENAME)
'Else
' My.Computer.FileSystem.CopyFile(My.Application.Globix.CURRENT_WORKFILE, My.Application.Globix.CURRENT_NEWFILENAME)
'End If
'Die Datei wird nun an den neuen Ort kopiert
My.Computer.FileSystem.MoveFile(My.Application.Globix.CURRENT_WORKFILE, My.Application.Globix.CURRENT_NEWFILENAME)
@@ -2436,8 +2405,4 @@ Public Class frmGlobix_Index
Return userEmail
End Function
Private Sub PictureEdit1_EditValueChanged(sender As Object, e As EventArgs) Handles PictureEdit1.EditValueChanged
End Sub
End Class