This commit is contained in:
SchreiberM 2023-11-16 17:44:00 +01:00
parent 4c502369bd
commit df489932df
5 changed files with 69 additions and 47 deletions

View File

@ -107,8 +107,9 @@ Public Class ClassWDRights
oWMObject = oSession.GetWMObjectByPath(1, reldocpath) oWMObject = oSession.GetWMObjectByPath(1, reldocpath)
LOGGER.Debug("Object created.") LOGGER.Debug("Object created.")
Catch ex As Exception Catch ex As Exception
Dim msg = "Error GetWMObjectByPath: (FDSR) " & reldocpath & vbNewLine & Err.Description Dim msg = "Error GetWMObjectByPath: " & reldocpath & vbNewLine & Err.Description
LOGGER.Warn(msg) LOGGER.Warn(msg)
LOGGER.Error(ex)
Return False Return False
End Try End Try
Dim lret Dim lret

View File

@ -32,11 +32,11 @@ Partial Class frmDoc_Links
Me.bbtnitmdeletelink = New DevExpress.XtraBars.BarButtonItem() Me.bbtnitmdeletelink = New DevExpress.XtraBars.BarButtonItem()
Me.BarStaticItemStatus = New DevExpress.XtraBars.BarStaticItem() Me.BarStaticItemStatus = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.bsiSource = New DevExpress.XtraBars.BarStaticItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.bsiSource = New DevExpress.XtraBars.BarStaticItem()
CType(Me.GridControlRecords, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.GridControlRecords, System.ComponentModel.ISupportInitialize).BeginInit()
Me.ContextMenuStrip1.SuspendLayout() Me.ContextMenuStrip1.SuspendLayout()
CType(Me.grvwGrid, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.grvwGrid, System.ComponentModel.ISupportInitialize).BeginInit()
@ -121,6 +121,13 @@ Partial Class frmDoc_Links
Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem2.Name = "BarButtonItem2" Me.BarButtonItem2.Name = "BarButtonItem2"
' '
'bsiSource
'
Me.bsiSource.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right
resources.ApplyResources(Me.bsiSource, "bsiSource")
Me.bsiSource.Id = 4
Me.bsiSource.Name = "bsiSource"
'
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1})
@ -147,13 +154,6 @@ Partial Class frmDoc_Links
Me.RibbonPage2.Name = "RibbonPage2" Me.RibbonPage2.Name = "RibbonPage2"
resources.ApplyResources(Me.RibbonPage2, "RibbonPage2") resources.ApplyResources(Me.RibbonPage2, "RibbonPage2")
' '
'bsiSource
'
Me.bsiSource.Alignment = DevExpress.XtraBars.BarItemLinkAlignment.Right
resources.ApplyResources(Me.bsiSource, "bsiSource")
Me.bsiSource.Id = 4
Me.bsiSource.Name = "bsiSource"
'
'frmDoc_Links 'frmDoc_Links
' '
resources.ApplyResources(Me, "$this") resources.ApplyResources(Me, "$this")

View File

