Compare commits

...

37 Commits

Author SHA1 Message Date
6327fef2e0 chore(Web): bump to 3.3.0 2025-09-17 17:48:58 +02:00
d0bfe795d7 refactor(HomeController): Ändern Sie den Routenparameter „EnvelopeReceiverReadOnly” von einem String-Schlüssel zu einer langen ID
- Aktualisieren Sie „MainAsync”, um mit einer geparsten schreibgeschützten ID anstelle eines String-Schlüssels zu „EnvelopeReceiverReadOnly” umzuleiten
- Ändern Sie die Aktionssignatur „EnvelopeReceiverReadOnly”, um „long readOnlyId” anstelle von „[FromRoute] string readOnlyKey” zu akzeptieren
- Inline-Schlüssel-Decodierungs-/Validierungslogik entfernt und Decodierung an `MainAsync` delegiert
- Protokollmeldungen angepasst, um `ReadOnly-Id` anstelle von `ReadOnly-key` widerzuspiegeln
2025-09-17 13:59:31 +02:00
10b1de4cf0 remove envelopeRejected-endpoint 2025-09-17 13:17:25 +02:00
cf3535b4de refactor(HomeController): remove envelopeSigned endpoint 2025-09-17 13:07:06 +02:00
56074c2b9f refactor(HomeController): add fromRoute attributes 2025-09-17 10:49:18 +02:00
c41c521fca rename postEnvelope as postAnnotation 2025-09-17 10:40:17 +02:00
7bc6cc92a0 remove setLangAsync-method 2025-09-17 10:37:43 +02:00
660a4c24df refactor(EnvelopeController): Umbenennen in AnnotationController 2025-09-17 10:35:11 +02:00
5d65f58a55 feat(EnvelopeController): sign out user after envelope actions
- Added `HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme)`
  to `CreateOrUpdate` and `Reject` endpoints in `EnvelopeController`
- Ensures user session is cleared after completing or rejecting envelope actions
- Updated using directives to include `Microsoft.AspNetCore.Authentication`
  and `Microsoft.AspNetCore.Authentication.Cookies`
2025-09-17 10:31:09 +02:00
6691471276 fix(pdfburner): correct y-position adjustment for signature seal annotations
Previously, image annotations for signature seals used a static yOffset
when combined with ink annotations, which caused positioning issues.
This change calculates the y-position of the signature annotation
relative to the next annotation and applies it only for the first seal.

- Added `yPosOfSigAnnot` calculation for precise vertical placement.
- Updated `AddInstantJSONAnnotationToPDF` to overwrite bbox.y for seals.
- Removed hardcoded ink offset logic.
2025-09-16 17:37:20 +02:00
b2bfc11713 change the y-offset of ANNOTATION_TYPE_IMAGE 2025-09-16 16:54:44 +02:00
5d758601b9 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-09-16 11:28:32 +02:00
Developer01
210bb821da DocResult-Column was defined wrong. Correct: DOC_RESULT 2025-09-16 09:02:38 +02:00
Developer01
3ac61e75f5 ReceiverVM Vereinheitlichung 2025-09-16 08:05:50 +02:00
eb353ab772 chore(Web): bump to 3.2.3 2025-09-15 15:51:10 +02:00
991943d6bd refactor(SendMailHandler): remove TextToHtml 2025-09-15 14:23:48 +02:00
b5fec7bb46 refactor(DocSignedNotificationTests): add again EmailOut DbRepository using Fake.EGDbContext2Prod
- create base EGDbContextBase to be able to add custom DbContextOptions
2025-09-15 14:02:58 +02:00
9eaa777fb6 feat(Fake): enhance Fake host with production DbContext support
- Added `EGDbContext2Prod` class to allow connecting to production database in tests
 - Updated `CreateHost` to register `EGDbContext2Prod` with SQL Server connection string
 - Added `EnvelopeGenerator.Application.Common.Configurations` and logging support
 - Refactored service registration ordering for clarity
2025-09-15 13:18:30 +02:00
ccc4e948f3 feat(TestBase): seed real email templates in TestBase setup
- Added `RealEmailTemplates` property with predefined email templates.
- Populated the repository with these templates in the `Setup` method.
- Ensures tests have consistent, realistic email data available.
2025-09-15 12:44:36 +02:00
d5afb2201c refactor(DocSignedNotificationTests): DocSignedNotificationTests aktualisieren, um SendSignedMailHandler zu verwenden
- SendSignedMailHandler in Testdiensten registrieren
- Test1 umbenennen → SendSignedMailHandler_ShouldNotThrow
- Sicherstellen, dass die Handler-Ausführung keinen Fehler auslöst
2025-09-15 11:18:44 +02:00
7fbf0ebbfc refactor(TestBase): add ConfigureServices-callback method to be able to add custom services to testes 2025-09-15 11:00:00 +02:00
cb0c361cdb test: enhance DocSignedNotificationTests with AutoMapper and notification mapping 2025-09-15 10:48:25 +02:00
796c59cd38 chore: update Core.Abstraction.Application to 1.3.1
- update DigitalData.Core.Abstractions to 4.1.1
 - update DigitalData.Core.Infrastructure to 2.4.1
