Compare commits

...

23 Commits

Author SHA1 Message Date
d8200993af feat(appsettings.Dev): remove wrong cnn string 2025-08-20 15:04:48 +02:00
ee98142405 refactor(Envelope): EnvelopeType in Type umbenennen 2025-08-19 15:37:12 +02:00
c27337a6f5 refactor(Envelope): make EnvelopeType nullable for only .net 2025-08-19 15:36:28 +02:00
a09ea990ab Revert "refactor(Envelope): remove EnvelopeType-property"
This reverts commit f4c61e3bc7.
2025-08-19 15:34:43 +02:00
05888bc57d revert(EnvelopeDocument): Add Filepath for .net framework
revert(EnvelopeHistory): Add AddedWhen, ActionDate and Comment for .net framework
2025-08-19 15:32:15 +02:00
39af0fe4fd feat(EnvelopeDocument): add System.Drawing-reference for .net-framework 2025-08-19 15:21:13 +02:00
f4c61e3bc7 refactor(Envelope): remove EnvelopeType-property 2025-08-19 15:20:00 +02:00
3f5a584399 refactor: Anpassung der Klassen-Definition für EnvelopeHistory zur Unterstützung von NET und NETFRAMEWORK 2025-08-19 15:11:42 +02:00
6aec854a64 refactor(EnvelopeHistory): Anpassung der Klassen-Definition für EnvelopeHistory zur Unterstützung von NET und NETFRAMEWORK 2025-08-19 15:06:00 +02:00
c360bde103 remove unnecessary references 2025-08-19 15:02:36 +02:00
82d4b0e740 refactor(EnvelopeDocument): Überarbeitung der Klasse EnvelopeDocument für .NET/Framework Kompatibilität
- Hinzugefügt: bedingte Namensraum-Deklaration für NET und NETFRAMEWORK
- Konstruktor eingeführt mit Initialisierung von Elements (nur .NET Framework)
- Entfernt: Property AddedWhen
- Verschoben: FileNameOriginal, IsTempFile, Filename, Filepath, Thumbnail, PageCount
  → nur verfügbar unter .NET Framework
- Entfernt Standardinitialisierung von Elements, stattdessen abhängig von Laufzeitumgebung
2025-08-19 15:02:05 +02:00
12519f06f7 refactor(EnvelopeCertificate): Entfernen Sie die Domäne, das Repository, die DTOs und den Dienst mit allen Schnittstellen. 2025-08-19 14:48:15 +02:00
a2471a0c35 refactor(EmailTemplate): adjust namespace declaration for EmailTemplate to support NET and NETFRAMEWORK 2025-08-19 14:35:35 +02:00
4251a24fe9 refactor(DocumentStatus): DocumentStatus-Klasse für plattformübergreifende Kompilierung angepasst
- Status-Default-Wert in Konstruktor verschoben, nur für NETFRAMEWORK gesetzt
- Klasse für NET/NETFRAMEWORK conditional compilation angepasst
- Unnötige Properties (StatusChangedWhen, AddedWhen, ChangedWhen, Navigation Properties) entfernt
- TODO-Kommentar für Status-Überprüfung erhalten
2025-08-19 14:31:11 +02:00
63a830c8e3 refactor(DocumentReceiverElement): Trenne .NET- und .NET Framework-spezifische Initialisierung in DocumentReceiverElement
- Verschiebe Standardwerte für Id, Required, ReadOnly und AnnotationIndex in den Konstruktor für .NET Framework
- Passe #if-Direktiven an, um Namensräume und NotMapped-Eigenschaften korrekt zu handhaben
- Entferne redundante Standardwert-Zuweisungen bei Property-Deklarationen
- Bereite Klasse für plattformübergreifende Nutzung vor
2025-08-19 14:26:14 +02:00
acee28ffce refactor: add conditional compilation for .NET and .NET Framework 2025-08-19 14:18:01 +02:00
50a541c5bf refactor: Plattform-spezifische Anpassungen an der Receiver-Klasse
- `NotMapped` Properties nur für NETFRAMEWORK verfügbar gemacht
- Klasse und Namespaces für NET- und NETFRAMEWORK-Bedingungen angepasst
- Redundant in NET definierten Code entfernt
2025-08-19 14:14:10 +02:00
d43877db62 refactor(Envelope): Standardwerte in der Envelope-Entity in den Konstruktor verschoben 2025-08-19 14:06:17 +02:00
242e66cd8d refactor(Receiver): make TfaRegDeadline nullable 2025-08-19 12:47:57 +02:00
e44fa0b7bd chore Upg UserManager 2025-08-19 12:13:30 +02:00
4201f7820a refactor(Envelope): Envelope-Entitätseigenschaften für NET/NETFRAMEWORK nullfähig und bedingt machen
- Mehrere DateTime- und int-Eigenschaften in nullfähige Typen geändert
- Bedingte Kompilierung für Message, Title, ContractTypeTranslated und StatusTranslated angewendet
- Einige Standardwerte entfernt, um die Kompatibilität mit verschiedenen Frameworks zu verbessern
- Flexibilität der Entitätszuordnung für Envelope verbessert
2025-08-19 11:12:41 +02:00
e095074c22 chore(Application): Aktualisierung zur Verwendung der bedingten Versionsverwaltung für Abhängigkeiten 2025-08-19 09:43:37 +02:00
412f19547f fix(Envelope): Entfernen das Attribut „NotMapped“. 2025-08-19 09:27:27 +02:00
33 changed files with 601 additions and 691 deletions

