This commit is contained in:
2022-07-07 13:20:13 +02:00
parent 331611c9e8
commit 28254c99f7
125 changed files with 1796 additions and 1144 deletions

View File

@@ -65,21 +65,26 @@ Public Class frmDoc_Links
End Sub
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmdeletelink.ItemClick
Dim oDocID = grvwGrid.GetRowCellValue(grvwGrid.FocusedRowHandle, "DocID")
Dim oRECORD_ID = grvwGrid.GetRowCellValue(grvwGrid.FocusedRowHandle, "RecordID")
If IsNothing(oDocID) Then
Exit Sub
End If
LOGGER.Debug($"RecordLink will be removed Record: {oRECORD_ID} - DocID: {oDocID} ")
Try
If ClassFileResult.Delete_ResultFile(oDocID, oRECORD_ID, 0) = True Then
ClassHelper.InsertEssential_Log(oDocID, "DOC-ID", $"RECORD LINK {oRECORD_ID} REMOVED FROM DOC-SEARCH")
End If
Catch ex As Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Removing DocRecord-Link", ex.Message, ex.StackTrace)
End Try
Dim oSelectedRows As Integer() = grvwGrid.GetSelectedRows()
For Each rowhandle As Integer In oSelectedRows
Try
Dim oSelectedDocID = grvwGrid.GetRowCellValue(rowhandle, "DocID")
Dim oSelectedRecordID = grvwGrid.GetRowCellValue(rowhandle, "RecordID")
If IsNothing(oSelectedDocID) Then
Continue For
End If
LOGGER.Debug($"RecordLink will be removed Record: {oSelectedRecordID} - DocID: {oSelectedDocID} ")
Try
If ClassFileResult.Delete_ResultFile(oSelectedDocID, oSelectedRecordID, 0) = True Then
ClassHelper.InsertEssential_Log(oSelectedDocID, "DOC-ID", $"RECORD LINK {oSelectedRecordID} REMOVED FROM DOC-SEARCH")
End If
Catch ex As Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Removing DocRecord-Link", ex.Message, ex.StackTrace)
End Try
Catch ex As Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Collecting DocRecord-Link", ex.Message, ex.StackTrace)
End Try
Next
Refresh_Grid_Data()
End Sub