2025-09-15 10:38:01 +02:00
86780477fe refactor(Fake): update CreateReceiverCommand to be able to add email address 2025-09-12 14:19:57 +02:00
27a2d5ecc4 refactor(DIExtensions): update to scan EmailProfilerDispatcher 2025-09-12 13:50:48 +02:00
83460bd92b refactor(DIExtensions): update dependecy inejction to scan assemblies 2025-09-12 13:40:53 +02:00
b8bffdb4bc chore: update package versions and to solve vulnerabilities 2025-09-12 13:21:28 +02:00
df66060de3 bump to 3.2.2 2025-09-11 09:29:34 +02:00
4da7445271 remove removed reference 2025-09-11 09:25:22 +02:00
0a9e1dccb9 refactor(Interfaces): move Interfaces to Common 2025-09-10 16:42:52 +02:00
95b54fa1f1 feat(JsonExtensions): create to be able to make fluent Json serilization 2025-09-10 15:55:56 +02:00
e990a466aa refactor(AnnotationHandler): update to use System.Text.Json.JsonSerializer 2025-09-10 15:38:05 +02:00
4eb6d87770 add MsgBox 2025-09-10 15:02:19 +02:00
e2c3d4ad52 init DocSignedNotificationTest 2025-09-10 14:21:14 +02:00
a9dda12bf9 chore(Web): bump to 3.2.1 2025-09-10 14:08:27 +02:00
fd157c4443 refactor(ReadEnvelopeReceiverQuery): add receiver filter to signatures 2025-09-10 14:04:48 +02:00
f940caad1c chore(Web): bump to 3.2.0 2025-09-10 13:42:08 +02:00
146 changed files with 2792 additions and 2613 deletions

View File

@@ -0,0 +1,18 @@
using System.Text.Json;
namespace EnvelopeGenerator.Application.Common.Extensions;
/// <summary>
///
/// </summary>
public static class JsonExtensions
{
/// <summary>
///
/// </summary>
/// <param name="obj"></param>
/// <param name="options"></param>
/// <returns></returns>
public static string ToJson(this object obj, JsonSerializerOptions? options = null)
=> JsonSerializer.Serialize(obj, options);
}

View File

@@ -1,14 +1,30 @@
using OtpNet;
namespace EnvelopeGenerator.Application.Common.Extensions
namespace EnvelopeGenerator.Application.Common.Extensions;
/// <summary>
///
/// </summary>
public static class StringExtension
{
public static class StringExtension
/// <summary>
///
/// </summary>
/// <param name="totp"></param>
/// <param name="secret"></param>
/// <returns></returns>
public static bool IsValidTotp(this string totp, string secret)
{
public static bool IsValidTotp(this string totp, string secret)
{
var secret_bytes = Base32Encoding.ToBytes(secret);
var secret_totp = new Totp(secret_bytes);
return secret_totp.VerifyTotp(totp, out _, VerificationWindow.RfcSpecifiedNetworkDelay);
}
var secret_bytes = Base32Encoding.ToBytes(secret);
var secret_totp = new Totp(secret_bytes);
return secret_totp.VerifyTotp(totp, out _, VerificationWindow.RfcSpecifiedNetworkDelay);
}
/// <summary>
///
/// </summary>
/// <param name="seperator"></param>
/// <param name="values"></param>
/// <returns></returns>
public static string Join(this IEnumerable<string> values, string seperator) => string.Join(seperator, values);
}

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///
/// </summary>

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -3,7 +3,7 @@ using EnvelopeGenerator.Application.Envelopes.Queries;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
/// <summary>
///

View File

@@ -1,6 +1,6 @@
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using Dapper;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
///

View File

@@ -1,6 +1,6 @@
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
///

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
/// Provides methods for executing common queries on a given entity type.

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
/// Represents a raw SQL query contract.

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
/// Defines methods for executing raw SQL queries or custom SQL query classes and returning query executors for further operations.

View File

@@ -1,6 +1,6 @@
using Dapper;
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
/// <summary>
///

View File

@@ -1,6 +1,6 @@
using OtpNet;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -3,7 +3,7 @@ using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Abstraction.Application;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -5,7 +5,7 @@ using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Domain.Constants;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -10,7 +10,7 @@ using EnvelopeGenerator.Domain;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -1,7 +1,7 @@
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Dto.Messaging;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -2,7 +2,7 @@
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Receivers.Commands;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
/// <summary>
///

View File

@@ -1,6 +1,6 @@
using EnvelopeGenerator.Application.Common.Dto.Messaging;
namespace EnvelopeGenerator.Application.Interfaces.Services;
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
//TODO: move to DigitalData.Core
/// <summary>

View File

@@ -1,4 +1,5 @@
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Domain.Constants;
using MediatR;
using Newtonsoft.Json;
@@ -27,7 +28,7 @@ public record DocSignedNotification(EnvelopeReceiverDto Original) : EnvelopeRece
/// </summary>
public string EmailAddress => Receiver?.EmailAddress
?? throw new InvalidOperationException($"Receiver is null." +
$"DocSignedNotification:\n{JsonConvert.SerializeObject(this, Format.Json.ForDiagnostics)}");
$"DocSignedNotification:\n{this.ToJson(Format.Json.ForDiagnostics)}");
}
/// <summary>

View File

@@ -1,8 +1,7 @@
using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
using EnvelopeGenerator.Application.DocStatus.Commands;
using EnvelopeGenerator.Application.DocStatus.Commands;
using EnvelopeGenerator.Domain.Constants;
using MediatR;
using Newtonsoft.Json;
using System.Text.Json;
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers;
@@ -34,7 +33,7 @@ public class AnnotationHandler : INotificationHandler<DocSignedNotification>
{
Envelope = new() { Id = notification.EnvelopeId },
Receiver = new() { Id = notification.ReceiverId},
Value = JsonConvert.SerializeObject(notification.Annotations, Format.Json.ForAnnotations)
Value = JsonSerializer.Serialize(notification.Annotations, Format.Json.ForAnnotations)
}, cancel);
}
}

View File

