Addin
This commit is contained in:
@@ -205,12 +205,17 @@ Public Class frmAvisoFormularAnfuegen
|
||||
If ATT IsNot Nothing Then
|
||||
If ATT.Count > 1 Then
|
||||
ATT = ATTTemp
|
||||
If dgvAnhaenge.SelectedCells.Count = 0 Then
|
||||
If dgvAnhaenge.SelectedRows.Count = 0 Then
|
||||
MsgBox("Bitte Anhang markieren!")
|
||||
DialogResult = DialogResult.None
|
||||
Exit Sub
|
||||
Else
|
||||
RemoveNotUsedAttachmentOnList(ATT, dgvAnhaenge.SelectedCells.Item(0).RowIndex)
|
||||
Dim listOfSelectedAttachmendIndex As New List(Of Integer)
|
||||
For Each indexOfAttachment As DataGridViewRow In dgvAnhaenge.SelectedRows
|
||||
listOfSelectedAttachmendIndex.Add(indexOfAttachment.Index)
|
||||
Next
|
||||
|
||||
RemoveNotUsedAttachmentOnList(ATT, listOfSelectedAttachmendIndex)
|
||||
|
||||
End If
|
||||
End If
|
||||
@@ -323,11 +328,13 @@ Public Class frmAvisoFormularAnfuegen
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub RemoveNotUsedAttachmentOnList(ByRef a As List(Of String), tmpIndex As Integer)
|
||||
Private Sub RemoveNotUsedAttachmentOnList(ByRef a As List(Of String), tmpIndex As List(Of Integer))
|
||||
If (a IsNot Nothing) AndAlso (a.Count > 1) Then
|
||||
Dim list As New List(Of String)
|
||||
Dim selectedItem As Object = a.Item(tmpIndex)
|
||||
list.Add(selectedItem)
|
||||
For Each r In tmpIndex
|
||||
Dim selectedItem As Object = a.Item(CInt(r))
|
||||
list.Add(selectedItem)
|
||||
Next
|
||||
a = list
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user