Refactor Receiver to ReceiverVM in EnvelopeEditor and Main

Updated the `oReceiver` variable type from `Receiver` to `ReceiverVM` in the `frmEnvelopeEditor` and `frmMain` classes to align with a view model pattern. Modified the `Controller.DeleteReceiver` method to use `oReceiver.Receiver`, reflecting the new structure. Additionally, created `BindingList` of `ReceiverVM` to support a more MVVM architecture.
This commit is contained in:
2025-09-01 13:00:03 +02:00
parent 33fa4b76f5
commit 3e3c9d4c54
2 changed files with 8 additions and 10 deletions

View File

@@ -366,7 +366,7 @@ Partial Public Class frmEnvelopeEditor
Exit Sub
End If
Dim oReceiver As Receiver = ViewReceivers.GetFocusedRow()
Dim oReceiver As ReceiverVM = ViewReceivers.GetFocusedRow()
If oReceiver Is Nothing Then
Exit Sub
@@ -381,7 +381,7 @@ Partial Public Class frmEnvelopeEditor
Exit Sub
End If
If Controller.DeleteReceiver(oReceiver) Then
If Controller.DeleteReceiver(oReceiver.Receiver) Then
Receivers.Remove(oReceiver)
Else
MsgBox(Resources.Envelope.Recipient_could_not_be_deleted, MsgBoxStyle.Critical, Text)