Refactor Envelope.Type to Envelope.Defaults

Replaced all references to `Envelope.Type` with `Envelope.Defaults` across the application for consistency and clarity.

- Updated `MappingProfile` to map `Defaults.Title` instead of `Type.Title` for `EnvelopeTypeTitle`.
- Modified `ReadEnvelopeQueryHandler` to use `Defaults` in place of `Type` and updated query includes.
- Renamed `Type` to `Defaults` in the `Envelope` entity while preserving its foreign key relationship.
- Updated `EnvelopeModel` to retrieve `Defaults` using `EnvelopeTypeModel.GetById`.
- Refactored `frmEnvelopeMainData` to replace all `Type` references with `Defaults` and adjusted logic for `ContractType` and `EnvelopeType`.

These changes ensure consistent naming and improve code readability.
This commit is contained in:
2026-11-12 16:57:50 +01:00
parent 17da3ea91e
commit f4d2b65943
5 changed files with 10 additions and 10 deletions

View File

@@ -68,14 +68,14 @@ Public Class frmEnvelopeMainData
chked_2Faktor.EditValue = DEF_TF_ENABLED
Else
If IsNothing(Envelope.Type) Then
Envelope.Type = EnvelopeType
If IsNothing(Envelope.Defaults) Then
Envelope.Defaults = EnvelopeType
End If
If Envelope.Type.ContractType = 0 Then
If Envelope.Defaults.ContractType = 0 Then
cmbEnvelopeType.EditValue = EnvelopeType
Else
' This will trigger loading values from the type
cmbEnvelopeType.EditValue = Envelope.Type
cmbEnvelopeType.EditValue = Envelope.Defaults
' cmbEnvelopeType.SelectedIndex = Convert.ToInt32(Envelope.Type) - 1
' cmbEnvelopeType.SelectedIndex = Envelope.Type.Id - 1
' cmbEnvelopeType.SelectedItem = cmbEnvelopeType.Properties.Items.Cast(Of Type).Where(Function(i) i.Id = Envelope.Type.Id).SingleOrDefault()
@@ -126,7 +126,7 @@ Public Class frmEnvelopeMainData
oEnvelopeType = EnvelopeType
End If
Envelope.Title = txtTitle.EditValue.ToString
Envelope.Type = oEnvelopeType
Envelope.Defaults = oEnvelopeType
Envelope.EnvelopeTypeId = IIf(IsNothing(oEnvelopeType), 0, oEnvelopeType.Id)
Envelope.CertificationType = cmbCertificationType.SelectedIndex + 1
Envelope.Language = cmbLanguage.EditValue