View File

@@ -1,12 +0,0 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
/// <summary>
///
/// </summary>
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
public interface IEnvelopeCertificateRepository : ICRUDRepository<EnvelopeCertificate, int>
{
}

View File

@@ -1,13 +0,0 @@
using DigitalData.Core.Abstraction.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Services;
/// <summary>
///
/// </summary>
[Obsolete("Use MediatR")]
public interface IEnvelopeCertificateService : IBasicCRUDService<EnvelopeCertificateDto, EnvelopeCertificate, int>
{
}

View File

@@ -1,50 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs;
/// <summary>
/// Data Transfer Object representing certificate information for an envelope.
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public class EnvelopeCertificateDto
{
/// <summary>
/// Gets the unique identifier of the certificate.
/// </summary>
public int Id { get; init; }
/// <summary>
/// Gets the envelope ID associated with the certificate.
/// </summary>
public int EnvelopeId { get; init; }
/// <summary>
/// Gets the UUID of the envelope.
/// </summary>
public string EnvelopeUuid { get; init; } = string.Empty;
/// <summary>
/// Gets the subject of the envelope.
/// </summary>
public string EnvelopeSubject { get; init; } = string.Empty;
/// <summary>
/// Gets the ID of the creator of the envelope.
/// </summary>
public int CreatorId { get; init; }
/// <summary>
/// Gets the name of the creator.
/// </summary>
public string CreatorName { get; init; } = string.Empty;
/// <summary>
/// Gets the email address of the creator.
/// </summary>
public string CreatorEmail { get; init; } = string.Empty;
/// <summary>
/// Gets the current status of the envelope.
/// </summary>
public int EnvelopeStatus { get; init; }
}

View File

@@ -27,7 +27,6 @@ public class MappingProfile : Profile
CreateMap<DocumentStatus, DocumentStatusDto>();
CreateMap<EmailTemplate, EmailTemplateDto>();
CreateMap<Envelope, EnvelopeDto>();
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryDto>();
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryCreateDto>();
@@ -45,7 +44,6 @@ public class MappingProfile : Profile
CreateMap<DocumentStatusDto, DocumentStatus>();
CreateMap<EmailTemplateDto, EmailTemplate>();
CreateMap<EnvelopeDto, Envelope>();
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
CreateMap<EnvelopeHistoryDto, Domain.Entities.EnvelopeHistory>();
CreateMap<EnvelopeHistoryCreateDto, Domain.Entities.EnvelopeHistory>();

View File

@@ -33,7 +33,6 @@ public static class DependencyInjection
services.TryAddScoped<IDocumentStatusService, DocumentStatusService>();
services.TryAddScoped<IEmailTemplateService, EmailTemplateService>();
services.TryAddScoped<IEnvelopeService, EnvelopeService>();
services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();

View File

@@ -20,11 +20,22 @@
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.1" />
<PackageReference Include="MediatR" Version="12.5.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
<PackageReference Include="Otp.NET" Version="1.4.0" />
<PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
<PackageReference Include="UserManager" Version="1.1.1" />
<PackageReference Include="UserManager" Version="1.1.3" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,25 +0,0 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Contracts.Repositories;
using EnvelopeGenerator.Application.Contracts.Services;
namespace EnvelopeGenerator.Application.Services;
/// <summary>
///
/// </summary>
[Obsolete("Use MediatR")]
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
{
/// <summary>
///
/// </summary>
/// <param name="repository"></param>
/// <param name="mapper"></param>
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}

View File

@@ -84,8 +84,8 @@
<Reference Include="DigitalData.Modules.Logging, Version=2.6.5.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Logging.2.6.5\lib\net462\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.1.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UserManager.Domain.3.2.1\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UserManager.Domain.3.2.3\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>

View File

@@ -64,7 +64,7 @@ Public Class EnvelopeModel
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)
oEnvelope.Documents = DocumentModel.List(oEnvelope.Id)
oEnvelope.History = HistoryModel.List(oEnvelope.Id)
oEnvelope.EnvelopeType = EnvelopeTypeModel.GetById(oEnvelope.EnvelopeTypeId)
oEnvelope.Type = EnvelopeTypeModel.GetById(oEnvelope.EnvelopeTypeId)
Return oEnvelope
End Function

View File

@@ -43,5 +43,5 @@
<package id="System.Text.Json" version="8.0.5" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="UserManager.Domain" version="3.2.1" targetFramework="net462" />
<package id="UserManager.Domain" version="3.2.3" targetFramework="net462" />
</packages>

View File

