MS 3.1.1.0

This commit is contained in:
2024-01-30 15:16:27 +01:00
parent de312ed3f6
commit 8a9bdc2fcd
11 changed files with 310 additions and 168 deletions

View File

@@ -1605,8 +1605,7 @@ LOGGER.Error(ex)
If USER_LANGUAGE <> "de-De" Then
oText = $"The entity-wide search will be started in background. The result will be displayed when ready."
End If
MsgBox(oText, vbOKOnly, "Information")
Update_Status_Label(True, oText, EditState.Insert)
CURRENT_DOCSEARCH_SQL = CURRENT_DOCSEARCH_SQL.Replace("@ENTITY_ID", _EntityId)
CURRENT_DOCSEARCH_SQL = CURRENT_DOCSEARCH_SQL.Replace("@USER_LANGUAGE", USER_LANGUAGE)
@@ -3039,6 +3038,11 @@ LOGGER.Error(ex)
Refresh_Selected_Table()
Dim oDocuments = DocList.SelectedDocuments
Dim oDocId As Integer = oDocuments.First.DocId
If oDocId = 0 Then
MsgBox("Sorry no document has been selected! Please try again!", MsgBoxStyle.Exclamation)
Exit Sub
End If
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)?"
@@ -3046,36 +3050,51 @@ LOGGER.Error(ex)
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
For Each oDoc As ClassWindreamDocGrid.WindreamDoc In ClassWindreamDocGrid.GetSelectedDocuments(GridViewDoc_Search)
If oDoc.DocPath <> "" 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
LOGGER.Info($"DocID {oDoc.DocPath} shall be deleted. User committed Delete-Start...")
Dim oDElWMFile As Boolean = False
Dim oCountLinks As Integer
If Not IsNothing(oDoc.DocId) Then
oCountLinks = MYDB_ECM.GetScalarValue("SELECT COUNT(GUID) FROM TBPMO_DOC_RECORD_LINK WHERE DOC_ID = " & oDoc.DocId)
If oCountLinks > 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")
If result2 = MsgBoxResult.Yes Then
LOGGER.Info($">> File has other Record-Links. User committed to delete all!")
oDElWMFile = True
Else
oDElWMFile = False
LOGGER.Info($">> File has other Record-Links. links shall be kept!")
End If
Else
oDElWMFile = True
End If
If ClassFileResult.Delete_ResultFile(oDoc.DocId, CURRENT_RECORD_ID, oDElWMFile) = True Then
If oDElWMFile = True Then
If clsWD_SET.Delete_WDFile(oDoc.DocPath) Then
Update_Status_Label(True, Now.ToLongTimeString & " - File successfully deleted", EditState.Insert)
ClassHelper.InsertEssential_Log(oDoc.DocId, "DOC-ID", "FILE DELETED BY USER")
End If
Else
ClassHelper.InsertEssential_Log(oDoc.DocId, "DOC-ID", "FILE LINK DELETED BY USER")
Update_Status_Label(True, Now.ToLongTimeString & " - File-links successfully deleted", EditState.Insert)
End If
Else
Update_Status_Label(True, Now.ToLongTimeString & " - Error deleting file - Check log", EditState.Delete)
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"))
Dim proc = String.Format("EXEC PRPROXY_DOC_CHECK_DELETE {0}", oDoc.DocId)
MYDB_ECM.ExecuteNonQuery(proc)
End If
Catch ex As Exception