@@ -1,4 +1,4 @@
using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Histories.Commands;
using EnvelopeGenerator.Domain.Constants;
using MediatR;
@@ -30,16 +30,14 @@ public class HistoryHandler : INotificationHandler<DocSignedNotification>
/// <returns></returns>
public async Task Handle(DocSignedNotification notification, CancellationToken cancel)
{
if(notification.Receiver is null)
if (notification.Receiver is null)
throw new InvalidOperationException($"Receiver information is missing in the notification. DocSignedNotification:\n {JsonConvert.SerializeObject(notification, Format.Json.ForDiagnostics)}");
if (notification.Receiver is null)
throw new InvalidOperationException($"Receiver information is missing in the notification. DocSignedNotification:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
await _sender.Send(new CreateHistoryCommand()
{
EnvelopeId = notification.EnvelopeId,
UserReference = notification.Receiver.EmailAddress,
Status = EnvelopeStatus.DocumentSigned,
Comment = JsonConvert.SerializeObject(notification.Annotations, Format.Json.ForAnnotations)
}, cancel);
}
}

View File

@@ -1,6 +1,7 @@
using DigitalData.Core.Abstraction.Application.Repository;
using DigitalData.EmailProfilerDispatcher.Abstraction.Entities;
using EnvelopeGenerator.Application.Common.Configurations;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
using MediatR;
@@ -98,10 +99,10 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
var placeHolders = CreatePlaceHolders(notification);
var temp = await TempRepo
.ReadOnly()
.SingleOrDefaultAsync(x => x.Name == notification.TemplateType.ToString(), cancel)
.Where(x => x.Name == notification.TemplateType.ToString())
.SingleOrDefaultAsync(cancel)
?? throw new InvalidOperationException($"Receiver information is missing in the notification." +
$"{typeof(TNotification)}:\n {JsonConvert.SerializeObject(notification, Format.Json.ForDiagnostics)}");
$"{typeof(TNotification)}:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
temp.Subject = ReplacePlaceHolders(temp.Subject, placeHolders, MailParams.Placeholders);
@@ -110,7 +111,7 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
var emailOut = new EmailOut
{
EmailAddress = notification.EmailAddress,
EmailBody = TextToHtml(temp.Body),
EmailBody = temp.Body,
EmailSubj = temp.Subject,
AddedWhen = DateTime.UtcNow,
AddedWho = DispatcherParams.AddedWho,
@@ -131,22 +132,4 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
text = text.Replace(ph.Key, ph.Value);
return text;
}
private static string TextToHtml(string input)
{
if (string.IsNullOrEmpty(input)) return "";
// HTML encoding special characters
string encoded = System.Net.WebUtility.HtmlEncode(input);
// Convert tabs to &nbsp; (4 non-breaking spaces)
encoded = encoded.Replace("\t", "&nbsp;&nbsp;&nbsp;&nbsp;");
// Convert line breaks to <br />
encoded = encoded.Replace("\r\n", "<br />"); // Windows
encoded = encoded.Replace("\r", "<br />"); // Mac old
encoded = encoded.Replace("\n", "<br />"); // Unix/Linux
return encoded;
}
}

View File

@@ -20,4 +20,14 @@ public record ReceiverQueryBase
/// Eindeutige Signatur des Empfängers
/// </summary>
public virtual string? Signature { get; set; }
/// <summary>
/// Checks whether any of the specified query criteria have a value.
/// </summary>
/// <remarks>
/// This property returns <c>true</c> if at least one of the fields
/// <see cref="Id"/>, <see cref="EmailAddress"/>, or <see cref="Signature"/> is not null.
/// <para>Usage example: The query can be executed only if at least one criterion is specified.</para>
/// </remarks>
public bool HasAnyCriteria => Id is not null || EmailAddress is not null || Signature is not null;
}

View File

@@ -1,7 +1,7 @@
using Dapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using DigitalData.Core.Exceptions;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Common.SQL;

View File

@@ -1,5 +1,5 @@
using Dapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
using System.Data;

View File

@@ -1,5 +1,5 @@
using Dapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Common.SQL;

View File

@@ -1,6 +1,6 @@
using DigitalData.Core.Client;
using EnvelopeGenerator.Application.Common.Configurations;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
using EnvelopeGenerator.Application.Services;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection;

View File

@@ -1,5 +1,5 @@
using AutoMapper;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Domain.Constants;
using MediatR;

View File

@@ -14,7 +14,7 @@
<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.2.1" />
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.3.1" />
<PackageReference Include="DigitalData.Core.Application" Version="3.4.0" />
<PackageReference Include="DigitalData.Core.Client" Version="2.1.0" />
<PackageReference Include="DigitalData.Core.Exceptions" Version="1.1.0" />

View File

@@ -1,8 +1,8 @@
using AutoMapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
using MediatR;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands;

View File

@@ -91,6 +91,8 @@ public class ReadEnvelopeReceiverQueryHandler : IRequestHandler<ReadEnvelopeRece
{
private readonly IRepository<EnvelopeReceiver> _repo;
private readonly IRepository<Receiver> _rcvRepo;
private readonly IMapper _mapper;
/// <summary>
@@ -98,10 +100,11 @@ public class ReadEnvelopeReceiverQueryHandler : IRequestHandler<ReadEnvelopeRece
/// </summary>
/// <param name="envelopeReceiver"></param>
/// <param name="mapper"></param>
public ReadEnvelopeReceiverQueryHandler(IRepository<EnvelopeReceiver> envelopeReceiver, IMapper mapper)
public ReadEnvelopeReceiverQueryHandler(IRepository<EnvelopeReceiver> envelopeReceiver, IRepository<Receiver> rcvRepo, IMapper mapper)
{
_repo = envelopeReceiver;
_mapper = mapper;
_rcvRepo = rcvRepo;
}
/// <summary>
@@ -138,6 +141,14 @@ public class ReadEnvelopeReceiverQueryHandler : IRequestHandler<ReadEnvelopeRece
.Include(er => er.Receiver)
.ToListAsync(cancel);
if (request.Receiver.HasAnyCriteria && envRcvs.Any())
{
var receiver = await _rcvRepo.ReadOnly().Where(request.Receiver).FirstAsync(cancel);
foreach (var envRcv in envRcvs)
envRcv.Envelope?.Documents?.First().Elements.RemoveAll(s => s.ReceiverId != receiver.Id);
}
return _mapper.Map<List<EnvelopeReceiverDto>>(envRcvs);
}
}