@@ -2,22 +2,30 @@
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_CONFIG", Schema = "dbo")]
public class Config
#if NET
;
#elif NETFRAMEWORK
{
[Column("SENDING_PROFILE", TypeName = "int")]
[Required]
public int SendingProfile { get; set; }
#endif
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
[Required]
public string SignatureHost { get; set; }
[Table("TBSIG_CONFIG", Schema = "dbo")]
public class Config
{
[Column("SENDING_PROFILE", TypeName = "int")]
[Required]
public int SendingProfile { get; set; }
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
public string ExternalProgramName { get; set; }
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
[Required]
public string SignatureHost { get; set; }
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
public string ExportPath { get; set; }
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
public string ExternalProgramName { get; set; }
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
public string ExportPath { get; set; }
}
#if NETFRAMEWORK
}
}
#endif

View File

@@ -6,93 +6,110 @@ using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
#if NET
;
#elif NETFRAMEWORK
{
#endif
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
public class DocumentReceiverElement
{
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
public class DocumentReceiverElement
public DocumentReceiverElement()
{
// TODO: * Check the Form App and remove the default value
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; } = -1;
[Required]
[Column("DOCUMENT_ID")]
public int DocumentId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("ELEMENT_TYPE")]
[DefaultValue(0)]
public int ElementType { get; set; }
[Required]
[Column("POSITION_X")]
[DefaultValue(0)]
public double X { get; set; }
[Required]
[Column("POSITION_Y")]
[DefaultValue(0)]
public double Y { get; set; }
[Required]
[Column("WIDTH")]
[DefaultValue(0)]
public double Width { get; set; }
[Required]
[Column("HEIGHT")]
[DefaultValue(0)]
public double Height { get; set; }
[Required]
[Column("PAGE")]
[DefaultValue(1)]
public int Page { get; set; }
// TODO: * Check the Form App and remove the default value
[Required]
[Column("REQUIRED")]
[DefaultValue(false)]
public bool Required { get; set; } = false;
[Column("TOOLTIP")]
public string Tooltip { get; set; }
// TODO: * Check the Form App and remove the default value
[Required]
[Column("READ_ONLY")]
[DefaultValue(false)]
public bool ReadOnly { get; set; } = false;
// TODO: * Check the Form App and remove the default value
[Required]
[Column("ANNOTATION_INDEX")]
[DefaultValue(0)]
public int AnnotationIndex { get; set; } = 0;
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DefaultValue("GETDATE()")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
[ForeignKey("DocumentId")]
public virtual EnvelopeDocument Document { get; set; }
[ForeignKey("ReceiverId")]
public virtual Receiver Receiver { get; set; }
[NotMapped]
public double Top => Math.Round(Y, 5);
[NotMapped]
public double Left => Math.Round(X, 5);
#if NETFRAMEWORK
Id = -1;
Required = false;
ReadOnly = false;
AnnotationIndex = 0;
#endif
}
}
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("DOCUMENT_ID")]
public int DocumentId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("ELEMENT_TYPE")]
[DefaultValue(0)]
public int ElementType { get; set; }
[Required]
[Column("POSITION_X")]
[DefaultValue(0)]
public double X { get; set; }
[Required]
[Column("POSITION_Y")]
[DefaultValue(0)]
public double Y { get; set; }
[Required]
[Column("WIDTH")]
[DefaultValue(0)]
public double Width { get; set; }
[Required]
[Column("HEIGHT")]
[DefaultValue(0)]
public double Height { get; set; }
[Required]
[Column("PAGE")]
[DefaultValue(1)]
public int Page { get; set; }
[Required]
[Column("REQUIRED")]
[DefaultValue(false)]
public bool Required { get; set; }
[Column("TOOLTIP")]
public string Tooltip { get; set; }
[Required]
[Column("READ_ONLY")]
[DefaultValue(false)]
public bool ReadOnly { get; set; }
[Required]
[Column("ANNOTATION_INDEX")]
[DefaultValue(0)]
public int AnnotationIndex { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DefaultValue("GETDATE()")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
[ForeignKey("DocumentId")]
public virtual EnvelopeDocument Document { get; set; }
[ForeignKey("ReceiverId")]
public virtual Receiver Receiver { get; set; }
#if NETFRAMEWORK
[NotMapped]
public double Top => Math.Round(Y, 5);
[NotMapped]
public double Left => Math.Round(X, 5);
#endif
}
#if NETFRAMEWORK
}
#endif

View File

@@ -5,45 +5,44 @@ using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
public class DocumentStatus
#if NET
;
#elif NETFRAMEWORK
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
#endif
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
public class DocumentStatus
{
public DocumentStatus()
{
// TODO: * check Form Application and remove default value
[Required]
[Column("STATUS")]
public Constants.DocumentStatus Status { get; set; } = Constants.DocumentStatus.Created;
[Column("STATUS_CHANGED_WHEN", TypeName = "datetime")]
public DateTime StatusChangedWhen { get; set; }
[Column("VALUE", TypeName = "nvarchar(max)")]
public string Value { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
[ForeignKey("EnvelopeId")]
public virtual Envelope Envelope { get; set; }
[ForeignKey("ReceiverId")]
public virtual Receiver Receiver { get; set; }
#if NETFRAMEWORK
Status = Constants.DocumentStatus.Created;
#endif
}
}
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("STATUS")]
public Constants.DocumentStatus Status { get; set; }
[Column("VALUE", TypeName = "nvarchar(max)")]
public string Value { get; set; }
}
#if NETFRAMEWORK
}
#endif

