Compare commits
14 Commits
feat/signF
...
a8a768d7d6
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a8a768d7d6 | ||
|
|
31c4a8a20f | ||
|
|
e98abde5ff | ||
|
|
49497dafd1 | ||
|
|
08e1187124 | ||
|
|
1b923dc93b | ||
|
|
bdf2527fc1 | ||
|
|
1a69478f48 | ||
|
|
83d29bf78d | ||
|
|
bc45aadf27 | ||
|
|
7e66cd4dae | ||
|
|
cc11d70a27 | ||
|
|
02aeaea8a9 | ||
|
|
05867cc645 |
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using DigitalData.Core.Client.Interface;
|
||||
namespace EnvelopeGenerator.Application.Configurations;
|
||||
|
||||
/// <summary>
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using static EnvelopeGenerator.Common.Constants;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
namespace EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using CommandDotNet;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
@@ -12,5 +12,5 @@ public interface IReceiverService : ICRUDService<ReceiverCreateDto, ReceiverRead
|
||||
|
||||
Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
|
||||
|
||||
Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto) where TUpdateDto : IUnique<int>;
|
||||
Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto);
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Application.Interfaces;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
|
||||
@@ -1,21 +1,35 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing configuration settings.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class ConfigDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record ConfigDto(
|
||||
string DocumentPath,
|
||||
int SendingProfile,
|
||||
string SignatureHost,
|
||||
string ExternalProgramName,
|
||||
string ExportPath) : IUnique<int>
|
||||
{
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
||||
};
|
||||
/// <summary>
|
||||
/// Gets or sets the path to the document.
|
||||
/// </summary>
|
||||
public string DocumentPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the sending profile identifier.
|
||||
/// </summary>
|
||||
public int SendingProfile { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the signature host URL or name.
|
||||
/// </summary>
|
||||
public string SignatureHost { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the external program.
|
||||
/// </summary>
|
||||
public string ExternalProgramName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the path where exports will be saved.
|
||||
/// </summary>
|
||||
public string ExportPath { get; set; }
|
||||
}
|
||||
@@ -1,26 +1,95 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing a positioned element assigned to a document receiver.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class DocumentReceiverElementDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record DocumentReceiverElementDto(
|
||||
int Id,
|
||||
int DocumentId,
|
||||
int ReceiverId,
|
||||
int ElementType,
|
||||
double X,
|
||||
double Y,
|
||||
double Width,
|
||||
double Height,
|
||||
int Page,
|
||||
bool Required,
|
||||
string? Tooltip,
|
||||
bool ReadOnly,
|
||||
int AnnotationIndex,
|
||||
DateTime AddedWhen,
|
||||
DateTime? ChangedWhen,
|
||||
double Top,
|
||||
double Left
|
||||
): IUnique<int>;
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the element.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the associated document.
|
||||
/// </summary>
|
||||
public int DocumentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the receiver.
|
||||
/// </summary>
|
||||
public int ReceiverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the type of the element.
|
||||
/// </summary>
|
||||
public int ElementType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the X coordinate of the element.
|
||||
/// </summary>
|
||||
public double X { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the Y coordinate of the element.
|
||||
/// </summary>
|
||||
public double Y { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the width of the element.
|
||||
/// </summary>
|
||||
public double Width { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the height of the element.
|
||||
/// </summary>
|
||||
public double Height { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the page number where the element appears.
|
||||
/// </summary>
|
||||
public int Page { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the element is required.
|
||||
/// </summary>
|
||||
public bool Required { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the tooltip text for the element.
|
||||
/// </summary>
|
||||
public string? Tooltip { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether the element is read-only.
|
||||
/// </summary>
|
||||
public bool ReadOnly { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the annotation index for ordering or reference.
|
||||
/// </summary>
|
||||
public int AnnotationIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when the element was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when the element was last changed, if applicable.
|
||||
/// </summary>
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the top position of the element (in layout terms).
|
||||
/// </summary>
|
||||
public double Top { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the left position of the element (in layout terms).
|
||||
/// </summary>
|
||||
public double Left { get; set; }
|
||||
}
|
||||
@@ -1,18 +1,50 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing the status of a document for a specific receiver.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class DocumentStatusDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record DocumentStatusDto(
|
||||
int Id,
|
||||
int EnvelopeId,
|
||||
int ReceiverId,
|
||||
int Status,
|
||||
DateTime? StatusChangedWhen,
|
||||
DateTime AddedWhen,
|
||||
DateTime? ChangedWhen) : IUnique<int>
|
||||
{
|
||||
public string? Value { get; set; }
|
||||
};
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the document status entry.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ID of the associated envelope.
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the ID of the receiver associated with this status.
|
||||
/// </summary>
|
||||
public int ReceiverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the current status code.
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when the status was changed.
|
||||
/// </summary>
|
||||
public DateTime? StatusChangedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when this record was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when this record was last changed.
|
||||
/// </summary>
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the display value associated with the status.
|
||||
/// </summary>
|
||||
public string? Value { get; set; }
|
||||
}
|
||||
@@ -1,5 +1,4 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
{
|
||||
@@ -7,7 +6,7 @@ namespace EnvelopeGenerator.Application.DTOs
|
||||
///
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EmailTemplateDto : IUnique<int>
|
||||
public record EmailTemplateDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -1,16 +1,50 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing certificate information for an envelope.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeCertificateDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeCertificateDto(
|
||||
int Id,
|
||||
int EnvelopeId,
|
||||
string EnvelopeUuid,
|
||||
string EnvelopeSubject,
|
||||
int CreatorId,
|
||||
string CreatorName,
|
||||
string CreatorEmail,
|
||||
int EnvelopeStatus) : IUnique<int>;
|
||||
/// <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; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the subject of the envelope.
|
||||
/// </summary>
|
||||
public string EnvelopeSubject { get; init; }
|
||||
|
||||
/// <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; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the email address of the creator.
|
||||
/// </summary>
|
||||
public string CreatorEmail { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the current status of the envelope.
|
||||
/// </summary>
|
||||
public int EnvelopeStatus { get; init; }
|
||||
}
|
||||
@@ -1,15 +1,35 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing a document within an envelope, including optional binary data and form elements.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeDocumentDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeDocumentDto
|
||||
(
|
||||
int Id,
|
||||
int EnvelopeId,
|
||||
DateTime AddedWhen,
|
||||
byte[]? ByteData = null,
|
||||
IEnumerable<DocumentReceiverElementDto>? Elements = null
|
||||
) : IUnique<int>;
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the document.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the envelope ID to which the document belongs.
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time when the document was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the binary data of the document, if available.
|
||||
/// </summary>
|
||||
public byte[]? ByteData { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the collection of elements associated with the document for receiver interactions, if any.
|
||||
/// </summary>
|
||||
public IEnumerable<DocumentReceiverElementDto>? Elements { get; set; }
|
||||
}
|
||||
@@ -1,56 +1,54 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||
using DigitalData.UserManager.Application.DTOs.User;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeDto() : IUnique<int>
|
||||
{
|
||||
public int Id { get; set; }
|
||||
public int Id { get; set; }
|
||||
|
||||
public int UserId { get; set; }
|
||||
public int UserId { get; set; }
|
||||
|
||||
public int Status { get; set; }
|
||||
public int Status { get; set; }
|
||||
|
||||
public string StatusName { get; set; }
|
||||
public string StatusName { get; set; }
|
||||
|
||||
public string Uuid { get; set; }
|
||||
public string Uuid { get; set; }
|
||||
|
||||
[TemplatePlaceholder("[MESSAGE]")]
|
||||
public string Message { get; set; }
|
||||
[TemplatePlaceholder("[MESSAGE]")]
|
||||
public string Message { get; set; }
|
||||
|
||||
public DateTime AddedWhen { get; set; }
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
|
||||
public string Title { get; set; }
|
||||
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
|
||||
public string Title { get; set; }
|
||||
|
||||
public int? ContractType { get; set; }
|
||||
public int? ContractType { get; set; }
|
||||
|
||||
public string Language { get; set; }
|
||||
public string Language { get; set; }
|
||||
|
||||
public int? EnvelopeTypeId { get; set; }
|
||||
public int? EnvelopeTypeId { get; set; }
|
||||
|
||||
public int? CertificationType { get; set; }
|
||||
public int? CertificationType { get; set; }
|
||||
|
||||
public bool? UseAccessCode { get; set; }
|
||||
public bool? UseAccessCode { get; set; }
|
||||
|
||||
public bool TFAEnabled { get; init; }
|
||||
public bool TFAEnabled { get; init; }
|
||||
|
||||
public UserReadDto? User { get; set; }
|
||||
public UserReadDto? User { get; set; }
|
||||
|
||||
public EnvelopeType? EnvelopeType { get; set; }
|
||||
public EnvelopeType? EnvelopeType { get; set; }
|
||||
|
||||
public string? EnvelopeTypeTitle { get; set; }
|
||||
public string? EnvelopeTypeTitle { get; set; }
|
||||
|
||||
public bool IsAlreadySent { get; set; }
|
||||
public bool IsAlreadySent { get; set; }
|
||||
|
||||
public byte[]? DocResult { get; init; }
|
||||
public byte[]? DocResult { get; init; }
|
||||
|
||||
public IEnumerable<EnvelopeDocumentDto>? Documents { get; set; }
|
||||
}
|
||||
public IEnumerable<EnvelopeDocumentDto>? Documents { get; set; }
|
||||
}
|
||||
@@ -1,12 +1,34 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object for creating a new envelope history record.
|
||||
/// </summary>
|
||||
public class EnvelopeHistoryCreateDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeHistoryCreateDto(
|
||||
int EnvelopeId,
|
||||
string UserReference,
|
||||
int Status,
|
||||
DateTime? ActionDate,
|
||||
string? Comment = null);
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the envelope.
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the user reference associated with the action.
|
||||
/// </summary>
|
||||
public required string UserReference { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the status of the envelope at the time of the action.
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time when the action occurred.
|
||||
/// </summary>
|
||||
public DateTime? ActionDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets an optional comment related to the action.
|
||||
/// </summary>
|
||||
public string? Comment { get; set; }
|
||||
}
|
||||
@@ -1,36 +1,73 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.UserManager.Application.DTOs.User;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using static EnvelopeGenerator.Common.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Data Transfer Object representing the history of an envelope, including status, sender, receiver, and related metadata.
|
||||
/// </summary>
|
||||
/// <param name="Id"></param>
|
||||
/// <param name="EnvelopeId"></param>
|
||||
/// <param name="UserReference"></param>
|
||||
/// <param name="Status"></param>
|
||||
/// <param name="StatusName"></param>
|
||||
/// <param name="AddedWhen"></param>
|
||||
/// <param name="ActionDate"></param>
|
||||
/// <param name="Sender"></param>
|
||||
/// <param name="Receiver"></param>
|
||||
/// <param name="ReferenceType"></param>
|
||||
/// <param name="Comment"></param>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeHistoryDto(
|
||||
long Id,
|
||||
int EnvelopeId,
|
||||
string UserReference,
|
||||
int Status,
|
||||
string? StatusName,
|
||||
DateTime AddedWhen,
|
||||
DateTime? ActionDate,
|
||||
UserCreateDto? Sender,
|
||||
ReceiverReadDto? Receiver,
|
||||
ReferenceType ReferenceType,
|
||||
string? Comment = null) : BaseDTO<long>(Id), IUnique<long>;
|
||||
public record EnvelopeHistoryDto : IUnique<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// Unique identifier for the envelope history entry.
|
||||
/// </summary>
|
||||
public long Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Identifier of the associated envelope.
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Reference string for the user related to this history entry.
|
||||
/// </summary>
|
||||
public string UserReference { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Status code of the envelope at this history point.
|
||||
/// </summary>
|
||||
public int Status { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Human-readable name of the status.
|
||||
/// </summary>
|
||||
public string? StatusName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date and time when this history entry was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Date and time when an action was performed, if applicable.
|
||||
/// </summary>
|
||||
public DateTime? ActionDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information about the sender associated with this history entry.
|
||||
/// </summary>
|
||||
public UserCreateDto? Sender { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Information about the receiver associated with this history entry.
|
||||
/// </summary>
|
||||
public ReceiverReadDto? Receiver { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Type of reference for this history entry.
|
||||
/// </summary>
|
||||
public ReferenceType ReferenceType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Optional comment related to this history entry.
|
||||
/// </summary>
|
||||
public string? Comment { get; set; }
|
||||
|
||||
/// <inheritdoc/>
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id.GetHashCode();
|
||||
}
|
||||
};
|
||||
|
||||
@@ -1,18 +1,62 @@
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a read-only Data Transfer Object (DTO) for an envelope receiver.
|
||||
/// Contains information about the receiver, associated envelope, and audit details.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeReceiverReadOnlyDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeReceiverReadOnlyDto(
|
||||
long Id,
|
||||
long EnvelopeId,
|
||||
string ReceiverMail,
|
||||
DateTime DateValid,
|
||||
DateTime AddedWhen,
|
||||
string AddedWho,
|
||||
EnvelopeDto? Envelope = null,
|
||||
string? ChangedWho = null,
|
||||
DateTime? ChangedWhen = null,
|
||||
ReceiverReadDto? Receiver = null);
|
||||
/// <summary>
|
||||
/// Gets or inits the unique identifier of the envelope receiver.
|
||||
/// </summary>
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the identifier of the associated envelope.
|
||||
/// </summary>
|
||||
public long EnvelopeId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the email address of the receiver.
|
||||
/// </summary>
|
||||
public string ReceiverMail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the date until which the receiver is valid.
|
||||
/// </summary>
|
||||
public DateTime DateValid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the date and time when the receiver was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the user who added the receiver.
|
||||
/// </summary>
|
||||
public string AddedWho { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the associated envelope details.
|
||||
/// </summary>
|
||||
public EnvelopeDto? Envelope { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the user who last changed the receiver, if any.
|
||||
/// </summary>
|
||||
public string? ChangedWho { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the date and time when the receiver was last changed, if any.
|
||||
/// </summary>
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or inits the associated receiver details.
|
||||
/// </summary>
|
||||
public ReceiverReadDto? Receiver { get; set; }
|
||||
}
|
||||
@@ -1,14 +1,31 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object for updating a read-only envelope receiver.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeReceiverReadOnlyUpdateDto : IUnique<long>
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeReceiverReadOnlyUpdateDto(
|
||||
long Id,
|
||||
DateTime DateValid,
|
||||
string ChangedWho) : IUnique<long>
|
||||
{
|
||||
public DateTime ChangedWhen { get; } = DateTime.Now;
|
||||
};
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the envelope receiver.
|
||||
/// </summary>
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date when the envelope receiver becomes valid.
|
||||
/// </summary>
|
||||
public DateTime DateValid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the user who made the change.
|
||||
/// </summary>
|
||||
public string ChangedWho { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the date and time when the change was made.
|
||||
/// </summary>
|
||||
public DateTime ChangedWhen { get; set; } = DateTime.Now;
|
||||
}
|
||||
@@ -1,23 +1,85 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing a type of envelope with its configuration settings.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class EnvelopeTypeDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record EnvelopeTypeDto(
|
||||
int Id,
|
||||
string Title,
|
||||
string Language,
|
||||
int? ExpiresDays,
|
||||
int? CertificationType,
|
||||
bool? UseAccessCode,
|
||||
int? FinalEmailToCreator,
|
||||
int? FinalEmailToReceivers,
|
||||
DateTime AddedWhen,
|
||||
DateTime? ChangedWhen,
|
||||
int? ExpiresWarningDays,
|
||||
bool? SendReminderEmails,
|
||||
int? FirstReminderDays,
|
||||
int? ReminderIntervalDays,
|
||||
int? ContractType) : IUnique<int>;
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the envelope type.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the title of the envelope type.
|
||||
/// </summary>
|
||||
public string Title { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the language code used in this envelope type.
|
||||
/// </summary>
|
||||
public string Language { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of days after which the envelope expires.
|
||||
/// </summary>
|
||||
public int? ExpiresDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the certification type identifier.
|
||||
/// </summary>
|
||||
public int? CertificationType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether an access code is required.
|
||||
/// </summary>
|
||||
public bool? UseAccessCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the final email template ID to be sent to the creator.
|
||||
/// </summary>
|
||||
public int? FinalEmailToCreator { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the final email template ID to be sent to the receivers.
|
||||
/// </summary>
|
||||
public int? FinalEmailToReceivers { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when this envelope type was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when this envelope type was last changed.
|
||||
/// </summary>
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of days before expiry when a warning should be sent.
|
||||
/// </summary>
|
||||
public int? ExpiresWarningDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets a value indicating whether reminder emails should be sent.
|
||||
/// </summary>
|
||||
public bool? SendReminderEmails { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the number of days before the first reminder is sent.
|
||||
/// </summary>
|
||||
public int? FirstReminderDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the interval in days between reminder emails.
|
||||
/// </summary>
|
||||
public int? ReminderIntervalDays { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the contract type associated with the envelope type.
|
||||
/// </summary>
|
||||
public int? ContractType { get; set; }
|
||||
}
|
||||
@@ -3,21 +3,30 @@ using System.ComponentModel.DataAnnotations;
|
||||
using System.Security.Cryptography;
|
||||
using System.Text;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record ReceiverCreateDto([EmailAddress] string EmailAddress, string? TotpSecretkey = null)
|
||||
{
|
||||
public string Signature => sha256HexOfMail.Value;
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
|
||||
private readonly Lazy<string> sha256HexOfMail = new(() =>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record ReceiverCreateDto
|
||||
{
|
||||
public ReceiverCreateDto()
|
||||
{
|
||||
_sha256HexOfMail = new(() =>
|
||||
{
|
||||
var bytes_arr = Encoding.UTF8.GetBytes(EmailAddress.ToUpper());
|
||||
var hash_arr = SHA256.HashData(bytes_arr);
|
||||
var hexa_str = BitConverter.ToString(hash_arr);
|
||||
return hexa_str.Replace("-", string.Empty);
|
||||
});
|
||||
}
|
||||
|
||||
public DateTime AddedWhen { get; } = DateTime.Now;
|
||||
};
|
||||
}
|
||||
[EmailAddress]
|
||||
public required string EmailAddress { get; init; }
|
||||
|
||||
public string? TotpSecretkey { get; init; }
|
||||
|
||||
public string Signature => _sha256HexOfMail.Value;
|
||||
|
||||
private readonly Lazy<string> _sha256HexOfMail;
|
||||
|
||||
public DateTime AddedWhen { get; } = DateTime.Now;
|
||||
};
|
||||
@@ -1,25 +1,31 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record ReceiverReadDto(
|
||||
int Id,
|
||||
string EmailAddress,
|
||||
string Signature,
|
||||
DateTime AddedWhen
|
||||
) : BaseDTO<int>(Id), IUnique<int>
|
||||
public class ReceiverReadDto
|
||||
{
|
||||
public int Id { get; set; }
|
||||
|
||||
public string EmailAddress { get; set; }
|
||||
|
||||
public string Signature { get; set; }
|
||||
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[JsonIgnore]
|
||||
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
|
||||
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; set; }
|
||||
|
||||
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
|
||||
|
||||
public string? TotpSecretkey { get; set; } = null;
|
||||
|
||||
public DateTime? TfaRegDeadline { get; set; }
|
||||
};
|
||||
|
||||
public override int GetHashCode()
|
||||
{
|
||||
return Id.GetHashCode();
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,27 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object for updating a receiver's information.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record ReceiverUpdateDto(int Id, string? TotpSecretkey = null, DateTime? TfaRegDeadline = null) : IUnique<int>;
|
||||
public class ReceiverUpdateDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the receiver.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the TOTP (Time-based One-Time Password) secret key.
|
||||
/// Optional.
|
||||
/// </summary>
|
||||
public string? TotpSecretkey { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the deadline for two-factor authentication registration.
|
||||
/// Optional.
|
||||
/// </summary>
|
||||
public DateTime? TfaRegDeadline { get; set; }
|
||||
}
|
||||
@@ -1,15 +1,45 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
namespace EnvelopeGenerator.Application.DTOs;
|
||||
|
||||
/// <summary>
|
||||
/// Data Transfer Object representing a user receiver with associated details.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class UserReceiverDto
|
||||
{
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public record UserReceiverDto(
|
||||
int Id,
|
||||
int UserId,
|
||||
int ReceiverId,
|
||||
string Name,
|
||||
string CompanyName,
|
||||
string JobTitle,
|
||||
DateTime AddedWhen) : IUnique<int>;
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the user receiver.
|
||||
/// </summary>
|
||||
public int Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the user associated with the receiver.
|
||||
/// </summary>
|
||||
public int UserId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the identifier of the receiver.
|
||||
/// </summary>
|
||||
public int ReceiverId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the name of the receiver.
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the company name of the receiver.
|
||||
/// </summary>
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the job title of the receiver.
|
||||
/// </summary>
|
||||
public string JobTitle { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets or sets the timestamp when the user receiver was added.
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; set; }
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
using DigitalData.Core.Abstractions.Infrastructure;
|
||||
using DigitalData.Core.Application.Interfaces.Repository;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Application.Exceptions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
@@ -14,16 +14,15 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="2.1.66" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.6.0" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="3.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
|
||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.1" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="4.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="3.3.1" />
|
||||
<PackageReference Include="DigitalData.Core.Client" Version="2.1.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.0" />
|
||||
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
|
||||
<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" />
|
||||
|
||||
@@ -7,6 +7,7 @@ using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
using DigitalData.Core.Application.DTO;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
@@ -76,9 +77,16 @@ public class EnvelopeHistoryService : CRUDService<IEnvelopeHistoryRepository, En
|
||||
}
|
||||
|
||||
public async Task<DataResult<long>> RecordAsync(int envelopeId, string userReference, EnvelopeStatus status, string? comment = null) =>
|
||||
await CreateAsync(new (EnvelopeId: envelopeId, UserReference: userReference, Status: (int)status, ActionDate: DateTime.Now, Comment: comment))
|
||||
await CreateAsync(new ()
|
||||
{
|
||||
EnvelopeId = envelopeId,
|
||||
UserReference = userReference,
|
||||
Status = (int) status,
|
||||
ActionDate = DateTime.Now,
|
||||
Comment = comment
|
||||
})
|
||||
.ThenAsync(
|
||||
Success: id => Result.Success(id),
|
||||
Success: dto => Result.Success(dto.Id),
|
||||
Fail: (mssg, ntc) => Result.Fail<long>().Message(mssg).Notice(ntc)
|
||||
);
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstractions.Client;
|
||||
using DigitalData.Core.Client.Interface;
|
||||
using DigitalData.Core.Client;
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
@@ -4,7 +4,6 @@ using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using EnvelopeGenerator.Application.Contracts.Services;
|
||||
|
||||
@@ -37,12 +36,12 @@ public class ReceiverService : CRUDService<IReceiverRepository, ReceiverCreateDt
|
||||
return await _repository.DeleteAsync(rcv) ? Result.Success() : Result.Fail();
|
||||
}
|
||||
|
||||
public virtual async Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto) where TUpdateDto : IUnique<int>
|
||||
public virtual async Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto)
|
||||
{
|
||||
var val = await _repository.ReadByIdAsync(updateDto.Id);
|
||||
var val = await _repository.ReadByIdAsync(updateDto.GetId<int>());
|
||||
if (val == null)
|
||||
{
|
||||
return Result.Fail().Notice(LogLevel.Warning, Flag.NotFound, $"{updateDto.Id} is not found in update process of {GetType()} entity.");
|
||||
return Result.Fail().Notice(LogLevel.Warning, Flag.NotFound, $"{updateDto.GetIdOrDefault<int>()} is not found in update process of {GetType()} entity.");
|
||||
}
|
||||
|
||||
var entity = _mapper.Map(updateDto, val);
|
||||
|
||||
@@ -1,152 +0,0 @@
|
||||
Public Class Constants
|
||||
|
||||
#Region "Status Fields"
|
||||
'http://wiki.dd/xwiki13/bin/view/Anwendungen/Produkt-Handbuch/Sonstiges/SignFlow/Envelope%20Status/
|
||||
Public Enum EnvelopeStatus
|
||||
Invalid = 0
|
||||
EnvelopeCreated = 1001
|
||||
EnvelopeSaved = 1002
|
||||
EnvelopeQueued = 1003
|
||||
EnvelopeSent = 1004 ' Nicht verwendet
|
||||
EnvelopePartlySigned = 1005
|
||||
EnvelopeCompletelySigned = 1006
|
||||
EnvelopeReportCreated = 1007
|
||||
EnvelopeArchived = 1008
|
||||
EnvelopeDeleted = 1009
|
||||
EnvelopeRejected = 10007
|
||||
EnvelopeWithdrawn = 10009
|
||||
AccessCodeRequested = 2001
|
||||
AccessCodeCorrect = 2002
|
||||
AccessCodeIncorrect = 2003
|
||||
DocumentOpened = 2004
|
||||
DocumentSigned = 2005
|
||||
DocumentForwarded = 2006
|
||||
DocumentRejected = 2007
|
||||
EnvelopeShared = 2008
|
||||
EnvelopeViewed = 2009
|
||||
MessageInvitationSent = 3001 ' Wird von Trigger verwendet
|
||||
MessageAccessCodeSent = 3002
|
||||
MessageConfirmationSent = 3003
|
||||
MessageDeletionSent = 3004
|
||||
MessageCompletionSent = 3005
|
||||
DocumentMod_Rotation = 4001
|
||||
End Enum
|
||||
|
||||
Public Class Status
|
||||
Public Shared ReadOnly NonHist As IReadOnlyList(Of EnvelopeStatus) = New List(Of EnvelopeStatus) From {
|
||||
EnvelopeStatus.Invalid,
|
||||
EnvelopeStatus.EnvelopeSaved,
|
||||
EnvelopeStatus.EnvelopeSent,
|
||||
EnvelopeStatus.EnvelopePartlySigned
|
||||
}
|
||||
|
||||
Public Shared ReadOnly RelatedToFormApp As IReadOnlyList(Of EnvelopeStatus) = New List(Of EnvelopeStatus) From {
|
||||
EnvelopeStatus.EnvelopeCreated,
|
||||
EnvelopeStatus.DocumentMod_Rotation
|
||||
}
|
||||
End Class
|
||||
|
||||
'TODO: standardize in xwiki
|
||||
Public Enum ReferenceType
|
||||
Sender = 1
|
||||
Receiver
|
||||
System
|
||||
Unknown
|
||||
End Enum
|
||||
|
||||
Public Enum ElementStatus
|
||||
Created = 0
|
||||
End Enum
|
||||
|
||||
Public Enum DocumentStatus
|
||||
Created = 0
|
||||
Signed = 1
|
||||
End Enum
|
||||
|
||||
Public Enum ReceiverStatus
|
||||
Unsigned = 0
|
||||
Signed = 1
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region "Type Fields"
|
||||
Public Enum ElementType
|
||||
Signature = 1
|
||||
End Enum
|
||||
|
||||
Public Enum ContractType
|
||||
Contract = 1
|
||||
ReadAndSign = 2
|
||||
End Enum
|
||||
|
||||
Public Enum ColorType
|
||||
ReceiverColor1 = 1
|
||||
ReceiverColor2 = 2
|
||||
ReceiverColor3 = 3
|
||||
ReceiverColor4 = 4
|
||||
ReceiverColor5 = 5
|
||||
ReceiverColor6 = 6
|
||||
ReceiverColor7 = 7
|
||||
ReceiverColor8 = 8
|
||||
ReceiverColor9 = 9
|
||||
ReceiverColor10 = 10
|
||||
End Enum
|
||||
|
||||
Public Enum CertificationType
|
||||
AdvancedElectronicSignature = 1
|
||||
'ElectronicSignature = 1
|
||||
'QualifiedSignature = 2
|
||||
End Enum
|
||||
|
||||
Public Enum FinalEmailType
|
||||
No = 0
|
||||
Yes = 1
|
||||
YesWithAttachment = 2
|
||||
End Enum
|
||||
|
||||
Public Enum PageOrientation
|
||||
Portrait = 0
|
||||
Landscape = 1
|
||||
End Enum
|
||||
|
||||
Public Enum EmailTemplateType
|
||||
DocumentReceived = 0
|
||||
DocumentSigned
|
||||
DocumentDeleted
|
||||
DocumentCompleted
|
||||
DocumentAccessCodeReceived
|
||||
DocumentShared
|
||||
TotpSecret
|
||||
DocumentRejected_ADM
|
||||
DocumentRejected_REC
|
||||
DocumentRejected_REC_2
|
||||
End Enum
|
||||
|
||||
Public Enum EncodeType
|
||||
EnvelopeReceiver
|
||||
EnvelopeReceiverReadOnly
|
||||
Undefined
|
||||
DocumentForwarded
|
||||
DocumentShared
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region "Role"
|
||||
Public NotInheritable Class ReceiverRole
|
||||
Public Const PreAuth As String = "PreAuth"
|
||||
Public Const FullyAuth As String = "FullyAuth"
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
#Region "Constants"
|
||||
|
||||
Public Const DATABASE = "DATABASE"
|
||||
Public Const LOGCONFIG = "LOGCONFIG"
|
||||
Public Const GDPICTURE = "GDPICTURE"
|
||||
Public Const PDF_BURNER_PARAMS = "PDFBurnerParams"
|
||||
|
||||
Public Const GREEN_300 = "#bbf7d0"
|
||||
Public Const RED_300 = "#fecaca"
|
||||
Public Const ORANGE_300 = "#fed7aa"
|
||||
#End Region
|
||||
End Class
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class DocumentStatus
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class DocumentStatus
|
||||
|
||||
Public Property Id As Integer
|
||||
Public Property EnvelopeId As Integer
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class ElementStatus
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class ElementStatus
|
||||
|
||||
Public Property Id As Integer
|
||||
Public Property EnvelopeId As Integer
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
|
||||
Imports EnvelopeGenerator.Domain
|
||||
Public Class EmailData
|
||||
Public Property EmailAdress As String = ""
|
||||
Public Property EmailSubject As String = ""
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class Envelope
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class Envelope
|
||||
Public Property Id As Integer = 0
|
||||
Public Property UserId As Integer
|
||||
Public Property Title As String = ""
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class EnvelopeDocumentElement
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class EnvelopeDocumentElement
|
||||
Public Property Id As Integer = -1
|
||||
Public Property X As Double
|
||||
Public Property Y As Double
|
||||
|
||||
@@ -1,4 +1,6 @@
|
||||
Public Class EnvelopeHistoryEntry
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class EnvelopeHistoryEntry
|
||||
Public Property EnvelopeId As Integer
|
||||
Public Property UserReference As String
|
||||
Public Property Status As Constants.EnvelopeStatus
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
Imports System.Drawing
|
||||
Imports System.Runtime.Serialization
|
||||
Imports DevExpress.Utils.Svg
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
Imports Newtonsoft.Json
|
||||
|
||||
Public Class EnvelopeReceiver
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Public Class EnvelopeType
|
||||
Imports EnvelopeGenerator.Domain
|
||||
Public Class EnvelopeType
|
||||
|
||||
Public Property Id As Integer = 0
|
||||
Public Property Title As String
|
||||
|
||||
@@ -274,7 +274,6 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Config.vb" />
|
||||
<Compile Include="Constants.vb" />
|
||||
<Compile Include="Entities\DbConfig.vb" />
|
||||
<Compile Include="Entities\ElementMetadata.vb" />
|
||||
<Compile Include="Entities\DocumentStatus.vb" />
|
||||
@@ -443,7 +442,12 @@
|
||||
<EmbeddedResource Include="Templates\document_access_code_de.html" />
|
||||
<EmbeddedResource Include="Templates\email_de.html" />
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj">
|
||||
<Project>{4f32a98d-e6f0-4a09-bd97-1cf26107e837}</Project>
|
||||
<Name>EnvelopeGenerator.Domain</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
|
||||
@@ -3,7 +3,7 @@ Imports System.IO
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.Text
|
||||
Imports DevExpress.Utils.Svg
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class Helpers
|
||||
Private Shared key As String = "$xzBvyPETUS&amm8)D8x#)f;4%;?[BPd" ' Passwort-Schlüssel (16, 24, or 32 bytes)
|
||||
|
||||
@@ -1,16 +1,9 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports GdPicture14
|
||||
Imports Quartz
|
||||
Imports System.Security.Cryptography
|
||||
Imports System.IO
|
||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports DevExpress.DataProcessing
|
||||
Imports System.Data.SqlClient
|
||||
Imports DevExpress.XtraRichEdit.Layout.Engine
|
||||
|
||||
Namespace Jobs
|
||||
Public Class APIEnvelopeJob
|
||||
@@ -39,7 +32,7 @@ Namespace Jobs
|
||||
End Class
|
||||
|
||||
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
||||
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
|
||||
LogConfig = pContext.MergedJobDataMap.Item(Domain.Constants.LOGCONFIG)
|
||||
Logger = LogConfig.GetLogger()
|
||||
myTempFiles = New TempFiles(LogConfig)
|
||||
myTempFiles.Create()
|
||||
@@ -179,7 +172,7 @@ Namespace Jobs
|
||||
ActionService = New ActionService(pState, Database)
|
||||
End Sub
|
||||
Private Function GetDatabase(pContext As IJobExecutionContext, pLogConfig As LogConfig) As MSSQLServer
|
||||
Dim oConnectionString As String = pContext.MergedJobDataMap.Item(Constants.DATABASE)
|
||||
Dim oConnectionString As String = pContext.MergedJobDataMap.Item(Domain.Constants.DATABASE)
|
||||
Dim Database = New MSSQLServer(pLogConfig, MSSQLServer.DecryptConnectionString(oConnectionString))
|
||||
|
||||
Return Database
|
||||
|
||||
@@ -7,7 +7,7 @@ Imports System.Security.Cryptography
|
||||
Imports System.IO
|
||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
Imports DevExpress.DataProcessing
|
||||
Imports System.Data.SqlClient
|
||||
|
||||
@@ -47,8 +47,8 @@ Namespace Jobs
|
||||
End Class
|
||||
|
||||
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
||||
Dim oGdPictureKey As String = pContext.MergedJobDataMap.Item(Constants.GDPICTURE)
|
||||
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
|
||||
Dim oGdPictureKey As String = pContext.MergedJobDataMap.Item(Domain.Constants.GDPICTURE)
|
||||
LogConfig = pContext.MergedJobDataMap.Item(Domain.Constants.LOGCONFIG)
|
||||
Logger = LogConfig.GetLogger()
|
||||
myTempFiles = New TempFiles(LogConfig)
|
||||
myTempFiles.Create()
|
||||
@@ -74,7 +74,7 @@ Namespace Jobs
|
||||
InitializeServices(oState)
|
||||
|
||||
Logger.Debug("Loading PDFBurner..")
|
||||
Dim pdfBurnerParams As PDFBurnerParams = pContext.MergedJobDataMap.Item(Constants.PDF_BURNER_PARAMS)
|
||||
Dim pdfBurnerParams As PDFBurnerParams = pContext.MergedJobDataMap.Item(PDF_BURNER_PARAMS)
|
||||
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, pdfBurnerParams)
|
||||
|
||||
Logger.Debug("Loading PDFMerger..")
|
||||
@@ -90,7 +90,7 @@ Namespace Jobs
|
||||
|
||||
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
||||
|
||||
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
|
||||
Dim oCompleteStatus As Integer = EnvelopeStatus.EnvelopeCompletelySigned
|
||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTime} ORDER BY GUID"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
|
||||
@@ -436,7 +436,7 @@ Namespace Jobs
|
||||
End Sub
|
||||
|
||||
Private Function GetDatabase(pContext As IJobExecutionContext, pLogConfig As LogConfig) As MSSQLServer
|
||||
Dim oConnectionString As String = pContext.MergedJobDataMap.Item(Constants.DATABASE)
|
||||
Dim oConnectionString As String = pContext.MergedJobDataMap.Item(Domain.Constants.DATABASE)
|
||||
Dim Database = New MSSQLServer(pLogConfig, MSSQLServer.DecryptConnectionString(oConnectionString))
|
||||
|
||||
Return Database
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class ReportItem
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Imports System.Data
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Data.SqlClient
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class ElementModel
|
||||
Inherits BaseModel
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class EmailTemplateModel
|
||||
Inherits BaseModel
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class EnvelopeModel
|
||||
Inherits BaseModel
|
||||
@@ -33,10 +33,10 @@ Public Class EnvelopeModel
|
||||
.Message = pRow.ItemEx("MESSAGE", ""),
|
||||
.UserId = pRow.ItemEx("USER_ID", 0),
|
||||
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
|
||||
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
|
||||
.Status = ObjectEx.ToEnum(Of EnvelopeStatus)(pRow.ItemEx("STATUS", EnvelopeStatus.EnvelopeCreated.ToString())),
|
||||
.AddedWhen = pRow.Item("ADDED_WHEN"),
|
||||
.ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing),
|
||||
.CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.AdvancedElectronicSignature.ToString())),
|
||||
.CertificationType = ObjectEx.ToEnum(Of CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", CertificationType.AdvancedElectronicSignature.ToString())),
|
||||
.User = New User(),
|
||||
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
|
||||
.ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_WHEN", Nothing),
|
||||
@@ -46,8 +46,8 @@ Public Class EnvelopeModel
|
||||
.FirstReminderDays = pRow.ItemEx("FIRST_REMINDER_DAYS", 0),
|
||||
.ReminderIntervalDays = pRow.ItemEx("REMINDER_INTERVAL_DAYS", 0),
|
||||
.UseAccessCode = pRow.ItemEx("USE_ACCESS_CODE", False),
|
||||
.FinalEmailToCreator = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", Constants.FinalEmailType.No.ToString())),
|
||||
.FinalEmailToReceivers = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", Constants.FinalEmailType.No.ToString())),
|
||||
.FinalEmailToCreator = ObjectEx.ToEnum(Of FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", FinalEmailType.No.ToString())),
|
||||
.FinalEmailToReceivers = ObjectEx.ToEnum(Of FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", FinalEmailType.No.ToString())),
|
||||
.TFA_Enabled = pRow.ItemEx("TFA_Enabled", False)
|
||||
}
|
||||
Dim oDOC_RESULT = pRow.Item("DOC_RESULT")
|
||||
@@ -148,7 +148,7 @@ Public Class EnvelopeModel
|
||||
Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE] (MESSAGE, ENVELOPE_UUID, STATUS, USER_ID)
|
||||
VALUES('',
|
||||
'{pEnvelope.Uuid}',
|
||||
'{CInt([Enum].Parse(GetType(EnvelopeStatus), Constants.EnvelopeStatus.EnvelopeCreated))}',
|
||||
'{CInt([Enum].Parse(GetType(EnvelopeStatus), EnvelopeStatus.EnvelopeCreated))}',
|
||||
'{pEnvelope.UserId}')"
|
||||
Dim oCommand As New SqlCommand(oSql)
|
||||
'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class EnvelopeTypeModel
|
||||
Inherits BaseModel
|
||||
|
||||
@@ -27,7 +27,7 @@ Public Class HistoryModel
|
||||
End Function
|
||||
|
||||
Public Function HasReceiverSigned(pEnvelopeId As Integer, pReceiverId As Integer) As Boolean
|
||||
Dim oEnvelopeSigned As Integer = Constants.EnvelopeStatus.DocumentSigned
|
||||
Dim oEnvelopeSigned As Integer = Domain.Constants.EnvelopeStatus.DocumentSigned
|
||||
Dim oSql = $"SELECT COUNT(T.GUID)
|
||||
FROM TBSIG_ENVELOPE_HISTORY T
|
||||
JOIN TBSIG_RECEIVER T2 ON T.USER_REFERENCE = T2.EMAIL_ADDRESS
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
Imports System.Net.Mail
|
||||
Imports DevExpress.DataProcessing
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class ReceiverModel
|
||||
Inherits BaseModel
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
Imports DevExpress.DataAccess.Native.Web
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
Imports EnvelopeGenerator.Common.My.Resources
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports System.ComponentModel
|
||||
@@ -26,7 +26,7 @@ Public Class ActionService
|
||||
End Sub
|
||||
|
||||
Public Function SendEnvelope(pEnvelope As Envelope) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -41,13 +41,13 @@ Public Class ActionService
|
||||
Return True
|
||||
End Function
|
||||
Public Function SetStatusDocumentRotationChanged(pEnvelope As Envelope) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentMod_Rotation, pEnvelope.User.Email) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.DocumentMod_Rotation, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
Return True
|
||||
End Function
|
||||
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
Dim oSendResult As Boolean = False
|
||||
@@ -64,9 +64,9 @@ Public Class ActionService
|
||||
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
|
||||
Dim oStatus As EnvelopeStatus
|
||||
If pEnvelope.IsAlreadySent Then
|
||||
oStatus = Constants.EnvelopeStatus.EnvelopeWithdrawn
|
||||
oStatus = EnvelopeStatus.EnvelopeWithdrawn
|
||||
Else
|
||||
oStatus = Constants.EnvelopeStatus.EnvelopeDeleted
|
||||
oStatus = EnvelopeStatus.EnvelopeDeleted
|
||||
End If
|
||||
Dim oUpd = $"UPDATE TBSIG_ENVELOPE SET REJECTION_REASON = '{pReason}' WHERE GUID = {pEnvelope.Id}"
|
||||
myDatabase.ExecuteNonQuery(oUpd)
|
||||
@@ -97,7 +97,7 @@ Public Class ActionService
|
||||
Public Function OpenEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Dim oUserReference = pReceiver.Email
|
||||
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentOpened, oUserReference) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.DocumentOpened, oUserReference) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -107,7 +107,7 @@ Public Class ActionService
|
||||
Public Function RequestAccessCode(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Dim oUserReference = pReceiver.Email
|
||||
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.AccessCodeRequested, oUserReference) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.AccessCodeRequested, oUserReference) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -117,7 +117,7 @@ Public Class ActionService
|
||||
Public Function EnterCorrectAccessCode(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Dim oUserReference = pReceiver.Email
|
||||
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.AccessCodeCorrect, oUserReference) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.AccessCodeCorrect, oUserReference) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -127,7 +127,7 @@ Public Class ActionService
|
||||
Public Function EnterIncorrectAccessCode(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Dim oUserReference = pReceiver.Email
|
||||
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.AccessCodeIncorrect, oUserReference) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.AccessCodeIncorrect, oUserReference) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -137,7 +137,7 @@ Public Class ActionService
|
||||
Public Function SignEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Dim oUserReference = pReceiver.Email
|
||||
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentSigned, oUserReference) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.DocumentSigned, oUserReference) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -145,7 +145,7 @@ Public Class ActionService
|
||||
End Function
|
||||
|
||||
Public Function FinalizeEnvelope(pEnvelope As Envelope) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeArchived, "System") = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.EnvelopeArchived, "System") = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -153,7 +153,7 @@ Public Class ActionService
|
||||
End Function
|
||||
|
||||
Public Function CompleteEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean ', pAttachment As String
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent, pReceiver.Email) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.MessageCompletionSent, pReceiver.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -161,7 +161,7 @@ Public Class ActionService
|
||||
End Function
|
||||
|
||||
Public Function CompleteEnvelope(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent, pEnvelope.User.Email) = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.MessageCompletionSent, pEnvelope.User.Email) = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
@@ -169,7 +169,7 @@ Public Class ActionService
|
||||
End Function
|
||||
|
||||
Public Function CreateReport(pEnvelope As Envelope) As Boolean
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeReportCreated, "System") = False Then
|
||||
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.EnvelopeReportCreated, "System") = False Then
|
||||
Return False
|
||||
End If
|
||||
|
||||
|
||||
@@ -1,7 +1,4 @@
|
||||
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common.My.Resources
|
||||
Imports DigitalData.Modules.Logging
|
||||
|
||||
Public Class EmailService
|
||||
Inherits BaseService
|
||||
@@ -18,7 +15,7 @@ Public Class EmailService
|
||||
|
||||
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pReason As String) As Boolean
|
||||
Logger.Debug("SendEnvelopeDeletedEmail - Creating email data object...")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageDeletionSent) With
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Domain.Constants.EnvelopeStatus.MessageDeletionSent) With
|
||||
{
|
||||
.SignatureLink = "",
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
@@ -36,7 +33,7 @@ Public Class EmailService
|
||||
|
||||
Public Function SendDocumentReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Logger.Debug("Creating email data object.")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Domain.Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||
{
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
@@ -56,7 +53,7 @@ Public Class EmailService
|
||||
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Domain.Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||
{
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
@@ -70,7 +67,7 @@ Public Class EmailService
|
||||
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageAccessCodeSent) With
|
||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Domain.Constants.EnvelopeStatus.MessageAccessCodeSent) With
|
||||
{
|
||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||
@@ -88,7 +85,7 @@ Public Class EmailService
|
||||
|
||||
Public Function SendSignedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
Logger.Debug("Creating email data object.")
|
||||
Dim oEmailData = New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageConfirmationSent) With
|
||||
Dim oEmailData = New EmailData(pEnvelope, pReceiver, Domain.Constants.EnvelopeStatus.MessageConfirmationSent) With
|
||||
{
|
||||
.SignatureLink = ""
|
||||
}
|
||||
@@ -105,7 +102,7 @@ Public Class EmailService
|
||||
|
||||
Public Function SendDocumentCompletedEmailToReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean ', pAttachment As String
|
||||
Logger.Debug("Creating email data object.")
|
||||
Dim oEmailData = New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageCompletionSent) With
|
||||
Dim oEmailData = New EmailData(pEnvelope, pReceiver, Domain.Constants.EnvelopeStatus.MessageCompletionSent) With
|
||||
{
|
||||
.SignatureLink = "",
|
||||
.ATT1_RELATED_ID = pEnvelope.Id,
|
||||
@@ -126,7 +123,7 @@ Public Class EmailService
|
||||
|
||||
Public Function SendDocumentCompletedEmailToCreator(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
||||
Logger.Debug("Creating email data object.")
|
||||
Dim oEmailData = New EmailData(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent) With
|
||||
Dim oEmailData = New EmailData(pEnvelope, Domain.Constants.EnvelopeStatus.MessageCompletionSent) With
|
||||
{
|
||||
.SignatureLink = "",
|
||||
.ATT1_RELATED_ID = pEnvelope.Id,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class HistoryService
|
||||
Inherits BaseService
|
||||
@@ -34,4 +32,4 @@ Public Class HistoryService
|
||||
Logger.Debug("Envelope status set to [{0}] for Envelope [{1}].", pStatus.ToString, pEnvelope.Id)
|
||||
Return True
|
||||
End Function
|
||||
End Class
|
||||
End Class
|
||||
@@ -1,5 +1,6 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class TemplateService
|
||||
Inherits BaseService
|
||||
@@ -35,7 +36,7 @@ Public Class TemplateService
|
||||
|
||||
Public Sub FillDocumentReceivedEmailBody(pEmailData As EmailData)
|
||||
InitDictionary(pEmailData)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentReceived)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentReceived)
|
||||
|
||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||
@@ -43,7 +44,7 @@ Public Class TemplateService
|
||||
|
||||
Public Sub FillEnvelopeDeletedEmailBody(pEmailData As EmailData, pReason As String)
|
||||
InitDictionary(pEmailData, pReason)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentDeleted)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentDeleted)
|
||||
|
||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body, pReason)
|
||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||
@@ -51,7 +52,7 @@ Public Class TemplateService
|
||||
|
||||
Public Sub FillDocumentSignedEmailBody(pEmailData As EmailData)
|
||||
InitDictionary(pEmailData)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentSigned)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentSigned)
|
||||
|
||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||
@@ -59,7 +60,7 @@ Public Class TemplateService
|
||||
|
||||
Public Sub FillDocumentCompletedEmailBody(pEmailData As EmailData)
|
||||
InitDictionary(pEmailData)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentCompleted)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentCompleted)
|
||||
|
||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||
@@ -67,7 +68,7 @@ Public Class TemplateService
|
||||
|
||||
Public Sub FillDocumentAccessCodeReceivedEmailBody(pEmailData As EmailData)
|
||||
InitDictionary(pEmailData)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentAccessCodeReceived)
|
||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentAccessCodeReceived)
|
||||
|
||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||
|
||||
183
EnvelopeGenerator.Domain/Constants.cs
Normal file
183
EnvelopeGenerator.Domain/Constants.cs
Normal file
@@ -0,0 +1,183 @@
|
||||
#if NETFRAMEWORK
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain
|
||||
{
|
||||
public static class Constants
|
||||
{
|
||||
#region Status Fields
|
||||
|
||||
// http://wiki.dd/xwiki13/bin/view/Anwendungen/Produkt-Handbuch/Sonstiges/SignFlow/Envelope%20Status/
|
||||
public enum EnvelopeStatus
|
||||
{
|
||||
Invalid = 0,
|
||||
EnvelopeCreated = 1001,
|
||||
EnvelopeSaved = 1002,
|
||||
EnvelopeQueued = 1003,
|
||||
EnvelopeSent = 1004, // Nicht verwendet
|
||||
EnvelopePartlySigned = 1005,
|
||||
EnvelopeCompletelySigned = 1006,
|
||||
EnvelopeReportCreated = 1007,
|
||||
EnvelopeArchived = 1008,
|
||||
EnvelopeDeleted = 1009,
|
||||
EnvelopeRejected = 10007,
|
||||
EnvelopeWithdrawn = 10009,
|
||||
AccessCodeRequested = 2001,
|
||||
AccessCodeCorrect = 2002,
|
||||
AccessCodeIncorrect = 2003,
|
||||
DocumentOpened = 2004,
|
||||
DocumentSigned = 2005,
|
||||
DocumentForwarded = 2006,
|
||||
DocumentRejected = 2007,
|
||||
EnvelopeShared = 2008,
|
||||
EnvelopeViewed = 2009,
|
||||
MessageInvitationSent = 3001, // Wird von Trigger verwendet
|
||||
MessageAccessCodeSent = 3002,
|
||||
MessageConfirmationSent = 3003,
|
||||
MessageDeletionSent = 3004,
|
||||
MessageCompletionSent = 3005,
|
||||
DocumentMod_Rotation = 4001
|
||||
}
|
||||
|
||||
public static class Status
|
||||
{
|
||||
public static readonly IReadOnlyList<EnvelopeStatus> NonHist = new List<EnvelopeStatus>
|
||||
{
|
||||
EnvelopeStatus.Invalid,
|
||||
EnvelopeStatus.EnvelopeSaved,
|
||||
EnvelopeStatus.EnvelopeSent,
|
||||
EnvelopeStatus.EnvelopePartlySigned
|
||||
};
|
||||
|
||||
public static readonly IReadOnlyList<EnvelopeStatus> RelatedToFormApp = new List<EnvelopeStatus>
|
||||
{
|
||||
EnvelopeStatus.EnvelopeCreated,
|
||||
EnvelopeStatus.DocumentMod_Rotation
|
||||
};
|
||||
}
|
||||
|
||||
// TODO: standardize in xwiki
|
||||
public enum ReferenceType
|
||||
{
|
||||
Sender = 1,
|
||||
Receiver,
|
||||
System,
|
||||
Unknown
|
||||
}
|
||||
|
||||
public enum ElementStatus
|
||||
{
|
||||
Created = 0
|
||||
}
|
||||
|
||||
public enum DocumentStatus
|
||||
{
|
||||
Created = 0,
|
||||
Signed = 1
|
||||
}
|
||||
|
||||
public enum ReceiverStatus
|
||||
{
|
||||
Unsigned = 0,
|
||||
Signed = 1
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Type Fields
|
||||
|
||||
public enum ElementType
|
||||
{
|
||||
Signature = 1
|
||||
}
|
||||
|
||||
public enum ContractType
|
||||
{
|
||||
Contract = 1,
|
||||
ReadAndSign = 2
|
||||
}
|
||||
|
||||
public enum ColorType
|
||||
{
|
||||
ReceiverColor1 = 1,
|
||||
ReceiverColor2 = 2,
|
||||
ReceiverColor3 = 3,
|
||||
ReceiverColor4 = 4,
|
||||
ReceiverColor5 = 5,
|
||||
ReceiverColor6 = 6,
|
||||
ReceiverColor7 = 7,
|
||||
ReceiverColor8 = 8,
|
||||
ReceiverColor9 = 9,
|
||||
ReceiverColor10 = 10
|
||||
}
|
||||
|
||||
public enum CertificationType
|
||||
{
|
||||
AdvancedElectronicSignature = 1
|
||||
// ElectronicSignature = 1
|
||||
// QualifiedSignature = 2
|
||||
}
|
||||
|
||||
public enum FinalEmailType
|
||||
{
|
||||
No = 0,
|
||||
Yes = 1,
|
||||
YesWithAttachment = 2
|
||||
}
|
||||
|
||||
public enum PageOrientation
|
||||
{
|
||||
Portrait = 0,
|
||||
Landscape = 1
|
||||
}
|
||||
|
||||
public enum EmailTemplateType
|
||||
{
|
||||
DocumentReceived = 0,
|
||||
DocumentSigned,
|
||||
DocumentDeleted,
|
||||
DocumentCompleted,
|
||||
DocumentAccessCodeReceived,
|
||||
DocumentShared,
|
||||
TotpSecret,
|
||||
DocumentRejected_ADM,
|
||||
DocumentRejected_REC,
|
||||
DocumentRejected_REC_2
|
||||
}
|
||||
|
||||
public enum EncodeType
|
||||
{
|
||||
EnvelopeReceiver,
|
||||
EnvelopeReceiverReadOnly,
|
||||
Undefined,
|
||||
DocumentForwarded,
|
||||
DocumentShared
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Role
|
||||
|
||||
public static class ReceiverRole
|
||||
{
|
||||
public const string PreAuth = "PreAuth";
|
||||
public const string FullyAuth = "FullyAuth";
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region Constants
|
||||
|
||||
public const string DATABASE = "DATABASE";
|
||||
public const string LOGCONFIG = "LOGCONFIG";
|
||||
public const string GDPICTURE = "GDPICTURE";
|
||||
public const string PDF_BURNER_PARAMS = "PDFBurnerParams";
|
||||
|
||||
public const string GREEN_300 = "#bbf7d0";
|
||||
public const string RED_300 = "#fecaca";
|
||||
public const string ORANGE_300 = "#fed7aa";
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -1,32 +1,25 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_CONFIG", Schema = "dbo")]
|
||||
public class Config : IUnique<int>
|
||||
public class Config
|
||||
{
|
||||
[Column("DOCUMENT_PATH", TypeName = "nvarchar(256)")]
|
||||
public string? DocumentPath { get; init; }
|
||||
public string DocumentPath { get; set; }
|
||||
|
||||
[Column("SENDING_PROFILE", TypeName = "int")]
|
||||
[Required]
|
||||
public required int SendingProfile { get; init; }
|
||||
public int SendingProfile { get; set; }
|
||||
|
||||
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
|
||||
public string? SignatureHost { get; init; }
|
||||
public string SignatureHost { get; set; }
|
||||
|
||||
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
|
||||
public string? ExternalProgramName { get; init; }
|
||||
public string ExternalProgramName { get; set; }
|
||||
|
||||
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
||||
public string? ExportPath { get; init; }
|
||||
|
||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single table in the database.");
|
||||
public string ExportPath { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
|
||||
public class DocumentReceiverElement : IUnique<int>
|
||||
public class DocumentReceiverElement
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -57,7 +59,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public bool Required { get; set; }
|
||||
|
||||
[Column("TOOLTIP")]
|
||||
public string? Tooltip { get; set; }
|
||||
public string Tooltip { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("READ_ONLY")]
|
||||
@@ -75,13 +77,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[ForeignKey("DocumentId")]
|
||||
public virtual EnvelopeDocument? Document { get; set; }
|
||||
public virtual EnvelopeDocument Document { get; set; }
|
||||
|
||||
[ForeignKey("ReceiverId")]
|
||||
public virtual Receiver? Receiver { get; set; }
|
||||
public virtual Receiver Receiver { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public double Top => Math.Round(Y, 5);
|
||||
|
||||
@@ -1,11 +1,13 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
||||
public class DocumentStatus : IUnique<int>
|
||||
public class DocumentStatus
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -25,22 +27,22 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public int Status { get; set; }
|
||||
|
||||
[Column("STATUS_CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime? StatusChangedWhen { get; set; }
|
||||
public DateTime StatusChangedWhen { get; set; }
|
||||
|
||||
[Column("VALUE", TypeName = "nvarchar(max)")]
|
||||
public string? Value { get; set; }
|
||||
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; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[ForeignKey("EnvelopeId")]
|
||||
public virtual Envelope? Envelope { get; set; }
|
||||
public virtual Envelope Envelope { get; set; }
|
||||
|
||||
[ForeignKey("ReceiverId")]
|
||||
public virtual Receiver? Receiver { get; set; }
|
||||
public virtual Receiver Receiver { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
|
||||
public class EmailTemplate : IUnique<int>
|
||||
public class EmailTemplate
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -14,13 +16,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public int Id { get; set; }
|
||||
|
||||
[Column("NAME", TypeName = "nvarchar(64)")]
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("BODY", TypeName = "nvarchar(max)")]
|
||||
public string? Body { get; set; }
|
||||
public string Body { get; set; }
|
||||
|
||||
[Column("SUBJECT", TypeName = "nvarchar(512)")]
|
||||
public string? Subject { get; set; }
|
||||
public string Subject { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
@@ -28,6 +30,6 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,14 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using EnvelopeGenerator.Common;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
|
||||
public class Envelope : IUnique<int>
|
||||
public class Envelope
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -22,90 +24,90 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public int Status { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
|
||||
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||
public required string Uuid { get; init; }
|
||||
public string Uuid { get; set; }
|
||||
|
||||
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
||||
public string? Message { get; set; }
|
||||
public string Message { get; set; }
|
||||
|
||||
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ExpiresWhen { get; set; }
|
||||
public DateTime ExpiresWhen { get; set; }
|
||||
|
||||
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ExpiresWarningWhen { get; set; }
|
||||
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; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||
public string? Title { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
||||
[Column("CONTRACT_TYPE")]
|
||||
public int? ContractType { get; set; }
|
||||
public int ContractType { get; set; }
|
||||
|
||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||
public string? Language { get; set; }
|
||||
public string Language { get; set; }
|
||||
|
||||
[Column("SEND_REMINDER_EMAILS")]
|
||||
public bool? SendReminderEmails { get; set; }
|
||||
public bool SendReminderEmails { get; set; }
|
||||
|
||||
[Column("FIRST_REMINDER_DAYS")]
|
||||
public int? FirstReminderDays { get; set; }
|
||||
public int FirstReminderDays { get; set; }
|
||||
|
||||
[Column("REMINDER_INTERVAL_DAYS")]
|
||||
public int? ReminderIntervalDays { get; set; }
|
||||
public int ReminderIntervalDays { get; set; }
|
||||
|
||||
[Column("ENVELOPE_TYPE")]
|
||||
public int? EnvelopeTypeId { get; set; }
|
||||
public int EnvelopeTypeId { get; set; }
|
||||
|
||||
[Column("CERTIFICATION_TYPE")]
|
||||
public int? CertificationType { get; set; }
|
||||
public int CertificationType { get; set; }
|
||||
|
||||
[Column("USE_ACCESS_CODE")]
|
||||
public bool? UseAccessCode { get; set; }
|
||||
public bool UseAccessCode { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||
public int? FinalEmailToCreator { get; set; }
|
||||
public int FinalEmailToCreator { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||
public int? FinalEmailToReceivers { get; set; }
|
||||
public int FinalEmailToReceivers { get; set; }
|
||||
|
||||
[Column("EXPIRES_WHEN_DAYS")]
|
||||
public int? ExpiresWhenDays { get; set; }
|
||||
public int ExpiresWhenDays { get; set; }
|
||||
|
||||
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
||||
public int? ExpiresWarningWhenDays { get; set; }
|
||||
public int ExpiresWarningWhenDays { get; set; }
|
||||
|
||||
[Column("TFA_ENABLED", TypeName = "bit")]
|
||||
public bool TFAEnabled { get; set; }
|
||||
|
||||
[Column("DOC_RESULT", TypeName = "varbinary(max)")]
|
||||
public byte[]? DocResult { get; init; }
|
||||
public byte[] DocResult { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The sender of envelope
|
||||
/// </summary>
|
||||
[ForeignKey("UserId")]
|
||||
public DigitalData.UserManager.Domain.Entities.User? User { get; set; }
|
||||
public User User { get; set; }
|
||||
|
||||
[ForeignKey("EnvelopeTypeId")]
|
||||
public EnvelopeType? EnvelopeType { get; set; }
|
||||
public EnvelopeType EnvelopeType { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string? EnvelopeTypeTitle => EnvelopeType?.Title;
|
||||
public string EnvelopeTypeTitle => EnvelopeType.Title;
|
||||
|
||||
[NotMapped]
|
||||
public bool IsAlreadySent => Status > (int) Constants.EnvelopeStatus.EnvelopeSaved;
|
||||
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
|
||||
|
||||
public IEnumerable<EnvelopeDocument>? Documents { get; set; }
|
||||
public IEnumerable<EnvelopeDocument> Documents { get; set; }
|
||||
|
||||
public IEnumerable<EnvelopeHistory>? History { get; set; }
|
||||
public IEnumerable<EnvelopeHistory> History { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,10 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
|
||||
public class EnvelopeCertificate : IUnique<int>
|
||||
public class EnvelopeCertificate
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -18,11 +17,11 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||
public required string EnvelopeUuid { get; set; }
|
||||
public string EnvelopeUuid { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
|
||||
public required string EnvelopeSubject { get; set; }
|
||||
public string EnvelopeSubject { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_ID")]
|
||||
@@ -30,11 +29,11 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
|
||||
public required string CreatorName { get; set; }
|
||||
public string CreatorName { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
|
||||
public required string CreatorEmail { get; set; }
|
||||
public string CreatorEmail { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_STATUS")]
|
||||
|
||||
@@ -1,27 +1,31 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||
public class EnvelopeDocument : IUnique<int>
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||
public class EnvelopeDocument
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
[Required]
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public required DateTime AddedWhen { get; set; }
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||
public byte[]? ByteData { get; init; }
|
||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||
public byte[] ByteData { get; set; }
|
||||
|
||||
public IEnumerable<DocumentReceiverElement>? Elements { get; set; }
|
||||
public IEnumerable<DocumentReceiverElement> Elements { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,12 +1,13 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.UserManager.Domain.Entities;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
|
||||
public class EnvelopeHistory : IUnique<long>
|
||||
public class EnvelopeHistory
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -19,7 +20,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[Required]
|
||||
[Column("USER_REFERENCE", TypeName = "nvarchar(128)")]
|
||||
public required string UserReference { get; init; }
|
||||
public string UserReference { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("STATUS")]
|
||||
@@ -31,15 +32,15 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("ACTION_DATE", TypeName = "datetime")]
|
||||
public DateTime? ActionDate { get; set; }
|
||||
public DateTime ActionDate { get; set; }
|
||||
|
||||
[Column("COMMENT", TypeName = "nvarchar(max)")]
|
||||
public string? Comment { get; set; }
|
||||
public string Comment { get; set; }
|
||||
|
||||
[ForeignKey("UserReference")]
|
||||
public virtual User? Sender { get; set; }
|
||||
public virtual User Sender { get; set; }
|
||||
|
||||
[ForeignKey("UserReference")]
|
||||
public virtual Receiver? Receiver { get; set; }
|
||||
public virtual Receiver Receiver { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -6,9 +6,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public class EnvelopeReceiver : EnvelopeReceiverBase
|
||||
{
|
||||
[ForeignKey("EnvelopeId")]
|
||||
public Envelope? Envelope { get; set; }
|
||||
public Envelope Envelope { get; set; }
|
||||
|
||||
[ForeignKey("ReceiverId")]
|
||||
public Receiver? Receiver { get; set; }
|
||||
public Receiver Receiver { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
||||
public class EnvelopeReceiverBase : IUnique<(int Envelope, int Receiver)>
|
||||
public class EnvelopeReceiverBase
|
||||
{
|
||||
[Key]
|
||||
[Column("ENVELOPE_ID")]
|
||||
@@ -20,34 +22,34 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
public int Sequence { get; set; }
|
||||
|
||||
[Column("NAME", TypeName = "nvarchar(128)")]
|
||||
public string? Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
|
||||
public string? JobTitle { get; set; }
|
||||
public string JobTitle { get; set; }
|
||||
|
||||
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
|
||||
public string? CompanyName { get; set; }
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
|
||||
public string? PrivateMessage { get; set; }
|
||||
public string PrivateMessage { get; set; }
|
||||
|
||||
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
|
||||
public string? AccessCode { get; set; }
|
||||
public string AccessCode { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[Column("PHONE_NUMBER")]
|
||||
[StringLength(20)]
|
||||
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||
public string? PhoneNumber { get; set; }
|
||||
public string PhoneNumber { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
||||
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
|
||||
|
||||
[NotMapped]
|
||||
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
||||
|
||||
@@ -1,52 +1,54 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_RECEIVER_READ_ONLY")]
|
||||
public class EnvelopeReceiverReadOnly : IUnique<long>
|
||||
public class EnvelopeReceiverReadOnly
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public long Id { get; init; }
|
||||
public long Id { get; set; }
|
||||
|
||||
[Column("ENVELOPE_ID")]
|
||||
[Required]
|
||||
public long EnvelopeId { get; init; }
|
||||
public long EnvelopeId { get; set; }
|
||||
|
||||
//TODO: remove NotMapped attribute when EnvelopeId data type is standardized
|
||||
[NotMapped]
|
||||
public Envelope? Envelope { get; set; }
|
||||
public Envelope Envelope { get; set; }
|
||||
|
||||
[Column("RECEIVER_MAIL")]
|
||||
[Required]
|
||||
[StringLength(250)]
|
||||
[TemplatePlaceholder("NAME_RECEIVER")]
|
||||
public required string ReceiverMail { get; init; }
|
||||
public string ReceiverMail { get; set; }
|
||||
|
||||
[Column("DATE_VALID")]
|
||||
[Required]
|
||||
public DateTime DateValid { get; init; }
|
||||
public DateTime DateValid { get; set; }
|
||||
|
||||
[Column("ADDED_WHO")]
|
||||
[Required]
|
||||
[StringLength(100)]
|
||||
public required string AddedWho { get; init; }
|
||||
public string AddedWho { get; set; }
|
||||
|
||||
public Receiver? Receiver { get; init; }
|
||||
public Receiver Receiver { get; set; }
|
||||
|
||||
[Column("ADDED_WHEN")]
|
||||
[Required]
|
||||
public DateTime AddedWhen { get; init; }
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHO")]
|
||||
[StringLength(100)]
|
||||
public string? ChangedWho { get; init; }
|
||||
public string ChangedWho { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN")]
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_ENVELOPE_TYPE", Schema = "dbo")]
|
||||
public class EnvelopeType : IUnique<int>
|
||||
public class EnvelopeType
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -14,46 +16,46 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[Required]
|
||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||
public required string Title { get; set; }
|
||||
public string Title { get; set; }
|
||||
|
||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||
public string? Language { get; set; }
|
||||
public string Language { get; set; }
|
||||
|
||||
[Column("EXPIRES_DAYS")]
|
||||
public int? ExpiresDays { get; set; }
|
||||
public int ExpiresDays { get; set; }
|
||||
|
||||
[Column("CERTIFICATION_TYPE")]
|
||||
public int? CertificationType { get; set; }
|
||||
public int CertificationType { get; set; }
|
||||
|
||||
[Column("USE_ACCESS_CODE")]
|
||||
public bool? UseAccessCode { get; set; }
|
||||
public bool UseAccessCode { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||
public int? FinalEmailToCreator { get; set; }
|
||||
public int FinalEmailToCreator { get; set; }
|
||||
|
||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||
public int? FinalEmailToReceivers { get; set; }
|
||||
public int FinalEmailToReceivers { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[Column("EXPIRES_WARNING_DAYS")]
|
||||
public int? ExpiresWarningDays { get; set; }
|
||||
public int ExpiresWarningDays { get; set; }
|
||||
|
||||
[Column("SEND_REMINDER_EMAILS")]
|
||||
public bool? SendReminderEmails { get; set; }
|
||||
public bool SendReminderEmails { get; set; }
|
||||
|
||||
[Column("FIRST_REMINDER_DAYS")]
|
||||
public int? FirstReminderDays { get; set; }
|
||||
public int FirstReminderDays { get; set; }
|
||||
|
||||
[Column("REMINDER_INTERVAL_DAYS")]
|
||||
public int? ReminderIntervalDays { get; set; }
|
||||
public int ReminderIntervalDays { get; set; }
|
||||
|
||||
[Column("CONTRACT_TYPE")]
|
||||
public int? ContractType { get; set; }
|
||||
public int ContractType { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +1,38 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
[Table("TBSIG_RECEIVER", Schema = "dbo")]
|
||||
public class Receiver : IUnique<int>
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required, EmailAddress]
|
||||
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
|
||||
public required 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 required string Signature { get; set; }
|
||||
[Required, EmailAddress]
|
||||
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
|
||||
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 IEnumerable<EnvelopeReceiver>? EnvelopeReceivers { get; init; }
|
||||
[Column("TFA_REG_DEADLINE", TypeName = "datetime")]
|
||||
public DateTime TfaRegDeadline { get; set; }
|
||||
|
||||
public IEnumerable<EnvelopeReceiver> EnvelopeReceivers { get; set; }
|
||||
}
|
||||
}
|
||||
99
EnvelopeGenerator.Domain/Entities/User.cs
Normal file
99
EnvelopeGenerator.Domain/Entities/User.cs
Normal file
@@ -0,0 +1,99 @@
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBDD_USER", Schema = "dbo")]
|
||||
public class User
|
||||
{
|
||||
[Column("GUID")]
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
public int Id { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
[Column("ADDED_WHO")]
|
||||
public string AddedWho { get; set; }
|
||||
|
||||
[StringLength(50)]
|
||||
[Column("CHANGED_WHO")]
|
||||
public string ChangedWho { get; set; }
|
||||
|
||||
//TODO: assign it to default value in create dto, not here!
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
[DefaultValue("GETDATE()")]
|
||||
public DateTime AddedWhen { get; set; } = DateTime.Now;
|
||||
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime ChangedWhen { get; set; }
|
||||
|
||||
[Column("PRENAME")]
|
||||
[StringLength(50)]
|
||||
public string Prename { get; set; }
|
||||
|
||||
[Column("NAME")]
|
||||
[StringLength(50)]
|
||||
public string Name { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("USERNAME")]
|
||||
[StringLength(50)]
|
||||
public string Username { get; set; }
|
||||
|
||||
[Column("SHORTNAME")]
|
||||
[StringLength(30)]
|
||||
public string Shortname { get; set; }
|
||||
|
||||
[Column("EMAIL")]
|
||||
[StringLength(100)]
|
||||
public string Email { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("LANGUAGE")]
|
||||
[StringLength(5)]
|
||||
[DefaultValue("de-DE")]
|
||||
public string Language { get; set; }
|
||||
|
||||
[Column("COMMENT")]
|
||||
[StringLength(500)]
|
||||
public string Comment { get; set; }
|
||||
|
||||
[Column("DELETED")]
|
||||
public bool Deleted { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("DATE_FORMAT")]
|
||||
[StringLength(10)]
|
||||
[DefaultValue("dd.MM.yyyy")]
|
||||
public string DateFormat { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ACTIVE")]
|
||||
public bool Active { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("GENERAL_VIEWER")]
|
||||
[StringLength(30)]
|
||||
[DefaultValue("NONE")]
|
||||
public string GeneralViewer { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("WAN_ENVIRONMENT")]
|
||||
public bool WanEnvironment { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("USERID_FK_INT_ECM")]
|
||||
public int UseridFkIntEcm { get; set; }
|
||||
|
||||
[Column("DELETED_WHEN")]
|
||||
public DateTime DeletedWhen { get; set; }
|
||||
|
||||
[Column("DELETED_WHO")]
|
||||
[StringLength(50)]
|
||||
public string DeletedWho { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,11 +1,13 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
#if NETFRAMEWORK
|
||||
using System;
|
||||
#endif
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
[Table("TBSIG_USER_RECEIVER", Schema = "dbo")]
|
||||
public class UserReceiver : IUnique<int>
|
||||
public class UserReceiver
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
@@ -22,16 +24,16 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
|
||||
[Required]
|
||||
[Column("NAME", TypeName = "nvarchar(128)")]
|
||||
public required string Name { get; set; }
|
||||
public string Name { get; set; }
|
||||
|
||||
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
|
||||
public string? CompanyName { get; set; }
|
||||
public string CompanyName { get; set; }
|
||||
|
||||
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
|
||||
public string? JobTitle { get; set; }
|
||||
public string JobTitle { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public required DateTime AddedWhen { get; init; }
|
||||
public DateTime AddedWhen { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,19 +1,25 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<TargetFrameworks>net462;net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.6.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.0.0" />
|
||||
<PackageReference Include="UserManager.Domain" Version="3.0.2" />
|
||||
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">
|
||||
<ImplicitUsings>disable</ImplicitUsings>
|
||||
<LangVersion>7.3</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup Condition="'$(TargetFramework)' != 'net462'">
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<LangVersion>latest</LangVersion>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net462'">
|
||||
<PackageReference Include="System.ComponentModel.Annotations" Version="4.7.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Common\EnvelopeGenerator.Common.vbproj" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction.Attributes" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -3,9 +3,8 @@ Imports System.IO
|
||||
Imports DevExpress.XtraBars.Docking
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports GdPicture14
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class EnvelopeEditorController
|
||||
Inherits BaseController
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
Imports DevExpress.XtraPrinting.Native
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports GdPicture14.Annotations
|
||||
Imports EnvelopeGenerator.Domain
|
||||
|
||||
Public Class FieldEditorController
|
||||
Inherits BaseController
|
||||
|
||||
@@ -506,6 +506,10 @@
|
||||
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
|
||||
<Name>EnvelopeGenerator.Common</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj">
|
||||
<Project>{4f32a98d-e6f0-4a09-bd97-1cf26107e837}</Project>
|
||||
<Name>EnvelopeGenerator.Domain</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
|
||||
@@ -1,24 +1,18 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DevExpress.Export.Xl
|
||||
Imports DevExpress.Utils.CommonDialogs
|
||||
Imports DevExpress.Utils.Drawing
|
||||
Imports DevExpress.Utils.Svg.CommonSvgImages
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraExport.Helpers
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Domain
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports GdPicture14
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Partial Public Class frmEnvelopeEditor
|
||||
Public Property Envelope As Envelope
|
||||
@@ -467,7 +461,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
Dim oReceiver As EnvelopeReceiver = ViewReceivers.GetRow(e.RowHandle)
|
||||
|
||||
Dim oUsedColors = Receivers.Select(Of Integer)(Function(r) r.ColorType).ToList()
|
||||
Dim oAllColors = [Enum].GetValues(GetType(ColorType)).Cast(Of Integer).ToList()
|
||||
Dim oAllColors = [Enum].GetValues(GetType(Domain.Constants.ColorType)).Cast(Of Integer).ToList()
|
||||
Dim oUnusedColors = oAllColors.Except(oUsedColors)
|
||||
If oUnusedColors.Any() Then
|
||||
oReceiver.ColorType = oUnusedColors.Min()
|
||||
@@ -576,7 +570,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
CheckAccesscode(e.RowHandle, oAccessCode)
|
||||
End If
|
||||
Else
|
||||
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||
oMsg = oMsg.Replace("@Mail", oEmailAdress)
|
||||
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
|
||||
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
|
||||
@@ -756,7 +750,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
End Sub
|
||||
|
||||
Private Sub btnShowFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowFile.ItemClick
|
||||
showDocument
|
||||
showdocument()
|
||||
End Sub
|
||||
Sub showdocument()
|
||||
If Not IsNothing(Documents) Then
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports System.ComponentModel
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
|
||||
Public Class frmEnvelopeMainData
|
||||
Private FormLoaded As Boolean = False
|
||||
|
||||
@@ -6,6 +6,7 @@ Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports EnvelopeGenerator.Domain.Constants
|
||||
Imports GdPicture14
|
||||
Imports GdPicture14.Annotations
|
||||
|
||||
|
||||
@@ -10,12 +10,9 @@ Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports System.Diagnostics
|
||||
Imports System.ComponentModel
|
||||
Imports DevExpress.XtraPrinting
|
||||
Imports System.Web
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports System.Security.Cryptography
|
||||
Imports DigitalData.Domain
|
||||
|
||||
Public Class frmMain
|
||||
Private ReadOnly LogConfig As LogConfig
|
||||
@@ -306,12 +303,12 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(e.RowHandle)
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopePartlySigned Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
||||
If oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopePartlySigned Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.GREEN_300)
|
||||
End If
|
||||
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeQueued Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeSent Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.ORANGE_300)
|
||||
If oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeQueued Or oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeSent Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.ORANGE_300)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -327,10 +324,10 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oReceiver.Status = Common.Constants.ReceiverStatus.Signed Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
||||
If oReceiver.Status = Domain.Constants.ReceiverStatus.Signed Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.GREEN_300)
|
||||
Else
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.RED_300)
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.RED_300)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -340,12 +337,12 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
Dim oEnvelope As Envelope = ViewCompleted.GetRow(e.RowHandle)
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeCompletelySigned Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
||||
If oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeCompletelySigned Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.GREEN_300)
|
||||
End If
|
||||
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeDeleted Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeWithdrawn Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeRejected Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.RED_300)
|
||||
If oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeDeleted Or oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeWithdrawn Or oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeRejected Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.RED_300)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -361,10 +358,10 @@ Public Class frmMain
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If oReceiver.Status = Common.Constants.ReceiverStatus.Signed Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
||||
If oReceiver.Status = Domain.Constants.ReceiverStatus.Signed Then
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.GREEN_300)
|
||||
Else
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.RED_300)
|
||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Domain.Constants.RED_300)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -507,7 +504,7 @@ Public Class frmMain
|
||||
End If
|
||||
|
||||
Dim oEnvelope As Envelope = ViewCompleted.GetRow(ViewCompleted.FocusedRowHandle)
|
||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeArchived Then
|
||||
If oEnvelope.Status = Domain.Constants.EnvelopeStatus.EnvelopeArchived Then
|
||||
bbtnitmEB.Enabled = True
|
||||
Else
|
||||
bbtnitmEB.Enabled = False
|
||||
@@ -811,16 +808,16 @@ Public Class frmMain
|
||||
Dim oMailToCreator = oEnvelope.FinalEmailToCreator
|
||||
Dim oMailToReceivers = oEnvelope.FinalEmailToReceivers
|
||||
|
||||
If oMailToCreator <> FinalEmailType.No Then
|
||||
If oMailToCreator <> Domain.Constants.FinalEmailType.No Then
|
||||
MsgBox("Finale email an Creator könnten/würden gesendet werden!")
|
||||
Else
|
||||
MsgBox("Finale email an Creator könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{FinalEmailType.No}]")
|
||||
MsgBox("Finale email an Creator könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{Domain.Constants.FinalEmailType.No}]")
|
||||
End If
|
||||
|
||||
If oMailToReceivers <> FinalEmailType.No Then
|
||||
If oMailToReceivers <> Domain.Constants.FinalEmailType.No Then
|
||||
MsgBox("Finale email an Unterzeichner könnten/würden gesendet werden!")
|
||||
Else
|
||||
MsgBox("Finale email an Unterzeichner könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToReceivers - oMailToReceivers [{oMailToReceivers}] <> [{FinalEmailType.No}]")
|
||||
MsgBox("Finale email an Unterzeichner könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToReceivers - oMailToReceivers [{oMailToReceivers}] <> [{Domain.Constants.FinalEmailType.No}]")
|
||||
End If
|
||||
End Sub
|
||||
Private Function GetState() As State
|
||||
|
||||
@@ -27,10 +27,9 @@
|
||||
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.0" />
|
||||
<PackageReference Include="Scalar.AspNetCore" Version="2.2.1" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="8.1.1" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.6.0" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="3.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.1" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="4.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="3.3.1" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.1.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
||||
|
||||
@@ -33,7 +33,7 @@ public static class DIExtensions
|
||||
/// will be created per HTTP request (or per scope) within the dependency injection container.
|
||||
/// </remarks>
|
||||
public static IServiceCollection AddEnvelopeGeneratorInfrastructureServices(this IServiceCollection services,
|
||||
Action<DbContextOptionsBuilder>? dbContextOptions = null,
|
||||
Action<IServiceProvider, DbContextOptionsBuilder>? dbContextOptions = null,
|
||||
IConfiguration? sqlExecutorConfiguration = null,
|
||||
Action<SQLExecutorParams>? sqlExecutorConfigureOptions = null)
|
||||
{
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user