View File

@@ -1,6 +1,6 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using MediatR;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

View File

@@ -1,10 +1,10 @@
using AutoMapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.Application.Envelopes.Commands;

View File

@@ -1,5 +1,5 @@
using EnvelopeGenerator.Application.Common.Configurations;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
using Microsoft.Extensions.Options;
using OtpNet;
using QRCoder;

View File

@@ -1,12 +1,12 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,9 +1,9 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,9 +1,9 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,12 +1,12 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using DigitalData.Core.Abstraction.Application.DTO;
using Microsoft.Extensions.Logging;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,9 +1,9 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,12 +1,12 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Interfaces.Services;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Dto.History;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -5,13 +5,13 @@ using DigitalData.EmailProfilerDispatcher.Abstraction.Services;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using Newtonsoft.Json;
using EnvelopeGenerator.Application.Interfaces.Services;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Configurations;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,9 +1,9 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -3,17 +3,17 @@ using DigitalData.Core.Application;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Envelopes.Queries;
using EnvelopeGenerator.Application.Receivers.Queries;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Dto.Messaging;
using EnvelopeGenerator.Application.Common;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,11 +1,11 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,10 +1,10 @@
using EnvelopeGenerator.Application.Interfaces.Services;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
using EnvelopeGenerator.Application.Common.Configurations;
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
using EnvelopeGenerator.Application.Common.Dto.Messaging;
using EnvelopeGenerator.Application.Common.Extensions;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,12 +1,12 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Logging;
using EnvelopeGenerator.Application.Interfaces.Services;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,10 +1,10 @@
using AutoMapper;
using DigitalData.Core.Client.Interface;
using DigitalData.Core.Client;
using EnvelopeGenerator.Application.Interfaces.Services;
using Microsoft.Extensions.Options;
using EnvelopeGenerator.Application.Common.Configurations;
using EnvelopeGenerator.Application.Common.Dto.Messaging;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,11 +1,11 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Receivers.Commands;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.Application.Services;

View File

@@ -1,5 +1,5 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -92,13 +92,13 @@
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.Firebird, Version=6.4.0.0, Culture=neutral, PublicKeyToken=42d22d092898e5f8, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.Firebird.6.4.0\lib\net452\EntityFramework.Firebird.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
</Reference>
<Reference Include="EnvelopeGenerator.CommonServices">
<HintPath>..\EnvelopeGenerator.CommonServices\bin\Debug\EnvelopeGenerator.CommonServices.dll</HintPath>
@@ -176,11 +176,11 @@
<Reference Include="Microsoft.Bcl.Cryptography, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Bcl.Cryptography.9.0.0\lib\net462\Microsoft.Bcl.Cryptography.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll</HintPath>
<Reference Include="Microsoft.Identity.Client, Version=4.77.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.4.77.0\lib\net462\Microsoft.Identity.Client.dll</HintPath>
</Reference>
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.22.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=8.14.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.8.14.0\lib\net462\Microsoft.IdentityModel.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -222,6 +222,9 @@
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.6.0.1\lib\net461\System.Diagnostics.DiagnosticSource.dll</HintPath>
</Reference>
<Reference Include="System.Formats.Asn1, Version=9.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Formats.Asn1.9.0.0\lib\net462\System.Formats.Asn1.dll</HintPath>
</Reference>
@@ -386,10 +389,10 @@
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -104,7 +104,7 @@ Public Class frmFinalizePDF
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical)
End Try
End Sub
End Class

View File

@@ -10,7 +10,7 @@
<package id="DigitalData.Modules.Messaging" version="1.9.8" targetFramework="net462" />
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="EntityFramework" version="6.5.1" targetFramework="net462" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
@@ -19,8 +19,8 @@
<package id="Microsoft.Bcl.AsyncInterfaces" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.Bcl.Cryptography" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.77.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Abstractions" version="8.14.0" targetFramework="net462" />
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />

View File

@@ -217,7 +217,7 @@ Namespace Jobs
If Not IsNothing(imageData) Then
sFileName = System.IO.Path.GetFileName(pFilePath)
'Set insert query
qry = $"UPDATE TBSIG_ENVELOPE SET DocResult = @ImageData WHERE GUID = {pEnvelopeID}"
qry = $"UPDATE TBSIG_ENVELOPE SET DOC_RESULT = @ImageData WHERE GUID = {pEnvelopeID}"
'Initialize SqlCommand object for insert.
SqlCom = New SqlCommand(qry, Database.GetConnection)
'We are passing File Name and Image byte data as sql parameters.

View File

@@ -71,6 +71,7 @@ Namespace Jobs.FinalizeDocument
oAnnotationData.annotations.Reverse()
Dim sigAnnotType = oAnnotationData.annotations.ElementAt(1).type
Dim yPosOfSigAnnot = oAnnotationData.annotations.ElementAt(2).bbox.ElementAt(1) - 71.84002685546875 + 7
Dim isSeal = True 'First element is signature seal
Dim formFieldIndex = 0
@@ -79,9 +80,12 @@ Namespace Jobs.FinalizeDocument
Select Case oAnnotation.type
Case ANNOTATION_TYPE_IMAGE
'Add offset to solve the seal position problem in ink signatures
Dim yOffset As Double = If(isSeal And sigAnnotType = ANNOTATION_TYPE_INK, 0.16, 0)
AddImageAnnotation(oAnnotation, oAnnotationData.attachments, yOffset)
If (isSeal) Then
oAnnotation.bbox.Item(1) = yPosOfSigAnnot
End If
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
Case ANNOTATION_TYPE_INK
AddInkAnnotation(oAnnotation)