View File

@@ -6,30 +6,38 @@ using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
public class EmailTemplate
#if NET
;
#elif NETFRAMEWORK
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
#endif
[Column("NAME", TypeName = "nvarchar(64)")]
public string Name { get; set; }
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
public class EmailTemplate
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Column("BODY", TypeName = "nvarchar(max)")]
public string Body { get; set; }
[Column("NAME", TypeName = "nvarchar(64)")]
public string Name { get; set; }
[Column("SUBJECT", TypeName = "nvarchar(512)")]
public string Subject { get; set; }
[Column("BODY", TypeName = "nvarchar(max)")]
public string Body { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DefaultValue("GETDATE()")]
public DateTime AddedWhen { get; set; }
[Column("SUBJECT", TypeName = "nvarchar(512)")]
public string Subject { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DefaultValue("GETDATE()")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
}
#if NETFRAMEWORK
}
}
#endif

View File

@@ -8,164 +8,174 @@ using System.Linq;
#endif
namespace EnvelopeGenerator.Domain.Entities
#if NET
;
#elif NETFRAMEWORK
{
#endif
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
public class Envelope
{
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
public class Envelope
public Envelope()
{
// TODO: * Check the Form App and remove the default value
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; } = 0;
[Required]
[Column("USER_ID")]
public int UserId { get; set; }
// TODO: * Check the Form App and remove the default value
[Required]
[Column("STATUS")]
public int Status { get; set; } = (int)Constants.EnvelopeStatus.EnvelopeCreated;
[NotMapped]
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
// TODO: The default value is set to 0. Check the Form App to remove this
[Required]
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
public string Uuid { get; set; } = Guid.NewGuid().ToString();
// TODO: * Check the Form App and remove the default value
[Column("MESSAGE", TypeName = "nvarchar(max)")]
public string Message { get; set; } = My.Resources.Envelope.Please_read_and_sign_this_document;
[Column("EXPIRES_WHEN", TypeName = "datetime")]
public DateTime ExpiresWhen { get; set; }
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
public DateTime ExpiresWarningWhen { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
// TODO: * Check the Form App and remove the default value
[Column("TITLE", TypeName = "nvarchar(128)")]
public string Title { get; set; } = string.Empty;
[Column("COMMENT", TypeName = "nvarchar(128)")]
public string Comment { get; set; } = string.Empty;
[Column("CONTRACT_TYPE")]
public int ContractType { get; set; }
// TODO: * Check the Form App and remove the default value
[NotMapped]
public string ContractTypeTranslated => My.Resources.Model.ResourceManager.GetString(ContractType.ToString());
// TODO: * Check the Form App and remove the default value
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
public string Language { get; set; } = "de-DE";
// TODO: * Check the Form App and remove the default value
[Column("SEND_REMINDER_EMAILS")]
public bool SendReminderEmails { get; set; } = false;
// TODO: * Check the Form App and remove the default value
[Column("FIRST_REMINDER_DAYS")]
public int FirstReminderDays { get; set; } = 0;
// TODO: * Check the Form App and remove the default value
[Column("REMINDER_INTERVAL_DAYS")]
public int ReminderIntervalDays { get; set; } = 0;
[Column("ENVELOPE_TYPE")]
public int EnvelopeTypeId { get; set; }
// TODO: * Check the Form App and remove the default value
[Column("CERTIFICATION_TYPE")]
public int CertificationType { get; set; } = (int)Constants.CertificationType.AdvancedElectronicSignature;
// TODO: * Check the Form App and remove the default value
[Column("USE_ACCESS_CODE")]
public bool UseAccessCode { get; set; } = false;
[Column("FINAL_EMAIL_TO_CREATOR")]
public int FinalEmailToCreator { get; set; }
[Column("FINAL_EMAIL_TO_RECEIVERS")]
public int FinalEmailToReceivers { get; set; }
[Column("EXPIRES_WHEN_DAYS")]
public int ExpiresWhenDays { get; set; }
[Column("EXPIRES_WARNING_WHEN_DAYS")]
public int ExpiresWarningWhenDays { get; set; }
// TODO: * Check the Form App and remove the default value
[Column("TFA_ENABLED", TypeName = "bit")]
public bool TFAEnabled { get; set; } = false;
[Column("DOC_RESULT", TypeName = "varbinary(max)")]
public byte[] DocResult { get; set; }
[NotMapped]
public string CURRENT_WORK_APP { get; set; } = "signFLOW GUI";
// TODO: * Check the Form App and remove the default value
[ForeignKey("UserId")]
public User User { get; set; }
[ForeignKey("EnvelopeTypeId")]
public EnvelopeType EnvelopeType { get; set; }
[NotMapped]
public string EnvelopeTypeTitle => EnvelopeType?.Title;
[NotMapped]
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
[NotMapped]
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(((Constants.EnvelopeStatus)Status).ToString());
[NotMapped]
public bool TFA_Enabled { get; set; } = false;
[NotMapped]
public byte[] DOC_RESULT { get; set; }
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<EnvelopeDocument> Documents { get; set; } = new List<EnvelopeDocument>();
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<EnvelopeHistory> History { get; set; } = new List<EnvelopeHistory>();
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<Receiver> Receivers { get; set; } = new List<Receiver>();
/// <summary>
/// Validates whether the receiver and document data are complete.
/// </summary>
public List<string> ValidateReceiverDocumentData()
{
var errors = new List<string>();
if (!Documents?.Any() ?? true)
errors.Add(My.Resources.Envelope.Missing_Documents);
if (!Receivers?.Any() ?? true)
errors.Add(My.Resources.Envelope.Missing_Receivers);
if (Receivers?.Any(r => !r.HasEmailAndName) ?? false)
errors.Add(My.Resources.Envelope.Incomplete_Receivers);
return errors;
}
#if NETFRAMEWORK
Id = 0;
Status = (int)Constants.EnvelopeStatus.EnvelopeCreated;
Uuid = Guid.NewGuid().ToString();
Message = My.Resources.Envelope.Please_read_and_sign_this_document;
Title= string.Empty;
Comment = string.Empty;
Language = "de-DE";
SendReminderEmails = false;
FirstReminderDays = 0;
ReminderIntervalDays = 0;
CertificationType = (int)Constants.CertificationType.AdvancedElectronicSignature;
UseAccessCode = false;
Documents = Enumerable.Empty<EnvelopeDocument>().ToList();
History = Enumerable.Empty<EnvelopeHistory>().ToList();
#endif
}
}
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("USER_ID")]
public int UserId { get; set; }
[Required]
[Column("STATUS")]
public int Status { get; set; }
[Required]
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
public string Uuid { get; set; }
[Column("MESSAGE", TypeName = "nvarchar(max)")]
public string Message { get; set; }
[Column("EXPIRES_WHEN", TypeName = "datetime")]
public DateTime? ExpiresWhen { get; set; }
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
public DateTime? ExpiresWarningWhen { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
[Column("TITLE", TypeName = "nvarchar(128)")]
public string
#if NET
?
#endif
Title { get; set; }
[Column("COMMENT", TypeName = "nvarchar(128)")]
public string Comment { get; set; }
[Column("CONTRACT_TYPE")]
public int? ContractType { get; set; }
#if NETFRAMEWORK
[NotMapped]
public string ContractTypeTranslated => My.Resources.Model.ResourceManager.GetString(ContractType.ToString());
#endif
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
public string Language { get; set; }
[Column("SEND_REMINDER_EMAILS")]
public bool SendReminderEmails { get; set; }
[Column("FIRST_REMINDER_DAYS")]
public int? FirstReminderDays { get; set; }
[Column("REMINDER_INTERVAL_DAYS")]
public int? ReminderIntervalDays { get; set; }
[Column("ENVELOPE_TYPE")]
public int? EnvelopeTypeId { get; set; }
[Column("CERTIFICATION_TYPE")]
public int? CertificationType { get; set; }
[Column("USE_ACCESS_CODE")]
public bool UseAccessCode { get; set; }
[Column("FINAL_EMAIL_TO_CREATOR")]
public int? FinalEmailToCreator { get; set; }
[Column("FINAL_EMAIL_TO_RECEIVERS")]
public int? FinalEmailToReceivers { get; set; }
[Column("EXPIRES_WHEN_DAYS")]
public int? ExpiresWhenDays { get; set; }
[Column("EXPIRES_WARNING_WHEN_DAYS")]
public int? ExpiresWarningWhenDays { get; set; }
[ForeignKey("UserId")]
public User User { get; set; }
[ForeignKey("EnvelopeTypeId")]
public virtual EnvelopeType
#if NET
?
#endif
Type { get; set; }
#if NETFRAMEWORK
[NotMapped]
public string CURRENT_WORK_APP { get; set; } = "signFLOW GUI";
[NotMapped]
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
[NotMapped]
public bool TFA_Enabled { get; set; } = false;
[NotMapped]
public byte[] DOC_RESULT { get; set; }
#endif
public List<EnvelopeDocument> Documents { get; set; }
public List<EnvelopeHistory> History { get; set; }
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<Receiver> Receivers { get; set; } = Enumerable.Empty<Receiver>().ToList();
#if NETFRAMEWORK
/// <summary>
/// Validates whether the receiver and document data are complete.
/// </summary>
public List<string> ValidateReceiverDocumentData()
{
var errors = new List<string>();
if (!Documents?.Any() ?? true)
errors.Add(My.Resources.Envelope.Missing_Documents);
if (!Receivers?.Any() ?? true)
errors.Add(My.Resources.Envelope.Missing_Receivers);
if (Receivers?.Any(r => !r.HasEmailAndName) ?? false)
errors.Add(My.Resources.Envelope.Incomplete_Receivers);
return errors;
}
#endif
}
#if NETFRAMEWORK
}
#endif

