Compare commits
27 Commits
feat/signF
...
39c1d3e624
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
39c1d3e624 | ||
|
|
39cc30f48b | ||
|
|
79204d4f6d | ||
|
|
806b990556 | ||
|
|
d34a1016c4 | ||
|
|
93dbe63fb4 | ||
|
|
55ffe40c46 | ||
|
|
be9516d852 | ||
|
|
12502bb2de | ||
|
|
26745e0c37 | ||
|
|
2ea5fd7dbb | ||
|
|
446aeb00b1 | ||
|
|
abc3bb7652 | ||
|
|
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;
|
namespace EnvelopeGenerator.Application.Configurations;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Infrastructure;
|
using DigitalData.Core.Application.Interfaces.Repository;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
using static EnvelopeGenerator.Common.Constants;
|
using static EnvelopeGenerator.Common.Constants;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Infrastructure;
|
using DigitalData.Core.Application.Interfaces.Repository;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
namespace EnvelopeGenerator.Application.Contracts.Repositories;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Services;
|
namespace EnvelopeGenerator.Application.Contracts.Services;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
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.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using CommandDotNet;
|
using CommandDotNet;
|
||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using DigitalData.Core.Abstractions;
|
||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Application.Interfaces;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
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> 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.Application.DTOs;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
|||||||
@@ -1,21 +1,35 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
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)]
|
/// <summary>
|
||||||
public record ConfigDto(
|
/// Gets or sets the path to the document.
|
||||||
string DocumentPath,
|
/// </summary>
|
||||||
int SendingProfile,
|
public string DocumentPath { get; set; }
|
||||||
string SignatureHost,
|
|
||||||
string ExternalProgramName,
|
/// <summary>
|
||||||
string ExportPath) : IUnique<int>
|
/// Gets or sets the sending profile identifier.
|
||||||
{
|
/// </summary>
|
||||||
[NotMapped]
|
public int SendingProfile { get; set; }
|
||||||
[JsonIgnore]
|
|
||||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
/// <summary>
|
||||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
/// 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)]
|
/// <summary>
|
||||||
public record DocumentReceiverElementDto(
|
/// Gets or sets the unique identifier of the element.
|
||||||
int Id,
|
/// </summary>
|
||||||
int DocumentId,
|
public int Id { get; set; }
|
||||||
int ReceiverId,
|
|
||||||
int ElementType,
|
/// <summary>
|
||||||
double X,
|
/// Gets or sets the identifier of the associated document.
|
||||||
double Y,
|
/// </summary>
|
||||||
double Width,
|
public int DocumentId { get; set; }
|
||||||
double Height,
|
|
||||||
int Page,
|
/// <summary>
|
||||||
bool Required,
|
/// Gets or sets the identifier of the receiver.
|
||||||
string? Tooltip,
|
/// </summary>
|
||||||
bool ReadOnly,
|
public int ReceiverId { get; set; }
|
||||||
int AnnotationIndex,
|
|
||||||
DateTime AddedWhen,
|
/// <summary>
|
||||||
DateTime? ChangedWhen,
|
/// Gets or sets the type of the element.
|
||||||
double Top,
|
/// </summary>
|
||||||
double Left
|
public int ElementType { get; set; }
|
||||||
): IUnique<int>;
|
|
||||||
|
/// <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)]
|
/// <summary>
|
||||||
public record DocumentStatusDto(
|
/// Gets or sets the unique identifier of the document status entry.
|
||||||
int Id,
|
/// </summary>
|
||||||
int EnvelopeId,
|
public int Id { get; set; }
|
||||||
int ReceiverId,
|
|
||||||
int Status,
|
/// <summary>
|
||||||
DateTime? StatusChangedWhen,
|
/// Gets or sets the ID of the associated envelope.
|
||||||
DateTime AddedWhen,
|
/// </summary>
|
||||||
DateTime? ChangedWhen) : IUnique<int>
|
public int EnvelopeId { get; set; }
|
||||||
{
|
|
||||||
public string? Value { 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
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
{
|
{
|
||||||
@@ -7,7 +6,7 @@ namespace EnvelopeGenerator.Application.DTOs
|
|||||||
///
|
///
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
[ApiExplorerSettings(IgnoreApi = true)]
|
||||||
public record EmailTemplateDto : IUnique<int>
|
public record EmailTemplateDto
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <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)]
|
/// <summary>
|
||||||
public record EnvelopeCertificateDto(
|
/// Gets the unique identifier of the certificate.
|
||||||
int Id,
|
/// </summary>
|
||||||
int EnvelopeId,
|
public int Id { get; init; }
|
||||||
string EnvelopeUuid,
|
|
||||||
string EnvelopeSubject,
|
/// <summary>
|
||||||
int CreatorId,
|
/// Gets the envelope ID associated with the certificate.
|
||||||
string CreatorName,
|
/// </summary>
|
||||||
string CreatorEmail,
|
public int EnvelopeId { get; init; }
|
||||||
int EnvelopeStatus) : IUnique<int>;
|
|
||||||
|
/// <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)]
|
/// <summary>
|
||||||
public record EnvelopeDocumentDto
|
/// Gets or sets the unique identifier of the document.
|
||||||
(
|
/// </summary>
|
||||||
int Id,
|
public int Id { get; set; }
|
||||||
int EnvelopeId,
|
|
||||||
DateTime AddedWhen,
|
/// <summary>
|
||||||
byte[]? ByteData = null,
|
/// Gets or sets the envelope ID to which the document belongs.
|
||||||
IEnumerable<DocumentReceiverElementDto>? Elements = null
|
/// </summary>
|
||||||
) : IUnique<int>;
|
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 DigitalData.UserManager.Application.DTOs.User;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs
|
namespace EnvelopeGenerator.Application.DTOs;
|
||||||
|
|
||||||
|
[ApiExplorerSettings(IgnoreApi = true)]
|
||||||
|
public record EnvelopeDto
|
||||||
{
|
{
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
public int Id { get; set; }
|
||||||
public record EnvelopeDto() : IUnique<int>
|
|
||||||
{
|
|
||||||
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]")]
|
[TemplatePlaceholder("[MESSAGE]")]
|
||||||
public string Message { get; set; }
|
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]")]
|
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
|
||||||
public string Title { get; set; }
|
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;
|
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)]
|
/// <summary>
|
||||||
public record EnvelopeHistoryCreateDto(
|
/// Gets or sets the identifier of the envelope.
|
||||||
int EnvelopeId,
|
/// </summary>
|
||||||
string UserReference,
|
public int EnvelopeId { get; set; }
|
||||||
int Status,
|
|
||||||
DateTime? ActionDate,
|
/// <summary>
|
||||||
string? Comment = null);
|
/// 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.Abstractions;
|
||||||
using DigitalData.Core.DTO;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
using DigitalData.UserManager.Application.DTOs.User;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
|
||||||
using static EnvelopeGenerator.Common.Constants;
|
using static EnvelopeGenerator.Common.Constants;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
///
|
/// Data Transfer Object representing the history of an envelope, including status, sender, receiver, and related metadata.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Id"></param>
|
public record EnvelopeHistoryDto : IUnique<long>
|
||||||
/// <param name="EnvelopeId"></param>
|
{
|
||||||
/// <param name="UserReference"></param>
|
/// <summary>
|
||||||
/// <param name="Status"></param>
|
/// Unique identifier for the envelope history entry.
|
||||||
/// <param name="StatusName"></param>
|
/// </summary>
|
||||||
/// <param name="AddedWhen"></param>
|
public long Id { get; set; }
|
||||||
/// <param name="ActionDate"></param>
|
|
||||||
/// <param name="Sender"></param>
|
/// <summary>
|
||||||
/// <param name="Receiver"></param>
|
/// Identifier of the associated envelope.
|
||||||
/// <param name="ReferenceType"></param>
|
/// </summary>
|
||||||
/// <param name="Comment"></param>
|
public int EnvelopeId { get; set; }
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
|
||||||
public record EnvelopeHistoryDto(
|
/// <summary>
|
||||||
long Id,
|
/// Reference string for the user related to this history entry.
|
||||||
int EnvelopeId,
|
/// </summary>
|
||||||
string UserReference,
|
public string UserReference { get; set; }
|
||||||
int Status,
|
|
||||||
string? StatusName,
|
/// <summary>
|
||||||
DateTime AddedWhen,
|
/// Status code of the envelope at this history point.
|
||||||
DateTime? ActionDate,
|
/// </summary>
|
||||||
UserCreateDto? Sender,
|
public int Status { get; set; }
|
||||||
ReceiverReadDto? Receiver,
|
|
||||||
ReferenceType ReferenceType,
|
/// <summary>
|
||||||
string? Comment = null) : BaseDTO<long>(Id), IUnique<long>;
|
/// 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 EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
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)]
|
/// <summary>
|
||||||
public record EnvelopeReceiverReadOnlyDto(
|
/// Gets or inits the unique identifier of the envelope receiver.
|
||||||
long Id,
|
/// </summary>
|
||||||
long EnvelopeId,
|
public long Id { get; init; }
|
||||||
string ReceiverMail,
|
|
||||||
DateTime DateValid,
|
/// <summary>
|
||||||
DateTime AddedWhen,
|
/// Gets or inits the identifier of the associated envelope.
|
||||||
string AddedWho,
|
/// </summary>
|
||||||
EnvelopeDto? Envelope = null,
|
public long EnvelopeId { get; init; }
|
||||||
string? ChangedWho = null,
|
|
||||||
DateTime? ChangedWhen = null,
|
/// <summary>
|
||||||
ReceiverReadDto? Receiver = null);
|
/// 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 DigitalData.Core.Abstractions;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
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)]
|
/// <summary>
|
||||||
public record EnvelopeReceiverReadOnlyUpdateDto(
|
/// Gets or sets the unique identifier of the envelope receiver.
|
||||||
long Id,
|
/// </summary>
|
||||||
DateTime DateValid,
|
public long Id { get; init; }
|
||||||
string ChangedWho) : IUnique<long>
|
|
||||||
{
|
/// <summary>
|
||||||
public DateTime ChangedWhen { get; } = DateTime.Now;
|
/// 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)]
|
/// <summary>
|
||||||
public record EnvelopeTypeDto(
|
/// Gets or sets the unique identifier of the envelope type.
|
||||||
int Id,
|
/// </summary>
|
||||||
string Title,
|
public int Id { get; set; }
|
||||||
string Language,
|
|
||||||
int? ExpiresDays,
|
/// <summary>
|
||||||
int? CertificationType,
|
/// Gets or sets the title of the envelope type.
|
||||||
bool? UseAccessCode,
|
/// </summary>
|
||||||
int? FinalEmailToCreator,
|
public string Title { get; set; }
|
||||||
int? FinalEmailToReceivers,
|
|
||||||
DateTime AddedWhen,
|
/// <summary>
|
||||||
DateTime? ChangedWhen,
|
/// Gets or sets the language code used in this envelope type.
|
||||||
int? ExpiresWarningDays,
|
/// </summary>
|
||||||
bool? SendReminderEmails,
|
public string Language { get; set; }
|
||||||
int? FirstReminderDays,
|
|
||||||
int? ReminderIntervalDays,
|
/// <summary>
|
||||||
int? ContractType) : IUnique<int>;
|
/// 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.Security.Cryptography;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs.Receiver
|
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
{
|
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
|
||||||
public record ReceiverCreateDto([EmailAddress] string EmailAddress, string? TotpSecretkey = null)
|
|
||||||
{
|
|
||||||
public string Signature => sha256HexOfMail.Value;
|
|
||||||
|
|
||||||
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 bytes_arr = Encoding.UTF8.GetBytes(EmailAddress.ToUpper());
|
||||||
var hash_arr = SHA256.HashData(bytes_arr);
|
var hash_arr = SHA256.HashData(bytes_arr);
|
||||||
var hexa_str = BitConverter.ToString(hash_arr);
|
var hexa_str = BitConverter.ToString(hash_arr);
|
||||||
return hexa_str.Replace("-", string.Empty);
|
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 EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
using DigitalData.Core.DTO;
|
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
|
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
[ApiExplorerSettings(IgnoreApi = true)]
|
||||||
public record ReceiverReadDto(
|
public class ReceiverReadDto
|
||||||
int Id,
|
|
||||||
string EmailAddress,
|
|
||||||
string Signature,
|
|
||||||
DateTime AddedWhen
|
|
||||||
) : BaseDTO<int>(Id), IUnique<int>
|
|
||||||
{
|
{
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
public string EmailAddress { get; set; }
|
||||||
|
|
||||||
|
public string Signature { get; set; }
|
||||||
|
|
||||||
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
|
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; set; }
|
||||||
|
|
||||||
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
|
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
|
||||||
|
|
||||||
public string? TotpSecretkey { get; set; } = null;
|
public string? TotpSecretkey { get; set; } = null;
|
||||||
|
|
||||||
public DateTime? TfaRegDeadline { get; set; }
|
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;
|
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Data Transfer Object for updating a receiver's information.
|
||||||
|
/// </summary>
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
[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)]
|
/// <summary>
|
||||||
public record UserReceiverDto(
|
/// Gets or sets the unique identifier of the user receiver.
|
||||||
int Id,
|
/// </summary>
|
||||||
int UserId,
|
public int Id { get; set; }
|
||||||
int ReceiverId,
|
|
||||||
string Name,
|
/// <summary>
|
||||||
string CompanyName,
|
/// Gets or sets the identifier of the user associated with the receiver.
|
||||||
string JobTitle,
|
/// </summary>
|
||||||
DateTime AddedWhen) : IUnique<int>;
|
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 EnvelopeGenerator.Domain.Entities;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions.Infrastructure;
|
using DigitalData.Core.Application.Interfaces.Repository;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
|
|
||||||
@@ -70,7 +69,7 @@ public class ResetEmailTemplateCommandHandler : IRequestHandler<ResetEmailTempla
|
|||||||
new(){
|
new(){
|
||||||
Id = 4,
|
Id = 4,
|
||||||
Name = "DocumentCompleted",
|
Name = "DocumentCompleted",
|
||||||
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br />\r\nDer Signaturvorgang <B><I>'[DOCUMENT_TITLE]'</I></B> wurde erfolgreich abgeschlossen.<br />\r\n<br />\r\nSie erhalten das Dokument mit einem detaillierten Ergebnisbericht als Anhang zu dieser Email.<br />\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br />\r\nDer Signaturvorgang <B><I>'[DOCUMENT_TITLE]'</I></B> wurde erfolgreich abgeschlossen.<br />\r\n<br />\r\nSie erhalten das Dokument mit einem detaillierten Ergebnisbericht als Anhang zu dieser EmailAddress.<br />\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
Subject = "Umschlag abgeschlossen: '[DOCUMENT_TITLE]'"
|
Subject = "Umschlag abgeschlossen: '[DOCUMENT_TITLE]'"
|
||||||
},
|
},
|
||||||
new(){
|
new(){
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
using DigitalData.Core.Abstractions.Infrastructure;
|
using DigitalData.Core.Application.Interfaces.Repository;
|
||||||
using EnvelopeGenerator.Application.DTOs;
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
using EnvelopeGenerator.Application.Exceptions;
|
using EnvelopeGenerator.Application.Exceptions;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|||||||
@@ -14,16 +14,13 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="Dapper" Version="2.1.66" />
|
<PackageReference Include="Dapper" Version="2.1.66" />
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.6.0" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="4.0.0" />
|
||||||
<PackageReference Include="DigitalData.Core.Application" Version="3.2.1" />
|
<PackageReference Include="DigitalData.Core.Application" Version="3.3.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
|
<PackageReference Include="DigitalData.Core.Client" Version="2.1.0" />
|
||||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.1" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.0" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.0.0" />
|
|
||||||
<PackageReference Include="MediatR" Version="12.5.0" />
|
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
|
|
||||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||||
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
|
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
|
||||||
@@ -65,6 +62,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
||||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.2.3" />
|
||||||
<PackageReference Include="CommandDotNet">
|
<PackageReference Include="CommandDotNet">
|
||||||
<Version>7.0.5</Version>
|
<Version>7.0.5</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@@ -72,6 +70,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||||
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||||
<PackageReference Include="CommandDotNet">
|
<PackageReference Include="CommandDotNet">
|
||||||
<Version>8.1.1</Version>
|
<Version>8.1.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
@@ -79,6 +78,7 @@
|
|||||||
|
|
||||||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
|
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
|
||||||
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||||
<PackageReference Include="CommandDotNet">
|
<PackageReference Include="CommandDotNet">
|
||||||
<Version>8.1.1</Version>
|
<Version>8.1.1</Version>
|
||||||
</PackageReference>
|
</PackageReference>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ using DigitalData.Core.DTO;
|
|||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
|
using DigitalData.Core.Application.DTO;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Services;
|
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) =>
|
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(
|
.ThenAsync(
|
||||||
Success: id => Result.Success(id),
|
Success: dto => Result.Success(dto.Id),
|
||||||
Fail: (mssg, ntc) => Result.Fail<long>().Message(mssg).Notice(ntc)
|
Fail: (mssg, ntc) => Result.Fail<long>().Message(mssg).Notice(ntc)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DigitalData.Core.Abstractions.Client;
|
using DigitalData.Core.Client.Interface;
|
||||||
using DigitalData.Core.Client;
|
using DigitalData.Core.Client;
|
||||||
using EnvelopeGenerator.Application.Configurations;
|
using EnvelopeGenerator.Application.Configurations;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
|
|||||||
@@ -4,7 +4,6 @@ using EnvelopeGenerator.Domain.Entities;
|
|||||||
using EnvelopeGenerator.Application.Contracts.Repositories;
|
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using DigitalData.Core.Abstractions;
|
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
|
|
||||||
@@ -37,12 +36,12 @@ public class ReceiverService : CRUDService<IReceiverRepository, ReceiverCreateDt
|
|||||||
return await _repository.DeleteAsync(rcv) ? Result.Success() : Result.Fail();
|
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)
|
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);
|
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,10 +0,0 @@
|
|||||||
Public Class DocumentStatus
|
|
||||||
|
|
||||||
Public Property Id As Integer
|
|
||||||
Public Property EnvelopeId As Integer
|
|
||||||
Public Property ReceiverId As Integer
|
|
||||||
Public Property Value As String
|
|
||||||
Public Property Status As Constants.DocumentStatus = Constants.DocumentStatus.Created
|
|
||||||
Public Property StatusChangedWhen As Date
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,4 +0,0 @@
|
|||||||
Public Class ElementMetadata
|
|
||||||
Public Property Index As Integer
|
|
||||||
Public Property Page As Integer
|
|
||||||
End Class
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
Public Class ElementStatus
|
Imports EnvelopeGenerator.Domain
|
||||||
|
|
||||||
|
<Obsolete("Tabelle TBSIG_ELEMENT_STATUS entfernt")>
|
||||||
|
Public Class ElementStatus
|
||||||
|
|
||||||
Public Property Id As Integer
|
Public Property Id As Integer
|
||||||
Public Property EnvelopeId As Integer
|
Public Property EnvelopeId As Integer
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
|
Imports EnvelopeGenerator.Domain
|
||||||
Public Class EmailData
|
Public Class EmailData
|
||||||
Public Property EmailAdress As String = ""
|
Public Property EmailAdress As String = ""
|
||||||
Public Property EmailSubject As String = ""
|
Public Property EmailSubject As String = ""
|
||||||
@@ -27,8 +27,8 @@ Public Class EmailData
|
|||||||
''' <param name="pEnvelope"></param>
|
''' <param name="pEnvelope"></param>
|
||||||
''' <param name="pReceiver"></param>
|
''' <param name="pReceiver"></param>
|
||||||
''' <param name="pStatus"></param>
|
''' <param name="pStatus"></param>
|
||||||
Public Sub New(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pStatus As Constants.EnvelopeStatus)
|
Public Sub New(pEnvelope As Envelope, pReceiver As Receiver, pStatus As Constants.EnvelopeStatus)
|
||||||
EmailAdress = pReceiver.Email
|
EmailAdress = pReceiver.EmailAddress
|
||||||
EmailSubject = String.Empty
|
EmailSubject = String.Empty
|
||||||
EmailType = pStatus
|
EmailType = pStatus
|
||||||
|
|
||||||
|
|||||||
@@ -1,8 +0,0 @@
|
|||||||
Public Class EmailTemplate
|
|
||||||
|
|
||||||
Public Property Id As Integer
|
|
||||||
Public Property Name As String
|
|
||||||
Public Property Body As String
|
|
||||||
Public Property Subject As String
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -1,4 +1,7 @@
|
|||||||
Public Class Envelope
|
Imports EnvelopeGenerator.Domain
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
|
Public Class Envelope
|
||||||
Public Property Id As Integer = 0
|
Public Property Id As Integer = 0
|
||||||
Public Property UserId As Integer
|
Public Property UserId As Integer
|
||||||
Public Property Title As String = ""
|
Public Property Title As String = ""
|
||||||
@@ -29,7 +32,7 @@
|
|||||||
Public Property User As New User()
|
Public Property User As New User()
|
||||||
|
|
||||||
Public Property Documents As New List(Of EnvelopeDocument)
|
Public Property Documents As New List(Of EnvelopeDocument)
|
||||||
Public Property Receivers As New List(Of EnvelopeReceiver)
|
Public Property Receivers As New List(Of Receiver)
|
||||||
Public Property History As New List(Of EnvelopeHistoryEntry)
|
Public Property History As New List(Of EnvelopeHistoryEntry)
|
||||||
Public Property EnvelopeType As EnvelopeType
|
Public Property EnvelopeType As EnvelopeType
|
||||||
Public Property DOC_RESULT As Byte()
|
Public Property DOC_RESULT As Byte()
|
||||||
|
|||||||
@@ -1,4 +1,6 @@
|
|||||||
Public Class EnvelopeDocumentElement
|
Imports EnvelopeGenerator.Domain
|
||||||
|
|
||||||
|
Public Class EnvelopeDocumentElement
|
||||||
Public Property Id As Integer = -1
|
Public Property Id As Integer = -1
|
||||||
Public Property X As Double
|
Public Property X As Double
|
||||||
Public Property Y 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 EnvelopeId As Integer
|
||||||
Public Property UserReference As String
|
Public Property UserReference As String
|
||||||
Public Property Status As Constants.EnvelopeStatus
|
Public Property Status As Constants.EnvelopeStatus
|
||||||
|
|||||||
@@ -1,83 +1,4 @@
|
|||||||
Imports System.Drawing
|
Public Class EnvelopeReceiver
|
||||||
Imports System.Runtime.Serialization
|
Public Property Envelope As Envelope
|
||||||
Imports DevExpress.Utils.Svg
|
Public Property Receiver As Receiver
|
||||||
Imports DigitalData.Modules.Base
|
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
|
||||||
Imports Newtonsoft.Json
|
|
||||||
|
|
||||||
Public Class EnvelopeReceiver
|
|
||||||
Public Property Id As Integer = 0
|
|
||||||
Public Property UserId As Integer
|
|
||||||
Public Property Signature As String
|
|
||||||
Public ReadOnly Property Color As Color
|
|
||||||
Get
|
|
||||||
Return Helpers.ColorTypeToColor(ColorType)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
<JsonIgnore>
|
|
||||||
Public ReadOnly Property Image As SvgBitmap
|
|
||||||
Get
|
|
||||||
Try
|
|
||||||
Return SvgBitmap.FromFile("Images/circle.svg")
|
|
||||||
Catch ex As Exception
|
|
||||||
Return Nothing
|
|
||||||
End Try
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
Public Property ColorType As ColorType
|
|
||||||
|
|
||||||
Public Property Name As String
|
|
||||||
|
|
||||||
Public Property Company As String = ""
|
|
||||||
|
|
||||||
Public Property JobTitle As String = ""
|
|
||||||
|
|
||||||
Public Property Email As String
|
|
||||||
|
|
||||||
Public Property Status As ReceiverStatus
|
|
||||||
|
|
||||||
Public ReadOnly Property StatusTranslated As String
|
|
||||||
Get
|
|
||||||
Dim oStatus = Status.ToString()
|
|
||||||
Return My.Resources.Model.ResourceManager.GetString(oStatus)
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property SignedDate As DateTime = DateTime.MinValue
|
|
||||||
|
|
||||||
Public ReadOnly Property SignedDateDisplayValue As String
|
|
||||||
Get
|
|
||||||
If SignedDate = DateTime.MinValue Then
|
|
||||||
Return "-"
|
|
||||||
Else
|
|
||||||
Return SignedDate.ToString("G")
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property HasId As Boolean
|
|
||||||
Get
|
|
||||||
Return Id > 0
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public ReadOnly Property HasEmailAndName As Boolean
|
|
||||||
Get
|
|
||||||
Return String.IsNullOrWhiteSpace(Email) = False And
|
|
||||||
String.IsNullOrWhiteSpace(Name) = False
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Public Property Sequence As Integer = 0
|
|
||||||
Public Property PrivateMessage As String = ""
|
|
||||||
Public Property AccessCode As String = ""
|
|
||||||
Public Property PhoneNumber As String = ""
|
|
||||||
|
|
||||||
Public Function GetSignature() As String
|
|
||||||
Return StringEx.GetChecksum(Email.ToUpper)
|
|
||||||
End Function
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,4 +0,0 @@
|
|||||||
Public Class EnvelopeResponse
|
|
||||||
Public Property Envelope As Envelope
|
|
||||||
Public Property Receiver As EnvelopeReceiver
|
|
||||||
End Class
|
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
Public Class EnvelopeType
|
Imports EnvelopeGenerator.Domain
|
||||||
|
Public Class EnvelopeType
|
||||||
|
|
||||||
Public Property Id As Integer = 0
|
Public Property Id As Integer = 0
|
||||||
Public Property Title As String
|
Public Property Title As String
|
||||||
|
|||||||
60
EnvelopeGenerator.Common/Entities/Receiver.vb
Normal file
60
EnvelopeGenerator.Common/Entities/Receiver.vb
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
Imports System.Drawing
|
||||||
|
Imports DigitalData.Modules.Base
|
||||||
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
|
||||||
|
Public Class Receiver
|
||||||
|
Public Property Id As Integer = 0
|
||||||
|
Public Property Signature As String
|
||||||
|
Public ReadOnly Property Color As Color
|
||||||
|
Get
|
||||||
|
Return Helpers.ColorTypeToColor(ColorType)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property ColorType As ColorType
|
||||||
|
|
||||||
|
Public Property Name As String
|
||||||
|
|
||||||
|
Public Property Company As String = ""
|
||||||
|
|
||||||
|
Public Property JobTitle As String = ""
|
||||||
|
|
||||||
|
Public Property EmailAddress As String
|
||||||
|
|
||||||
|
Public Property Status As ReceiverStatus
|
||||||
|
|
||||||
|
Public Property SignedDate As DateTime = DateTime.MinValue
|
||||||
|
|
||||||
|
Public ReadOnly Property SignedDateDisplayValue As String
|
||||||
|
Get
|
||||||
|
If SignedDate = DateTime.MinValue Then
|
||||||
|
Return "-"
|
||||||
|
Else
|
||||||
|
Return SignedDate.ToString("G")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property HasId As Boolean
|
||||||
|
Get
|
||||||
|
Return Id > 0
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public ReadOnly Property HasEmailAndName As Boolean
|
||||||
|
Get
|
||||||
|
Return String.IsNullOrWhiteSpace(EmailAddress) = False And
|
||||||
|
String.IsNullOrWhiteSpace(Name) = False
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property Sequence As Integer = 0
|
||||||
|
Public Property PrivateMessage As String = ""
|
||||||
|
Public Property AccessCode As String = ""
|
||||||
|
Public Property PhoneNumber As String = ""
|
||||||
|
|
||||||
|
Public Function GetSignature() As String
|
||||||
|
Return StringEx.GetChecksum(EmailAddress.ToUpper)
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
Public Class State
|
Public Class State
|
||||||
Public Property UserId As Integer
|
Public Property UserId As Integer
|
||||||
|
|||||||
@@ -1,18 +0,0 @@
|
|||||||
Public Class User
|
|
||||||
Public Property Id As Integer = 0
|
|
||||||
Public Property Prename As String
|
|
||||||
Public Property Name As String
|
|
||||||
Public Property Username As String
|
|
||||||
Public Property Email As String
|
|
||||||
Public Property Language As String
|
|
||||||
|
|
||||||
Public Property HasAccess As Boolean
|
|
||||||
Public Property IsAdmin As Boolean
|
|
||||||
Public Property GhostModeActive As Boolean
|
|
||||||
|
|
||||||
Public ReadOnly Property FullName() As String
|
|
||||||
Get
|
|
||||||
Return Prename + " " + Name
|
|
||||||
End Get
|
|
||||||
End Property
|
|
||||||
End Class
|
|
||||||
@@ -274,13 +274,9 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<Compile Include="Config.vb" />
|
<Compile Include="Config.vb" />
|
||||||
<Compile Include="Constants.vb" />
|
|
||||||
<Compile Include="Entities\DbConfig.vb" />
|
<Compile Include="Entities\DbConfig.vb" />
|
||||||
<Compile Include="Entities\ElementMetadata.vb" />
|
|
||||||
<Compile Include="Entities\DocumentStatus.vb" />
|
|
||||||
<Compile Include="Entities\ElementStatus.vb" />
|
<Compile Include="Entities\ElementStatus.vb" />
|
||||||
<Compile Include="Entities\EmailData.vb" />
|
<Compile Include="Entities\EmailData.vb" />
|
||||||
<Compile Include="Entities\EmailTemplate.vb" />
|
|
||||||
<Compile Include="Jobs\APIBackendJobs\APIEnvelopeJob.vb" />
|
<Compile Include="Jobs\APIBackendJobs\APIEnvelopeJob.vb" />
|
||||||
<Compile Include="Jobs\FinalizeDocument\PDFBurnerParams.vb" />
|
<Compile Include="Jobs\FinalizeDocument\PDFBurnerParams.vb" />
|
||||||
<Compile Include="Services\TemplateService.vb" />
|
<Compile Include="Services\TemplateService.vb" />
|
||||||
@@ -288,11 +284,10 @@
|
|||||||
<Compile Include="Entities\EnvelopeDocument.vb" />
|
<Compile Include="Entities\EnvelopeDocument.vb" />
|
||||||
<Compile Include="Entities\EnvelopeDocumentElement.vb" />
|
<Compile Include="Entities\EnvelopeDocumentElement.vb" />
|
||||||
<Compile Include="Entities\EnvelopeHistoryEntry.vb" />
|
<Compile Include="Entities\EnvelopeHistoryEntry.vb" />
|
||||||
|
<Compile Include="Entities\Receiver.vb" />
|
||||||
<Compile Include="Entities\EnvelopeReceiver.vb" />
|
<Compile Include="Entities\EnvelopeReceiver.vb" />
|
||||||
<Compile Include="Entities\EnvelopeResponse.vb" />
|
|
||||||
<Compile Include="Entities\EnvelopeType.vb" />
|
<Compile Include="Entities\EnvelopeType.vb" />
|
||||||
<Compile Include="Entities\State.vb" />
|
<Compile Include="Entities\State.vb" />
|
||||||
<Compile Include="Entities\User.vb" />
|
|
||||||
<Compile Include="Helpers.vb" />
|
<Compile Include="Helpers.vb" />
|
||||||
<Compile Include="Jobs\FinalizeDocument\FinalizeDocumentExceptions.vb" />
|
<Compile Include="Jobs\FinalizeDocument\FinalizeDocumentExceptions.vb" />
|
||||||
<Compile Include="Jobs\FinalizeDocument\FinalizeDocumentJob.vb" />
|
<Compile Include="Jobs\FinalizeDocument\FinalizeDocumentJob.vb" />
|
||||||
@@ -443,7 +438,12 @@
|
|||||||
<EmbeddedResource Include="Templates\document_access_code_de.html" />
|
<EmbeddedResource Include="Templates\document_access_code_de.html" />
|
||||||
<EmbeddedResource Include="Templates\email_de.html" />
|
<EmbeddedResource Include="Templates\email_de.html" />
|
||||||
</ItemGroup>
|
</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" />
|
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
|
||||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Imports System.IO
|
|||||||
Imports System.Security.Cryptography
|
Imports System.Security.Cryptography
|
||||||
Imports System.Text
|
Imports System.Text
|
||||||
Imports DevExpress.Utils.Svg
|
Imports DevExpress.Utils.Svg
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
|
||||||
Public Class Helpers
|
Public Class Helpers
|
||||||
Private Shared key As String = "$xzBvyPETUS&amm8)D8x#)f;4%;?[BPd" ' Passwort-Schlüssel (16, 24, or 32 bytes)
|
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.Database
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports GdPicture14
|
|
||||||
Imports Quartz
|
Imports Quartz
|
||||||
Imports System.Security.Cryptography
|
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 DevExpress.DataProcessing
|
||||||
Imports System.Data.SqlClient
|
|
||||||
Imports DevExpress.XtraRichEdit.Layout.Engine
|
|
||||||
|
|
||||||
Namespace Jobs
|
Namespace Jobs
|
||||||
Public Class APIEnvelopeJob
|
Public Class APIEnvelopeJob
|
||||||
@@ -39,7 +32,7 @@ Namespace Jobs
|
|||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
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()
|
Logger = LogConfig.GetLogger()
|
||||||
myTempFiles = New TempFiles(LogConfig)
|
myTempFiles = New TempFiles(LogConfig)
|
||||||
myTempFiles.Create()
|
myTempFiles.Create()
|
||||||
@@ -179,7 +172,7 @@ Namespace Jobs
|
|||||||
ActionService = New ActionService(pState, Database)
|
ActionService = New ActionService(pState, Database)
|
||||||
End Sub
|
End Sub
|
||||||
Private Function GetDatabase(pContext As IJobExecutionContext, pLogConfig As LogConfig) As MSSQLServer
|
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))
|
Dim Database = New MSSQLServer(pLogConfig, MSSQLServer.DecryptConnectionString(oConnectionString))
|
||||||
|
|
||||||
Return Database
|
Return Database
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ Imports System.Security.Cryptography
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
||||||
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
Imports DevExpress.DataProcessing
|
Imports DevExpress.DataProcessing
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
@@ -47,8 +47,8 @@ Namespace Jobs
|
|||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
||||||
Dim oGdPictureKey As String = pContext.MergedJobDataMap.Item(Constants.GDPICTURE)
|
Dim oGdPictureKey As String = pContext.MergedJobDataMap.Item(Domain.Constants.GDPICTURE)
|
||||||
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
|
LogConfig = pContext.MergedJobDataMap.Item(Domain.Constants.LOGCONFIG)
|
||||||
Logger = LogConfig.GetLogger()
|
Logger = LogConfig.GetLogger()
|
||||||
myTempFiles = New TempFiles(LogConfig)
|
myTempFiles = New TempFiles(LogConfig)
|
||||||
myTempFiles.Create()
|
myTempFiles.Create()
|
||||||
@@ -74,7 +74,7 @@ Namespace Jobs
|
|||||||
InitializeServices(oState)
|
InitializeServices(oState)
|
||||||
|
|
||||||
Logger.Debug("Loading PDFBurner..")
|
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)
|
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, pdfBurnerParams)
|
||||||
|
|
||||||
Logger.Debug("Loading PDFMerger..")
|
Logger.Debug("Loading PDFMerger..")
|
||||||
@@ -90,7 +90,7 @@ Namespace Jobs
|
|||||||
|
|
||||||
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
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 oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTime} ORDER BY GUID"
|
||||||
Dim oTable = Database.GetDatatable(oSql)
|
Dim oTable = Database.GetDatatable(oSql)
|
||||||
|
|
||||||
@@ -334,7 +334,7 @@ Namespace Jobs
|
|||||||
|
|
||||||
For Each oReceiver In pEnvelope.Receivers
|
For Each oReceiver In pEnvelope.Receivers
|
||||||
If ActionService.CompleteEnvelope(pEnvelope, oReceiver) = False Then ', oAttachment
|
If ActionService.CompleteEnvelope(pEnvelope, oReceiver) = False Then ', oAttachment
|
||||||
Logger.Error("Envelope could not be completed for receiver [{0}]", oReceiver.Email)
|
Logger.Error("Envelope could not be completed for receiver [{0}]", oReceiver.EmailAddress)
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -436,7 +436,7 @@ Namespace Jobs
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function GetDatabase(pContext As IJobExecutionContext, pLogConfig As LogConfig) As MSSQLServer
|
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))
|
Dim Database = New MSSQLServer(pLogConfig, MSSQLServer.DecryptConnectionString(oConnectionString))
|
||||||
|
|
||||||
Return Database
|
Return Database
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
Imports System.Windows.Forms.VisualStyles.VisualStyleElement
|
Imports EnvelopeGenerator.Domain
|
||||||
|
|
||||||
Public Class ReportItem
|
Public Class ReportItem
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
Public Class DocumentStatusModel
|
Public Class DocumentStatusModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Imports System.Data
|
Imports System.Data.SqlClient
|
||||||
Imports System.Data.SqlClient
|
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
|
Imports EnvelopeGenerator.Domain
|
||||||
|
|
||||||
Public Class ElementModel
|
Public Class ElementModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
|
|
||||||
|
<Obsolete("Tabelle TBSIG_ELEMENT_STATUS entfernt")>
|
||||||
Public Class ElementStatusModel
|
Public Class ElementStatusModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
|
|
||||||
@@ -7,6 +8,7 @@ Public Class ElementStatusModel
|
|||||||
MyBase.New(pState)
|
MyBase.New(pState)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
<Obsolete("Tabelle TBSIG_ELEMENT_STATUS entfernt")>
|
||||||
Public Function Insert(pElementStatus As ElementStatus) As Boolean
|
Public Function Insert(pElementStatus As ElementStatus) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oSql = "INSERT INTO [dbo].[TBSIG_ELEMENT_STATUS]
|
Dim oSql = "INSERT INTO [dbo].[TBSIG_ELEMENT_STATUS]
|
||||||
@@ -41,6 +43,7 @@ Public Class ElementStatusModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
<Obsolete("Tabelle TBSIG_ELEMENT_STATUS entfernt")>
|
||||||
Public Function Update(pElementStatus As ElementStatus) As Boolean
|
Public Function Update(pElementStatus As ElementStatus) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oSql = "UPDATE [dbo].[TBSIG_ELEMENT_STATUS]
|
Dim oSql = "UPDATE [dbo].[TBSIG_ELEMENT_STATUS]
|
||||||
@@ -68,6 +71,7 @@ Public Class ElementStatusModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
<Obsolete("Tabelle TBSIG_ELEMENT_STATUS entfernt")>
|
||||||
Private Function GetElementId(pElement As ElementStatus) As Integer
|
Private Function GetElementId(pElement As ElementStatus) As Integer
|
||||||
Try
|
Try
|
||||||
Return Database.GetScalarValue($"SELECT MAX(GUID) FROM TBSIG_ELEMENT_STATUS
|
Return Database.GetScalarValue($"SELECT MAX(GUID) FROM TBSIG_ELEMENT_STATUS
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
Public Class EmailTemplateModel
|
Public Class EmailTemplateModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
|
|||||||
@@ -1,8 +1,8 @@
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.Web.UI.WebControls
|
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
Public Class EnvelopeModel
|
Public Class EnvelopeModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
@@ -33,10 +33,10 @@ Public Class EnvelopeModel
|
|||||||
.Message = pRow.ItemEx("MESSAGE", ""),
|
.Message = pRow.ItemEx("MESSAGE", ""),
|
||||||
.UserId = pRow.ItemEx("USER_ID", 0),
|
.UserId = pRow.ItemEx("USER_ID", 0),
|
||||||
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
|
.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"),
|
.AddedWhen = pRow.Item("ADDED_WHEN"),
|
||||||
.ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing),
|
.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(),
|
.User = New User(),
|
||||||
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
|
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
|
||||||
.ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_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),
|
.FirstReminderDays = pRow.ItemEx("FIRST_REMINDER_DAYS", 0),
|
||||||
.ReminderIntervalDays = pRow.ItemEx("REMINDER_INTERVAL_DAYS", 0),
|
.ReminderIntervalDays = pRow.ItemEx("REMINDER_INTERVAL_DAYS", 0),
|
||||||
.UseAccessCode = pRow.ItemEx("USE_ACCESS_CODE", False),
|
.UseAccessCode = pRow.ItemEx("USE_ACCESS_CODE", False),
|
||||||
.FinalEmailToCreator = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", Constants.FinalEmailType.No.ToString())),
|
.FinalEmailToCreator = ObjectEx.ToEnum(Of FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", FinalEmailType.No.ToString())),
|
||||||
.FinalEmailToReceivers = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", Constants.FinalEmailType.No.ToString())),
|
.FinalEmailToReceivers = ObjectEx.ToEnum(Of FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", FinalEmailType.No.ToString())),
|
||||||
.TFA_Enabled = pRow.ItemEx("TFA_Enabled", False)
|
.TFA_Enabled = pRow.ItemEx("TFA_Enabled", False)
|
||||||
}
|
}
|
||||||
Dim oDOC_RESULT = pRow.Item("DOC_RESULT")
|
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)
|
Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE] (MESSAGE, ENVELOPE_UUID, STATUS, USER_ID)
|
||||||
VALUES('',
|
VALUES('',
|
||||||
'{pEnvelope.Uuid}',
|
'{pEnvelope.Uuid}',
|
||||||
'{CInt([Enum].Parse(GetType(EnvelopeStatus), Constants.EnvelopeStatus.EnvelopeCreated))}',
|
'{CInt([Enum].Parse(GetType(EnvelopeStatus), EnvelopeStatus.EnvelopeCreated))}',
|
||||||
'{pEnvelope.UserId}')"
|
'{pEnvelope.UserId}')"
|
||||||
Dim oCommand As New SqlCommand(oSql)
|
Dim oCommand As New SqlCommand(oSql)
|
||||||
'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
|
'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
|
||||||
Public Class EnvelopeTypeModel
|
Public Class EnvelopeTypeModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
|
|||||||
@@ -27,7 +27,7 @@ Public Class HistoryModel
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function HasReceiverSigned(pEnvelopeId As Integer, pReceiverId As Integer) As Boolean
|
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)
|
Dim oSql = $"SELECT COUNT(T.GUID)
|
||||||
FROM TBSIG_ENVELOPE_HISTORY T
|
FROM TBSIG_ENVELOPE_HISTORY T
|
||||||
JOIN TBSIG_RECEIVER T2 ON T.USER_REFERENCE = T2.EMAIL_ADDRESS
|
JOIN TBSIG_RECEIVER T2 ON T.USER_REFERENCE = T2.EMAIL_ADDRESS
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Imports System.Net.Mail
|
Imports System.Net.Mail
|
||||||
Imports DevExpress.DataProcessing
|
Imports DevExpress.DataProcessing
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
|
||||||
Public Class ReceiverModel
|
Public Class ReceiverModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
@@ -11,7 +11,7 @@ Public Class ReceiverModel
|
|||||||
MyBase.New(pState)
|
MyBase.New(pState)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ToReceiver(pRow As DataRow, pColorIndex As Integer) As EnvelopeReceiver
|
Private Function ToReceiver(pRow As DataRow, pColorIndex As Integer) As Receiver
|
||||||
Dim EmailAdress As String = pRow.ItemEx("EMAIL_ADDRESS", "")
|
Dim EmailAdress As String = pRow.ItemEx("EMAIL_ADDRESS", "")
|
||||||
Dim EnvelopeId As Integer = pRow.ItemEx("ENVELOPE_ID", 0)
|
Dim EnvelopeId As Integer = pRow.ItemEx("ENVELOPE_ID", 0)
|
||||||
Dim SignedDate As DateTime = DateTime.MinValue
|
Dim SignedDate As DateTime = DateTime.MinValue
|
||||||
@@ -24,9 +24,9 @@ Public Class ReceiverModel
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return New EnvelopeReceiver() With {
|
Return New Receiver() With {
|
||||||
.Id = pRow.ItemEx("GUID", 0),
|
.Id = pRow.ItemEx("GUID", 0),
|
||||||
.Email = pRow.ItemEx("EMAIL_ADDRESS", ""),
|
.EmailAddress = pRow.ItemEx("EMAIL_ADDRESS", ""),
|
||||||
.Name = pRow.ItemEx("NAME", ""),
|
.Name = pRow.ItemEx("NAME", ""),
|
||||||
.Sequence = pRow.ItemEx("SEQUENCE", 0),
|
.Sequence = pRow.ItemEx("SEQUENCE", 0),
|
||||||
.Signature = pRow.ItemEx("SIGNATURE", ""),
|
.Signature = pRow.ItemEx("SIGNATURE", ""),
|
||||||
@@ -38,15 +38,15 @@ Public Class ReceiverModel
|
|||||||
}
|
}
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function ToReceiver(pTable As DataTable) As EnvelopeReceiver
|
Private Function ToReceiver(pTable As DataTable) As Receiver
|
||||||
Return pTable?.Rows.Cast(Of DataRow).
|
Return pTable?.Rows.Cast(Of DataRow).
|
||||||
Select(AddressOf ToReceiver).
|
Select(AddressOf ToReceiver).
|
||||||
Single()
|
Single()
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function TestReceiverExists(pReceiver As EnvelopeReceiver) As Boolean
|
Public Function TestReceiverExists(pReceiver As Receiver) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oGuid = Database.GetScalarValue($"SELECT COALESCE(GUID, 0) FROM TBSIG_RECEIVER WHERE EMAIL_ADDRESS = '{pReceiver.Email}'")
|
Dim oGuid = Database.GetScalarValue($"SELECT COALESCE(GUID, 0) FROM TBSIG_RECEIVER WHERE EMAIL_ADDRESS = '{pReceiver.EmailAddress}'")
|
||||||
pReceiver.Id = oGuid
|
pReceiver.Id = oGuid
|
||||||
Return oGuid > 0
|
Return oGuid > 0
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -55,7 +55,7 @@ Public Class ReceiverModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function Insert(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
|
Public Function Insert(pReceiver As Receiver, pTransaction As SqlTransaction) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oSignature As String = pReceiver.GetSignature()
|
Dim oSignature As String = pReceiver.GetSignature()
|
||||||
Dim oCheck = $"SELECT COUNT(GUID) FROM [dbo].[TBSIG_RECEIVER] WHERE SIGNATURE = '{oSignature}'"
|
Dim oCheck = $"SELECT COUNT(GUID) FROM [dbo].[TBSIG_RECEIVER] WHERE SIGNATURE = '{oSignature}'"
|
||||||
@@ -66,19 +66,19 @@ Public Class ReceiverModel
|
|||||||
([EMAIL_ADDRESS]
|
([EMAIL_ADDRESS]
|
||||||
,[SIGNATURE])
|
,[SIGNATURE])
|
||||||
VALUES
|
VALUES
|
||||||
('{pReceiver.Email}'
|
('{pReceiver.EmailAddress}'
|
||||||
,'{pReceiver.GetSignature()}')"
|
,'{pReceiver.GetSignature()}')"
|
||||||
|
|
||||||
Dim oCommand = New SqlCommand(oSql)
|
Dim oCommand = New SqlCommand(oSql)
|
||||||
Dim oResult = Database.ExecuteNonQuery(oCommand)
|
Dim oResult = Database.ExecuteNonQuery(oCommand)
|
||||||
If oResult = True Then
|
If oResult = True Then
|
||||||
pReceiver.Id = GetReceiverIdByEmail(pReceiver.Email, pTransaction)
|
pReceiver.Id = GetReceiverIdByEmail(pReceiver.EmailAddress, pTransaction)
|
||||||
Return True
|
Return True
|
||||||
Else
|
Else
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Logger.Warn($"Receiver [{pReceiver.Email}] already existing! SignatureID: {oSignature} Check SQL {oCheck}")
|
Logger.Warn($"Receiver [{pReceiver.EmailAddress}] already existing! SignatureID: {oSignature} Check SQL {oCheck}")
|
||||||
Return True
|
Return True
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -87,7 +87,7 @@ Public Class ReceiverModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function Update(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
|
Public Function Update(pReceiver As Receiver, pTransaction As SqlTransaction) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oSql As String = $"UPDATE [dbo].[TBSIG_USER_RECEIVER]
|
Dim oSql As String = $"UPDATE [dbo].[TBSIG_USER_RECEIVER]
|
||||||
SET [NAME] = '{pReceiver.Name}'
|
SET [NAME] = '{pReceiver.Name}'
|
||||||
@@ -118,7 +118,7 @@ Public Class ReceiverModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function Assign(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
|
Public Function Assign(pEnvelope As Envelope, pReceiver As Receiver, pTransaction As SqlTransaction) As Boolean
|
||||||
Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE_RECEIVER]
|
Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE_RECEIVER]
|
||||||
([ENVELOPE_ID]
|
([ENVELOPE_ID]
|
||||||
,[RECEIVER_ID]
|
,[RECEIVER_ID]
|
||||||
@@ -153,7 +153,7 @@ Public Class ReceiverModel
|
|||||||
Return Database.ExecuteNonQuery(oCommand, pTransaction)
|
Return Database.ExecuteNonQuery(oCommand, pTransaction)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ListEnvelopeReceivers(pEnvelopeId As Integer) As IEnumerable(Of EnvelopeReceiver)
|
Public Function ListEnvelopeReceivers(pEnvelopeId As Integer) As IEnumerable(Of Receiver)
|
||||||
Try
|
Try
|
||||||
Dim oSql = $"SELECT * FROM [dbo].[VWSIG_ENVELOPE_RECEIVERS] WHERE ENVELOPE_ID = {pEnvelopeId}"
|
Dim oSql = $"SELECT * FROM [dbo].[VWSIG_ENVELOPE_RECEIVERS] WHERE ENVELOPE_ID = {pEnvelopeId}"
|
||||||
Dim oTable = Database.GetDatatable(oSql)
|
Dim oTable = Database.GetDatatable(oSql)
|
||||||
@@ -187,7 +187,7 @@ Public Class ReceiverModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ListReceivers() As IEnumerable(Of EnvelopeReceiver)
|
Public Function ListReceivers() As IEnumerable(Of Receiver)
|
||||||
Try
|
Try
|
||||||
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_RECEIVER]"
|
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_RECEIVER]"
|
||||||
Dim oTable = Database.GetDatatable(oSql)
|
Dim oTable = Database.GetDatatable(oSql)
|
||||||
@@ -202,13 +202,13 @@ Public Class ReceiverModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function ListReceivers(pReceiversFromGrid As List(Of EnvelopeReceiver)) As IEnumerable(Of EnvelopeReceiver)
|
Public Function ListReceivers(pReceiversFromGrid As List(Of Receiver)) As IEnumerable(Of Receiver)
|
||||||
Try
|
Try
|
||||||
If pReceiversFromGrid.Count = 0 Then
|
If pReceiversFromGrid.Count = 0 Then
|
||||||
Return New List(Of EnvelopeReceiver)
|
Return New List(Of Receiver)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim oAddresses = pReceiversFromGrid.Select(Function(r) $"'{r.Email}'").JoinToString(",")
|
Dim oAddresses = pReceiversFromGrid.Select(Function(r) $"'{r.EmailAddress}'").JoinToString(",")
|
||||||
|
|
||||||
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_RECEIVER] WHERE EMAIL_ADDRESS IN ({oAddresses})"
|
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_RECEIVER] WHERE EMAIL_ADDRESS IN ({oAddresses})"
|
||||||
Dim oTable = Database.GetDatatable(oSql)
|
Dim oTable = Database.GetDatatable(oSql)
|
||||||
@@ -235,7 +235,7 @@ Public Class ReceiverModel
|
|||||||
End Try
|
End Try
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetById(pReceiverId As Integer) As EnvelopeReceiver
|
Public Function GetById(pReceiverId As Integer) As Receiver
|
||||||
'Try
|
'Try
|
||||||
' Dim oSql = $"SELECT * FROM [dbo].[VWSIG_ENVELOPE_RECEIVERS] WHERE RECEIVER_ID = {pReceiverId}"
|
' Dim oSql = $"SELECT * FROM [dbo].[VWSIG_ENVELOPE_RECEIVERS] WHERE RECEIVER_ID = {pReceiverId}"
|
||||||
' Dim oTable = Database.GetDatatable(oSql)
|
' Dim oTable = Database.GetDatatable(oSql)
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
Public Class UserModel
|
Public Class UserModel
|
||||||
Inherits BaseModel
|
Inherits BaseModel
|
||||||
|
|||||||
@@ -320,7 +320,7 @@ Partial Public Class rptEnvelopeHistory
|
|||||||
Me.XrTableCell19.StylePriority.UseBorders = False
|
Me.XrTableCell19.StylePriority.UseBorders = False
|
||||||
Me.XrTableCell19.StylePriority.UseFont = False
|
Me.XrTableCell19.StylePriority.UseFont = False
|
||||||
Me.XrTableCell19.StylePriority.UseForeColor = False
|
Me.XrTableCell19.StylePriority.UseForeColor = False
|
||||||
Me.XrTableCell19.Text = "Email"
|
Me.XrTableCell19.Text = "EmailAddress"
|
||||||
Me.XrTableCell19.Weight = 0.11578820509129036R
|
Me.XrTableCell19.Weight = 0.11578820509129036R
|
||||||
'
|
'
|
||||||
'XrTableCell20
|
'XrTableCell20
|
||||||
@@ -329,7 +329,7 @@ Partial Public Class rptEnvelopeHistory
|
|||||||
Me.XrTableCell20.BorderColor = System.Drawing.Color.Empty
|
Me.XrTableCell20.BorderColor = System.Drawing.Color.Empty
|
||||||
Me.XrTableCell20.Borders = DevExpress.XtraPrinting.BorderSide.None
|
Me.XrTableCell20.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||||
Me.XrTableCell20.Dpi = 254.0!
|
Me.XrTableCell20.Dpi = 254.0!
|
||||||
Me.XrTableCell20.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[User].[Email]")})
|
Me.XrTableCell20.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[User].[EmailAddress]")})
|
||||||
Me.XrTableCell20.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
Me.XrTableCell20.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
Me.XrTableCell20.ForeColor = System.Drawing.Color.Black
|
Me.XrTableCell20.ForeColor = System.Drawing.Color.Black
|
||||||
Me.XrTableCell20.Multiline = True
|
Me.XrTableCell20.Multiline = True
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
Imports DevExpress.DataAccess.Native.Web
|
Imports DevExpress.DataAccess.Native.Web
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
Imports EnvelopeGenerator.Common.My.Resources
|
Imports EnvelopeGenerator.Common.My.Resources
|
||||||
Imports DigitalData.Modules.Database
|
Imports DigitalData.Modules.Database
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
@@ -26,7 +26,7 @@ Public Class ActionService
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function SendEnvelope(pEnvelope As Envelope) As Boolean
|
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
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -41,13 +41,13 @@ Public Class ActionService
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
Public Function SetStatusDocumentRotationChanged(pEnvelope As Envelope) As Boolean
|
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
|
Return False
|
||||||
End If
|
End If
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
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
|
Return False
|
||||||
End If
|
End If
|
||||||
Dim oSendResult As Boolean = False
|
Dim oSendResult As Boolean = False
|
||||||
@@ -56,7 +56,7 @@ Public Class ActionService
|
|||||||
Next
|
Next
|
||||||
Return oSendResult
|
Return oSendResult
|
||||||
End Function
|
End Function
|
||||||
Public Function ResendReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function ResendReceiver(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Return EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
|
Return EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -64,9 +64,9 @@ Public Class ActionService
|
|||||||
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
|
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
|
||||||
Dim oStatus As EnvelopeStatus
|
Dim oStatus As EnvelopeStatus
|
||||||
If pEnvelope.IsAlreadySent Then
|
If pEnvelope.IsAlreadySent Then
|
||||||
oStatus = Constants.EnvelopeStatus.EnvelopeWithdrawn
|
oStatus = EnvelopeStatus.EnvelopeWithdrawn
|
||||||
Else
|
Else
|
||||||
oStatus = Constants.EnvelopeStatus.EnvelopeDeleted
|
oStatus = EnvelopeStatus.EnvelopeDeleted
|
||||||
End If
|
End If
|
||||||
Dim oUpd = $"UPDATE TBSIG_ENVELOPE SET REJECTION_REASON = '{pReason}' WHERE GUID = {pEnvelope.Id}"
|
Dim oUpd = $"UPDATE TBSIG_ENVELOPE SET REJECTION_REASON = '{pReason}' WHERE GUID = {pEnvelope.Id}"
|
||||||
myDatabase.ExecuteNonQuery(oUpd)
|
myDatabase.ExecuteNonQuery(oUpd)
|
||||||
@@ -86,7 +86,7 @@ Public Class ActionService
|
|||||||
End Function
|
End Function
|
||||||
Public Function API_SendWithdrawn_Mails(pEnvelope As Envelope, pReason As String) As Boolean
|
Public Function API_SendWithdrawn_Mails(pEnvelope As Envelope, pReason As String) As Boolean
|
||||||
Dim oSendResult As Boolean = False
|
Dim oSendResult As Boolean = False
|
||||||
For Each oReceiver As EnvelopeReceiver In pEnvelope.Receivers
|
For Each oReceiver As Receiver In pEnvelope.Receivers
|
||||||
If EmailService.SendEnvelopeDeletedEmail(pEnvelope, oReceiver, pReason) = False Then
|
If EmailService.SendEnvelopeDeletedEmail(pEnvelope, oReceiver, pReason) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -94,50 +94,50 @@ Public Class ActionService
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function OpenEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function OpenEnvelope(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Dim oUserReference = pReceiver.Email
|
Dim oUserReference = pReceiver.EmailAddress
|
||||||
|
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentOpened, oUserReference) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.DocumentOpened, oUserReference) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function RequestAccessCode(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function RequestAccessCode(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Dim oUserReference = pReceiver.Email
|
Dim oUserReference = pReceiver.EmailAddress
|
||||||
|
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.AccessCodeRequested, oUserReference) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.AccessCodeRequested, oUserReference) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function EnterCorrectAccessCode(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function EnterCorrectAccessCode(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Dim oUserReference = pReceiver.Email
|
Dim oUserReference = pReceiver.EmailAddress
|
||||||
|
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.AccessCodeCorrect, oUserReference) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.AccessCodeCorrect, oUserReference) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function EnterIncorrectAccessCode(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function EnterIncorrectAccessCode(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Dim oUserReference = pReceiver.Email
|
Dim oUserReference = pReceiver.EmailAddress
|
||||||
|
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.AccessCodeIncorrect, oUserReference) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.AccessCodeIncorrect, oUserReference) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function SignEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function SignEnvelope(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Dim oUserReference = pReceiver.Email
|
Dim oUserReference = pReceiver.EmailAddress
|
||||||
|
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentSigned, oUserReference) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.DocumentSigned, oUserReference) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -145,15 +145,15 @@ Public Class ActionService
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function FinalizeEnvelope(pEnvelope As Envelope) As Boolean
|
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
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function CompleteEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean ', pAttachment As String
|
Public Function CompleteEnvelope(pEnvelope As Envelope, pReceiver As Receiver) As Boolean ', pAttachment As String
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent, pReceiver.Email) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, EnvelopeStatus.MessageCompletionSent, pReceiver.EmailAddress) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -161,7 +161,7 @@ Public Class ActionService
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function CompleteEnvelope(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
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
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -169,7 +169,7 @@ Public Class ActionService
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function CreateReport(pEnvelope As Envelope) As Boolean
|
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
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,4 @@
|
|||||||
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Base
|
|
||||||
Imports DigitalData.Modules.Logging
|
|
||||||
Imports EnvelopeGenerator.Common.My.Resources
|
|
||||||
|
|
||||||
Public Class EmailService
|
Public Class EmailService
|
||||||
Inherits BaseService
|
Inherits BaseService
|
||||||
@@ -16,9 +13,9 @@ Public Class EmailService
|
|||||||
EmailTemplate = New TemplateService(pState)
|
EmailTemplate = New TemplateService(pState)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pReason As String) As Boolean
|
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As Receiver, pReason As String) As Boolean
|
||||||
Logger.Debug("SendEnvelopeDeletedEmail - Creating email data object...")
|
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 = "",
|
.SignatureLink = "",
|
||||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
@@ -34,9 +31,9 @@ Public Class EmailService
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function SendDocumentReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function SendDocumentReceivedEmail(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Logger.Debug("Creating email data object.")
|
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),
|
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
@@ -52,11 +49,11 @@ Public Class EmailService
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetReceiverUrl(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As String
|
Public Function GetReceiverUrl(pEnvelope As Envelope, pReceiver As Receiver) As String
|
||||||
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||||
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||||
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
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),
|
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
@@ -65,12 +62,12 @@ Public Class EmailService
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function SendDocumentAccessCodeReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function SendDocumentAccessCodeReceivedEmail(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Logger.Debug("Creating email data object.")
|
Logger.Debug("Creating email data object.")
|
||||||
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||||
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||||
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
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),
|
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||||
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
@@ -86,9 +83,9 @@ Public Class EmailService
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function SendSignedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function SendSignedEmail(pEnvelope As Envelope, pReceiver As Receiver) As Boolean
|
||||||
Logger.Debug("Creating email data object.")
|
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 = ""
|
.SignatureLink = ""
|
||||||
}
|
}
|
||||||
@@ -103,9 +100,9 @@ Public Class EmailService
|
|||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function SendDocumentCompletedEmailToReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean ', pAttachment As String
|
Public Function SendDocumentCompletedEmailToReceiver(pEnvelope As Envelope, pReceiver As Receiver) As Boolean ', pAttachment As String
|
||||||
Logger.Debug("Creating email data object.")
|
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 = "",
|
.SignatureLink = "",
|
||||||
.ATT1_RELATED_ID = pEnvelope.Id,
|
.ATT1_RELATED_ID = pEnvelope.Id,
|
||||||
@@ -126,7 +123,7 @@ Public Class EmailService
|
|||||||
|
|
||||||
Public Function SendDocumentCompletedEmailToCreator(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
Public Function SendDocumentCompletedEmailToCreator(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
||||||
Logger.Debug("Creating email data object.")
|
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 = "",
|
.SignatureLink = "",
|
||||||
.ATT1_RELATED_ID = pEnvelope.Id,
|
.ATT1_RELATED_ID = pEnvelope.Id,
|
||||||
|
|||||||
@@ -1,7 +1,5 @@
|
|||||||
|
Imports DigitalData.Modules.Logging
|
||||||
Imports DigitalData.Modules.Base
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
Imports DigitalData.Modules.Logging
|
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
|
||||||
|
|
||||||
Public Class HistoryService
|
Public Class HistoryService
|
||||||
Inherits BaseService
|
Inherits BaseService
|
||||||
@@ -34,4 +32,4 @@ Public Class HistoryService
|
|||||||
Logger.Debug("Envelope status set to [{0}] for Envelope [{1}].", pStatus.ToString, pEnvelope.Id)
|
Logger.Debug("Envelope status set to [{0}] for Envelope [{1}].", pStatus.ToString, pEnvelope.Id)
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
End Class
|
End Class
|
||||||
@@ -1,5 +1,6 @@
|
|||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports EnvelopeGenerator.Domain.Constants
|
||||||
|
|
||||||
Public Class TemplateService
|
Public Class TemplateService
|
||||||
Inherits BaseService
|
Inherits BaseService
|
||||||
@@ -35,7 +36,7 @@ Public Class TemplateService
|
|||||||
|
|
||||||
Public Sub FillDocumentReceivedEmailBody(pEmailData As EmailData)
|
Public Sub FillDocumentReceivedEmailBody(pEmailData As EmailData)
|
||||||
InitDictionary(pEmailData)
|
InitDictionary(pEmailData)
|
||||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentReceived)
|
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentReceived)
|
||||||
|
|
||||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||||
@@ -43,7 +44,7 @@ Public Class TemplateService
|
|||||||
|
|
||||||
Public Sub FillEnvelopeDeletedEmailBody(pEmailData As EmailData, pReason As String)
|
Public Sub FillEnvelopeDeletedEmailBody(pEmailData As EmailData, pReason As String)
|
||||||
InitDictionary(pEmailData, pReason)
|
InitDictionary(pEmailData, pReason)
|
||||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentDeleted)
|
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentDeleted)
|
||||||
|
|
||||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body, pReason)
|
pEmailData.EmailBody = FillTemplate(oTemplate.Body, pReason)
|
||||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||||
@@ -51,7 +52,7 @@ Public Class TemplateService
|
|||||||
|
|
||||||
Public Sub FillDocumentSignedEmailBody(pEmailData As EmailData)
|
Public Sub FillDocumentSignedEmailBody(pEmailData As EmailData)
|
||||||
InitDictionary(pEmailData)
|
InitDictionary(pEmailData)
|
||||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentSigned)
|
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentSigned)
|
||||||
|
|
||||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||||
@@ -59,7 +60,7 @@ Public Class TemplateService
|
|||||||
|
|
||||||
Public Sub FillDocumentCompletedEmailBody(pEmailData As EmailData)
|
Public Sub FillDocumentCompletedEmailBody(pEmailData As EmailData)
|
||||||
InitDictionary(pEmailData)
|
InitDictionary(pEmailData)
|
||||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentCompleted)
|
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentCompleted)
|
||||||
|
|
||||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||||
@@ -67,7 +68,7 @@ Public Class TemplateService
|
|||||||
|
|
||||||
Public Sub FillDocumentAccessCodeReceivedEmailBody(pEmailData As EmailData)
|
Public Sub FillDocumentAccessCodeReceivedEmailBody(pEmailData As EmailData)
|
||||||
InitDictionary(pEmailData)
|
InitDictionary(pEmailData)
|
||||||
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentAccessCodeReceived)
|
Dim oTemplate = EmailHtmlTemplateModel.GetById(EmailTemplateType.DocumentAccessCodeReceived)
|
||||||
|
|
||||||
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
|
||||||
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ Namespace My.Resources
|
|||||||
Public Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
Public Shared ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager
|
||||||
Get
|
Get
|
||||||
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
If Object.ReferenceEquals(resourceMan, Nothing) Then
|
||||||
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("EnvelopeGenerator.Common.Email", GetType(Email).Assembly)
|
Dim temp As Global.System.Resources.ResourceManager = New Global.System.Resources.ResourceManager("EnvelopeGenerator.Common.EmailAddress", GetType(Email).Assembly)
|
||||||
resourceMan = temp
|
resourceMan = temp
|
||||||
End If
|
End If
|
||||||
Return resourceMan
|
Return resourceMan
|
||||||
|
|||||||
@@ -236,7 +236,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Die Email-Adresse [ @Mail ] konnte nicht validiert werden! ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Die EmailAddress-Adresse [ @Mail ] konnte nicht validiert werden! ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Public Shared ReadOnly Property Error_email_Validation() As String
|
Public Shared ReadOnly Property Error_email_Validation() As String
|
||||||
Get
|
Get
|
||||||
@@ -300,7 +300,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Mindestens ein Empfänger hat keine Anrede oder keine Email Adresse. ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Mindestens ein Empfänger hat keine Anrede oder keine EmailAddress Adresse. ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Public Shared ReadOnly Property Incomplete_Receivers() As String
|
Public Shared ReadOnly Property Incomplete_Receivers() As String
|
||||||
Get
|
Get
|
||||||
@@ -309,11 +309,11 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Empfänger {0} hat keine gültige Email Addresse. ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Empfänger {0} hat keine gültige EmailAddress Addresse. ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Public Shared ReadOnly Property Invalid_Email_Address() As String
|
Public Shared ReadOnly Property Invalid_Email_Address() As String
|
||||||
Get
|
Get
|
||||||
Return ResourceManager.GetString("Invalid Email Address", resourceCulture)
|
Return ResourceManager.GetString("Invalid EmailAddress Address", resourceCulture)
|
||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|||||||
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.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.Text.Json.Serialization;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_CONFIG", Schema = "dbo")]
|
[Table("TBSIG_CONFIG", Schema = "dbo")]
|
||||||
public class Config : IUnique<int>
|
public class Config
|
||||||
{
|
{
|
||||||
[Column("DOCUMENT_PATH", TypeName = "nvarchar(256)")]
|
[Column("DOCUMENT_PATH", TypeName = "nvarchar(256)")]
|
||||||
public string? DocumentPath { get; init; }
|
public string DocumentPath { get; set; }
|
||||||
|
|
||||||
[Column("SENDING_PROFILE", TypeName = "int")]
|
[Column("SENDING_PROFILE", TypeName = "int")]
|
||||||
[Required]
|
[Required]
|
||||||
public required int SendingProfile { get; init; }
|
public int SendingProfile { get; set; }
|
||||||
|
|
||||||
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
|
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
|
||||||
public string? SignatureHost { get; init; }
|
public string SignatureHost { get; set; }
|
||||||
|
|
||||||
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
|
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
|
||||||
public string? ExternalProgramName { get; init; }
|
public string ExternalProgramName { get; set; }
|
||||||
|
|
||||||
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
||||||
public string? ExportPath { get; init; }
|
public string ExportPath { get; set; }
|
||||||
|
|
||||||
[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.");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,12 +1,14 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using System.ComponentModel;
|
||||||
using System.ComponentModel;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
|
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
|
||||||
public class DocumentReceiverElement : IUnique<int>
|
public class DocumentReceiverElement
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
@@ -57,7 +59,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public bool Required { get; set; }
|
public bool Required { get; set; }
|
||||||
|
|
||||||
[Column("TOOLTIP")]
|
[Column("TOOLTIP")]
|
||||||
public string? Tooltip { get; set; }
|
public string Tooltip { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("READ_ONLY")]
|
[Column("READ_ONLY")]
|
||||||
@@ -75,13 +77,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime ChangedWhen { get; set; }
|
||||||
|
|
||||||
[ForeignKey("DocumentId")]
|
[ForeignKey("DocumentId")]
|
||||||
public virtual EnvelopeDocument? Document { get; set; }
|
public virtual EnvelopeDocument Document { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ReceiverId")]
|
[ForeignKey("ReceiverId")]
|
||||||
public virtual Receiver? Receiver { get; set; }
|
public virtual Receiver Receiver { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public double Top => Math.Round(Y, 5);
|
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;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
|
||||||
public class DocumentStatus : IUnique<int>
|
public class DocumentStatus
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
@@ -20,27 +22,28 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("RECEIVER_ID")]
|
[Column("RECEIVER_ID")]
|
||||||
public int ReceiverId { get; set; }
|
public int ReceiverId { get; set; }
|
||||||
|
|
||||||
|
// TODO: * check Form Application and remove default value
|
||||||
[Required]
|
[Required]
|
||||||
[Column("STATUS")]
|
[Column("STATUS")]
|
||||||
public int Status { get; set; }
|
public Constants.DocumentStatus Status { get; set; } = Constants.DocumentStatus.Created;
|
||||||
|
|
||||||
[Column("STATUS_CHANGED_WHEN", TypeName = "datetime")]
|
[Column("STATUS_CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? StatusChangedWhen { get; set; }
|
public DateTime StatusChangedWhen { get; set; }
|
||||||
|
|
||||||
[Column("VALUE", TypeName = "nvarchar(max)")]
|
[Column("VALUE", TypeName = "nvarchar(max)")]
|
||||||
public string? Value { get; set; }
|
public string Value { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime ChangedWhen { get; set; }
|
||||||
|
|
||||||
[ForeignKey("EnvelopeId")]
|
[ForeignKey("EnvelopeId")]
|
||||||
public virtual Envelope? Envelope { get; set; }
|
public virtual Envelope Envelope { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ReceiverId")]
|
[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;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
|
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
|
||||||
public class EmailTemplate : IUnique<int>
|
public class EmailTemplate
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
@@ -14,13 +16,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public int Id { get; set; }
|
public int Id { get; set; }
|
||||||
|
|
||||||
[Column("NAME", TypeName = "nvarchar(64)")]
|
[Column("NAME", TypeName = "nvarchar(64)")]
|
||||||
public string? Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
[Column("BODY", TypeName = "nvarchar(max)")]
|
[Column("BODY", TypeName = "nvarchar(max)")]
|
||||||
public string? Body { get; set; }
|
public string Body { get; set; }
|
||||||
|
|
||||||
[Column("SUBJECT", TypeName = "nvarchar(512)")]
|
[Column("SUBJECT", TypeName = "nvarchar(512)")]
|
||||||
public string? Subject { get; set; }
|
public string Subject { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
@@ -28,6 +30,6 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime ChangedWhen { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,111 +1,158 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using EnvelopeGenerator.Common;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
|
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
|
||||||
public class Envelope : IUnique<int>
|
public class Envelope
|
||||||
{
|
{
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
[Column("GUID")]
|
[Column("GUID")]
|
||||||
public int Id { get; set; }
|
public int Id { get; set; } = 0;
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("USER_ID")]
|
[Column("USER_ID")]
|
||||||
public int UserId { get; set; }
|
public int UserId { get; set; }
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Required]
|
[Required]
|
||||||
[Column("STATUS")]
|
[Column("STATUS")]
|
||||||
public int Status { get; set; }
|
public int Status { get; set; } = (int)Constants.EnvelopeStatus.EnvelopeCreated;
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
|
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
|
||||||
|
|
||||||
|
// TODO: The default value is set to 0. Check the Form App to remove this
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||||
public required string Uuid { get; init; }
|
public string Uuid { get; set; } = Guid.NewGuid().ToString();
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
||||||
public string? Message { get; set; }
|
public string Message { get; set; } = My.Resources.Envelope.Please_read_and_sign_this_document;
|
||||||
|
|
||||||
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
[Column("EXPIRES_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ExpiresWhen { get; set; }
|
public DateTime ExpiresWhen { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
|
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ExpiresWarningWhen { get; set; }
|
public DateTime ExpiresWarningWhen { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime ChangedWhen { get; set; }
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||||
public string? Title { get; set; }
|
public string Title { get; set; } = string.Empty;
|
||||||
|
|
||||||
[Column("CONTRACT_TYPE")]
|
[Column("CONTRACT_TYPE")]
|
||||||
public int? ContractType { get; set; }
|
public int ContractType { get; set; }
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
[NotMapped]
|
||||||
|
public string ContractTypeTranslated => My.Resources.Model.ResourceManager.GetString(ContractType.ToString());
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||||
public string? Language { get; set; }
|
public string Language { get; set; } = "de-DE";
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("SEND_REMINDER_EMAILS")]
|
[Column("SEND_REMINDER_EMAILS")]
|
||||||
public bool? SendReminderEmails { get; set; }
|
public bool SendReminderEmails { get; set; } = false;
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("FIRST_REMINDER_DAYS")]
|
[Column("FIRST_REMINDER_DAYS")]
|
||||||
public int? FirstReminderDays { get; set; }
|
public int FirstReminderDays { get; set; } = 0;
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("REMINDER_INTERVAL_DAYS")]
|
[Column("REMINDER_INTERVAL_DAYS")]
|
||||||
public int? ReminderIntervalDays { get; set; }
|
public int ReminderIntervalDays { get; set; } = 0;
|
||||||
|
|
||||||
[Column("ENVELOPE_TYPE")]
|
[Column("ENVELOPE_TYPE")]
|
||||||
public int? EnvelopeTypeId { get; set; }
|
public int EnvelopeTypeId { get; set; }
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("CERTIFICATION_TYPE")]
|
[Column("CERTIFICATION_TYPE")]
|
||||||
public int? CertificationType { get; set; }
|
public int CertificationType { get; set; } = (int)Constants.CertificationType.AdvancedElectronicSignature;
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("USE_ACCESS_CODE")]
|
[Column("USE_ACCESS_CODE")]
|
||||||
public bool? UseAccessCode { get; set; }
|
public bool UseAccessCode { get; set; } = false;
|
||||||
|
|
||||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||||
public int? FinalEmailToCreator { get; set; }
|
public int FinalEmailToCreator { get; set; }
|
||||||
|
|
||||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||||
public int? FinalEmailToReceivers { get; set; }
|
public int FinalEmailToReceivers { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WHEN_DAYS")]
|
[Column("EXPIRES_WHEN_DAYS")]
|
||||||
public int? ExpiresWhenDays { get; set; }
|
public int ExpiresWhenDays { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
||||||
public int? ExpiresWarningWhenDays { get; set; }
|
public int ExpiresWarningWhenDays { get; set; }
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[Column("TFA_ENABLED", TypeName = "bit")]
|
[Column("TFA_ENABLED", TypeName = "bit")]
|
||||||
public bool TFAEnabled { get; set; }
|
public bool TFAEnabled { get; set; } = false;
|
||||||
|
|
||||||
[Column("DOC_RESULT", TypeName = "varbinary(max)")]
|
[Column("DOC_RESULT", TypeName = "varbinary(max)")]
|
||||||
public byte[]? DocResult { get; init; }
|
public byte[] DocResult { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
[NotMapped]
|
||||||
/// The sender of envelope
|
public string CURRENT_WORK_APP { get; set; } = "signFLOW GUI";
|
||||||
/// </summary>
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
[ForeignKey("UserId")]
|
[ForeignKey("UserId")]
|
||||||
public DigitalData.UserManager.Domain.Entities.User? User { get; set; }
|
public User User { get; set; } = new User();
|
||||||
|
|
||||||
[ForeignKey("EnvelopeTypeId")]
|
[ForeignKey("EnvelopeTypeId")]
|
||||||
public EnvelopeType? EnvelopeType { get; set; }
|
public EnvelopeType EnvelopeType { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public string? EnvelopeTypeTitle => EnvelopeType?.Title;
|
public string EnvelopeTypeTitle => EnvelopeType?.Title;
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool IsAlreadySent => Status > (int) Constants.EnvelopeStatus.EnvelopeSaved;
|
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
|
||||||
|
|
||||||
public IEnumerable<EnvelopeDocument>? Documents { get; set; }
|
[NotMapped]
|
||||||
|
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
|
||||||
|
|
||||||
public IEnumerable<EnvelopeHistory>? History { get; set; }
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
public IEnumerable<EnvelopeDocument> Documents { get; set; } = new List<EnvelopeDocument>();
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
public IEnumerable<EnvelopeHistory> History { get; set; } = new List<EnvelopeHistory>();
|
||||||
|
|
||||||
|
// TODO: * Check the Form App and remove the default value
|
||||||
|
public IEnumerable<Receiver> Receivers { get; set; } = new List<Receiver>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Validates whether the receiver and document data are complete.
|
||||||
|
/// </summary>
|
||||||
|
public List<string> ValidateReceiverDocumentData()
|
||||||
|
{
|
||||||
|
var errors = new List<string>();
|
||||||
|
|
||||||
|
if (!Documents?.Any() ?? true)
|
||||||
|
errors.Add(My.Resources.Envelope.Missing_Documents);
|
||||||
|
|
||||||
|
if (!Receivers?.Any() ?? true)
|
||||||
|
errors.Add(My.Resources.Envelope.Missing_Receivers);
|
||||||
|
|
||||||
|
if (Receivers?.Any(r => !r.HasEmailAndName) ?? false)
|
||||||
|
errors.Add(My.Resources.Envelope.Incomplete_Receivers);
|
||||||
|
|
||||||
|
return errors;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,11 +1,10 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
|
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
|
||||||
public class EnvelopeCertificate : IUnique<int>
|
public class EnvelopeCertificate
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
@@ -18,11 +17,11 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||||
public required string EnvelopeUuid { get; set; }
|
public string EnvelopeUuid { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
|
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
|
||||||
public required string EnvelopeSubject { get; set; }
|
public string EnvelopeSubject { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("CREATOR_ID")]
|
[Column("CREATOR_ID")]
|
||||||
@@ -30,11 +29,11 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
|
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
|
||||||
public required string CreatorName { get; set; }
|
public string CreatorName { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
|
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
|
||||||
public required string CreatorEmail { get; set; }
|
public string CreatorEmail { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_STATUS")]
|
[Column("ENVELOPE_STATUS")]
|
||||||
|
|||||||
@@ -1,27 +1,31 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities;
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
|
||||||
public class EnvelopeDocument : IUnique<int>
|
|
||||||
{
|
{
|
||||||
[Key]
|
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
public class EnvelopeDocument
|
||||||
[Column("GUID")]
|
{
|
||||||
public int Id { get; set; }
|
[Key]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
|
[Column("GUID")]
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ENVELOPE_ID")]
|
[Column("ENVELOPE_ID")]
|
||||||
public int EnvelopeId { get; set; }
|
public int EnvelopeId { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public required DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||||
public byte[]? ByteData { get; init; }
|
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 System.ComponentModel.DataAnnotations;
|
||||||
using DigitalData.UserManager.Domain.Entities;
|
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
|
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
|
||||||
public class EnvelopeHistory : IUnique<long>
|
public class EnvelopeHistory
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
@@ -19,7 +20,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("USER_REFERENCE", TypeName = "nvarchar(128)")]
|
[Column("USER_REFERENCE", TypeName = "nvarchar(128)")]
|
||||||
public required string UserReference { get; init; }
|
public string UserReference { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("STATUS")]
|
[Column("STATUS")]
|
||||||
@@ -31,15 +32,15 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("ACTION_DATE", TypeName = "datetime")]
|
[Column("ACTION_DATE", TypeName = "datetime")]
|
||||||
public DateTime? ActionDate { get; set; }
|
public DateTime ActionDate { get; set; }
|
||||||
|
|
||||||
[Column("COMMENT", TypeName = "nvarchar(max)")]
|
[Column("COMMENT", TypeName = "nvarchar(max)")]
|
||||||
public string? Comment { get; set; }
|
public string Comment { get; set; }
|
||||||
|
|
||||||
[ForeignKey("UserReference")]
|
[ForeignKey("UserReference")]
|
||||||
public virtual User? Sender { get; set; }
|
public virtual User Sender { get; set; }
|
||||||
|
|
||||||
[ForeignKey("UserReference")]
|
[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
|
public class EnvelopeReceiver : EnvelopeReceiverBase
|
||||||
{
|
{
|
||||||
[ForeignKey("EnvelopeId")]
|
[ForeignKey("EnvelopeId")]
|
||||||
public Envelope? Envelope { get; set; }
|
public Envelope Envelope { get; set; }
|
||||||
|
|
||||||
[ForeignKey("ReceiverId")]
|
[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;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
|
||||||
public class EnvelopeReceiverBase : IUnique<(int Envelope, int Receiver)>
|
public class EnvelopeReceiverBase
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[Column("ENVELOPE_ID")]
|
[Column("ENVELOPE_ID")]
|
||||||
@@ -20,34 +22,34 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public int Sequence { get; set; }
|
public int Sequence { get; set; }
|
||||||
|
|
||||||
[Column("NAME", TypeName = "nvarchar(128)")]
|
[Column("NAME", TypeName = "nvarchar(128)")]
|
||||||
public string? Name { get; set; }
|
public string Name { get; set; }
|
||||||
|
|
||||||
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
|
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
|
||||||
public string? JobTitle { get; set; }
|
public string JobTitle { get; set; }
|
||||||
|
|
||||||
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
|
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
|
||||||
public string? CompanyName { get; set; }
|
public string CompanyName { get; set; }
|
||||||
|
|
||||||
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
|
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
|
||||||
public string? PrivateMessage { get; set; }
|
public string PrivateMessage { get; set; }
|
||||||
|
|
||||||
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
|
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
|
||||||
public string? AccessCode { get; set; }
|
public string AccessCode { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime ChangedWhen { get; set; }
|
||||||
|
|
||||||
[Column("PHONE_NUMBER")]
|
[Column("PHONE_NUMBER")]
|
||||||
[StringLength(20)]
|
[StringLength(20)]
|
||||||
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||||
public string? PhoneNumber { get; set; }
|
public string PhoneNumber { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
public Tuple<int, int> Id => Tuple.Create(EnvelopeId, ReceiverId);
|
||||||
|
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
public bool HasPhoneNumber => !string.IsNullOrWhiteSpace(PhoneNumber);
|
||||||
|
|||||||
@@ -1,52 +1,54 @@
|
|||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using DigitalData.Core.Abstractions;
|
|
||||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE_RECEIVER_READ_ONLY")]
|
[Table("TBSIG_ENVELOPE_RECEIVER_READ_ONLY")]
|
||||||
public class EnvelopeReceiverReadOnly : IUnique<long>
|
public class EnvelopeReceiverReadOnly
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
[Column("GUID")]
|
[Column("GUID")]
|
||||||
public long Id { get; init; }
|
public long Id { get; set; }
|
||||||
|
|
||||||
[Column("ENVELOPE_ID")]
|
[Column("ENVELOPE_ID")]
|
||||||
[Required]
|
[Required]
|
||||||
public long EnvelopeId { get; init; }
|
public long EnvelopeId { get; set; }
|
||||||
|
|
||||||
//TODO: remove NotMapped attribute when EnvelopeId data type is standardized
|
//TODO: remove NotMapped attribute when EnvelopeId data type is standardized
|
||||||
[NotMapped]
|
[NotMapped]
|
||||||
public Envelope? Envelope { get; set; }
|
public Envelope Envelope { get; set; }
|
||||||
|
|
||||||
[Column("RECEIVER_MAIL")]
|
[Column("RECEIVER_MAIL")]
|
||||||
[Required]
|
[Required]
|
||||||
[StringLength(250)]
|
[StringLength(250)]
|
||||||
[TemplatePlaceholder("NAME_RECEIVER")]
|
[TemplatePlaceholder("NAME_RECEIVER")]
|
||||||
public required string ReceiverMail { get; init; }
|
public string ReceiverMail { get; set; }
|
||||||
|
|
||||||
[Column("DATE_VALID")]
|
[Column("DATE_VALID")]
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime DateValid { get; init; }
|
public DateTime DateValid { get; set; }
|
||||||
|
|
||||||
[Column("ADDED_WHO")]
|
[Column("ADDED_WHO")]
|
||||||
[Required]
|
[Required]
|
||||||
[StringLength(100)]
|
[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")]
|
[Column("ADDED_WHEN")]
|
||||||
[Required]
|
[Required]
|
||||||
public DateTime AddedWhen { get; init; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHO")]
|
[Column("CHANGED_WHO")]
|
||||||
[StringLength(100)]
|
[StringLength(100)]
|
||||||
public string? ChangedWho { get; init; }
|
public string ChangedWho { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN")]
|
[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;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
[Table("TBSIG_ENVELOPE_TYPE", Schema = "dbo")]
|
[Table("TBSIG_ENVELOPE_TYPE", Schema = "dbo")]
|
||||||
public class EnvelopeType : IUnique<int>
|
public class EnvelopeType
|
||||||
{
|
{
|
||||||
[Key]
|
[Key]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
@@ -14,46 +16,46 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("TITLE", TypeName = "nvarchar(128)")]
|
[Column("TITLE", TypeName = "nvarchar(128)")]
|
||||||
public required string Title { get; set; }
|
public string Title { get; set; }
|
||||||
|
|
||||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||||
public string? Language { get; set; }
|
public string Language { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_DAYS")]
|
[Column("EXPIRES_DAYS")]
|
||||||
public int? ExpiresDays { get; set; }
|
public int ExpiresDays { get; set; }
|
||||||
|
|
||||||
[Column("CERTIFICATION_TYPE")]
|
[Column("CERTIFICATION_TYPE")]
|
||||||
public int? CertificationType { get; set; }
|
public int CertificationType { get; set; }
|
||||||
|
|
||||||
[Column("USE_ACCESS_CODE")]
|
[Column("USE_ACCESS_CODE")]
|
||||||
public bool? UseAccessCode { get; set; }
|
public bool UseAccessCode { get; set; }
|
||||||
|
|
||||||
[Column("FINAL_EMAIL_TO_CREATOR")]
|
[Column("FINAL_EMAIL_TO_CREATOR")]
|
||||||
public int? FinalEmailToCreator { get; set; }
|
public int FinalEmailToCreator { get; set; }
|
||||||
|
|
||||||
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
[Column("FINAL_EMAIL_TO_RECEIVERS")]
|
||||||
public int? FinalEmailToReceivers { get; set; }
|
public int FinalEmailToReceivers { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime ChangedWhen { get; set; }
|
||||||
|
|
||||||
[Column("EXPIRES_WARNING_DAYS")]
|
[Column("EXPIRES_WARNING_DAYS")]
|
||||||
public int? ExpiresWarningDays { get; set; }
|
public int ExpiresWarningDays { get; set; }
|
||||||
|
|
||||||
[Column("SEND_REMINDER_EMAILS")]
|
[Column("SEND_REMINDER_EMAILS")]
|
||||||
public bool? SendReminderEmails { get; set; }
|
public bool SendReminderEmails { get; set; }
|
||||||
|
|
||||||
[Column("FIRST_REMINDER_DAYS")]
|
[Column("FIRST_REMINDER_DAYS")]
|
||||||
public int? FirstReminderDays { get; set; }
|
public int FirstReminderDays { get; set; }
|
||||||
|
|
||||||
[Column("REMINDER_INTERVAL_DAYS")]
|
[Column("REMINDER_INTERVAL_DAYS")]
|
||||||
public int? ReminderIntervalDays { get; set; }
|
public int ReminderIntervalDays { get; set; }
|
||||||
|
|
||||||
[Column("CONTRACT_TYPE")]
|
[Column("CONTRACT_TYPE")]
|
||||||
public int? ContractType { get; set; }
|
public int ContractType { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1,34 +1,89 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations;
|
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
using System.Drawing;
|
||||||
|
#if NETFRAMEWORK
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
#endif
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities;
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
|
|
||||||
[Table("TBSIG_RECEIVER", Schema = "dbo")]
|
|
||||||
public class Receiver : IUnique<int>
|
|
||||||
{
|
{
|
||||||
[Key]
|
[Table("TBSIG_RECEIVER", Schema = "dbo")]
|
||||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
public class Receiver
|
||||||
[Column("GUID")]
|
{
|
||||||
public int Id { get; set; }
|
[Key]
|
||||||
|
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||||
[Required, EmailAddress]
|
[Column("GUID")]
|
||||||
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
|
public int Id { get; set; }
|
||||||
public required string EmailAddress { get; set; }
|
|
||||||
|
|
||||||
[Required]
|
[Required, EmailAddress]
|
||||||
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
|
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
|
||||||
public required string Signature { get; set; }
|
public string EmailAddress { get; set; }
|
||||||
|
|
||||||
[Required]
|
[Required]
|
||||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
|
||||||
public DateTime AddedWhen { get; set; }
|
public string Signature { get; set; }
|
||||||
|
|
||||||
[Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")]
|
[Required]
|
||||||
public string? TotpSecretkey { get; set; }
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
[Column("TFA_REG_DEADLINE", TypeName = "datetime")]
|
[Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")]
|
||||||
public DateTime? TfaRegDeadline { get; set; }
|
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; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string Name { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string Company { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string JobTitle { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string PhoneNumber { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string AccessCode { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string PrivateMessage { get; set; } = string.Empty;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public int Sequence { get; set; } = 0;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public DateTime SignedDate { get; set; } = DateTime.MinValue;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public Constants.ReceiverStatus Status { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public Constants.ColorType ColorType { get; set; }
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool HasId => Id > 0;
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public bool HasEmailAndName =>
|
||||||
|
!string.IsNullOrWhiteSpace(EmailAddress) &&
|
||||||
|
!string.IsNullOrWhiteSpace(Name);
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public string SignedDateDisplayValue =>
|
||||||
|
SignedDate == DateTime.MinValue ? "-" : SignedDate.ToString("G");
|
||||||
|
|
||||||
|
[NotMapped]
|
||||||
|
public Color Color => ColorType.ToColor();
|
||||||
|
|
||||||
|
public string GetSignature()
|
||||||
|
{
|
||||||
|
return EmailAddress.ToUpperInvariant().GetChecksum();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user