@ -144,7 +144,7 @@
<value>0, 158</value> <value>0, 158</value>
</data> </data>
<data name="GridControlRecords.Size" type="System.Drawing.Size, System.Drawing"> <data name="GridControlRecords.Size" type="System.Drawing.Size, System.Drawing">
<value>800, 270</value> <value>1251, 426</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" /> <assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="GridControlRecords.TabIndex" type="System.Int32, mscorlib"> <data name="GridControlRecords.TabIndex" type="System.Int32, mscorlib">
@ -226,13 +226,13 @@
<value>Doc-Links</value> <value>Doc-Links</value>
</data> </data>
<data name="RibbonControl1.Size" type="System.Drawing.Size, System.Drawing"> <data name="RibbonControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>800, 158</value> <value>1251, 158</value>
</data> </data>
<data name="RibbonStatusBar1.Location" type="System.Drawing.Point, System.Drawing"> <data name="RibbonStatusBar1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 428</value> <value>0, 584</value>
</data> </data>
<data name="RibbonStatusBar1.Size" type="System.Drawing.Size, System.Drawing"> <data name="RibbonStatusBar1.Size" type="System.Drawing.Size, System.Drawing">
<value>800, 22</value> <value>1251, 22</value>
</data> </data>
<data name="&gt;&gt;RibbonStatusBar1.Name" xml:space="preserve"> <data name="&gt;&gt;RibbonStatusBar1.Name" xml:space="preserve">
<value>RibbonStatusBar1</value> <value>RibbonStatusBar1</value>
@ -268,7 +268,7 @@
<value>6, 13</value> <value>6, 13</value>
</data> </data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing"> <data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>800, 450</value> <value>1251, 606</value>
</data> </data>
<data name="frmDoc_Links.IconOptions.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="frmDoc_Links.IconOptions.Icon" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
@ -443,6 +443,9 @@
AA/+AAAP/gAAD/4AAA/+AAAP/gAAD/4AAA/+AAAP/gAAD/4AAA/+AAAP/gAAD/4AAA/+AAAP AA/+AAAP/gAAD/4AAA/+AAAP/gAAD/4AAA/+AAAP/gAAD/4AAA/+AAAP/gAAD/4AAA/+AAAP
</value> </value>
</data> </data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
<value>CenterScreen</value>
</data>
<data name="$this.Text" xml:space="preserve"> <data name="$this.Text" xml:space="preserve">
<value>Doc-Links</value> <value>Doc-Links</value>
</data> </data>
@ -476,6 +479,12 @@
<data name="&gt;&gt;BarButtonItem2.Type" xml:space="preserve"> <data name="&gt;&gt;BarButtonItem2.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;bsiSource.Name" xml:space="preserve">
<value>bsiSource</value>
</data>
<data name="&gt;&gt;bsiSource.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RibbonPage1.Name" xml:space="preserve"> <data name="&gt;&gt;RibbonPage1.Name" xml:space="preserve">
<value>RibbonPage1</value> <value>RibbonPage1</value>
</data> </data>
@ -494,12 +503,6 @@
<data name="&gt;&gt;RibbonPage2.Type" xml:space="preserve"> <data name="&gt;&gt;RibbonPage2.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.Ribbon.RibbonPage, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;bsiSource.Name" xml:space="preserve">
<value>bsiSource</value>
</data>
<data name="&gt;&gt;bsiSource.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>frmDoc_Links</value> <value>frmDoc_Links</value>
</data> </data>

View File