View File

@@ -1,42 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
public class EnvelopeCertificate
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
public string EnvelopeUuid { get; set; }
[Required]
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
public string EnvelopeSubject { get; set; }
[Required]
[Column("CREATOR_ID")]
public int CreatorId { get; set; }
[Required]
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
public string CreatorName { get; set; }
[Required]
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
public string CreatorEmail { get; set; }
[Required]
[Column("ENVELOPE_STATUS")]
public int EnvelopeStatus { get; set; }
}
}

View File

@@ -1,51 +1,64 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Drawing;
#if NETFRAMEWORK
using System;
using System.Drawing;
using System.Collections.Generic;
using System.Linq;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
public class EnvelopeDocument
#if NET
;
#elif NETFRAMEWORK
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
#endif
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; } = 0;
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
public byte[] ByteData { get; set; }
// TODO: * Check the Form App and remove the default value
public List<DocumentReceiverElement> Elements { get; set; } = new List<DocumentReceiverElement>();
[NotMapped]
public string FileNameOriginal { get; set; }
[NotMapped]
public bool IsTempFile { get; set; }
[NotMapped]
public string Filename { get; set; }
[NotMapped]
public string Filepath { get; set; }
[NotMapped]
public Bitmap Thumbnail { get; set; }
[NotMapped]
public int PageCount { get; set; }
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
public class EnvelopeDocument
{
public EnvelopeDocument()
{
#if NETFRAMEWORK
Elements = Enumerable.Empty<DocumentReceiverElement>().ToList();
#endif
}
}
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; } = 0;
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
public byte[] ByteData { get; set; }
public List<DocumentReceiverElement> Elements { get; set; }
// TODO: * Check the Form App and remove the default value
[NotMapped]
public string Filepath { get; set; }
#if NETFRAMEWORK
[NotMapped]
public string FileNameOriginal { get; set; }
[NotMapped]
public bool IsTempFile { get; set; }
[NotMapped]
public string Filename { get; set; }
[NotMapped]
public Bitmap Thumbnail { get; set; }
[NotMapped]
public int PageCount { get; set; }
#endif
}
#if NETFRAMEWORK
}
#endif

