diff --git a/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb b/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb index 47038f3..1abf6b4 100644 --- a/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb +++ b/app/DD-Record-Organizer/frmNodeNavigation.Designer.vb @@ -54,6 +54,7 @@ Partial Class frmNodeNavigation Me.SplitContainerTreeList = New DevExpress.XtraEditors.SplitContainerControl() Me.TreeListDevexpress = New DevExpress.XtraTreeList.TreeList() Me.ImageCollection1 = New DevExpress.Utils.ImageCollection(Me.components) + Me.SplitContainerDocumentSearch = New DevExpress.XtraEditors.SplitContainerControl() Me.pnlControls = New System.Windows.Forms.Panel() Me.GridControlDocSearch = New DevExpress.XtraGrid.GridControl() Me.GridViewDoc_Search = New DevExpress.XtraGrid.Views.Grid.GridView() @@ -85,7 +86,6 @@ Partial Class frmNodeNavigation Me.TimerClearResultfiles = New System.Windows.Forms.Timer(Me.components) Me.SplitContainerDocView = New DevExpress.XtraEditors.SplitContainerControl() Me.DocumentViewer = New DigitalData.Controls.DocumentViewer.DocumentViewer() - Me.SplitContainerDocumentSearch = New DevExpress.XtraEditors.SplitContainerControl() CType(Me.ribbonNodeNavigation, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerTreeList, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerTreeList.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() @@ -95,6 +95,12 @@ Partial Class frmNodeNavigation Me.SplitContainerTreeList.SuspendLayout() CType(Me.TreeListDevexpress, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ImageCollection1, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SplitContainerDocumentSearch, System.ComponentModel.ISupportInitialize).BeginInit() + CType(Me.SplitContainerDocumentSearch.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerDocumentSearch.Panel1.SuspendLayout() + CType(Me.SplitContainerDocumentSearch.Panel2, System.ComponentModel.ISupportInitialize).BeginInit() + Me.SplitContainerDocumentSearch.Panel2.SuspendLayout() + Me.SplitContainerDocumentSearch.SuspendLayout() CType(Me.GridControlDocSearch, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridViewDoc_Search, System.ComponentModel.ISupportInitialize).BeginInit() Me.cmsResultFilesBasic.SuspendLayout() @@ -105,12 +111,6 @@ Partial Class frmNodeNavigation CType(Me.SplitContainerDocView.Panel2, System.ComponentModel.ISupportInitialize).BeginInit() Me.SplitContainerDocView.Panel2.SuspendLayout() Me.SplitContainerDocView.SuspendLayout() - CType(Me.SplitContainerDocumentSearch, System.ComponentModel.ISupportInitialize).BeginInit() - CType(Me.SplitContainerDocumentSearch.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainerDocumentSearch.Panel1.SuspendLayout() - CType(Me.SplitContainerDocumentSearch.Panel2, System.ComponentModel.ISupportInitialize).BeginInit() - Me.SplitContainerDocumentSearch.Panel2.SuspendLayout() - Me.SplitContainerDocumentSearch.SuspendLayout() Me.SuspendLayout() ' 'ribbonNodeNavigation @@ -379,6 +379,26 @@ Partial Class frmNodeNavigation ' Me.ImageCollection1.ImageStream = CType(resources.GetObject("ImageCollection1.ImageStream"), DevExpress.Utils.ImageCollectionStreamer) ' + 'SplitContainerDocumentSearch + ' + Me.SplitContainerDocumentSearch.Dock = System.Windows.Forms.DockStyle.Fill + Me.SplitContainerDocumentSearch.Horizontal = False + Me.SplitContainerDocumentSearch.Location = New System.Drawing.Point(0, 0) + Me.SplitContainerDocumentSearch.Name = "SplitContainerDocumentSearch" + ' + 'SplitContainerDocumentSearch.Panel1 + ' + Me.SplitContainerDocumentSearch.Panel1.Controls.Add(Me.pnlControls) + Me.SplitContainerDocumentSearch.Panel1.Text = "Panel1" + ' + 'SplitContainerDocumentSearch.Panel2 + ' + Me.SplitContainerDocumentSearch.Panel2.Controls.Add(Me.GridControlDocSearch) + Me.SplitContainerDocumentSearch.Panel2.Text = "Panel2" + Me.SplitContainerDocumentSearch.Size = New System.Drawing.Size(998, 510) + Me.SplitContainerDocumentSearch.SplitterPosition = 246 + Me.SplitContainerDocumentSearch.TabIndex = 1 + ' 'pnlControls ' Me.pnlControls.AllowDrop = True @@ -458,7 +478,7 @@ Partial Class frmNodeNavigation ' Me.cmsResultFileDetail.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsmiFileProperties, Me.ToolStripSeparator5, Me.tsmiFileOpen, Me.tsmiFileFolderOpen, Me.ToolStripSeparator1, Me.tsmiFileInWork, Me.ToolStripSeparator3, Me.tsmiFileLink_Add, Me.tsmiFileLink_ShowAll, Me.tsmiFileLinkRemove, Me.ToolStripSeparator2, Me.tsmiFileRename, Me.tsmiFileVersion, Me.DokumentartÄndernToolStripMenuItem, Me.tsmiFileRightsShow, Me.ToolStripSeparator4, Me.tsmiFileDelete}) Me.cmsResultFileDetail.Name = "ContextMenuStripResultFiles" - Me.cmsResultFileDetail.Size = New System.Drawing.Size(240, 298) + Me.cmsResultFileDetail.Size = New System.Drawing.Size(240, 320) ' 'tsmiFileProperties ' @@ -618,26 +638,6 @@ Partial Class frmNodeNavigation Me.DocumentViewer.Size = New System.Drawing.Size(0, 0) Me.DocumentViewer.TabIndex = 0 ' - 'SplitContainerDocumentSearch - ' - Me.SplitContainerDocumentSearch.Dock = System.Windows.Forms.DockStyle.Fill - Me.SplitContainerDocumentSearch.Horizontal = False - Me.SplitContainerDocumentSearch.Location = New System.Drawing.Point(0, 0) - Me.SplitContainerDocumentSearch.Name = "SplitContainerDocumentSearch" - ' - 'SplitContainerDocumentSearch.SplitContainerDocumentSearch_Panel1 - ' - Me.SplitContainerDocumentSearch.Panel1.Controls.Add(Me.pnlControls) - Me.SplitContainerDocumentSearch.Panel1.Text = "Panel1" - ' - 'SplitContainerDocumentSearch.SplitContainerDocumentSearch_Panel2 - ' - Me.SplitContainerDocumentSearch.Panel2.Controls.Add(Me.GridControlDocSearch) - Me.SplitContainerDocumentSearch.Panel2.Text = "Panel2" - Me.SplitContainerDocumentSearch.Size = New System.Drawing.Size(998, 510) - Me.SplitContainerDocumentSearch.SplitterPosition = 246 - Me.SplitContainerDocumentSearch.TabIndex = 1 - ' 'frmNodeNavigation ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -660,6 +660,12 @@ Partial Class frmNodeNavigation Me.SplitContainerTreeList.ResumeLayout(False) CType(Me.TreeListDevexpress, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.ImageCollection1, System.ComponentModel.ISupportInitialize).EndInit() + CType(Me.SplitContainerDocumentSearch.Panel1, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerDocumentSearch.Panel1.ResumeLayout(False) + CType(Me.SplitContainerDocumentSearch.Panel2, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerDocumentSearch.Panel2.ResumeLayout(False) + CType(Me.SplitContainerDocumentSearch, System.ComponentModel.ISupportInitialize).EndInit() + Me.SplitContainerDocumentSearch.ResumeLayout(False) CType(Me.GridControlDocSearch, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.GridViewDoc_Search, System.ComponentModel.ISupportInitialize).EndInit() Me.cmsResultFilesBasic.ResumeLayout(False) @@ -670,12 +676,6 @@ Partial Class frmNodeNavigation Me.SplitContainerDocView.Panel2.ResumeLayout(False) CType(Me.SplitContainerDocView, System.ComponentModel.ISupportInitialize).EndInit() Me.SplitContainerDocView.ResumeLayout(False) - CType(Me.SplitContainerDocumentSearch.Panel1, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainerDocumentSearch.Panel1.ResumeLayout(False) - CType(Me.SplitContainerDocumentSearch.Panel2, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainerDocumentSearch.Panel2.ResumeLayout(False) - CType(Me.SplitContainerDocumentSearch, System.ComponentModel.ISupportInitialize).EndInit() - Me.SplitContainerDocumentSearch.ResumeLayout(False) Me.ResumeLayout(False) Me.PerformLayout() diff --git a/app/DD-Record-Organizer/frmNodeNavigation.vb b/app/DD-Record-Organizer/frmNodeNavigation.vb index b28b823..aca489f 100644 --- a/app/DD-Record-Organizer/frmNodeNavigation.vb +++ b/app/DD-Record-Organizer/frmNodeNavigation.vb @@ -3023,4 +3023,64 @@ LOGGER.Error(ex) .Name = pRow.ItemEx("NAME", "") } End Function + + Private Sub tsmiFileDelete_Click(sender As Object, e As EventArgs) Handles tsmiFileDelete.Click + If ClassWindreamDocGrid.HasNoSelectedDocuments(GridViewDoc_Search) Then + MsgBox("Could not read File Parameters (LinkRecord)!", MsgBoxStyle.Exclamation) + Exit Sub + End If + Refresh_Selected_Table() + + Dim oDocuments = DocList.SelectedDocuments + Dim msg = "Sind Sie sicher, dass Sie die Datei(en) endgültig löschen wollen?" + If USER_LANGUAGE <> "de-DE" Then + msg = "Are You sure You want to permanently delete this file(s)?" + End If + Dim result1 As MsgBoxResult + result1 = MessageBox.Show(msg, CAPTION_CONFIRMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question) + If result1 = MsgBoxResult.Yes Then + For Each row As DataRow In ClassWindreamDocGrid.DT_RESULTFILES.Rows + If row.Item("DOC_PATH") <> "" Then + Try + If Not IsNothing(row.Item("DOC_ID")) Then + Dim Count As Integer = MYDB_ECM.GetScalarValue("SELECT COUNT(GUID) FROM TBPMO_DOC_RECORD_LINK WHERE DOC_ID = " & row.Item("DOC_ID")) + If Count > 1 And CURRENT_SEARCH_TYPE = "RECORD" Then + msg = "Diese Datei ist noch mit anderen Datensätzen verknüpft! Wollen Sie diese Verknüpfungen ebenfalls löschen?" + If USER_LANGUAGE <> "de-DE" Then + msg = "This file is also linked to other records! Would You like to delete these links also?" + End If + Dim result2 As MsgBoxResult + result2 = MessageBox.Show(msg, CAPTION_CONFIRMATION, MessageBoxButtons.YesNo, MessageBoxIcon.Question) + Dim oDElWMFile As Boolean = False + If result2 = MsgBoxResult.Yes Then + oDElWMFile = True + End If + + If ClassFileResult.Delete_ResultFile(row.Item("DOC_ID"), CURRENT_RECORD_ID, oDElWMFile) = True Then + If oDElWMFile = True Then + ClassHelper.InsertEssential_Log(row.Item("DOC_ID"), "DOC-ID", "FILE DELETED BY USER") + Else + ClassHelper.InsertEssential_Log(row.Item("DOC_ID"), "DOC-ID", "FILE LINK DELETED BY USER") + End If + + End If + End If + + End If + If LICENSE_PROXY = True And DD_LIB_Standards.clsDatabase.DB_PROXY_INITIALIZED Then + Dim proc = String.Format("EXEC PRPROXY_DOC_CHECK_DELETE {0}", row.Item("DOC_ID")) + MYDB_ECM.ExecuteNonQuery(proc) + End If + Catch ex As Exception + ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error", "Error in delete file: ", ex.Message) + End Try + + End If + Next + If CURRENT_SEARCH_TYPE = "ENTITY" Then + CURRENT_DT_DOC_ENTITY_SEARCH = Nothing + End If + RUN_WDSEARCH_GRID(True) + End If + End Sub End Class \ No newline at end of file diff --git a/app/DD-Record-Organizer/frmSAP_FuBa.vb b/app/DD-Record-Organizer/frmSAP_FuBa.vb index 043cb60..e45bfef 100644 --- a/app/DD-Record-Organizer/frmSAP_FuBa.vb +++ b/app/DD-Record-Organizer/frmSAP_FuBa.vb @@ -126,7 +126,7 @@ Public Class frmSAP_FuBa If txtLimitRows.Text <> "" Then rowlimit = txtLimitRows.Text End If - Dim oSAPResulttable As New DataTable + Dim oSAPResulttable As DataTable If rbTable.Checked = True Then Dim result = ClassSAP.Return_Datatable_for_Table(TableNameTextBox.Text, WHERE_CLAUSETextBox.Text, True, rowlimit) If Not IsNothing(result) Then @@ -386,7 +386,7 @@ Public Class frmSAP_FuBa If txtLimitRows.Text <> "" Then rowlimit = txtLimitRows.Text End If - Dim oSAPResulttable As New DataTable + Dim oSAPResulttable As DataTable If rbTable.Checked = True Then Dim result = ClassSAP.Return_Datatable_for_Table(TableNameTextBox.Text, WHERE_CLAUSETextBox.Text, False, rowlimit) If Not IsNothing(result) Then diff --git a/app/DD-Record-Organizer/frmWM_IndexFile.vb b/app/DD-Record-Organizer/frmWM_IndexFile.vb index 98287ac..1fbf1fa 100644 --- a/app/DD-Record-Organizer/frmWM_IndexFile.vb +++ b/app/DD-Record-Organizer/frmWM_IndexFile.vb @@ -55,9 +55,9 @@ Public Class frmWM_IndexFile Dim existsonlyasMaster = False If _wm.TestFileExists(CURRENT_NEWFILENAME) = True Then - Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen?" + Dim msg = "Eine Datei mit identischem Namen existiert bereits! Wollen Sie die bestehende Datei ersetzen? (KEINE VERSIONIERUNG)" & vbNewLine & "Beachten Sie das vorhandene Versionen beim Ersetzen mit gelöscht werden!" If USER_LANGUAGE <> "de-DE" Then - msg = "There is already a file with the same name! Would You like to replace the file?" + msg = "There is already a file with the same name! Would You like to replace the file?" & vbNewLine & "All versions will also be deleted!" End If Dim result As MsgBoxResult result = MessageBox.Show(msg, "File alredy exists:", MessageBoxButtons.YesNo, MessageBoxIcon.Question) @@ -105,7 +105,7 @@ Public Class frmWM_IndexFile End If End If - Dim sql = "SELECT * FROM TBDD_INDEX_AUTOM WHERE ACTIVE = 1 AND UPPER(INDEXNAME) NOT LIKE UPPER('%ONLY %') AND SQL_ACTIVE = 0 AND DOCTYPE_ID = " & vDokart_ID + Dim sql = "SELECT * FROM TBDD_INDEX_AUTOM WHERE ACTIVE = 1 AND UPPER(INDEXNAME) NOT LIKE UPPER('%ONLY %') AND SQL_ACTIVE = 0 AND LEN(INDEXNAME) > 1 AND DOCTYPE_ID = " & vDokart_ID Dim DT_AUTO_INDEXE As DataTable = MYDB_ECM.GetDatatable(sql) Try sql = "SELECT * FROM VWCUST_DOCTYPE_CONFIG WHERE DOCTYPE_ID = " & vDokart_ID @@ -161,89 +161,89 @@ Public Class frmWM_IndexFile If DT_AUTO_INDEXE.Rows.Count > 0 Then Dim Count As Integer = 0 For Each row As DataRow In DT_AUTO_INDEXE.Rows - Dim indexname = row.Item("INDEXNAME").ToString - Dim idxvalue = row.Item("VALUE") - If idxvalue.ToString.StartsWith("@") Then - Select Case idxvalue.ToString.ToUpper - Case "@RECORD-ID" - idxvalue = idxvalue.ToString.Replace("@Record-ID", CURRENT_RECORD_ID) - Case "@DOKART" - idxvalue = idxvalue.ToString.Replace("@Dokart", vDokart) - End Select - Else 'Es wird nicht über einen @PAttern indexiert - ' Regulären Ausdruck zum Auslesen der Indexe definieren - Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}" - ' einen Regulären Ausdruck laden - Dim regulärerAusdruck As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(preg) - ' die Vorkommen im SQL-String auslesen - Dim elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(idxvalue) - '#### - ' alle Vorkommen innerhalbd er Namenkonvention durchlaufen - For Each element As System.Text.RegularExpressions.Match In elemente + Dim oAutoIndexname = row.Item("INDEXNAME").ToString + Dim oAutoIndexValue = row.Item("VALUE") + If oAutoIndexValue.ToString.StartsWith("@") Then + Select Case oAutoIndexValue.ToString.ToUpper + Case "@RECORD-ID" + oAutoIndexValue = oAutoIndexValue.ToString.Replace("@Record-ID", CURRENT_RECORD_ID) + Case "@DOKART" + oAutoIndexValue = oAutoIndexValue.ToString.Replace("@Dokart", vDokart) + End Select + Else 'Es wird nicht über einen @PAttern indexiert + ' Regulären Ausdruck zum Auslesen der Indexe definieren + Dim preg As String = "\[%{1}[a-zA-Z0-9\!\$\&\/\(\)\=\?\,\.\-\;\:_öÖüÜäÄ\#\'\+\*\~\{\}\@\€\<\>\ ]+]{1}" + ' einen Regulären Ausdruck laden + Dim regulärerAusdruck As System.Text.RegularExpressions.Regex = New System.Text.RegularExpressions.Regex(preg) + ' die Vorkommen im SQL-String auslesen + Dim elemente As System.Text.RegularExpressions.MatchCollection = regulärerAusdruck.Matches(oAutoIndexValue) + '#### + ' alle Vorkommen innerhalbd er Namenkonvention durchlaufen + For Each element As System.Text.RegularExpressions.Match In elemente LOGGER.Debug("element in RegeX: " & element.Value) Select Case element.Value.Substring(2, 1).ToUpper 'Nur automatische Indizes auswerten - Case "A" - Dim APattern = element.Value.Substring(3, element.Value.Length - 4) - If APattern.Contains("#") Then + Case "A" + Dim APattern = element.Value.Substring(3, element.Value.Length - 4) + If APattern.Contains("#") Then LOGGER.Debug("element filled with Record-Data.......: ") Dim split() As String = APattern.Split("#") - If split.Length = 2 Then - Dim CONTROL_ID = split(1) + If split.Length = 2 Then + Dim CONTROL_ID = split(1) LOGGER.Debug("CONTROL_ID: " & CONTROL_ID) If IsNumeric(CONTROL_ID) Then - Dim CONTROLVALUE = ClassControlValues.Get_Control_Value_for_ID(CONTROL_ID, CURRENT_RECORD_ID) - If IsNothing(CONTROLVALUE) Then + Dim CONTROLVALUE = ClassControlValues.Get_Control_Value_for_ID(CONTROL_ID, CURRENT_RECORD_ID) + If IsNothing(CONTROLVALUE) Then LOGGER.Warn("Index should be filled with value of Control-ID '" & CONTROL_ID & "', but result was nothing.") LOGGER.Warn("SQL-Command: " & CURRENT_LAST_SQL) - idxvalue = "" - Else - If IsDBNull(CONTROLVALUE) Then + oAutoIndexValue = "" + Else + If IsDBNull(CONTROLVALUE) Then LOGGER.Warn("Index should be filled with value of Control-ID '" & CONTROL_ID & "', but result was DBNULL.") LOGGER.Warn("SQL-Command: " & CURRENT_LAST_SQL) - idxvalue = "" - Else - idxvalue = CONTROLVALUE - End If + oAutoIndexValue = "" + Else + oAutoIndexValue = CONTROLVALUE End If - Else - End If + Else + End If End If - End Select + End If + End Select - Next - End If - LOGGER.Debug("Value for Indexing : '" & idxvalue.ToString & "'") + Next + End If + LOGGER.Debug($"Autovalue used for Indexing: '" & oAutoIndexValue.ToString & "'") Count += 1 - indexierung_erfolgreich = _wm.SetFileIndex(CURRENT_FILEIN_WD, indexname, idxvalue, oWMObjecttype) 'clsWM_SET.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue, oWMObjecttype) 'clsWM.MY_WDOBJECTTYPE) + indexierung_erfolgreich = _wm.SetFileIndex(CURRENT_FILEIN_WD, oAutoIndexname, oAutoIndexValue, oWMObjecttype) 'clsWM_SET.IndexFile(CURRENT_FILEIN_WD, indexname, idxvalue, oWMObjecttype) 'clsWM.MY_WDOBJECTTYPE) If indexierung_erfolgreich = False Then - MsgBox("Unexpected Error in indexing file - See log", MsgBoxStyle.Critical) - err = True - Exit For - End If - - Next - If err = True Then - swWORK_FILE.Done() - Return False + MsgBox("Unexpected Error in indexing file - See log", MsgBoxStyle.Critical) + err = True + Exit For End If - Else - 'MsgBox("Attention in Work-File:" & vbNewLine & "No indices were defined (1)!", MsgBoxStyle.Critical) - 'Return False + Next + If err = True Then + swWORK_FILE.Done() + Return False End If + Else - swWORK_FILE.Done() - MsgBox("Attention in Work-File:" & vbNewLine & "No indices were defined (0)!", MsgBoxStyle.Critical) - - Return False + 'MsgBox("Attention in Work-File:" & vbNewLine & "No indices were defined (1)!", MsgBoxStyle.Critical) + 'Return False End If - 'Nun alles aufrüumen und die neue DocID holen + Else + swWORK_FILE.Done() + MsgBox("Attention in Work-File:" & vbNewLine & "No indices were defined (0)!", MsgBoxStyle.Critical) - If indexierung_erfolgreich = True Then + Return False + End If + 'Nun alles aufrüumen und die neue DocID holen + + If indexierung_erfolgreich = True Then LOGGER.Info("File was correctly imported and indexed: " & CURRENT_FILEIN_WD) Dim oReldocpath = ClassHelper.GetRelPath(CURRENT_FILEIN_WD) LOGGER.Info("oReldocpath: " & oReldocpath) @@ -252,55 +252,55 @@ Public Class frmWM_IndexFile MsgBox("Attention in Work-File:" & vbNewLine & "Could not create final windream-object!", MsgBoxStyle.Critical) Return False End If - LOGGER.Info("..CURRENT_WM_OBJECT created: " & oReldocpath) + LOGGER.Info("...CURRENT_WM_OBJECT created: " & oReldocpath) Dim stg As String = "Datei erfolgreich nach windream übertragen" - Dim stg1 As String = "Erfolgsmeldung" - If USER_LANGUAGE <> "de-DE" Then - stg = "File was successfully transfered to windream" - stg1 = "Success:" - End If - If multiindex = False Then CURRENT_NOTIFICATION_MSG = stg + Dim stg1 As String = "Erfolgsmeldung" + If USER_LANGUAGE <> "de-DE" Then + stg = "File was successfully transfered to windream" + stg1 = "Success:" + End If + If multiindex = False Then CURRENT_NOTIFICATION_MSG = stg MYDB_ECM.GetScalarValue("UPDATE TBPMO_FILES_USER SET WORKED = 1 WHERE GUID = " & CURRENT_FILEID) For Each row As DataRow In CURRENT_TBPMO_FILES_USER.Rows - If row.Item("GUID") = CURRENT_FILEID Then - row.Item("WORKED") = 1 - If IsNothing(droptype) Then - droptype = row.Item("HANDLE_TYPE") - End If + If row.Item("GUID") = CURRENT_FILEID Then + row.Item("WORKED") = 1 + If IsNothing(droptype) Then + droptype = row.Item("HANDLE_TYPE") End If - Next - If IsNothing(CURRENT_DOC_ID) Then - sw = New SW("GettingDocID") - sql = String.Format("SELECT DocID FROM VWPMO_DOC_SYNC WHERE FULL_FILENAME = '{0}' AND CONVERT(DATE,Change_DateTime) = CONVERT(DATE,GETDATE())", CURRENT_FILEIN_WD) - CURRENT_DOC_ID = MYDB_ECM.GetScalarValue(SQL) - sw.Done() End If + Next + If IsNothing(CURRENT_DOC_ID) Then + sw = New SW("GettingDocID") + sql = String.Format("SELECT DocID FROM VWPMO_DOC_SYNC WHERE FULL_FILENAME = '{0}' AND CONVERT(DATE,Change_DateTime) = CONVERT(DATE,GETDATE())", CURRENT_FILEIN_WD) + CURRENT_DOC_ID = MYDB_ECM.GetScalarValue(sql) + sw.Done() + End If - If Not IsNothing(CURRENT_DOC_ID) Then - ClassHelper.InsertEssential_Log(CURRENT_DOC_ID, "DOC_ID", "File was imported and indexed!") + If Not IsNothing(CURRENT_DOC_ID) Then + ClassHelper.InsertEssential_Log(CURRENT_DOC_ID, "DOC_ID", "File was imported and indexed!") LOGGER.Info(String.Format("File-Import was finished - DocID: {0} ", CURRENT_DOC_ID)) Dim delete = False - 'Die Originaldatei löschen - If droptype = "dragdrop file" And indexierung_erfolgreich = True Then - If chkdelete_origin.Checked = True Then - 'Die temporäre Datei löschen - File.Delete(aktFiledropped) + 'Die Originaldatei löschen + If droptype = "dragdrop file" And indexierung_erfolgreich = True Then + If chkdelete_origin.Checked = True Then + 'Die temporäre Datei löschen + File.Delete(aktFiledropped) + End If + ElseIf (droptype = "@ATTMNTEXTRACTED@" Or droptype = "SCAN") And indexierung_erfolgreich = True Then + 'Die temporäre Datei löschen + delete = True + ElseIf droptype = "dragdrop message" And indexierung_erfolgreich = True Then + 'Die temporäre Datei löschen + delete = True + End If + If delete = True Then + For Each row As DataRow In CURRENT_TBPMO_FILES_USER.Rows + If row.Item("GUID") = CURRENT_FILEID Then + row.Item("DELETE_FILE") = True End If - ElseIf (droptype = "@ATTMNTEXTRACTED@" Or droptype = "SCAN") And indexierung_erfolgreich = True Then - 'Die temporäre Datei löschen - delete = True - ElseIf droptype = "dragdrop message" And indexierung_erfolgreich = True Then - 'Die temporäre Datei löschen - delete = True - End If - If delete = True Then - For Each row As DataRow In CURRENT_TBPMO_FILES_USER.Rows - If row.Item("GUID") = CURRENT_FILEID Then - row.Item("DELETE_FILE") = True - End If - Next - End If + Next + End If If _wm.SessionLoggedin = False Then 'clsWM.Create_Session() = False Then MsgBox("Could not create a windream-session!", MsgBoxStyle.Critical) @@ -323,27 +323,27 @@ Public Class frmWM_IndexFile ClassHelper.InsertEssential_Log(CURRENT_DOC_ID, "DOC-ID", "NEW FILE INDEXING - RIGHTS COULD NOT BE SET!!") End If sw.Done() - End If End If - - Else - stg = "Unerwarteter Fehler: Es konnte keine DocID für die übertragene Datei erzeugt werden!" - If USER_LANGUAGE <> "de-DE" Then - stg = "Unexpected Error: Could not get a docId for transmitted file!" - - End If - LOGGER.Warn(stg) - MsgBox(stg, MsgBoxStyle.Critical, stg1) End If + Else - MsgBox("An unexpected error occured while indexing file. Please check the log!", MsgBoxStyle.Exclamation) - swWORK_FILE.Done() - Return False + stg = "Unerwarteter Fehler: Es konnte keine DocID für die übertragene Datei erzeugt werden!" + If USER_LANGUAGE <> "de-DE" Then + stg = "Unexpected Error: Could not get a docId for transmitted file!" + + End If + LOGGER.Warn(stg) + MsgBox(stg, MsgBoxStyle.Critical, stg1) End If - swWORK_FILE.Done() - Return True Else + MsgBox("An unexpected error occured while indexing file. Please check the log!", MsgBoxStyle.Exclamation) swWORK_FILE.Done() + Return False + End If + swWORK_FILE.Done() + Return True + Else + swWORK_FILE.Done() Return False End If Catch ex As Exception