@ -1,6 +1,7 @@
Imports System.IO Imports System.IO
Imports DD_LIB_Standards Imports DD_LIB_Standards
Imports DevExpress.XtraPrinting Imports DevExpress.XtraPrinting
Imports Microsoft.Office.Interop.Outlook
Public Class frmDoc_Links Public Class frmDoc_Links
Public Property Documents As New List(Of ClassWindreamDocGrid.WindreamDoc) Public Property Documents As New List(Of ClassWindreamDocGrid.WindreamDoc)
@ -38,7 +39,7 @@ Public Class frmDoc_Links
Case "RWA" Case "RWA"
bbtnitmdeletelink.Enabled = True bbtnitmdeletelink.Enabled = True
End Select End Select
Catch ex As Exception Catch ex As System.Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in frmDoc_DocLinks_Load", ex.Message, ex.StackTrace) ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in frmDoc_DocLinks_Load", ex.Message, ex.StackTrace)
End Try End Try
End Sub End Sub
@ -80,12 +81,12 @@ Public Class frmDoc_Links
If grvwGrid.Columns.Item("VALUE") IsNot Nothing Then If grvwGrid.Columns.Item("VALUE") IsNot Nothing Then
grvwGrid.Columns.Item("VALUE").Visible = False grvwGrid.Columns.Item("VALUE").Visible = False
End If End If
Catch ex1 As Exception Catch ex1 As System.Exception
LOGGER.Warn("Column VALUE not part of VWPMO_CUST_DOC_OBJECT_LINKS" & ex1.Message) LOGGER.Warn("Column VALUE not part of VWPMO_CUST_DOC_OBJECT_LINKS" & ex1.Message)
End Try End Try
grvwGrid.OptionsView.ColumnAutoWidth = False grvwGrid.OptionsView.ColumnAutoWidth = False
grvwGrid.BestFitColumns() grvwGrid.BestFitColumns()
Catch ex As Exception Catch ex As System.Exception
LOGGER.Error(ex) LOGGER.Error(ex)
End Try End Try
@ -99,7 +100,7 @@ Public Class frmDoc_Links
MsgBox($"Please check Your link-object-relation", MsgBoxStyle.Exclamation) MsgBox($"Please check Your link-object-relation", MsgBoxStyle.Exclamation)
End If End If
Catch ex As Exception Catch ex As System.Exception
LOGGER.Error(ex) LOGGER.Error(ex)
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Sub Refresh_Grid_Data", ex.Message, ex.StackTrace) ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Sub Refresh_Grid_Data", ex.Message, ex.StackTrace)
End Try End Try
@ -108,27 +109,44 @@ Public Class frmDoc_Links
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmdeletelink.ItemClick Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmdeletelink.ItemClick
Dim oSelectedRows As Integer() = grvwGrid.GetSelectedRows() Dim oSelectedRows As Integer() = grvwGrid.GetSelectedRows()
For Each rowhandle As Integer In oSelectedRows If oSelectedRows.Count > 0 Then
Try Dim result As MsgBoxResult
Dim oSelectedDocID = grvwGrid.GetRowCellValue(rowhandle, "DocID") Dim msg = String.Format("Wollen Sie die ausgewählten Links wirklich löschen?")
Dim oSelectedRecordID = grvwGrid.GetRowCellValue(rowhandle, "RecordID") Dim oCount As Integer = 0
If IsNothing(oSelectedDocID) Then If USER_LANGUAGE <> "de-DE" Then
Continue For msg = String.Format("Do you really want to delete the selected links?")
End If End If
LOGGER.Debug($"RecordLink will be removed Record: {oSelectedRecordID} - DocID: {oSelectedDocID} ") result = MessageBox.Show(msg, "Bestätigung/Commitment:", MessageBoxButtons.YesNo, MessageBoxIcon.Question)
Try If result = MsgBoxResult.Yes Then
If ClassFileResult.Delete_ResultFile(oSelectedDocID, oSelectedRecordID, 0) = True Then For Each rowhandle As Integer In oSelectedRows
ClassHelper.InsertEssential_Log(oSelectedDocID, "DOC-ID", $"RECORD LINK {oSelectedRecordID} REMOVED FROM DOC-SEARCH") Try
End If Dim oSelectedDocID = grvwGrid.GetRowCellValue(rowhandle, "DocID")
Catch ex As Exception Dim oSelectedRecordID = grvwGrid.GetRowCellValue(rowhandle, "RecordID")
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Removing DocRecord-Link", ex.Message, ex.StackTrace) If IsNothing(oSelectedDocID) Then
End Try Continue For
Catch ex As Exception End If
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Collecting DocRecord-Link", ex.Message, ex.StackTrace) LOGGER.Debug($"RecordLink will be removed - Record: {oSelectedRecordID} - DocID: {oSelectedDocID} ")
End Try Try
Next Dim oDEL = $"DELETE FROM TBPMO_DOC_RECORD_LINK WHERE Doc_ID = {oSelectedDocID} AND RECORD_ID = {oSelectedRecordID}"
If MYDB_ECM.ExecuteNonQuery(oDEL) = True Then
oCount += 1
ClassHelper.InsertEssential_Log(oSelectedDocID, "DOC-ID", $"RECORD LINK {oSelectedRecordID} REMOVED FROM DOC-SEARCH")
End If
Catch ex As System.Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Removing DocRecord-Link", ex.Message, ex.StackTrace)
End Try
Catch ex As System.Exception
ClassHelper.MSGBOX_Handler("ERROR", "Unexpected Error in Collecting DocRecord-Link", ex.Message, ex.StackTrace)
End Try
Next
MsgBox($"Es wurden {oCount} Links erfolreich gelöscht!", MsgBoxStyle.Information)
End If
Refresh_Grid_Data(Documents)
Else
MsgBox("No links selected!", MsgBoxStyle.Information)
End If
Refresh_Grid_Data(Documents)
End Sub End Sub
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
@ -162,7 +180,7 @@ Public Class frmDoc_Links
End If End If
End If End If
Catch ex As Exception Catch ex As System.Exception
LOGGER.Error(ex) LOGGER.Error(ex)
MsgBox("Unexpected Error in ExportExcel: " & ex.Message, MsgBoxStyle.Critical) MsgBox("Unexpected Error in ExportExcel: " & ex.Message, MsgBoxStyle.Critical)
End Try End Try
@ -173,7 +191,7 @@ Public Class frmDoc_Links
Try Try
grvwGrid.OptionsView.ColumnAutoWidth = False grvwGrid.OptionsView.ColumnAutoWidth = False
grvwGrid.BestFitColumns() grvwGrid.BestFitColumns()
Catch ex As Exception Catch ex As System.Exception
LOGGER.Error(ex) LOGGER.Error(ex)
End Try End Try
End Sub End Sub

View File

@ -612,7 +612,7 @@ Public Class frmMain
Application.AddMessageFilter(New ClassInactivityFilter(Me)) Application.AddMessageFilter(New ClassInactivityFilter(Me))
End If End If
Catch ex As Exception Catch ex As Exception
ClassHelper.InsertEssential_Log(USER_GUID, "USER_ID", "Unexpected Error in AUOTP_LOGOUT_USER: " & ex.Message) ClassHelper.InsertEssential_Log(USER_GUID, "USER_ID", "Unexpected Error in AUTO_LOGOUT_USER: " & ex.Message)
End Try End Try
Catch ex As Exception Catch ex As Exception