View File

@@ -6,43 +6,53 @@ using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
public class EnvelopeHistory
#if NET
;
#elif NETFRAMEWORK
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public long Id { get; set; }
#endif
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
public class EnvelopeHistory
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public long Id { get; set; }
[Required]
[Column("USER_REFERENCE", TypeName = "nvarchar(128)")]
public string UserReference { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("STATUS")]
public Constants.EnvelopeStatus Status { get; set; }
[Required]
[Column("USER_REFERENCE", TypeName = "nvarchar(128)")]
public string UserReference { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime AddedWhen { get; set; }
[Required]
[Column("STATUS")]
public Constants.EnvelopeStatus Status { get; set; }
[Column("ACTION_DATE", TypeName = "datetime")]
public DateTime ActionDate { get; set; } = DateTime.Now;
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime AddedWhen { get; set; }
[Column("COMMENT", TypeName = "nvarchar(max)")]
public string Comment { get; set; }
[Column("ACTION_DATE", TypeName = "datetime")]
public DateTime ActionDate { get; set; } = DateTime.Now;
public virtual User Sender { get; set; }
[Column("COMMENT", TypeName = "nvarchar(max)")]
public string Comment { get; set; }
public virtual Receiver Receiver { get; set; }
public virtual User Sender { get; set; }
[NotMapped]
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
public virtual Receiver Receiver { get; set; }
#if NETFRAMEWORK
[NotMapped]
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
#endif
}
#if NETFRAMEWORK
}
}
#endif

View File

@@ -5,59 +5,65 @@ using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
public class EnvelopeReceiver
#if NET
;
#elif NETFRAMEWORK
{
[Key]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
#endif
[Key]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
public class EnvelopeReceiver
{
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("SEQUENCE")]
public int Sequence { get; set; }
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Column("NAME", TypeName = "nvarchar(128)")]
public string Name { get; set; }
[Required]
[Column("SEQUENCE")]
public int Sequence { get; set; }
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
public string JobTitle { get; set; }
[Column("NAME", TypeName = "nvarchar(128)")]
public string Name { get; set; }
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
public string CompanyName { get; set; }
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
public string JobTitle { get; set; }
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
public string PrivateMessage { get; set; }
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
public string CompanyName { get; set; }
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
public string AccessCode { get; set; }
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
public string PrivateMessage { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
public string AccessCode { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("PHONE_NUMBER")]
[StringLength(20)]
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
public string PhoneNumber { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime ChangedWhen { get; set; }
[NotMapped]
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
[Column("PHONE_NUMBER")]
[StringLength(20)]
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
public string PhoneNumber { get; set; }
[NotMapped]
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
[NotMapped]
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
[ForeignKey("EnvelopeId")]
public Envelope Envelope { get; set; }
[NotMapped]
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
[ForeignKey("ReceiverId")]
public Receiver Receiver { get; set; }
[ForeignKey("EnvelopeId")]
public Envelope Envelope { get; set; }
[ForeignKey("ReceiverId")]
public Receiver Receiver { get; set; }
}
#if NETFRAMEWORK
}
}
#endif

