Email Indexing, Check Windream before profile select

This commit is contained in:
Jonathan Jenne
2021-06-25 16:53:47 +02:00
parent b5d8317d71
commit 04e5170312
7 changed files with 399 additions and 324 deletions

View File

@@ -1,4 +1,5 @@
Imports System.ComponentModel
Imports DevExpress.XtraEditors.Controls
Public Class frmIndexFileList
@@ -11,7 +12,6 @@ Public Class frmIndexFileList
CheckedListBoxControl1.DataSource = MyDataset1.TBGI_FILES_USER
CheckedListBoxControl1.DisplayMember = MyDataset1.TBGI_FILES_USER.Columns("FILENAME_ONLY").ColumnName
CheckedListBoxControl1.ValueMember = MyDataset1.TBGI_FILES_USER.Columns(0).ColumnName
End If
Catch ex As Exception
@@ -22,21 +22,24 @@ Public Class frmIndexFileList
Private Sub btnstartIndex_Click(sender As Object, e As EventArgs) Handles btnstartIndex.Click
Try
For Each item In CheckedListBoxControl1.CheckedItems
Dim row As DataRowView = CType(item, DataRowView)
Dim _file = row.Item(1)
Dim handletype As String = row.Item("HANDLE_TYPE")
For index = 0 To CheckedListBoxControl1.ItemCount - 1
Dim oRow = MyDataset1.TBGI_FILES_USER.Item(index)
Dim oChecked = CheckedListBoxControl1.GetItemChecked(index)
If handletype = "|MSGONLY|" Or handletype = "|ATTMNTEXTRACTED|" Then
Try
IO.File.Delete(_file)
Catch ex As Exception
Dim oFilePath = oRow.Item(1)
Dim oHandletype As String = oRow.Item("HANDLE_TYPE")
End Try
If oChecked = False Then
If oHandletype = "|MSGONLY|" Or oHandletype = "|ATTMNTEXTRACTED|" Then
Try
IO.File.Delete(oFilePath)
Catch ex As Exception
LOGGER.Error(ex)
End Try
End If
ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE GUID = " & oRow.Item(0), True)
End If
'System.IO.File.Delete(filestring)
ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE GUID = " & row.Item(0), True)
Next
Catch ex As Exception
MsgBox("Unexpected Error in Clear Multiple Documents: " & ex.Message, MsgBoxStyle.Critical)
@@ -62,4 +65,10 @@ Public Class frmIndexFileList
ClassDatabase.Execute_non_Query("DELETE FROM TBGI_FILES_USER WHERE UPPER(USER@WORK) = UPPER('" & Environment.UserName & "')", True)
Close()
End Sub
Private Sub CheckedListBoxControl1_DrawItem(sender As Object, e As DevExpress.XtraEditors.ListBoxDrawItemEventArgs) Handles CheckedListBoxControl1.DrawItem
If e.State = DrawItemState.Checked Then
e.Appearance.BackColor = Color.LightGreen
End If
End Sub
End Class