View File

@@ -61,7 +61,15 @@ Public Class EnvelopeModel
oEnvelope.DocResult = Nothing
End If
oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId)
oEnvelope.EnvelopeReceivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)
oEnvelope.EnvelopeReceivers = New List(Of EnvelopeReceiver)
For Each rcv In ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)
oEnvelope.EnvelopeReceivers.Add(rcv)
Next
oEnvelope.Documents = DocumentModel.List(oEnvelope.Id)
oEnvelope.Histories = HistoryModel.List(oEnvelope.Id)
oEnvelope.Type = EnvelopeTypeModel.GetById(oEnvelope.EnvelopeTypeId)
@@ -185,7 +193,7 @@ Public Class EnvelopeModel
oSql += " [SEND_REMINDER_EMAILS] = @SEND_REMINDER_EMAILS, "
oSql += " [USE_ACCESS_CODE] = @USE_ACCESS_CODE, "
oSql += " [CHANGED_WHEN] = GETDATE(), "
oSql += " [TfaEnabled] = @TfaEnabled"
oSql += " [TFA_ENABLED] = @TfaEnabled"
oSql += " WHERE GUID = @ID AND USER_ID = @USER_ID"
@@ -210,7 +218,7 @@ Public Class EnvelopeModel
oCommand.Parameters.Add("REMINDER_INTERVAL_DAYS", SqlDbType.Int).Value = pEnvelope.ReminderIntervalDays
oCommand.Parameters.Add("SEND_REMINDER_EMAILS", SqlDbType.Bit).Value = pEnvelope.SendReminderEmails
oCommand.Parameters.Add("USE_ACCESS_CODE", SqlDbType.Bit).Value = pEnvelope.UseAccessCode
oCommand.Parameters.Add("TFA_ENABLED", SqlDbType.Bit).Value = pEnvelope.TfaEnabled
oCommand.Parameters.Add("TfaEnabled", SqlDbType.Bit).Value = pEnvelope.TfaEnabled
Return Database.ExecuteNonQuery(oCommand, pTransaction)
Catch ex As Exception

View File

@@ -23,6 +23,7 @@ Public Class ReceiverModel
End If
End If
Return New ReceiverVM() With {
.Id = pRow.ItemEx("GUID", 0),
.EmailAddress = pRow.ItemEx("EMAIL_ADDRESS", ""),
@@ -162,15 +163,25 @@ Public Class ReceiverModel
If pReceiversFromGrid.Count = 0 Then
Return New List(Of Receiver)
End If
Dim oReceiverList As New List(Of ReceiverVM)
Dim oAddresses = pReceiversFromGrid.Select(Function(r) $"'{r.EmailAddress}'").JoinToString(",")
Dim oSql = $"SELECT * FROM [dbo].[TBSIG_RECEIVER] WHERE EMAIL_ADDRESS IN ({oAddresses})"
Dim oTable = Database.GetDatatable(oSql)
'Dim oIndex = 0
'For Each oRow As DataRow In oTable.Rows
' ' oEnvelope.EnvelopeReceivers.Add(rcv)
' Dim oReceiver As ReceiverVM = ToReceiver(oRow)
' oReceiverList.Add(oReceiver)
' oIndex +=
'Next
Return oTable?.Rows.Cast(Of DataRow).
Select(AddressOf ToReceiver).
ToList()
Dim rcvs = New List(Of Receiver)
For Each r_vm In pReceiversFromGrid
rcvs.Add(r_vm.Receiver)
Next
Return rcvs
Catch ex As Exception
Logger.Error(ex)

View File

@@ -1,5 +1,7 @@
using Newtonsoft.Json;
using Newtonsoft.Json.Serialization;
#if NET
using System.Text.Json;
using System.Text.Json.Serialization;
#endif
namespace EnvelopeGenerator.Domain.Constants
{
@@ -8,18 +10,21 @@ namespace EnvelopeGenerator.Domain.Constants
#region Json Serializer Settings
public static class Json
{
public static readonly JsonSerializerSettings ForDiagnostics = new JsonSerializerSettings()
#if NET
public static readonly JsonSerializerOptions ForDiagnostics = new()
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Formatting = Formatting.Indented,
NullValueHandling = NullValueHandling.Include
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = true,
DefaultIgnoreCondition = JsonIgnoreCondition.Never
};
public static readonly JsonSerializerSettings ForAnnotations = new JsonSerializerSettings()
public static readonly JsonSerializerOptions ForAnnotations = new()
{
ContractResolver = new CamelCasePropertyNamesContractResolver(),
Formatting = Formatting.None,
NullValueHandling = NullValueHandling.Ignore
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
WriteIndented = false,
DefaultIgnoreCondition = JsonIgnoreCondition.Never,
};
#endif
}
#endregion
}

View File

@@ -1,4 +1,5 @@
using System.ComponentModel;
using DigitalData.Core.Abstractions.Interfaces;
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#if NETFRAMEWORK
@@ -13,7 +14,7 @@ namespace EnvelopeGenerator.Domain.Entities
#endif
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
public class EmailTemplate
public class EmailTemplate : IEntity
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]

View File