View File

@@ -7,84 +7,94 @@ using System.Collections.Generic;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_RECEIVER", Schema = "dbo")]
public class Receiver
#if NET
;
#elif NETFRAMEWORK
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
#endif
[Required, EmailAddress]
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(250)")]
[StringLength(250)]
public string EmailAddress { get; set; }
[Table("TBSIG_RECEIVER", Schema = "dbo")]
public class Receiver
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
public string Signature { get; set; }
[Required, EmailAddress]
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(250)")]
[StringLength(250)]
public string EmailAddress { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Required]
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
public string Signature { get; set; }
[Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")]
public string TotpSecretkey { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("TFA_REG_DEADLINE", TypeName = "datetime")]
public DateTime TfaRegDeadline { get; set; }
[Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")]
public string TotpSecretkey { get; set; }
public List<EnvelopeReceiver> EnvelopeReceivers { get; set; }
[Column("TFA_REG_DEADLINE", TypeName = "datetime")]
public DateTime? TfaRegDeadline { get; set; }
[NotMapped]
public string Name { get; set; }
public List<EnvelopeReceiver> EnvelopeReceivers { get; set; }
[NotMapped]
public string Company { get; set; } = string.Empty;
#if NETFRAMEWORK
[NotMapped]
public string Name { get; set; }
[NotMapped]
public string JobTitle { get; set; } = string.Empty;
[NotMapped]
public string Company { get; set; } = string.Empty;
[NotMapped]
public string PhoneNumber { get; set; } = string.Empty;
[NotMapped]
public string JobTitle { get; set; } = string.Empty;
[NotMapped]
public string AccessCode { get; set; } = string.Empty;
[NotMapped]
public string PhoneNumber { get; set; } = string.Empty;
[NotMapped]
public string PrivateMessage { get; set; } = string.Empty;
[NotMapped]
public string AccessCode { get; set; } = string.Empty;
[NotMapped]
public int Sequence { get; set; } = 0;
[NotMapped]
public string PrivateMessage { get; set; } = string.Empty;
[NotMapped]
public DateTime SignedDate { get; set; } = DateTime.MinValue;
[NotMapped]
public int Sequence { get; set; } = 0;
[NotMapped]
public Constants.ReceiverStatus Status { get; set; }
[NotMapped]
public DateTime SignedDate { get; set; } = DateTime.MinValue;
[NotMapped]
public Constants.ColorType ColorType { get; set; }
[NotMapped]
public Constants.ReceiverStatus Status { get; set; }
[NotMapped]
public bool HasId => Id > 0;
[NotMapped]
public Constants.ColorType ColorType { get; set; }
[NotMapped]
public bool HasEmailAndName =>
!string.IsNullOrWhiteSpace(EmailAddress) &&
!string.IsNullOrWhiteSpace(Name);
[NotMapped]
public bool HasId => Id > 0;
[NotMapped]
public string SignedDateDisplayValue =>
SignedDate == DateTime.MinValue ? "-" : SignedDate.ToString("G");
[NotMapped]
public bool HasEmailAndName =>
!string.IsNullOrWhiteSpace(EmailAddress) &&
!string.IsNullOrWhiteSpace(Name);
[NotMapped]
public Color Color => ColorType.ToColor();
[NotMapped]
public string SignedDateDisplayValue =>
SignedDate == DateTime.MinValue ? "-" : SignedDate.ToString("G");
public string GetSignature()
{
return EmailAddress.ToUpperInvariant().GetChecksum();
}
[NotMapped]
public Color Color => ColorType.ToColor();
public string GetSignature()
{
return EmailAddress.ToUpperInvariant().GetChecksum();
}
}
#endif
}
#if NETFRAMEWORK
}
#endif

View File

@@ -35,7 +35,7 @@
<ItemGroup>
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction.Attributes" Version="1.0.0" />
<PackageReference Include="UserManager.Domain" Version="3.2.1" />
<PackageReference Include="UserManager.Domain" Version="3.2.3" />
</ItemGroup>
<ItemGroup>

View File

@@ -13,7 +13,7 @@
<ItemGroup>
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.4" />
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="8.0.1" />
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
<PackageReference Include="Otp.NET" Version="1.4.0" />

View File

@@ -101,8 +101,8 @@
<Reference Include="DigitalData.Modules.Messaging, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Messaging.1.9.8\lib\net462\DigitalData.Modules.Messaging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UserManager.Domain.3.2.2\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.3.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UserManager.Domain.3.2.3\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>

View File

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

View File

@@ -50,5 +50,5 @@
<package id="System.Text.Json" version="9.0.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="UserManager.Domain" version="3.2.2" targetFramework="net462" />
<package id="UserManager.Domain" version="3.2.3" targetFramework="net462" />
</packages>

View File

@@ -48,7 +48,6 @@ public static class DIExtensions
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
@@ -61,7 +60,6 @@ public static class DIExtensions
services.AddDbRepository<EGDbContext, DocumentStatus>(context => context.DocumentStatus).UseAutoMapper();
services.AddDbRepository<EGDbContext, EmailTemplate>(context => context.EmailTemplate).UseAutoMapper();
services.AddDbRepository<EGDbContext, Envelope>(context => context.Envelopes).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeCertificate>(context => context.EnvelopeCertificates).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeHistory>(context => context.EnvelopeHistories).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeReceiver>(context => context.EnvelopeReceivers).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeType>(context => context.EnvelopeTypes).UseAutoMapper();

View File

@@ -29,8 +29,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
public DbSet<EmailTemplate> EmailTemplate { get; set; }
public DbSet<EnvelopeCertificate> EnvelopeCertificates { get; set; }
public DbSet<EnvelopeDocument> EnvelopeDocument { get; set; }
public DbSet<EnvelopeHistory> EnvelopeHistories { get; set; }
@@ -73,7 +71,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
Envelopes = Set<Envelope>();
DocumentReceiverElements = Set<DocumentReceiverElement>();
DocumentStatus = Set<DocumentStatus>();
EnvelopeCertificates = Set<EnvelopeCertificate>();
EnvelopeDocument = Set<EnvelopeDocument>();
EnvelopeHistories = Set<EnvelopeHistory>();
EnvelopeTypes = Set<EnvelopeType>();
@@ -101,7 +98,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
modelBuilder.Entity<DocumentStatus>();
modelBuilder.Entity<EmailTemplate>();
modelBuilder.Entity<Envelope>();
modelBuilder.Entity<EnvelopeCertificate>();
modelBuilder.Entity<EnvelopeHistory>();
modelBuilder.Entity<EnvelopeType>();
modelBuilder.Entity<Receiver>();
@@ -165,7 +161,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
AddTrigger<DocumentStatus>();
AddTrigger<EmailTemplate>();
AddTrigger<Envelope>();
AddTrigger<EnvelopeCertificate>();
AddTrigger<EnvelopeDocument>();
AddTrigger<EnvelopeHistory>();
AddTrigger<EnvelopeReceiver>();

View File

@@ -12,7 +12,7 @@
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.1.1" />
<PackageReference Include="DigitalData.Core.Infrastructure.AutoMapper" Version="1.0.3" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.1" />
<PackageReference Include="UserManager" Version="1.1.1" />
<PackageReference Include="UserManager" Version="1.1.3" />
</ItemGroup>
<ItemGroup>

View File

@@ -1053,7 +1053,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
});
});
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.EnvelopeType", b =>
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Type", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1271,7 +1271,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Envelope", b =>
{
b.HasOne("EnvelopeGenerator.Domain.Entities.EnvelopeType", "EnvelopeType")
b.HasOne("EnvelopeGenerator.Domain.Entities.Type", "Type")
.WithMany()
.HasForeignKey("EnvelopeTypeId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1283,7 +1283,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("EnvelopeType");
b.Navigation("Type");
b.Navigation("User");
});

View File

@@ -1050,7 +1050,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
});
});
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.EnvelopeType", b =>
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Type", b =>
{
b.Property<int>("Id")
.ValueGeneratedOnAdd()
@@ -1268,7 +1268,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
modelBuilder.Entity("EnvelopeGenerator.Domain.Entities.Envelope", b =>
{
b.HasOne("EnvelopeGenerator.Domain.Entities.EnvelopeType", "EnvelopeType")
b.HasOne("EnvelopeGenerator.Domain.Entities.Type", "Type")
.WithMany()
.HasForeignKey("EnvelopeTypeId")
.OnDelete(DeleteBehavior.Cascade)
@@ -1280,7 +1280,7 @@ namespace EnvelopeGenerator.Infrastructure.Migrations
.OnDelete(DeleteBehavior.Cascade)
.IsRequired();
b.Navigation("EnvelopeType");
b.Navigation("Type");
b.Navigation("User");
});

View File

@@ -1,13 +0,0 @@
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class EnvelopeCertificateRepository : CRUDRepository<EnvelopeCertificate, int, EGDbContext>, IEnvelopeCertificateRepository
{
public EnvelopeCertificateRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeCertificates)
{
}
}

View File

@@ -1,14 +0,0 @@
using EnvelopeGenerator.Application.Contracts.Services;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
public class TestEnvelopeCertificateController : TestControllerBase<IEnvelopeCertificateService, EnvelopeCertificateDto, EnvelopeCertificate, int>
{
public TestEnvelopeCertificateController(ILogger<TestEnvelopeCertificateController> logger, IEnvelopeCertificateService service) : base(logger, service)
{
}
}

View File

@@ -7,8 +7,5 @@
}
},
"AdminPassword": "dd",
"UseCSPInDev": false,
"ConnectionStrings": {
"Default": "Server=sDD-VMP04-SQL19\\CURSORAG;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
}
"UseCSPInDev": false
}