@@ -1,5 +1,6 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using DigitalData.Core.Abstractions.Interfaces;
using EnvelopeGenerator.Domain.Interfaces;
#if NETFRAMEWORK
@@ -14,7 +15,7 @@ namespace EnvelopeGenerator.Domain.Entities
#endif
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
public class EnvelopeReceiver : IHasEnvelope, IHasReceiver
public class EnvelopeReceiver : IHasEnvelope, IHasReceiver, IEntity
{
public EnvelopeReceiver()
{

View File

@@ -37,6 +37,7 @@
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction.Attributes" Version="1.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="UserManager.Domain" Version="3.2.3" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="4.1.1" />
</ItemGroup>
<ItemGroup>

View File

@@ -1,5 +1,5 @@
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.props" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" />
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">x86</Platform>
@@ -111,13 +111,15 @@
<HintPath>..\packages\DocumentFormat.OpenXml.Framework.3.2.0\lib\net46\DocumentFormat.OpenXml.Framework.dll</HintPath>
</Reference>
<Reference Include="EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="EntityFramework.Firebird, Version=6.4.0.0, Culture=neutral, PublicKeyToken=42d22d092898e5f8, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.Firebird.6.4.0\lib\net452\EntityFramework.Firebird.dll</HintPath>
</Reference>
<Reference Include="EntityFramework.SqlServer, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089, processorArchitecture=MSIL">
<HintPath>..\packages\EntityFramework.6.4.4\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<HintPath>..\packages\EntityFramework.6.5.1\lib\net45\EntityFramework.SqlServer.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="FirebirdSql.Data.FirebirdClient, Version=7.5.0.0, Culture=neutral, PublicKeyToken=3750abcc3150b00c, processorArchitecture=MSIL">
<HintPath>..\packages\FirebirdSql.Data.FirebirdClient.7.5.0\lib\net452\FirebirdSql.Data.FirebirdClient.dll</HintPath>
@@ -199,10 +201,12 @@
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.2.1.1\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
</Reference>
<Reference Include="Microsoft.Identity.Client, Version=4.55.0.0, Culture=neutral, PublicKeyToken=0a613f4dd989e8ae, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.Identity.Client.4.55.0\lib\net461\Microsoft.Identity.Client.dll</HintPath>
<HintPath>..\packages\Microsoft.Identity.Client.4.77.0\lib\net462\Microsoft.Identity.Client.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Microsoft.IdentityModel.Abstractions, Version=6.22.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35, processorArchitecture=MSIL">
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.6.22.0\lib\net461\Microsoft.IdentityModel.Abstractions.dll</HintPath>
<HintPath>..\packages\Microsoft.IdentityModel.Abstractions.8.14.0\lib\net462\Microsoft.IdentityModel.Abstractions.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.13.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
@@ -251,6 +255,10 @@
<Reference Include="System.Data.Odbc, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Data.Odbc.6.0.1\lib\net461\System.Data.Odbc.dll</HintPath>
</Reference>
<Reference Include="System.Diagnostics.DiagnosticSource, Version=6.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Diagnostics.DiagnosticSource.6.0.1\lib\net461\System.Diagnostics.DiagnosticSource.dll</HintPath>
<Private>True</Private>
</Reference>
<Reference Include="System.Drawing.Common, Version=4.0.0.2, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
<HintPath>..\packages\System.Drawing.Common.4.7.3\lib\net461\System.Drawing.Common.dll</HintPath>
</Reference>
@@ -525,12 +533,12 @@
<PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.4.4\build\EntityFramework.targets'))" />
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.props'))" />
<Error Condition="!Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\EntityFramework.6.5.1\build\EntityFramework.targets'))" />
</Target>
<Import Project="..\packages\EntityFramework.6.4.4\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.4.4\build\EntityFramework.targets')" />
<Import Project="..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.3.3\build\net462\GdPicture.runtimes.windows.targets')" />
<Import Project="..\packages\EntityFramework.6.5.1\build\EntityFramework.targets" Condition="Exists('..\packages\EntityFramework.6.5.1\build\EntityFramework.targets')" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">

View File

@@ -101,7 +101,7 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Collections.Immutable" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
@@ -121,15 +121,15 @@
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Security.Cryptography.Pkcs" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.IO.Packaging" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.1" newVersion="8.0.0.1" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
<bindingRedirect oldVersion="0.0.0.0-8.0.0.5" newVersion="8.0.0.5" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />

View File

@@ -486,8 +486,8 @@ Partial Public Class frmEnvelopeEditor
'
'EnvelopeReceiverBindingSource
'
Me.EnvelopeReceiverBindingSource.DataMember = "EnvelopeReceivers"
Me.EnvelopeReceiverBindingSource.DataSource = GetType(EnvelopeGenerator.Form.frmEnvelopeEditor)
'Me.EnvelopeReceiverBindingSource.DataMember = "EnvelopeReceivers"
'Me.EnvelopeReceiverBindingSource.DataSource = GetType(EnvelopeGenerator.Form.frmEnvelopeEditor)
'
'ViewReceivers
'

View File

@@ -132,10 +132,10 @@ Public Class frmEnvelopeMainData
Envelope.Language = cmbLanguage.EditValue
Envelope.UseAccessCode = chkUseAccessCode.EditValue
Envelope.SendReminderEmails = chkSendReminderEmails.EditValue
Envelope.FirstReminderDays = spnFirstReminderDays.EditValue
Envelope.ReminderIntervalDays = spnReminderIntervalDays.EditValue
Envelope.ExpiresWhenDays = spnExpiresDays.EditValue
Envelope.ExpiresWarningWhenDays = spnExpiresWarningDays.EditValue
Envelope.FirstReminderDays = CInt(spnFirstReminderDays.EditValue)
Envelope.ReminderIntervalDays = CInt(spnReminderIntervalDays.EditValue)
Envelope.ExpiresWhenDays = CInt(spnExpiresDays.EditValue)
Envelope.ExpiresWarningWhenDays = CInt(spnExpiresWarningDays.EditValue)
Envelope.FinalEmailToCreator = cmbEmailToCreator.SelectedIndex
Envelope.FinalEmailToReceivers = cmbEmailToReceivers.SelectedIndex
Envelope.TfaEnabled = chked_2Faktor.EditValue

View File

@@ -129,17 +129,17 @@ Public Class frmMain
End Sub
Private Sub btnCreateEnvelope_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnCreateEnvelope.ItemClick
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oForm As New frmEnvelopeEditor() With {.State = State}
'Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
'Try
Dim oForm As New frmEnvelopeEditor() With {.State = State}
oForm.ShowDialog()
LoadEnvelopeData()
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
' Catch ex As Exception
'Logger.Error(ex)
'Finally
'SplashScreenManager.CloseOverlayForm(oHandle)
'End Try
End Sub
Private Sub btnEditEnvelope_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnEditEnvelope.ItemClick
@@ -448,7 +448,7 @@ Public Class frmMain
'For Document
Try
'Get image data from gridview column.
strSql = "Select [DocResult] from [TBSIG_ENVELOPE] WHERE GUID = " & pEnvID
strSql = "Select [DOC_RESULT] from [TBSIG_ENVELOPE] WHERE GUID = " & pEnvID
Dim obyteDB = DB_DD_ECM.GetScalarValue(strSql)
If Not IsDBNull(obyteDB) Then
'Get image data from DB
@@ -623,7 +623,7 @@ Public Class frmMain
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
Dim oController = New EnvelopeEditorController(State, oEnvelope)
Dim Documents As New BindingList(Of Document)
Dim Documents As New BindingList(Of Domain.Entities.Document)
Dim Receivers = New BindingList(Of ReceiverVM)(oController.Envelope.EnvelopeReceivers.Select(Function(r) ReceiverVM.From(r)).ToList())
For Each oReceiver As ReceiverVM In Receivers
If oReceiver.EmailAddress = selReceiver.EmailAddress Then
@@ -871,7 +871,7 @@ Public Class frmMain
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
If oEnvelope.UseAccessCode = True Then
Dim oController = New EnvelopeEditorController(State, oEnvelope)
Dim Documents As New BindingList(Of Document)
Dim Documents As New BindingList(Of Domain.Entities.Document)
Dim Receivers = New BindingList(Of ReceiverVM)(oController.Envelope.EnvelopeReceivers.Select(Function(r) ReceiverVM.From(r)).ToList())
For Each oReceiver As ReceiverVM In Receivers
If oReceiver.EmailAddress = selReceiver.EmailAddress Then

View File

@@ -10,7 +10,7 @@
<package id="DigitalData.Modules.Messaging" version="1.9.8" targetFramework="net462" />
<package id="DocumentFormat.OpenXml" version="3.2.0" targetFramework="net462" />
<package id="DocumentFormat.OpenXml.Framework" version="3.2.0" targetFramework="net462" />
<package id="EntityFramework" version="6.4.4" targetFramework="net462" />
<package id="EntityFramework" version="6.5.1" targetFramework="net462" />
<package id="EntityFramework.Firebird" version="6.4.0" targetFramework="net462" />
<package id="FirebirdSql.Data.FirebirdClient" version="7.5.0" targetFramework="net462" />
<package id="GdPicture" version="14.3.3" targetFramework="net462" />
@@ -20,8 +20,8 @@
<package id="Microsoft.Bcl.Cryptography" version="9.0.0" targetFramework="net462" />
<package id="Microsoft.CSharp" version="4.7.0" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.55.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Abstractions" version="6.22.0" targetFramework="net462" />
<package id="Microsoft.Identity.Client" version="4.77.0" targetFramework="net462" />
<package id="Microsoft.IdentityModel.Abstractions" version="8.14.0" targetFramework="net462" />
<package id="Microsoft.VisualBasic" version="10.3.0" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Newtonsoft.Json.Bson" version="1.0.2" targetFramework="net462" />
@@ -37,6 +37,7 @@
<package id="System.Collections.Immutable" version="9.0.0" targetFramework="net462" />
<package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net462" />
<package id="System.Data.Odbc" version="6.0.1" targetFramework="net462" />
<package id="System.Diagnostics.DiagnosticSource" version="6.0.1" targetFramework="net462" />
<package id="System.Drawing.Common" version="4.7.3" targetFramework="net462" />
<package id="System.Formats.Asn1" version="9.0.0" targetFramework="net462" />
<package id="System.IO.Packaging" version="9.0.0" targetFramework="net462" />

View File

@@ -5,12 +5,12 @@ using EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
using EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using MediatR;
using System.Threading.Tasks;
using DigitalData.UserManager.Application.Services;
using DigitalData.Core.Exceptions;
using EnvelopeGenerator.Application.Common.Dto;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;

View File

@@ -1,11 +1,11 @@
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Envelopes.Commands;
using EnvelopeGenerator.Application.Envelopes.Queries;
using MediatR;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;

View File

@@ -1,7 +1,5 @@
using AutoMapper;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.EnvelopeReceivers.Commands;
using EnvelopeGenerator.Application.EnvelopeReceivers.Queries;
using EnvelopeGenerator.Application.Envelopes.Queries;
@@ -18,6 +16,8 @@ using EnvelopeGenerator.Domain;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.SQL;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;

View File

@@ -1,5 +1,5 @@
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;

View File

@@ -1,12 +1,12 @@
using DigitalData.Core.Abstraction.Application.DTO;
using DigitalData.Core.API;
using EnvelopeGenerator.Application.Interfaces.Services;
using EnvelopeGenerator.Application.Receivers.Queries;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using EnvelopeGenerator.Application.Receivers.Commands;
using EnvelopeGenerator.Application.Common.Dto.Receiver;
using EnvelopeGenerator.Application.Common.Interfaces.Services;
namespace EnvelopeGenerator.GeneratorAPI.Controllers;

View File

@@ -1,18 +1,17 @@
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Infrastructure.Repositories;
using EnvelopeGenerator.Infrastructure.Repositories;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.EntityFrameworkCore;
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using DigitalData.Core.Infrastructure.AutoMapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using Microsoft.Extensions.Configuration;
using EnvelopeGenerator.Infrastructure.Executor;
using Dapper;
using System.ComponentModel.DataAnnotations.Schema;
using System.Reflection;
using DigitalData.UserManager.Domain.Entities;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using DigitalData.EmailProfilerDispatcher.Abstraction.Entities;
namespace EnvelopeGenerator.Infrastructure;
@@ -55,19 +54,17 @@ public static class DIExtensions
services.TryAddScoped<IReceiverRepository, ReceiverRepository>();
services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
services.AddDbRepository<EGDbContext, User>(context => context.Users).UseAutoMapper();
services.AddDbRepository<EGDbContext, Config>(context => context.Configs).UseAutoMapper();
services.AddDbRepository<EGDbContext, Signature>(context => context.DocumentReceiverElements).UseAutoMapper();
services.AddDbRepository<EGDbContext, Document>(context => context.EnvelopeDocument).UseAutoMapper();
services.AddDbRepository<EGDbContext, DocumentStatus>(context => context.DocumentStatus).UseAutoMapper();
services.AddDbRepository<EGDbContext, EmailTemplate>(context => context.EmailTemplate).UseAutoMapper();
services.AddDbRepository<EGDbContext, EmailOut>(context => context.EMailOuts).UseAutoMapper();
services.AddDbRepository<EGDbContext, Envelope>(context => context.Envelopes).UseAutoMapper();
services.AddDbRepository<EGDbContext, History>(context => context.EnvelopeHistories).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeReceiver>(context => context.EnvelopeReceivers).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeType>(context => context.EnvelopeTypes).UseAutoMapper();
services.AddDbRepository<EGDbContext, Receiver>(context => context.Receivers).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeReceiverReadOnly>(context => context.EnvelopeReceiverReadOnlys).UseAutoMapper();
services.AddDbRepository(opt =>
{
// scan EnvelopeGenerator
opt.RegisterFromAssembly<EGDbContext>(typeof(Config).Assembly);
// scan UserManager
opt.RegisterFromAssembly<EGDbContext>(typeof(User).Assembly);
// scan EmailProfilerDispatcher
opt.RegisterFromAssembly<EGDbContext>(typeof(EmailOut).Assembly);
});
services.AddSQLExecutor<Envelope>();
services.AddSQLExecutor<Receiver>();

View File

@@ -14,8 +14,15 @@ using EnvelopeGenerator.Application.Common.Configurations;
namespace EnvelopeGenerator.Infrastructure;
public class EGDbContext : EGDbContextBase
{
public EGDbContext(DbContextOptions<EGDbContext> options, IOptions<DbTriggerParams> triggerParamOptions, ILogger<EGDbContext>? logger = null) : base(options, triggerParamOptions, logger)
{
}
}
//TODO: Adding EmailOut instead of EmailOut.Abst is not correct for the arch. Re-design EmailPut consedering this. IMailDbContext shoud move to Abstraction layer (hint: in this case using DBSet in abst. will be problem because entity framework will have to be added.
public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
public abstract class EGDbContextBase : DbContext, IUserManagerDbContext, IMailDbContext
{
public DbSet<Config> Configs { get; set; }
@@ -57,11 +64,11 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
private readonly DbTriggerParams _triggers;
private readonly ILogger<EGDbContext>? _logger;
private readonly ILogger? _logger;
public bool IsMigration { get; set; } = false;
public EGDbContext(DbContextOptions<EGDbContext> options, IOptions<DbTriggerParams> triggerParamOptions, ILogger<EGDbContext>? logger = null) : base(options)
public EGDbContextBase(DbContextOptions options, IOptions<DbTriggerParams> triggerParamOptions, ILogger? logger = null) : base(options)
{
_triggers = triggerParamOptions.Value;
_logger = logger;

View File

@@ -8,9 +8,8 @@
<ItemGroup>
<PackageReference Include="Dapper" Version="2.1.66" />
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.2.1" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.3.1" />
<PackageReference Include="DigitalData.Core.Infrastructure.AutoMapper" Version="1.0.3" />
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.3.1" />
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.4.1" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.1.1" />
<PackageReference Include="QuestPDF" Version="2025.7.1" />
<PackageReference Include="UserManager" Version="1.1.3" />

View File

@@ -1,6 +1,6 @@
using Dapper;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.SQL;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.DependencyInjection;

View File

@@ -1,8 +1,7 @@
using Dapper;
using DigitalData.UserManager.Application.Contracts.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.SQL;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.DependencyInjection;

View File

@@ -1,7 +1,7 @@
using Dapper;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.SQL;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Domain.Entities;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.DependencyInjection;

View File

@@ -1,4 +1,4 @@
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using Microsoft.EntityFrameworkCore;
namespace EnvelopeGenerator.Infrastructure.Executor;

View File

@@ -1,5 +1,5 @@
using Dapper;
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using Microsoft.Data.SqlClient;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;

View File

@@ -1,4 +1,4 @@
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.Options;

View File

@@ -1,7 +1,7 @@
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using Microsoft.EntityFrameworkCore;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;

View File

@@ -1,6 +1,6 @@
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;

View File

@@ -1,6 +1,6 @@
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;

View File

@@ -1,9 +1,9 @@
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Interfaces.Repositories;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.Caching.Memory;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;

Some files were not shown because too many files have changed in this diff Show More