Compare commits

..

49 Commits

Author SHA1 Message Date
796b233ba4 Add contract type check to envelope validation
ValidateEnvelopeForSending now skips element checks if the envelope does not require a signature (i.e., contract type is not ReadAndSign), preventing unnecessary validation for such envelopes.
2026-01-23 17:37:14 +01:00
Developer01
1e2e018f7f MS Anpassungen 2025-11-12 21:43:50 +01:00
Developer01
69afea012b Handling InsertReceivers und kleinigkeiten frm Main 2025-09-16 09:00:43 +02:00
Developer01
85e0bc3400 Logging wegen Y-Konstante 2025-09-04 14:35:54 +02:00
b8c00884a9 Merge EnvelopeReceiver and EnvelopeReceiverBase 2025-08-13 16:35:51 +02:00
51d49d68ba fix(Envelope): Fügen Nicht-relationalen Eigenschaften NotMapped-Attribute hinzu. 2025-08-13 16:07:26 +02:00
4d5ee2b461 fix(MailParams): make Placeholders Dictionary 2025-08-13 13:03:56 +02:00
8a79ee4126 Stil: BaseController auf Datei-Namensraumformat umstellen 2025-08-12 11:24:38 +02:00
cde9896c01 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-08-07 17:01:51 +02:00
c7d26a87b0 fix(EnvelopeMailService): Vermeiden Sie gemeinsam genutzte veränderbare Zustände in EnvelopeMailService-Platzhaltern
EnvelopeMailService wurde umgestaltet, um gemeinsam genutzte Veränderungen des _placeholders-Wörterbuchs zu vermeiden.
Die Konfigurationseigenschaft MailParams.Placeholders wurde von einem veränderbaren Dictionary<string, string>
zu einem ImmutableDictionary<string, string> geändert, und _placeholders wird nun bei der Dienstkonstruktion als neues Wörterbuch instanziiert.
2025-08-07 17:01:32 +02:00
17ceb1f72a Update EnvelopeGenerator.Web/wwwroot/README.md 2025-08-06 09:48:34 +02:00
b2c396c3b2 Add EnvelopeGenerator.Web/wwwroot/README.md 2025-08-06 09:45:11 +02:00
Developer01
286e17a900 layout specihern 2025-07-18 15:42:07 +02:00
Developer01
a21db6d6c5 Button AccessCode manuell versenden 2025-07-15 07:27:01 +02:00
Developer01
fe7030b9d7 Resend AccessCode Manually 2025-07-14 15:19:05 +02:00
Developer01
888c04b5c9 EnvelopeDomain Add Comment 2025-07-14 13:45:14 +02:00
de2cc62f95 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-07-02 14:26:08 +02:00
0cfa732d87 Fix StatusTranslated property for correct enum translation
Updated the `StatusTranslated` property to cast the `Status` integer to the `Constants.EnvelopeStatus` enum before calling `ToString()`. This ensures accurate string representation based on the enum rather than the integer value.
2025-07-02 14:25:14 +02:00
Developer01
b14d9169f2 Fild editor msgbox 2025-07-02 13:18:01 +02:00
be51ca31dd Add initial migration for database schema setup
This commit introduces the `InitialCreate` migration class, establishing the initial database schema with multiple tables including `TBDD_CLIENT_USER`, `TBDD_GROUPS`, `TBDD_MODULES`, and `TBDD_USER`. Foreign key relationships are defined to ensure referential integrity, and a `Down` method is included for rollback functionality.

Additionally, the `InitialCreate.Designer.cs` file is generated to capture the model snapshot post-migration, while the `EGDbContextModelSnapshot.cs` file is updated to reflect the current state of the database model for future migrations.
2025-07-01 17:22:13 +02:00
bb8d7cd208 Update AddedWho property in EnvelopeReceiverReadOnly
Modified the `AddedWho` property to use `nvarchar(250)`
and increased the string length constraint from 100 to 250
characters, allowing for more extensive data storage.
2025-07-01 17:17:24 +02:00
b6588db615 Increase email address length in data models
Updated `ReceiverMail` and `EmailAddress` columns to
support `nvarchar(250)` for longer email addresses.
Retained `[NotMapped]` attribute for `Envelope` in
`EnvelopeReceiverReadOnly.cs` with a note for future
standardization of `EnvelopeId` data type.
2025-07-01 17:08:30 +02:00
9a9aa2608b Refactor EnvelopeHistory and update DbContext for migrations
Removed Sender and Receiver properties from EnvelopeHistory.
Added ActionDate and Comment properties. Introduced IsMigration
property in EGDbContext to conditionally configure foreign key
relationships for EnvelopeHistory. Updated EGDbContextFactory
to set IsMigration during context creation for migration operations.
2025-07-01 16:38:42 +02:00
349d65d050 Update DbTriggerParams and EF Core package versions
- Changed DbTriggerParams to use ICollection<string> for flexibility.
- Updated Microsoft.EntityFrameworkCore.SqlServer to version 9.0.6.
- Made _logger in EGDbContext nullable and optional in constructor.
- Updated logging statements to prevent null reference exceptions.
- Added Microsoft.EntityFrameworkCore.SqlServer package for net8.0 and net9.0.
- Introduced appsettings.migration.json for connection strings and trigger parameters.
- Added EGDbContextFactory for design-time DbContext creation.
2025-07-01 13:07:40 +02:00
93593226e2 Add conditional DB connection string selection
Updated `Program.cs` to conditionally select the database connection string based on an environment variable or configuration setting. Introduced a new variable `cnnStrName` for determining the use of a migration test database.

Added a new setting `"UseDbMigration": true` in `appsettings.json` to enable the migration test database, and included the corresponding connection string as `"DbMigrationTest"`. Removed the previous `"Dev"` connection string.
2025-06-30 16:19:22 +02:00
351cead423 Update Entity Framework packages and add Design package
The project file `EnvelopeGenerator.Infrastructure.csproj` has been modified to include the `Microsoft.EntityFrameworkCore.Design` package for net7.0, net8.0, and net9.0, with appropriate configurations for `PrivateAssets` and `IncludeAssets`. Additionally, the versions of `Microsoft.EntityFrameworkCore` and `Microsoft.EntityFrameworkCore.Relational` have been updated for net8.0 (from 8.0.15 to 8.0.17) and net9.0 (from 9.0.5 to 9.0.6).
2025-06-30 15:59:35 +02:00
07cab88e0d Refactor service registration with lambda expression 2025-06-30 15:53:38 +02:00
faa019355a Add DbMigrationTest key and update connection logic
Introduced a new static readonly string `DbMigrationTest` in the `Key` class for database migration tests. Updated connection string logic in `Program.cs` to use `DbMigrationTest` when `useDbMigration` is true, allowing for dynamic connection string selection based on environment configuration.
2025-06-30 15:38:01 +02:00
df9bcf3221 Remove IUserReceiverService registration 2025-06-30 15:29:57 +02:00
cda19e2b83 Add migration support and update launch settings
Introduce `useDbMigration` variable in `Program.cs` to conditionally manage database migrations based on environment settings. Update `launchSettings.json` to include a new `httpsDbMigration` profile for testing with Swagger UI. Modify `appsettings.json` to add `UseDbMigration` setting and replace the "Dev" connection string with "DbMigrationTest" for migration testing.
2025-06-30 15:29:47 +02:00
1586009a72 Add development connection string to appsettings.json 2025-06-30 15:07:04 +02:00
408b1e9f0d Merge branch 'refactor/split-common' 2025-06-30 14:59:37 +02:00
9158933333 Refactor security key handling and culture info setup
Updated `IssuerSigningKeyResolver` to use array syntax for returning security keys. Changed supported culture names declaration to use square brackets and modified the creation of the `CultureInfo` list to utilize the spread operator. Adjusted exception handling to throw `InvalidOperationException` when no supported culture is found.
2025-06-30 14:36:55 +02:00
902848958d Refactor empty array initialization 2025-06-30 14:26:26 +02:00
f5418499a7 Refactor envelope generator service registration 2025-06-30 14:25:32 +02:00
47d190d9ea Remove UserReceiver repository registration 2025-06-30 14:23:20 +02:00
35f46d3182 Remove UserReceiver repository and related entities
This commit removes the `IUserReceiverRepository` service registration from `DIExtensions`, indicating it is no longer needed. The `UserReceiver` and `Config` DbSet properties have been eliminated from the `EGDbContext`, along with their initialization in the constructor. Additionally, the `UserReceiver` entity has been removed from the model builder configuration and the associated trigger has been deleted. These changes reflect a refactoring of the data model to simplify the architecture and improve maintainability.
2025-06-30 14:23:00 +02:00
425d21084b Refactor TestSanitizeController for improved clarity
- Updated namespace for consistency.
- Changed constructor and method parameters to non-nullable strings.
- Enhanced method signatures for `Sanitize` and `Encoder`.
- Improved overall class structure and formatting for better readability.
2025-06-30 14:13:36 +02:00
6aeba4d1e7 Deprecate methods and streamline controller code
Added [Obsolete("Use MediatR")] attribute to several methods
across `DocumentController`, `HomeController`,
`TestConfigController`, `TestDocumentReceiverElementController`,
and `TestEnvelopeController` to indicate they should no longer
be used.

Refactored constructors in `TestConfigController` and
`TestEnvelopeController` to remove unnecessary empty blocks.

Improved formatting and structure of the `GetAll` method in
`TestEnvelopeController` for better clarity while maintaining
functionality.

Updated `Program.cs` to suppress warnings about obsolete
types/members during service registrations, indicating a
transition to newer implementations.
2025-06-30 14:11:56 +02:00
6930d7a431 Mark CommandManager as obsolete; add warning suppression
Updated `CommandManager` to mark the `_envelopeReceiverService` field and its constructor as obsolete, recommending the use of `MediatR`. Added a new obsolete property `EnvelopeReceiver` for accessing the service. In `Program.cs`, added warning suppression for the obsolete member during command manager runner registration.
2025-06-30 14:07:39 +02:00
c453a1650a Suppress obsolete warnings and update auth options
Added pragma directives to suppress warnings for obsolete
types when configuring user manager and envelope generator
services. Also set a logout path and enabled sliding
expiration for authentication options.
2025-06-30 14:06:26 +02:00
b9f5ae826a Deprecate user service interfaces in controllers
Added [Obsolete] attributes to _userService in AuthController,
_repository in EmailTemplateController, and _userRepository
in EnvelopeExecutor. These changes guide developers to
transition to using MediatR and IRepository.
2025-06-30 14:05:36 +02:00
532dc41004 Remove DocumentPath, add SignatureHost to Config
Removed the `DocumentPath` property from the `Config` class. Added a new required property `SignatureHost` of type `string`, mapped to the database column `SIGNATURE_HOST` (nvarchar(128)). Other properties remain unchanged.
2025-06-30 14:01:30 +02:00
13899cf70a Refactor ConfigDto class and update properties
- Change namespace to `EnvelopeGenerator.Application.DTOs`
- Remove `DocumentPath` property
- Update `SignatureHost` to be a required string
2025-06-30 13:59:18 +02:00
9756303d6e Refactor repositories and enhance documentation
- Mark `IEmailTemplateRepository` and `_repository` in `ReadEmailTemplateQueryHandler` as obsolete, suggesting the use of `IRepository`.
- Update `ResetEmailTemplateCommand` with additional documentation and examples for `Type`.
- Change return type of `CreateEnvelopeReceiverCommand` to `IRequest<CreateEnvelopeReceiverResponse>`.
- Improve caching methods in `CacheExtensions.cs` for better functionality and clarity.
- Add XML documentation to the `Ok` method in `MappingExtensions`.
- Make `UserReference` property required in `ReadHistoryResponse`.
2025-06-30 13:56:49 +02:00
1c51fafb69 Remove UserReceiver functionality and related components
This commit marks the `IUserReceiverRepository` and `IUserReceiverService` as obsolete and removes their implementations. The `UserReceiverDto`, `UserReceiver`, `UserReceiverService`, and `UserReceiverRepository` classes have been deleted, along with their mappings in the `MappingProfile`. Additionally, the `TestUserReceiverController` has been removed, reflecting the complete removal of user receiver functionality from the codebase.
2025-06-30 13:44:43 +02:00
94d43bce24 Deprecate repositories and update service interfaces
- Marked `IEnvelopeReceiverRepository` and several repository classes as obsolete, recommending the use of `IRepository`.
- Corrected `using` directive in `IReceiverService.cs`.
- Removed `UpdateAsync` method from `IReceiverService`.
- Enhanced `ISmsSender` interface with new properties and methods.
- Updated `ReceiverCreateDto`, `ReceiverReadDto`, and `UserReceiverDto` to enforce non-nullable properties.
- Refactored `TestReceiverController` to suggest using `MediatR`.
2025-06-30 13:37:54 +02:00
f5733228bf Merge branch 'refactor/split-common' 2025-06-30 11:28:32 +02:00
e3cb2ec219 Add new library references and update packages
- Added references to `DigitalData.UserManager.Domain` v3.2.2.0, `System.ComponentModel.Annotations` v4.2.1.0, and `System.Drawing.Common` v4.0.0.2 in `EnvelopeGenerator.Form.vbproj`.
- Updated `packages.config` to include `System.ComponentModel.Annotations` v4.7.0, `System.Drawing.Common` v4.7.3, and `UserManager.Domain` v3.2.2.
2025-06-30 11:27:26 +02:00
97 changed files with 5107 additions and 870 deletions

View File

@@ -3,6 +3,6 @@
/// <summary>
///
/// </summary>
public class DbTriggerParams : Dictionary<string, IEnumerable<string>>
public class DbTriggerParams : Dictionary<string, ICollection<string>>
{
}

View File

@@ -7,7 +7,7 @@ namespace EnvelopeGenerator.Application.Contracts.Repositories;
/// <summary>
///
/// </summary>
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
[Obsolete("Use IRepository")]
public interface IEmailTemplateRepository : ICRUDRepository<EmailTemplate, int>
{
/// <summary>

View File

@@ -6,6 +6,7 @@ namespace EnvelopeGenerator.Application.Contracts.Repositories;
/// <summary>
///
/// </summary>
[Obsolete("Use IRepository")]
public interface IEnvelopeReceiverRepository : ICRUDRepository<EnvelopeReceiver, (int Envelope, int Receiver)>
{
/// <summary>

View File

@@ -1,12 +0,0 @@
using DigitalData.Core.Abstraction.Application.Repository;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts.Repositories;
/// <summary>
///
/// </summary>
[Obsolete("Use IRepository")]
public interface IUserReceiverRepository : ICRUDRepository<UserReceiver, int>
{
}

View File

@@ -1,5 +1,4 @@
using DigitalData.Core.Abstractions;
using DigitalData.Core.Abstraction.Application;
using DigitalData.Core.Abstraction.Application;
using DigitalData.Core.Abstraction.Application.DTO;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
@@ -27,12 +26,4 @@ public interface IReceiverService : ICRUDService<ReceiverCreateDto, ReceiverRead
/// <param name="signature"></param>
/// <returns></returns>
Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
/// <summary>
///
/// </summary>
/// <typeparam name="TUpdateDto"></typeparam>
/// <param name="updateDto"></param>
/// <returns></returns>
Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto);
}

View File

@@ -3,9 +3,21 @@
namespace EnvelopeGenerator.Application.Contracts.Services;
//TODO: move to DigitalData.Core
/// <summary>
///
/// </summary>
public interface ISmsSender
{
/// <summary>
///
/// </summary>
string ServiceProvider { get; }
/// <summary>
///
/// </summary>
/// <param name="recipient"></param>
/// <param name="message"></param>
/// <returns></returns>
Task<SmsResponse> SendSmsAsync(string recipient, string message);
}

View File

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

View File

@@ -8,11 +8,6 @@ namespace EnvelopeGenerator.Application.DTOs;
[ApiExplorerSettings(IgnoreApi = true)]
public class ConfigDto
{
/// <summary>
/// Gets or sets the path to the document.
/// </summary>
public string? DocumentPath { get; set; }
/// <summary>
/// Gets or sets the sending profile identifier.
/// </summary>
@@ -21,7 +16,7 @@ public class ConfigDto
/// <summary>
/// Gets or sets the signature host URL or name.
/// </summary>
public string? SignatureHost { get; set; }
public required string SignatureHost { get; set; }
/// <summary>
/// Gets or sets the name of the external program.

View File

@@ -37,7 +37,6 @@ public class MappingProfile : Profile
CreateMap<Domain.Entities.Receiver, ReceiverReadDto>();
CreateMap<Domain.Entities.Receiver, ReceiverCreateDto>();
CreateMap<Domain.Entities.Receiver, ReceiverUpdateDto>();
CreateMap<UserReceiver, UserReceiverDto>();
CreateMap<Domain.Entities.EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
// DTO to Entity mappings
@@ -55,8 +54,7 @@ public class MappingProfile : Profile
CreateMap<ReceiverReadDto, Domain.Entities.Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
CreateMap<ReceiverCreateDto, Domain.Entities.Receiver>();
CreateMap<ReceiverUpdateDto, Domain.Entities.Receiver>();
CreateMap<UserReceiverDto, UserReceiver>();
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverBasicDto>();
CreateMap<EnvelopeReceiverReadOnlyCreateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, Domain.Entities.EnvelopeReceiverReadOnly>();

View File

@@ -18,7 +18,7 @@ public record 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 hexa_str = BitConverter.ToString(hash_arr);
return hexa_str.Replace("-", string.Empty);
@@ -37,7 +37,7 @@ public record ReceiverCreateDto
public string? TotpSecretkey { get; init; }
/// <summary>
/// var bytes_arr = Encoding.UTF8.GetBytes(EmailAddress.ToUpper());<br>
/// var bytes_arr = Encoding.UTF8.GetBytes(EmailAddress.ToUpper());<br/>
/// var hash_arr = SHA256.HashData(bytes_arr);
/// var hexa_str = BitConverter.ToString(hash_arr);
/// return hexa_str.Replace("-", string.Empty);

View File

@@ -4,26 +4,57 @@ using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.Receiver;
/// <summary>
///
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public class ReceiverReadDto
{
/// <summary>
///
/// </summary>
public int Id { get; set; }
public string EmailAddress { get; set; }
/// <summary>
///
/// </summary>
public required string EmailAddress { get; set; }
public string Signature { get; set; }
/// <summary>
///
/// </summary>
public required string Signature { get; set; }
/// <summary>
///
/// </summary>
public DateTime AddedWhen { get; set; }
/// <summary>
///
/// </summary>
[JsonIgnore]
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; set; }
/// <summary>
///
/// </summary>
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
/// <summary>
///
/// </summary>
public string? TotpSecretkey { get; set; } = null;
/// <summary>
///
/// </summary>
public DateTime? TfaRegDeadline { get; set; }
/// <summary>
///
/// </summary>
/// <returns></returns>
public override int GetHashCode()
{
return Id.GetHashCode();

View File

@@ -1,45 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Application.DTOs;
/// <summary>
/// Data Transfer Object representing a user receiver with associated details.
/// </summary>
[ApiExplorerSettings(IgnoreApi = true)]
public class UserReceiverDto
{
/// <summary>
/// Gets or sets the unique identifier of the user receiver.
/// </summary>
public int Id { get; set; }
/// <summary>
/// Gets or sets the identifier of the user associated with the receiver.
/// </summary>
public int UserId { get; set; }
/// <summary>
/// Gets or sets the identifier of the receiver.
/// </summary>
public int ReceiverId { get; set; }
/// <summary>
/// Gets or sets the name of the receiver.
/// </summary>
public string Name { get; set; }
/// <summary>
/// Gets or sets the company name of the receiver.
/// </summary>
public string CompanyName { get; set; }
/// <summary>
/// Gets or sets the job title of the receiver.
/// </summary>
public string JobTitle { get; set; }
/// <summary>
/// Gets or sets the timestamp when the user receiver was added.
/// </summary>
public DateTime AddedWhen { get; set; }
}

View File

@@ -38,7 +38,6 @@ public static class DependencyInjection
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
services.TryAddScoped<IReceiverService, ReceiverService>();
services.TryAddScoped<IUserReceiverService, UserReceiverService>();
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
//Auto mapping profiles

View File

@@ -5,20 +5,19 @@ namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
/// <summary>
/// Ein Befehl zum Zurücksetzen einer E-Mail-Vorlage auf die Standardwerte.
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.<br/><br/>
/// Beispiele:<br/>
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.<br/>
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.<br/>
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.<br/>
/// 3 - DocumentCompleted: Benachrichtigung über den Abschluss eines Dokuments.<br/>
/// 4 - DocumentAccessCodeReceived: Benachrichtigung über den Erhalt eines Zugangscodes.<br/>
/// 5 - DocumentShared: Benachrichtigung über das Teilen eines Dokuments.<br/>
/// 6 - TotpSecret: Benachrichtigung über ein TOTP-Geheimnis.<br/>
/// 7 - DocumentRejected_ADM (Für den Absender): Mail an den Absender, wenn das Dokument abgelehnt wird.<br/>
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.<br/>
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.<br/>
/// </summary>
/// Beispiele:
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
/// 3 - DocumentCompleted: Benachrichtigung über den Abschluss eines Dokuments.
/// 4 - DocumentAccessCodeReceived: Benachrichtigung über den Erhalt eines Zugangscodes.
/// 5 - DocumentShared: Benachrichtigung über das Teilen eines Dokuments.
/// 6 - TotpSecret: Benachrichtigung über ein TOTP-Geheimnis.
/// 7 - DocumentRejected_ADM (Für den Absender): Mail an den Absender, wenn das Dokument abgelehnt wird.
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
/// </param>
public record ResetEmailTemplateCommand : EmailTemplateQuery, IRequest
{
/// <summary>
@@ -34,7 +33,7 @@ public record ResetEmailTemplateCommand : EmailTemplateQuery, IRequest
///
/// </summary>
/// <param name="Id">Die optionale ID der E-Mail-Vorlage, die zurückgesetzt werden soll.</param>
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional).
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional).</param>
public ResetEmailTemplateCommand(int? Id = null, Constants.EmailTemplateType? Type = null) : base(Id, Type)
{
}

View File

@@ -12,6 +12,7 @@ public class ReadEmailTemplateQueryHandler : IRequestHandler<ReadEmailTemplateQu
{
private readonly IMapper _mapper;
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
private readonly IEmailTemplateRepository _repository;
/// <summary>
@@ -21,6 +22,7 @@ public class ReadEmailTemplateQueryHandler : IRequestHandler<ReadEmailTemplateQu
/// <param name="repository">
/// Die AutoMapper-Instanz, die zum Zuordnen von Objekten verwendet wird.
/// </param>
[Obsolete("Use Read-method returning IReadQuery<TEntity> instead.")]
public ReadEmailTemplateQueryHandler(IMapper mapper, IEmailTemplateRepository repository)
{
_mapper = mapper;
@@ -34,6 +36,7 @@ public class ReadEmailTemplateQueryHandler : IRequestHandler<ReadEmailTemplateQu
/// <param name="cancellationToken"></param>
/// <returns></returns>
/// <exception cref="InvalidOperationException"></exception>
[Obsolete("Use IRepository")]
public async Task<ReadEmailTemplateResponse?> Handle(ReadEmailTemplateQuery request, CancellationToken cancellationToken)
{
var temp = request.Id is int id
@@ -46,4 +49,4 @@ public class ReadEmailTemplateQueryHandler : IRequestHandler<ReadEmailTemplateQu
return res;
}
}
}

View File

@@ -18,4 +18,4 @@ public record CreateEnvelopeReceiverCommand(
[Required] DocumentCreateCommand Document,
[Required] IEnumerable<ReceiverGetOrCreateCommand> Receivers,
bool TFAEnabled = false
) : CreateEnvelopeCommand(Title, Message, TFAEnabled), IRequest<CreateEnvelopeReceiverResponse?>;
) : CreateEnvelopeCommand(Title, Message, TFAEnabled), IRequest<CreateEnvelopeReceiverResponse>;

View File

@@ -64,4 +64,4 @@ public class CreateEnvelopeReceiverCommandHandler : IRequestHandler<CreateEnvelo
res.SentReceiver = _mapper.Map<IEnumerable<ReceiverReadDto>>(sentRecipients);
return res;
}
}
}

View File

@@ -1,131 +1,222 @@
using Microsoft.Extensions.Caching.Distributed;
namespace EnvelopeGenerator.Application.Extensions
namespace EnvelopeGenerator.Application.Extensions;
/// <summary>
///
/// </summary>
public static class CacheExtensions
{
public static class CacheExtensions
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="value"></param>
/// <param name="options"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static Task SetLongAsync(this IDistributedCache cache, string key, long value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> options is null
? cache.SetAsync(key, BitConverter.GetBytes(value), token: cToken)
: cache.SetAsync(key, BitConverter.GetBytes(value), options: options, token: cToken);
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<long?> GetLongAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{
public static Task SetLongAsync(this IDistributedCache cache, string key, long value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> options is null
? cache.SetAsync(key, BitConverter.GetBytes(value), token: cToken)
: cache.SetAsync(key, BitConverter.GetBytes(value), options: options, token: cToken);
public static async Task<long?> GetLongAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{
var value = await cache.GetAsync(key, cToken);
return value is null ? null : BitConverter.ToInt64(value, 0);
}
public static Task SetDateTimeAsync(this IDistributedCache cache, string key, DateTime value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken: cToken);
public static async Task<DateTime?> GetDateTimeAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{
var value = await cache.GetAsync(key, cToken);
return value is null ? null : new(BitConverter.ToInt64(value, 0));
}
public static Task SetTimeSpanAsync(this IDistributedCache cache, string key, TimeSpan value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken);
public static async Task<TimeSpan?> GetTimeSpanAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{
var value = await cache.GetAsync(key, cToken);
return value is null ? null : new(BitConverter.ToInt64(value, 0));
}
//TODO: use code generator
#region GetOrSetAsync
#region string
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<string> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
var value = await cache.GetStringAsync(key, cToken);
if (value is null)
{
// create new and save
value = factory();
Task CacheAsync() => options is null
? cache.SetStringAsync(key, value, cToken)
: cache.SetStringAsync(key, value, options, cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
}
return value;
}
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<string>> factoryAsync, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
var value = await cache.GetStringAsync(key, cToken);
if(value is null)
{
// create new and save
value = await factoryAsync();
Task CacheAsync() => options is null
? cache.SetStringAsync(key: key, value: value, token: cToken)
: cache.SetStringAsync(key: key, value: value, options: options, token: cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
}
return value;
}
#endregion
#region DateTime
public static async Task<DateTime> GetOrSetAsync(this IDistributedCache cache, string key, Func<DateTime> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
if (await cache.GetDateTimeAsync(key, cToken) is DateTime dateTimeValue)
return dateTimeValue;
else
{
// create new and save
var newValue = factory();
Task CacheAsync() => options is null
? cache.SetDateTimeAsync(key, newValue, cToken: cToken)
: cache.SetDateTimeAsync(key, newValue, options, cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
return newValue;
}
}
public static async Task<DateTime> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<DateTime>> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
if (await cache.GetDateTimeAsync(key, cToken) is DateTime dateTimeValue)
return dateTimeValue;
else
{
// create new and save
var newValue = await factory();
Task CacheAsync() => options is null
? cache.SetDateTimeAsync(key, newValue, cToken: cToken)
: cache.SetDateTimeAsync(key, newValue, options, cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
return newValue;
}
}
#endregion
#endregion
var value = await cache.GetAsync(key, cToken);
return value is null ? null : BitConverter.ToInt64(value, 0);
}
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="value"></param>
/// <param name="options"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static Task SetDateTimeAsync(this IDistributedCache cache, string key, DateTime value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken: cToken);
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<DateTime?> GetDateTimeAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{
var value = await cache.GetAsync(key, cToken);
return value is null ? null : new(BitConverter.ToInt64(value, 0));
}
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="value"></param>
/// <param name="options"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static Task SetTimeSpanAsync(this IDistributedCache cache, string key, TimeSpan value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken);
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<TimeSpan?> GetTimeSpanAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{
var value = await cache.GetAsync(key, cToken);
return value is null ? null : new(BitConverter.ToInt64(value, 0));
}
//TODO: use code generator
#region GetOrSetAsync
#region string
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="factory"></param>
/// <param name="options"></param>
/// <param name="cacheInBackground"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<string> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
var value = await cache.GetStringAsync(key, cToken);
if (value is null)
{
// create new and save
value = factory();
Task CacheAsync() => options is null
? cache.SetStringAsync(key, value, cToken)
: cache.SetStringAsync(key, value, options, cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
}
return value;
}
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="factoryAsync"></param>
/// <param name="options"></param>
/// <param name="cacheInBackground"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<string>> factoryAsync, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
var value = await cache.GetStringAsync(key, cToken);
if(value is null)
{
// create new and save
value = await factoryAsync();
Task CacheAsync() => options is null
? cache.SetStringAsync(key: key, value: value, token: cToken)
: cache.SetStringAsync(key: key, value: value, options: options, token: cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
}
return value;
}
#endregion
#region DateTime
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="factory"></param>
/// <param name="options"></param>
/// <param name="cacheInBackground"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<DateTime> GetOrSetAsync(this IDistributedCache cache, string key, Func<DateTime> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
if (await cache.GetDateTimeAsync(key, cToken) is DateTime dateTimeValue)
return dateTimeValue;
else
{
// create new and save
var newValue = factory();
Task CacheAsync() => options is null
? cache.SetDateTimeAsync(key, newValue, cToken: cToken)
: cache.SetDateTimeAsync(key, newValue, options, cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
return newValue;
}
}
/// <summary>
///
/// </summary>
/// <param name="cache"></param>
/// <param name="key"></param>
/// <param name="factory"></param>
/// <param name="options"></param>
/// <param name="cacheInBackground"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public static async Task<DateTime> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<DateTime>> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
{
if (await cache.GetDateTimeAsync(key, cToken) is DateTime dateTimeValue)
return dateTimeValue;
else
{
// create new and save
var newValue = await factory();
Task CacheAsync() => options is null
? cache.SetDateTimeAsync(key, newValue, cToken: cToken)
: cache.SetDateTimeAsync(key, newValue, options, cToken);
if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), cToken);
else
await CacheAsync();
return newValue;
}
}
#endregion
#endregion
}

View File

@@ -1,14 +1,27 @@
using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Extensions
{
public static class MappingExtensions
{
public static bool Ok(this GtxMessagingResponse gtxMessagingResponse)
=> gtxMessagingResponse.TryGetValue("message-status", out var status)
&& status?.ToString()?.ToLower() == "ok";
namespace EnvelopeGenerator.Application.Extensions;
public static string ToBase64String(this byte[] bytes)
=> Convert.ToBase64String(bytes);
}
/// <summary>
/// Provides extension methods for common mapping and conversion operations.
/// </summary>
public static class MappingExtensions
{
/// <summary>
/// Determines whether the response indicates a successful "OK" message status.
/// </summary>
/// <param name="gtxMessagingResponse">The response object to evaluate.</param>
/// <returns><see langword="true"/> if the response contains a "message-status" key with a value of "ok" (case-insensitive);
/// otherwise, <see langword="false"/>.</returns>
public static bool Ok(this GtxMessagingResponse gtxMessagingResponse)
=> gtxMessagingResponse.TryGetValue("message-status", out var status)
&& status?.ToString()?.ToLower() == "ok";
/// <summary>
/// Converts the specified byte array to its equivalent string representation encoded in base-64.
/// </summary>
/// <param name="bytes">The byte array to encode.</param>
/// <returns>A base-64 encoded string representation of the input byte array.</returns>
public static string ToBase64String(this byte[] bytes)
=> Convert.ToBase64String(bytes);
}

View File

@@ -10,6 +10,7 @@ namespace EnvelopeGenerator.Application.Histories.Queries.Read;
/// </summary>
public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumerable<ReadHistoryResponse>>
{
[Obsolete("Use IRepository")]
private readonly IEnvelopeHistoryRepository _repository;
private readonly IMapper _mapper;
@@ -19,6 +20,7 @@ public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumer
/// </summary>
/// <param name="repository"></param>
/// <param name="mapper"></param>
[Obsolete("Use IRepository")]
public ReadHistoryQueryHandler(IEnvelopeHistoryRepository repository, IMapper mapper)
{
_repository = repository;
@@ -41,4 +43,4 @@ public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumer
return _mapper.Map<IEnumerable<ReadHistoryResponse>>(hists);
}
}
}

View File

@@ -20,7 +20,7 @@ public class ReadHistoryResponse
/// <summary>
/// Gets or sets the reference identifier of the user who performed the action.
/// </summary>
public string UserReference { get; set; }
public required string UserReference { get; set; }
/// <summary>
/// Gets or sets the status code of the envelope.

View File

@@ -74,4 +74,9 @@ public static class Key
///
/// </summary>
public static readonly string Default = nameof(Default);
/// <summary>
///
/// </summary>
public static readonly string DbMigrationTest = nameof(DbMigrationTest);
}

View File

@@ -44,11 +44,11 @@ private readonly IAuthenticator _authenticator;
public EnvelopeMailService(IEmailOutRepository repository, IMapper mapper, IEmailTemplateService tempService, IEnvelopeReceiverService envelopeReceiverService, IOptions<DispatcherParams> dispatcherConfigOptions, IConfigService configService, IOptions<MailParams> mailConfig, IAuthenticator authenticator) : base(repository, mapper)
{
_tempService = tempService;
_envRcvService = envelopeReceiverService;
_dConfig = dispatcherConfigOptions.Value;
_configService = configService;
_placeholders = mailConfig.Value.Placeholders;
_authenticator = authenticator;
_envRcvService = envelopeReceiverService;
_dConfig = dispatcherConfigOptions.Value;
_configService = configService;
_placeholders = new Dictionary<string, string>(mailConfig.Value.Placeholders);
_authenticator = authenticator;
}
private async Task<Dictionary<string, string>> CreatePlaceholders(string? accessCode = null, EnvelopeReceiverDto? envelopeReceiverDto = null)

View File

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

View File

@@ -1,10 +1,11 @@
Imports DigitalData.Modules.Database
Imports System.IO
Imports System.Security.Cryptography
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.CommonServices.Jobs
Imports EnvelopeGenerator.CommonServices.Jobs.FinalizeDocument
Imports GdPicture14
Imports Newtonsoft.Json.Linq
Imports EnvelopeGenerator.CommonServices.Jobs
Imports System.IO
Imports EnvelopeGenerator.CommonServices.Jobs.FinalizeDocument
Public Class frmFinalizePDF
Private Const CONNECTIONSTRING = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=+bk8oAbbQP1AzoHtvZUbd+Mbok2f8Fl4miEx1qssJ5yEaEWoQJ9prg4L14fURpPnqi1WMNs9fE4=;"
@@ -65,6 +66,22 @@ Public Class frmFinalizePDF
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Try
'Dim oEnvelopeData = GetEnvelopeData(oId)
'If oEnvelopeData Is Nothing Then
' Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
' Throw New ArgumentNullException("EnvelopeData")
'End If
'Logger.Debug("Burning Annotations to pdf ...")
'sd
'Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
'If oBurnedDocument Is Nothing Then
' Logger.Warn("Document could not be finalized!")
' Throw New ApplicationException("Document could not be finalized")
'End If
Dim oTable = LoadAnnotationDataForEnvelope()
Dim oJsonList = oTable.Rows.

View File

@@ -123,6 +123,7 @@ Namespace Jobs
Throw New ArgumentNullException("EnvelopeData")
End If
Logger.Debug("Burning Annotations to pdf ...")
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
If oBurnedDocument Is Nothing Then
Logger.Warn("Document could not be finalized!")

View File

@@ -16,6 +16,8 @@ Namespace Jobs.FinalizeDocument
Private Const ANNOTATION_TYPE_IMAGE = "pspdfkit/image"
Private Const ANNOTATION_TYPE_INK = "pspdfkit/ink"
Private Const ANNOTATION_TYPE_WIDGET = "pspdfkit/widget"
Private Annotationheight_min As Double = 0
Private Annotationheight_max As Double = 0
Private Property _pdfBurnerParams As PDFBurnerParams
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, pdfBurnerParams As PDFBurnerParams)
@@ -69,12 +71,14 @@ Namespace Jobs.FinalizeDocument
Try
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
oAnnotationData.annotations.Reverse()
Dim formFieldIndex = 0
Dim formFieldIndex = 0, AnnotationIndex = 0, AnnotationImageIndex = 0
For Each oAnnotation In oAnnotationData.annotations
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
AnnotationIndex += 1
Logger.Debug("Adding AnnotationID: " + oAnnotation.id + " -Index: " + AnnotationIndex.ToString)
Select Case oAnnotation.type
Case ANNOTATION_TYPE_IMAGE
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
AnnotationImageIndex += 1
AddImageAnnotation(AnnotationImageIndex, oAnnotation, oAnnotationData.attachments)
Case ANNOTATION_TYPE_INK
AddInkAnnotation(oAnnotation)
@@ -98,19 +102,26 @@ Namespace Jobs.FinalizeDocument
End Try
End Function
Private Function AddImageAnnotation(pAnnotation As Annotation, pAttachments As Dictionary(Of String, Attachment)) As Boolean
Private Function AddImageAnnotation(pidX As Integer, pAnnotation As Annotation, pAttachments As Dictionary(Of String, Attachment)) As Boolean
Try
Dim oAttachment = pAttachments.Where(Function(a) a.Key = pAnnotation.imageAttachmentId).
SingleOrDefault()
' Convert pixels to Inches
Dim oBounds = pAnnotation.bbox.Select(AddressOf ToInches).ToList()
Dim oX = oBounds.Item(0)
Dim oY = oBounds.Item(1)
Dim oWidth = oBounds.Item(2)
Dim oHeight = oBounds.Item(3)
If pidX = 1 Then
If Annotationheight_min = 0 Then
Annotationheight_min = oHeight
Annotationheight_min = oHeight
End If
End If
Manager.SelectPage(pAnnotation.pageIndex + 1)
Manager.AddEmbeddedImageAnnotFromBase64(oAttachment.Value.binary, oX, oY, oWidth, oHeight)

View File

@@ -152,6 +152,9 @@ Public Class ElementModel
pElement.Id = GetElementId(pElement)
Return True
Else
Dim filledSql As String = GetFilledSql(oCommand)
Logger.Warn(filledSql)
Return False
End If
@@ -161,6 +164,26 @@ Public Class ElementModel
End Try
End Function
Function GetFilledSql(command As SqlCommand) As String
Dim oSql As String = command.CommandText
For Each oParam As SqlParameter In command.Parameters
Dim oValue As String
If oParam.Value Is Nothing OrElse oParam.Value Is DBNull.Value Then
oValue = "NULL"
ElseIf TypeOf oParam.Value Is String OrElse TypeOf oParam.Value Is Date Then
oValue = $"'{oParam.Value.ToString().Replace("'", "''")}'"
ElseIf TypeOf oParam.Value Is Boolean Then
oValue = If(CBool(oParam.Value), "1", "0")
Else
oValue = oParam.Value.ToString()
End If
oSql = oSql.Replace("@" & oParam.ParameterName, oValue)
Next
Return oSql
End Function
Public Function Update(pElement As DocumentReceiverElement) As Boolean
Try
Dim oSql = "UPDATE [dbo].[TBSIG_DOCUMENT_RECEIVER_ELEMENT]

View File

@@ -27,6 +27,7 @@ Public Class EnvelopeModel
Dim oEnvelope = New Envelope() With {
.Id = pRow.ItemEx("GUID", 0),
.Title = pRow.ItemEx("TITLE", ""),
.Comment = pRow.ItemEx("COMMENT", ""),
.EnvelopeTypeId = pRow.ItemEx("ENVELOPE_TYPE", 0),
.ContractType = pRow.ItemEx("CONTRACT_TYPE", 0),
.Uuid = pRow.ItemEx("ENVELOPE_UUID", ""),

View File

@@ -57,7 +57,9 @@ Public Class ActionService
Public Function ResendReceiver(pEnvelope As Domain.Entities.Envelope, pReceiver As Receiver) As Boolean
Return EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
End Function
Public Function ManuallySendAccessCode(pEnvelope As Domain.Entities.Envelope, pReceiver As Receiver) As Boolean
Return EmailService.SendDocumentAccessCodeReceivedEmail(pEnvelope, pReceiver)
End Function
Public Function DeleteEnvelope(pEnvelope As Domain.Entities.Envelope, pReason As String) As Boolean
Dim oStatus As EnvelopeStatus

View File

@@ -325,7 +325,11 @@ Namespace My.Resources
Return ResourceManager.GetString("Invitation successfully resend", resourceCulture)
End Get
End Property
Public Shared ReadOnly Property AccessCode_successfully_send() As String
Get
Return ResourceManager.GetString("AccessCode manually send", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Fehlendes Dokument ähnelt.
'''</summary>

View File

@@ -6,14 +6,12 @@ namespace EnvelopeGenerator.Domain.Entities
[Table("TBSIG_CONFIG", Schema = "dbo")]
public class Config
{
[Column("DOCUMENT_PATH", TypeName = "nvarchar(256)")]
public string DocumentPath { get; set; }
[Column("SENDING_PROFILE", TypeName = "int")]
[Required]
public int SendingProfile { get; set; }
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
[Required]
public string SignatureHost { get; set; }
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]

View File

@@ -56,6 +56,9 @@ namespace EnvelopeGenerator.Domain.Entities
[Column("TITLE", TypeName = "nvarchar(128)")]
public string Title { get; set; } = string.Empty;
[Column("COMMENT", TypeName = "nvarchar(128)")]
public string Comment { get; set; } = string.Empty;
[Column("CONTRACT_TYPE")]
public int ContractType { get; set; }
@@ -126,7 +129,7 @@ namespace EnvelopeGenerator.Domain.Entities
public bool IsAlreadySent => Status > (int)Constants.EnvelopeStatus.EnvelopeSaved;
[NotMapped]
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(Status.ToString());
public string StatusTranslated => My.Resources.Model.ResourceManager.GetString(((Constants.EnvelopeStatus)Status).ToString());
[NotMapped]
public bool TFA_Enabled { get; set; } = false;
@@ -135,12 +138,15 @@ namespace EnvelopeGenerator.Domain.Entities
public byte[] DOC_RESULT { get; set; }
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<EnvelopeDocument> Documents { get; set; } = new List<EnvelopeDocument>();
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<EnvelopeHistory> History { get; set; } = new List<EnvelopeHistory>();
// TODO: * Check the Form App and remove the default value
[NotMapped]
public List<Receiver> Receivers { get; set; } = new List<Receiver>();
/// <summary>

View File

@@ -38,10 +38,8 @@ namespace EnvelopeGenerator.Domain.Entities
[Column("COMMENT", TypeName = "nvarchar(max)")]
public string Comment { get; set; }
[ForeignKey("UserReference")]
public virtual User Sender { get; set; }
[ForeignKey("UserReference")]
public virtual Receiver Receiver { get; set; }
[NotMapped]

View File

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

View File

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

View File

@@ -23,7 +23,7 @@ namespace EnvelopeGenerator.Domain.Entities
[NotMapped]
public Envelope Envelope { get; set; }
[Column("RECEIVER_MAIL")]
[Column("RECEIVER_MAIL", TypeName = "nvarchar(250)")]
[Required]
[StringLength(250)]
[TemplatePlaceholder("NAME_RECEIVER")]
@@ -33,9 +33,9 @@ namespace EnvelopeGenerator.Domain.Entities
[Required]
public DateTime DateValid { get; set; }
[Column("ADDED_WHO")]
[Column("ADDED_WHO", TypeName = "nvarchar(250)")]
[Required]
[StringLength(100)]
[StringLength(250)]
public string AddedWho { get; set; }
public Receiver Receiver { get; set; }

View File

@@ -17,7 +17,8 @@ namespace EnvelopeGenerator.Domain.Entities
public int Id { get; set; }
[Required, EmailAddress]
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(250)")]
[StringLength(250)]
public string EmailAddress { get; set; }
[Required]

View File

@@ -1,39 +0,0 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
#if NETFRAMEWORK
using System;
#endif
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_USER_RECEIVER", Schema = "dbo")]
public class UserReceiver
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("USER_ID")]
public int UserId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("NAME", TypeName = "nvarchar(128)")]
public string Name { get; set; }
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
public string CompanyName { get; set; }
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
public string JobTitle { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
}
}

View File

@@ -2,6 +2,8 @@
<PropertyGroup>
<TargetFrameworks>net462;net7.0;net8.0;net9.0</TargetFrameworks>
<AssemblyVersion>1.4.0</AssemblyVersion>
<FileVersion>1.4.0</FileVersion>
</PropertyGroup>
<PropertyGroup Condition="'$(TargetFramework)' == 'net462'">

View File

@@ -60,6 +60,15 @@ namespace My.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Der Zugangs Code wurde erfolgreich an [@Mail] versendet! ähnelt.
/// </summary>
public static string AccessCode_manually_send {
get {
return ResourceManager.GetString("AccessCode manually send", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bitte wählen Sie die PDF-Dokumente die Sie verketten möchten: ähnelt.
/// </summary>
@@ -150,6 +159,15 @@ namespace My.Resources {
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Aktuell sind per Drag and Drop nur PDF-Dateien erlaubt. ähnelt.
/// </summary>
public static string Drop_only_pdf {
get {
return ResourceManager.GetString("Drop only pdf", resourceCulture);
}
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Bearbeite Umschlag ähnelt.
/// </summary>
@@ -241,8 +259,8 @@ namespace My.Resources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die The mobile phone number [@PhoneNr] could not be validated.
///Pattern: +491234567890 ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Die Mobiltelefonnummer [@PhoneNr] konnte nicht validiert werden.
///Muster: +491234567890 ähnelt.
/// </summary>
public static string Error_phone_Validation {
get {
@@ -368,7 +386,7 @@ namespace My.Resources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Not translated ähnelt.
/// </summary>
public static string ModificationOriginFile_FormFields {
get {
@@ -476,7 +494,7 @@ namespace My.Resources {
}
/// <summary>
/// Sucht eine lokalisierte Zeichenfolge, die Es sind ungespeicherte Änderungen vorhanden. Wollen Sie diese Speichern? ähnelt.
/// Sucht eine lokalisierte Zeichenfolge, die Es sind ungespeicherte Änderungen vorhanden. Wollen Sie diese speichern? ähnelt.
/// </summary>
public static string There_are_unsaved_changes {
get {

View File

@@ -147,9 +147,6 @@
<data name="Drop only one file" xml:space="preserve">
<value>Currently, only one PDF file is permitted via drag and drop.</value>
</data>
<data name="Drop only pdf" xml:space="preserve">
<value />
</data>
<data name="Edit Envelope" xml:space="preserve">
<value>Edit Envelope</value>
</data>
@@ -181,7 +178,8 @@
<value>The email [ @Mail ] could not be varified!</value>
</data>
<data name="Error phone Validation" xml:space="preserve">
<value />
<value>The mobile phone number [@PhoneNr] could not be validated.
Pattern: +491234567890</value>
</data>
<data name="Error sending the envelope" xml:space="preserve">
<value>Error sending the envelope:</value>
@@ -222,6 +220,9 @@
<data name="Missing Receivers" xml:space="preserve">
<value>Missing Receivers</value>
</data>
<data name="ModificationOriginFile_FormFields" xml:space="preserve">
<value>Not translated</value>
</data>
<data name="New Envelope" xml:space="preserve">
<value>New Envelope</value>
</data>
@@ -255,10 +256,16 @@
<data name="There are already elements for this recipient" xml:space="preserve">
<value>There are already elements for this recipient. Do you still want to delete the recipient?</value>
</data>
<data name="There are unsaved changes." xml:space="preserve">
<data name="There are unsaved changes" xml:space="preserve">
<value>There are unsaved changes. Do you want to save them?</value>
</data>
<data name="You received a document to sign" xml:space="preserve">
<value>You received a document to sign:</value>
</data>
<data name="Drop only pdf" xml:space="preserve">
<value>Currently, only PDF files are allowed via drag and drop.</value>
</data>
<data name="AccessCode manually send" xml:space="preserve">
<value>The access code was successfully sent to [@Mail]!</value>
</data>
</root>

View File

@@ -178,8 +178,8 @@
<value>Die Email-Adresse [ @Mail ] konnte nicht validiert werden!</value>
</data>
<data name="Error phone Validation" xml:space="preserve">
<value>The mobile phone number [@PhoneNr] could not be validated.
Pattern: +491234567890</value>
<value>Die Mobiltelefonnummer [@PhoneNr] konnte nicht validiert werden.
Muster: +491234567890</value>
</data>
<data name="Error sending the envelope" xml:space="preserve">
<value>Fehler beim Senden des Umschlags:</value>
@@ -221,7 +221,7 @@ Pattern: +491234567890</value>
<value>Fehlende Empfänger</value>
</data>
<data name="ModificationOriginFile_FormFields" xml:space="preserve">
<value />
<value>Not translated</value>
</data>
<data name="New Envelope" xml:space="preserve">
<value>Neuer Umschlag</value>
@@ -257,9 +257,15 @@ Pattern: +491234567890</value>
<value>Es gibt für diesen Empfänger bereits Elemente. Wollen Sie den Empfänger trotzdem löschen?</value>
</data>
<data name="There are unsaved changes" xml:space="preserve">
<value>Es sind ungespeicherte Änderungen vorhanden. Wollen Sie diese Speichern?</value>
<value>Es sind ungespeicherte Änderungen vorhanden. Wollen Sie diese speichern?</value>
</data>
<data name="You received a document to sign" xml:space="preserve">
<value>Sie haben ein Dokument zum signieren erhalten:</value>
</data>
<data name="Drop only pdf" xml:space="preserve">
<value>Aktuell sind per Drag and Drop nur PDF-Dateien erlaubt.</value>
</data>
<data name="AccessCode manually send" xml:space="preserve">
<value>Der Zugangs Code wurde erfolgreich an [@Mail] versendet!</value>
</data>
</root>

View File

@@ -132,6 +132,9 @@
<data name="Completed" xml:space="preserve">
<value>Completed</value>
</data>
<data name="CompletelySigned" xml:space="preserve">
<value>Completely signed</value>
</data>
<data name="Contract" xml:space="preserve">
<value>Contract</value>
</data>

View File

@@ -50,6 +50,11 @@ Public Class EnvelopeEditorController
Public Function ValidateEnvelopeForSending(pErrors As List(Of String)) As List(Of String)
Dim oEnvelopeErrors = pErrors
Dim requiresSignature = (Envelope.ContractType = ContractType.ReadAndSign)
If requiresSignature = False Then
Return oEnvelopeErrors
End If
If ElementModel.ElementsExist(Envelope.Id) = False Then
oEnvelopeErrors.Add(Resources.Envelope.Missing_Elements)
End If

View File

@@ -101,6 +101,9 @@
<Reference Include="DigitalData.Modules.Messaging, Version=1.9.8.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\DigitalData.Modules.Messaging.1.9.8\lib\net462\DigitalData.Modules.Messaging.dll</HintPath>
</Reference>
<Reference Include="DigitalData.UserManager.Domain, Version=3.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\UserManager.Domain.3.2.2\lib\net462\DigitalData.UserManager.Domain.dll</HintPath>
</Reference>
<Reference Include="DocumentFormat.OpenXml, Version=3.2.0.0, Culture=neutral, PublicKeyToken=8fb06cb64d019a17, processorArchitecture=MSIL">
<HintPath>..\packages\DocumentFormat.OpenXml.3.2.0\lib\net46\DocumentFormat.OpenXml.dll</HintPath>
</Reference>
@@ -238,6 +241,9 @@
<Reference Include="System.Collections.Immutable, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.Collections.Immutable.9.0.0\lib\net462\System.Collections.Immutable.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
<HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
</Reference>
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" />
<Reference Include="System.Core" />
@@ -245,6 +251,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.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>
<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>

View File

@@ -424,7 +424,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlGroup4.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup5})
Me.LayoutControlGroup4.Name = "LayoutControlGroup4"
Me.LayoutControlGroup4.Padding = New DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0)
Me.LayoutControlGroup4.Size = New System.Drawing.Size(251, 530)
Me.LayoutControlGroup4.Size = New System.Drawing.Size(251, 418)
Me.LayoutControlGroup4.TextVisible = False
'
'LayoutControlGroup5
@@ -432,7 +432,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlGroup5.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem5})
Me.LayoutControlGroup5.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlGroup5.Name = "LayoutControlGroup5"
Me.LayoutControlGroup5.Size = New System.Drawing.Size(251, 530)
Me.LayoutControlGroup5.Size = New System.Drawing.Size(251, 418)
resources.ApplyResources(Me.LayoutControlGroup5, "LayoutControlGroup5")
'
'LayoutControlItem5
@@ -440,7 +440,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlItem5.Control = Me.GridDocuments
Me.LayoutControlItem5.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlItem5.Name = "LayoutControlItem5"
Me.LayoutControlItem5.Size = New System.Drawing.Size(227, 485)
Me.LayoutControlItem5.Size = New System.Drawing.Size(227, 373)
Me.LayoutControlItem5.TextSize = New System.Drawing.Size(0, 0)
Me.LayoutControlItem5.TextVisible = False
'
@@ -594,7 +594,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlGroup2.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup3})
Me.LayoutControlGroup2.Name = "LayoutControlGroup2"
Me.LayoutControlGroup2.Padding = New DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0)
Me.LayoutControlGroup2.Size = New System.Drawing.Size(899, 249)
Me.LayoutControlGroup2.Size = New System.Drawing.Size(796, 249)
Me.LayoutControlGroup2.TextVisible = False
'
'LayoutControlGroup3
@@ -602,7 +602,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlGroup3.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem2})
Me.LayoutControlGroup3.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlGroup3.Name = "LayoutControlGroup3"
Me.LayoutControlGroup3.Size = New System.Drawing.Size(899, 249)
Me.LayoutControlGroup3.Size = New System.Drawing.Size(796, 249)
resources.ApplyResources(Me.LayoutControlGroup3, "LayoutControlGroup3")
'
'LayoutControlItem2
@@ -610,7 +610,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlItem2.Control = Me.GridReceivers
Me.LayoutControlItem2.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlItem2.Name = "LayoutControlItem2"
Me.LayoutControlItem2.Size = New System.Drawing.Size(875, 204)
Me.LayoutControlItem2.Size = New System.Drawing.Size(772, 204)
Me.LayoutControlItem2.TextSize = New System.Drawing.Size(0, 0)
Me.LayoutControlItem2.TextVisible = False
'
@@ -644,7 +644,7 @@ Partial Public Class frmEnvelopeEditor
Me.Root.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlGroup1})
Me.Root.Name = "Root"
Me.Root.Padding = New DevExpress.XtraLayout.Utils.Padding(0, 0, 0, 0)
Me.Root.Size = New System.Drawing.Size(899, 263)
Me.Root.Size = New System.Drawing.Size(796, 151)
Me.Root.TextVisible = False
'
'LayoutControlGroup1
@@ -653,7 +653,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlGroup1.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlGroup1.Name = "LayoutControlGroup1"
Me.LayoutControlGroup1.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlGroup1.Size = New System.Drawing.Size(899, 263)
Me.LayoutControlGroup1.Size = New System.Drawing.Size(796, 151)
resources.ApplyResources(Me.LayoutControlGroup1, "LayoutControlGroup1")
'
'LayoutControlItem3
@@ -662,7 +662,7 @@ Partial Public Class frmEnvelopeEditor
Me.LayoutControlItem3.Location = New System.Drawing.Point(0, 0)
Me.LayoutControlItem3.Name = "LayoutControlItem3"
Me.LayoutControlItem3.Padding = New DevExpress.XtraLayout.Utils.Padding(10, 10, 10, 10)
Me.LayoutControlItem3.Size = New System.Drawing.Size(873, 216)
Me.LayoutControlItem3.Size = New System.Drawing.Size(770, 104)
resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3")
Me.LayoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(46, 13)

View File

@@ -485,13 +485,13 @@
<value>Start</value>
</data>
<data name="RibbonControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>1164, 132</value>
<value>1061, 132</value>
</data>
<data name="RibbonStatusBar1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 662</value>
<value>0, 550</value>
</data>
<data name="RibbonStatusBar1.Size" type="System.Drawing.Size, System.Drawing">
<value>1164, 22</value>
<value>1061, 22</value>
</data>
<data name="&gt;&gt;RibbonStatusBar1.Name" xml:space="preserve">
<value>RibbonStatusBar1</value>
@@ -518,7 +518,7 @@
<value>2</value>
</data>
<data name="GridDocuments.Size" type="System.Drawing.Size, System.Drawing">
<value>223, 481</value>
<value>223, 369</value>
</data>
<data name="GridDocuments.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -545,7 +545,7 @@
<value>Ihre Dokumente</value>
</data>
<data name="LayoutControl3.Size" type="System.Drawing.Size, System.Drawing">
<value>251, 530</value>
<value>251, 418</value>
</data>
<data name="LayoutControl3.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -627,7 +627,7 @@
<value>0</value>
</data>
<data name="colColor.Width" type="System.Int32, mscorlib">
<value>32</value>
<value>54</value>
</data>
<data name="RepositoryItemComboBox1.AutoHeight" type="System.Boolean, mscorlib">
<value>False</value>
@@ -696,7 +696,7 @@
<value>Combo</value>
</data>
<data name="GridReceivers.Size" type="System.Drawing.Size, System.Drawing">
<value>871, 200</value>
<value>768, 200</value>
</data>
<data name="GridReceivers.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -726,7 +726,7 @@
<value>Empfänger</value>
</data>
<data name="LayoutControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>899, 249</value>
<value>796, 249</value>
</data>
<data name="LayoutControl2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -756,7 +756,7 @@
<value>0, 0, 0, 0</value>
</data>
<data name="PanelControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>903, 253</value>
<value>800, 253</value>
</data>
<data name="PanelControl1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -795,7 +795,7 @@
<value>Segoe UI, 9.75pt</value>
</data>
<data name="txtMessage.Size" type="System.Drawing.Size, System.Drawing">
<value>853, 180</value>
<value>750, 68</value>
</data>
<data name="txtMessage.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
@@ -825,7 +825,7 @@
<value>Ihre Nachricht</value>
</data>
<data name="LayoutControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>899, 263</value>
<value>796, 151</value>
</data>
<data name="LayoutControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -855,7 +855,7 @@
<value>0, 0, 0, 0</value>
</data>
<data name="PanelControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>903, 267</value>
<value>800, 155</value>
</data>
<data name="PanelControl2.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -888,7 +888,7 @@
<value>1</value>
</data>
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>903, 530</value>
<value>800, 418</value>
</data>
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -921,7 +921,7 @@
<value>1</value>
</data>
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>1164, 530</value>
<value>1061, 418</value>
</data>
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -985,7 +985,7 @@
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>1164, 684</value>
<value>1061, 572</value>
</data>
<data name="frmEnvelopeEditor.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>

View File

@@ -123,7 +123,7 @@
</data>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="SplitContainerControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 59</value>
<value>0, 132</value>
</data>
<data name="ThumbnailEx2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
@@ -132,7 +132,7 @@
<value>0, 0</value>
</data>
<data name="ThumbnailEx2.Size" type="System.Drawing.Size, System.Drawing">
<value>199, 600</value>
<value>199, 402</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="ThumbnailEx2.TabIndex" type="System.Int32, mscorlib">
@@ -172,7 +172,7 @@
<value>0, 0</value>
</data>
<data name="DocumentViewer1.Size" type="System.Drawing.Size, System.Drawing">
<value>917, 600</value>
<value>577, 402</value>
</data>
<data name="DocumentViewer1.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
@@ -205,7 +205,7 @@
<value>1</value>
</data>
<data name="SplitContainerControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>1126, 600</value>
<value>786, 402</value>
</data>
<data name="SplitContainerControl1.TabIndex" type="System.Int32, mscorlib">
<value>15</value>
@@ -397,7 +397,7 @@
<value>Combo</value>
</data>
<data name="ribbonControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>1126, 88</value>
<value>786, 132</value>
</data>
<data name="&gt;&gt;ribbonControl1.Name" xml:space="preserve">
<value>ribbonControl1</value>
@@ -427,7 +427,7 @@
<value>0, 0</value>
</data>
<data name="barDockControlTop.Size" type="System.Drawing.Size, System.Drawing">
<value>1126, 0</value>
<value>786, 0</value>
</data>
<data name="&gt;&gt;barDockControlTop.Name" xml:space="preserve">
<value>barDockControlTop</value>
@@ -445,10 +445,10 @@
<value>Bottom</value>
</data>
<data name="barDockControlBottom.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 659</value>
<value>0, 534</value>
</data>
<data name="barDockControlBottom.Size" type="System.Drawing.Size, System.Drawing">
<value>1126, 0</value>
<value>786, 0</value>
</data>
<data name="&gt;&gt;barDockControlBottom.Name" xml:space="preserve">
<value>barDockControlBottom</value>
@@ -469,7 +469,7 @@
<value>0, 0</value>
</data>
<data name="barDockControlLeft.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 659</value>
<value>0, 534</value>
</data>
<data name="&gt;&gt;barDockControlLeft.Name" xml:space="preserve">
<value>barDockControlLeft</value>
@@ -487,10 +487,10 @@
<value>Right</value>
</data>
<data name="barDockControlRight.Location" type="System.Drawing.Point, System.Drawing">
<value>1126, 0</value>
<value>786, 0</value>
</data>
<data name="barDockControlRight.Size" type="System.Drawing.Size, System.Drawing">
<value>0, 659</value>
<value>0, 534</value>
</data>
<data name="&gt;&gt;barDockControlRight.Name" xml:space="preserve">
<value>barDockControlRight</value>
@@ -511,7 +511,7 @@
<value>6, 13</value>
</data>
<data name="$this.ClientSize" type="System.Drawing.Size, System.Drawing">
<value>1689, 988</value>
<value>786, 534</value>
</data>
<data name="$this.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 8.25pt</value>

View File

@@ -243,7 +243,7 @@ Partial Public Class frmFieldEditor
If oElement IsNot Nothing Then
oStickyNote.Tag = GetAnnotationTag(SelectedReceiver.Id, oPage, oElement.Id)
Else
MsgBox("No Element for Update found!")
'MsgBox("No Element for Update found!")
Logger.Error("No Element for Update found!")
End If
End If

View File

@@ -67,10 +67,12 @@ Partial Class frmMain
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
Me.bbtnitm2Faktor = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupFunctions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupReceiver = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@@ -87,6 +89,7 @@ Partial Class frmMain
Me.ColHistoryDateCompleted = New DevExpress.XtraGrid.Columns.GridColumn()
Me.ViewCompleted = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.GridColumn3 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn6 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn7 = New DevExpress.XtraGrid.Columns.GridColumn()
@@ -166,7 +169,7 @@ Partial Class frmMain
'SplitContainerControl1.Panel2
'
resources.ApplyResources(Me.SplitContainerControl1.Panel2, "SplitContainerControl1.Panel2")
Me.SplitContainerControl1.SplitterPosition = 272
Me.SplitContainerControl1.SplitterPosition = 335
'
'XtraTabControlMain
'
@@ -178,8 +181,8 @@ Partial Class frmMain
'XtraTabPage1
'
Me.XtraTabPage1.Controls.Add(Me.GridEnvelopes)
Me.XtraTabPage1.Name = "XtraTabPage1"
resources.ApplyResources(Me.XtraTabPage1, "XtraTabPage1")
Me.XtraTabPage1.Name = "XtraTabPage1"
'
'GridEnvelopes
'
@@ -188,6 +191,7 @@ Partial Class frmMain
Me.GridEnvelopes.EmbeddedNavigator.Anchor = CType(resources.GetObject("GridEnvelopes.EmbeddedNavigator.Anchor"), System.Windows.Forms.AnchorStyles)
Me.GridEnvelopes.EmbeddedNavigator.BackgroundImageLayout = CType(resources.GetObject("GridEnvelopes.EmbeddedNavigator.BackgroundImageLayout"), System.Windows.Forms.ImageLayout)
Me.GridEnvelopes.EmbeddedNavigator.ImeMode = CType(resources.GetObject("GridEnvelopes.EmbeddedNavigator.ImeMode"), System.Windows.Forms.ImeMode)
Me.GridEnvelopes.EmbeddedNavigator.Margin = CType(resources.GetObject("GridEnvelopes.EmbeddedNavigator.Margin"), System.Windows.Forms.Padding)
Me.GridEnvelopes.EmbeddedNavigator.TextLocation = CType(resources.GetObject("GridEnvelopes.EmbeddedNavigator.TextLocation"), DevExpress.XtraEditors.NavigatorButtonsTextLocation)
Me.GridEnvelopes.EmbeddedNavigator.ToolTipIconType = CType(resources.GetObject("GridEnvelopes.EmbeddedNavigator.ToolTipIconType"), DevExpress.Utils.ToolTipIconType)
GridLevelNode1.LevelTemplate = Me.ViewReceivers
@@ -204,6 +208,7 @@ Partial Class frmMain
'ViewReceivers
'
Me.ViewReceivers.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.ColReceiverStatus, Me.ColName, Me.ColEmail, Me.ColSignedDate, Me.colAccessCode, Me.ColStatusReceiver})
Me.ViewReceivers.DetailHeight = 431
Me.ViewReceivers.GridControl = Me.GridEnvelopes
Me.ViewReceivers.Name = "ViewReceivers"
Me.ViewReceivers.OptionsBehavior.Editable = False
@@ -218,6 +223,7 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColReceiverStatus, "ColReceiverStatus")
Me.ColReceiverStatus.FieldName = "StatusTranslated"
Me.ColReceiverStatus.MinWidth = 27
Me.ColReceiverStatus.Name = "ColReceiverStatus"
Me.ColReceiverStatus.OptionsColumn.AllowEdit = False
'
@@ -225,6 +231,7 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColName, "ColName")
Me.ColName.FieldName = "Name"
Me.ColName.MinWidth = 27
Me.ColName.Name = "ColName"
Me.ColName.OptionsColumn.AllowEdit = False
'
@@ -232,6 +239,7 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColEmail, "ColEmail")
Me.ColEmail.FieldName = "EmailAddress"
Me.ColEmail.MinWidth = 27
Me.ColEmail.Name = "ColEmail"
Me.ColEmail.OptionsColumn.AllowEdit = False
'
@@ -239,6 +247,7 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColSignedDate, "ColSignedDate")
Me.ColSignedDate.FieldName = "SignedDateDisplayValue"
Me.ColSignedDate.MinWidth = 27
Me.ColSignedDate.Name = "ColSignedDate"
Me.ColSignedDate.OptionsColumn.AllowEdit = False
'
@@ -246,17 +255,20 @@ Partial Class frmMain
'
resources.ApplyResources(Me.colAccessCode, "colAccessCode")
Me.colAccessCode.FieldName = "AccessCode"
Me.colAccessCode.MinWidth = 27
Me.colAccessCode.Name = "colAccessCode"
'
'ColStatusReceiver
'
resources.ApplyResources(Me.ColStatusReceiver, "ColStatusReceiver")
Me.ColStatusReceiver.FieldName = "Status"
Me.ColStatusReceiver.MinWidth = 27
Me.ColStatusReceiver.Name = "ColStatusReceiver"
'
'ViewHistory
'
Me.ViewHistory.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.ColHistoryStatus, Me.ColHistoryUserReference, Me.ColHistoryDate})
Me.ViewHistory.DetailHeight = 431
Me.ViewHistory.GridControl = Me.GridEnvelopes
Me.ViewHistory.Name = "ViewHistory"
Me.ViewHistory.OptionsBehavior.Editable = False
@@ -269,12 +281,14 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColHistoryStatus, "ColHistoryStatus")
Me.ColHistoryStatus.FieldName = "StatusTranslated"
Me.ColHistoryStatus.MinWidth = 27
Me.ColHistoryStatus.Name = "ColHistoryStatus"
'
'ColHistoryUserReference
'
resources.ApplyResources(Me.ColHistoryUserReference, "ColHistoryUserReference")
Me.ColHistoryUserReference.FieldName = "UserReference"
Me.ColHistoryUserReference.MinWidth = 27
Me.ColHistoryUserReference.Name = "ColHistoryUserReference"
'
'ColHistoryDate
@@ -283,11 +297,13 @@ Partial Class frmMain
Me.ColHistoryDate.DisplayFormat.FormatString = "G"
Me.ColHistoryDate.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.ColHistoryDate.FieldName = "ActionDate"
Me.ColHistoryDate.MinWidth = 27
Me.ColHistoryDate.Name = "ColHistoryDate"
'
'ViewEnvelopes
'
Me.ViewEnvelopes.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colEnvelopeId, Me.colContractType, Me.colStatus, Me.colTitle, Me.colAddedWhen, Me.GridColumn2})
Me.ViewEnvelopes.DetailHeight = 431
Me.ViewEnvelopes.GridControl = Me.GridEnvelopes
Me.ViewEnvelopes.Name = "ViewEnvelopes"
Me.ViewEnvelopes.OptionsBehavior.Editable = False
@@ -299,24 +315,28 @@ Partial Class frmMain
'
resources.ApplyResources(Me.colEnvelopeId, "colEnvelopeId")
Me.colEnvelopeId.FieldName = "Id"
Me.colEnvelopeId.MinWidth = 27
Me.colEnvelopeId.Name = "colEnvelopeId"
'
'colContractType
'
resources.ApplyResources(Me.colContractType, "colContractType")
Me.colContractType.FieldName = "EnvelopeTypeTitle"
Me.colContractType.MinWidth = 27
Me.colContractType.Name = "colContractType"
'
'colStatus
'
resources.ApplyResources(Me.colStatus, "colStatus")
Me.colStatus.FieldName = "StatusTranslated"
Me.colStatus.MinWidth = 27
Me.colStatus.Name = "colStatus"
'
'colTitle
'
resources.ApplyResources(Me.colTitle, "colTitle")
Me.colTitle.FieldName = "Title"
Me.colTitle.MinWidth = 27
Me.colTitle.Name = "colTitle"
'
'colAddedWhen
@@ -325,6 +345,7 @@ Partial Class frmMain
Me.colAddedWhen.DisplayFormat.FormatString = "G"
Me.colAddedWhen.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.colAddedWhen.FieldName = "AddedWhen"
Me.colAddedWhen.MinWidth = 27
Me.colAddedWhen.Name = "colAddedWhen"
'
'GridColumn2
@@ -333,17 +354,20 @@ Partial Class frmMain
Me.GridColumn2.DisplayFormat.FormatString = "G"
Me.GridColumn2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.GridColumn2.FieldName = "ChangedWhen"
Me.GridColumn2.MinWidth = 27
Me.GridColumn2.Name = "GridColumn2"
'
'RibbonControl
'
Me.RibbonControl.EmptyAreaImageOptions.ImagePadding = New System.Windows.Forms.Padding(40, 37, 40, 37)
Me.RibbonControl.ExpandCollapseItem.Id = 0
Me.RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex"), Integer)
Me.RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex"), Integer)
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnCreateEnvelope, Me.btnEditEnvelope, Me.btnDeleteEnvelope, Me.BarButtonItem1, Me.txtRefreshLabel, Me.btnShowDocument, Me.btnContactReceiver, Me.txtEnvelopeIdLabel, Me.btnOpenLogDirectory, Me.BarCheckItem1, Me.bsitmInfo, Me.bbtnitmEB, Me.bbtnitmInfoMail, Me.bbtnitm_ResendInvitation, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarStaticItemGhost, Me.bbtnitm2Faktor})
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnCreateEnvelope, Me.btnEditEnvelope, Me.btnDeleteEnvelope, Me.BarButtonItem1, Me.txtRefreshLabel, Me.btnShowDocument, Me.btnContactReceiver, Me.txtEnvelopeIdLabel, Me.btnOpenLogDirectory, Me.BarCheckItem1, Me.bsitmInfo, Me.bbtnitmEB, Me.bbtnitmInfoMail, Me.bbtnitm_ResendInvitation, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarStaticItemGhost, Me.bbtnitm2Faktor, Me.BarButtonItem2})
resources.ApplyResources(Me.RibbonControl, "RibbonControl")
Me.RibbonControl.MaxItemId = 21
Me.RibbonControl.MaxItemId = 22
Me.RibbonControl.Name = "RibbonControl"
Me.RibbonControl.OptionsMenuMinWidth = 440
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2})
Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
Me.RibbonControl.ShowPageHeadersMode = DevExpress.XtraBars.Ribbon.ShowPageHeadersMode.Show
@@ -507,9 +531,16 @@ Partial Class frmMain
Me.bbtnitm2Faktor.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitm2Faktor.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.bbtnitm2Faktor.Name = "bbtnitm2Faktor"
'
'BarButtonItem2
'
resources.ApplyResources(Me.BarButtonItem2, "BarButtonItem2")
Me.BarButtonItem2.Id = 21
Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem2.Name = "BarButtonItem2"
'
'RibbonPage1
'
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions})
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions, Me.RibbonPageGroupReceiver})
Me.RibbonPage1.Name = "RibbonPage1"
resources.ApplyResources(Me.RibbonPage1, "RibbonPage1")
'
@@ -532,14 +563,21 @@ Partial Class frmMain
'RibbonPageGroupFunctions
'
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnShowDocument)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitm_ResendInvitation)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnContactReceiver)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitm2Faktor)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmEB)
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmInfoMail)
Me.RibbonPageGroupFunctions.Name = "RibbonPageGroupFunctions"
resources.ApplyResources(Me.RibbonPageGroupFunctions, "RibbonPageGroupFunctions")
'
'RibbonPageGroupReceiver
'
Me.RibbonPageGroupReceiver.Enabled = False
Me.RibbonPageGroupReceiver.ItemLinks.Add(Me.bbtnitm_ResendInvitation)
Me.RibbonPageGroupReceiver.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroupReceiver.ItemLinks.Add(Me.bbtnitm2Faktor)
Me.RibbonPageGroupReceiver.ItemLinks.Add(Me.btnContactReceiver)
Me.RibbonPageGroupReceiver.Name = "RibbonPageGroupReceiver"
resources.ApplyResources(Me.RibbonPageGroupReceiver, "RibbonPageGroupReceiver")
'
'RibbonPage2
'
Me.RibbonPage2.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup3})
@@ -567,8 +605,8 @@ Partial Class frmMain
'XtraTabPage2
'
Me.XtraTabPage2.Controls.Add(Me.GridCompleted)
Me.XtraTabPage2.Name = "XtraTabPage2"
resources.ApplyResources(Me.XtraTabPage2, "XtraTabPage2")
Me.XtraTabPage2.Name = "XtraTabPage2"
'
'GridCompleted
'
@@ -577,6 +615,7 @@ Partial Class frmMain
Me.GridCompleted.EmbeddedNavigator.Anchor = CType(resources.GetObject("GridCompleted.EmbeddedNavigator.Anchor"), System.Windows.Forms.AnchorStyles)
Me.GridCompleted.EmbeddedNavigator.BackgroundImageLayout = CType(resources.GetObject("GridCompleted.EmbeddedNavigator.BackgroundImageLayout"), System.Windows.Forms.ImageLayout)
Me.GridCompleted.EmbeddedNavigator.ImeMode = CType(resources.GetObject("GridCompleted.EmbeddedNavigator.ImeMode"), System.Windows.Forms.ImeMode)
Me.GridCompleted.EmbeddedNavigator.Margin = CType(resources.GetObject("GridCompleted.EmbeddedNavigator.Margin"), System.Windows.Forms.Padding)
Me.GridCompleted.EmbeddedNavigator.TextLocation = CType(resources.GetObject("GridCompleted.EmbeddedNavigator.TextLocation"), DevExpress.XtraEditors.NavigatorButtonsTextLocation)
Me.GridCompleted.EmbeddedNavigator.ToolTipIconType = CType(resources.GetObject("GridCompleted.EmbeddedNavigator.ToolTipIconType"), DevExpress.Utils.ToolTipIconType)
GridLevelNode3.LevelTemplate = Me.ViewReceiversCompleted
@@ -593,6 +632,7 @@ Partial Class frmMain
'ViewReceiversCompleted
'
Me.ViewReceiversCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.ColStatusCompleted, Me.ColNameCompleted, Me.ColEmailCompleted, Me.ColSignedDateCompleted})
Me.ViewReceiversCompleted.DetailHeight = 431
Me.ViewReceiversCompleted.GridControl = Me.GridCompleted
Me.ViewReceiversCompleted.Name = "ViewReceiversCompleted"
Me.ViewReceiversCompleted.OptionsBehavior.Editable = False
@@ -607,29 +647,34 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColStatusCompleted, "ColStatusCompleted")
Me.ColStatusCompleted.FieldName = "StatusTranslated"
Me.ColStatusCompleted.MinWidth = 27
Me.ColStatusCompleted.Name = "ColStatusCompleted"
'
'ColNameCompleted
'
resources.ApplyResources(Me.ColNameCompleted, "ColNameCompleted")
Me.ColNameCompleted.FieldName = "Name"
Me.ColNameCompleted.MinWidth = 27
Me.ColNameCompleted.Name = "ColNameCompleted"
'
'ColEmailCompleted
'
resources.ApplyResources(Me.ColEmailCompleted, "ColEmailCompleted")
Me.ColEmailCompleted.FieldName = "EmailAddress"
Me.ColEmailCompleted.MinWidth = 27
Me.ColEmailCompleted.Name = "ColEmailCompleted"
'
'ColSignedDateCompleted
'
resources.ApplyResources(Me.ColSignedDateCompleted, "ColSignedDateCompleted")
Me.ColSignedDateCompleted.FieldName = "SignedDateDisplayValue"
Me.ColSignedDateCompleted.MinWidth = 27
Me.ColSignedDateCompleted.Name = "ColSignedDateCompleted"
'
'ViewHistoryCompleted
'
Me.ViewHistoryCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.ColHistoryStatusCompleted, Me.ColHistoryUserReferenceCompleted, Me.ColHistoryDateCompleted})
Me.ViewHistoryCompleted.DetailHeight = 431
Me.ViewHistoryCompleted.GridControl = Me.GridCompleted
Me.ViewHistoryCompleted.Name = "ViewHistoryCompleted"
Me.ViewHistoryCompleted.OptionsBehavior.Editable = False
@@ -644,12 +689,14 @@ Partial Class frmMain
'
resources.ApplyResources(Me.ColHistoryStatusCompleted, "ColHistoryStatusCompleted")
Me.ColHistoryStatusCompleted.FieldName = "StatusTranslated"
Me.ColHistoryStatusCompleted.MinWidth = 27
Me.ColHistoryStatusCompleted.Name = "ColHistoryStatusCompleted"
'
'ColHistoryUserReferenceCompleted
'
resources.ApplyResources(Me.ColHistoryUserReferenceCompleted, "ColHistoryUserReferenceCompleted")
Me.ColHistoryUserReferenceCompleted.FieldName = "UserReference"
Me.ColHistoryUserReferenceCompleted.MinWidth = 27
Me.ColHistoryUserReferenceCompleted.Name = "ColHistoryUserReferenceCompleted"
'
'ColHistoryDateCompleted
@@ -658,11 +705,13 @@ Partial Class frmMain
Me.ColHistoryDateCompleted.DisplayFormat.FormatString = "G"
Me.ColHistoryDateCompleted.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.ColHistoryDateCompleted.FieldName = "ActionDate"
Me.ColHistoryDateCompleted.MinWidth = 27
Me.ColHistoryDateCompleted.Name = "ColHistoryDateCompleted"
'
'ViewCompleted
'
Me.ViewCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn3, Me.GridColumn4, Me.GridColumn5, Me.GridColumn7, Me.GridColumn1})
Me.ViewCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn3, Me.GridColumn6, Me.GridColumn4, Me.GridColumn5, Me.GridColumn7, Me.GridColumn1})
Me.ViewCompleted.DetailHeight = 431
Me.ViewCompleted.GridControl = Me.GridCompleted
Me.ViewCompleted.Name = "ViewCompleted"
Me.ViewCompleted.OptionsBehavior.Editable = False
@@ -674,18 +723,28 @@ Partial Class frmMain
'
resources.ApplyResources(Me.GridColumn3, "GridColumn3")
Me.GridColumn3.FieldName = "EnvelopeTypeTitle"
Me.GridColumn3.MinWidth = 27
Me.GridColumn3.Name = "GridColumn3"
'
'GridColumn6
'
resources.ApplyResources(Me.GridColumn6, "GridColumn6")
Me.GridColumn6.FieldName = "Comment"
Me.GridColumn6.MinWidth = 107
Me.GridColumn6.Name = "GridColumn6"
'
'GridColumn4
'
resources.ApplyResources(Me.GridColumn4, "GridColumn4")
Me.GridColumn4.FieldName = "StatusTranslated"
Me.GridColumn4.MinWidth = 27
Me.GridColumn4.Name = "GridColumn4"
'
'GridColumn5
'
resources.ApplyResources(Me.GridColumn5, "GridColumn5")
Me.GridColumn5.FieldName = "Title"
Me.GridColumn5.MinWidth = 27
Me.GridColumn5.Name = "GridColumn5"
'
'GridColumn7
@@ -694,6 +753,7 @@ Partial Class frmMain
Me.GridColumn7.DisplayFormat.FormatString = "G"
Me.GridColumn7.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.GridColumn7.FieldName = "AddedWhen"
Me.GridColumn7.MinWidth = 27
Me.GridColumn7.Name = "GridColumn7"
'
'GridColumn1
@@ -702,14 +762,15 @@ Partial Class frmMain
Me.GridColumn1.DisplayFormat.FormatString = "G"
Me.GridColumn1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.GridColumn1.FieldName = "ChangedWhen"
Me.GridColumn1.MinWidth = 27
Me.GridColumn1.Name = "GridColumn1"
'
'XtraTabPageAdmin
'
Me.XtraTabPageAdmin.Controls.Add(Me.SplitContainerControl2)
Me.XtraTabPageAdmin.Controls.Add(Me.PanelControl1)
Me.XtraTabPageAdmin.Name = "XtraTabPageAdmin"
resources.ApplyResources(Me.XtraTabPageAdmin, "XtraTabPageAdmin")
Me.XtraTabPageAdmin.Name = "XtraTabPageAdmin"
'
'SplitContainerControl2
'
@@ -724,11 +785,12 @@ Partial Class frmMain
'SplitContainerControl2.Panel2
'
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
Me.SplitContainerControl2.SplitterPosition = 907
Me.SplitContainerControl2.SplitterPosition = 1209
'
'GridControlData
'
resources.ApplyResources(Me.GridControlData, "GridControlData")
Me.GridControlData.EmbeddedNavigator.Margin = CType(resources.GetObject("GridControlData.EmbeddedNavigator.Margin"), System.Windows.Forms.Padding)
Me.GridControlData.MainView = Me.GridViewData
Me.GridControlData.MenuManager = Me.RibbonControl
Me.GridControlData.Name = "GridControlData"
@@ -736,6 +798,7 @@ Partial Class frmMain
'
'GridViewData
'
Me.GridViewData.DetailHeight = 431
Me.GridViewData.GridControl = Me.GridControlData
Me.GridViewData.Name = "GridViewData"
Me.GridViewData.OptionsView.ShowAutoFilterRow = True
@@ -810,8 +873,8 @@ Partial Class frmMain
Me.XtraTabPage3.Controls.Add(Me.Label1)
Me.XtraTabPage3.Controls.Add(Me.Button1)
Me.XtraTabPage3.Controls.Add(Me.txtEnvID)
Me.XtraTabPage3.Name = "XtraTabPage3"
resources.ApplyResources(Me.XtraTabPage3, "XtraTabPage3")
Me.XtraTabPage3.Name = "XtraTabPage3"
'
'Label1
'
@@ -976,4 +1039,7 @@ Partial Class frmMain
Friend WithEvents Label1 As Label
Friend WithEvents Button1 As Button
Friend WithEvents txtEnvID As TextBox
Friend WithEvents GridColumn6 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroupReceiver As DevExpress.XtraBars.Ribbon.RibbonPageGroup
End Class

File diff suppressed because it is too large Load Diff

View File

@@ -1,17 +1,19 @@
Imports System.IO
Imports System.ComponentModel
Imports System.IdentityModel.Metadata
Imports System.IO
Imports System.Text
Imports DevExpress.LookAndFeel
Imports DevExpress.Utils.Extensions
Imports DevExpress.XtraCharts
Imports DevExpress.XtraGrid
Imports DevExpress.XtraGrid.Views.Grid
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraSplashScreen
Imports DigitalData.GUIs.Common
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.CommonServices
Imports EnvelopeGenerator.CommonServices.My
Imports System.ComponentModel
Imports DevExpress.XtraPrinting
Imports EnvelopeGenerator.Domain.Entities
Public Class frmMain
@@ -25,6 +27,7 @@ Public Class frmMain
Private Controller As EnvelopeListController
Private myFileData As Byte()
Private myResFileData As Byte()
Private FormLoad As Boolean = True
Public Sub New(pState As State)
' Dieser Aufruf ist für den Designer erforderlich.
@@ -60,6 +63,10 @@ Public Class frmMain
XtraTabControlMain.TabPages(3).PageVisible = False
End If
LoadEnvelopeData()
Dim oXMLPath = Get_DocGrid_Layout_Filename(ViewEnvelopes.Name)
If File.Exists(oXMLPath) Then
ViewEnvelopes.RestoreLayoutFromXml(oXMLPath)
End If
End Sub
Private Sub LoadEnvelopeData()
@@ -216,6 +223,7 @@ Public Class frmMain
RibbonPageEnvelopeActions.Enabled = True
Select Case XtraTabControlMain.SelectedTabPageIndex
Case 1
RibbonPageGroupReceiver.Visible = False
btnEditEnvelope.Enabled = False
btnDeleteEnvelope.Enabled = False
btnContactReceiver.Enabled = False
@@ -225,7 +233,12 @@ Public Class frmMain
bbtnitmEB.Enabled = True
bbtnitm2Faktor.Enabled = False
LoadEnvelopeData()
Dim oXMLPath = Get_DocGrid_Layout_Filename(ViewCompleted.Name)
If File.Exists(oXMLPath) Then
ViewCompleted.RestoreLayoutFromXml(oXMLPath)
End If
Case 0
RibbonPageGroupReceiver.Visible = True
btnEditEnvelope.Enabled = True
btnDeleteEnvelope.Enabled = True
btnContactReceiver.Enabled = True
@@ -256,6 +269,7 @@ Public Class frmMain
Private Sub ViewEnvelopes_FocusedRowChanged(sender As Object, e As DevExpress.XtraGrid.Views.Base.FocusedRowChangedEventArgs) Handles ViewEnvelopes.FocusedRowChanged
If ViewEnvelopes.FocusedRowHandle < 0 Then
RibbonPageGroupReceiver.Enabled = False
Exit Sub
End If
@@ -557,6 +571,7 @@ Public Class frmMain
MYUSER = oUser
End If
End If
FormLoad = False
End Sub
Private Sub bbtnitmInfoMail_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitmInfoMail.ItemClick
@@ -781,10 +796,13 @@ Public Class frmMain
End Sub
Private Sub bbtnitm2Faktor_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm2Faktor.ItemClick
Show_MF_Info
End Sub
Private Sub Show_MF_Info()
If ViewEnvelopes.FocusedRowHandle < 0 Then
Exit Sub
End If
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
Dim oView As GridView = GridEnvelopes.FocusedView
If oView.Name = ViewReceivers.Name Then
@@ -795,8 +813,11 @@ Public Class frmMain
If oDT.Rows.Count = 1 Then
Dim oTFA_REG_DL = oDT.Rows(0).Item("TFA_REG_DEADLINE")
Dim oTOTP = oDT.Rows(0).Item("TOTP_SECRET_KEY")
Dim oForm As New frm2Factor_Properties(oReceiver.EmailAddress, oTOTP, oTFA_REG_DL, DB_DD_ECM)
oForm.ShowDialog()
If Not IsDBNull(oTOTP) And Not IsDBNull(oTFA_REG_DL) Then
Dim oForm As New frm2Factor_Properties(oReceiver.EmailAddress, oTOTP.ToString, oTFA_REG_DL, DB_DD_ECM)
oForm.ShowDialog()
End If
End If
End If
@@ -804,7 +825,6 @@ Public Class frmMain
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If txtEnvID.Text = String.Empty Then
Exit Sub
@@ -838,4 +858,116 @@ Public Class frmMain
.DbConfig = Nothing
}
End Function
Private Sub BarButtonItem2_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oView As GridView = GridEnvelopes.FocusedView
Dim selReceiver As Receiver
If oView.Name = ViewReceivers.Name Then
selReceiver = oView.GetRow(oView.FocusedRowHandle)
Else
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
End If
If ViewEnvelopes.FocusedRowHandle < 0 Or IsNothing(selReceiver) Then
Exit Sub
End If
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 EnvelopeDocument)
Dim Receivers As New BindingList(Of Receiver)
Receivers = New BindingList(Of Receiver)(oController.Envelope.Receivers)
For Each oReceiver As Receiver In Receivers
If oReceiver.EmailAddress = selReceiver.EmailAddress Then
If oController.ActionService.ManuallySendAccessCode(oEnvelope, oReceiver) = True Then
Dim oMsg = Resources.Envelope.AccessCode_successfully_send.Replace("@Mail", oReceiver.EmailAddress)
MsgBox(oMsg, MsgBoxStyle.Information, Text)
End If
End If
Next
Else
MsgBox("Envelope is defined without AccessCode so far!", MsgBoxStyle.Information)
End If
Catch ex As Exception
Logger.Error(ex)
Finally
End Try
SplashScreenManager.CloseOverlayForm(oHandle)
End Sub
Private Sub ViewCompleted_Layout(sender As Object, e As EventArgs) Handles ViewCompleted.Layout
If FormLoad = True Then
Exit Sub
End If
Dim oXMLPath = Get_DocGrid_Layout_Filename(ViewCompleted.Name)
ViewCompleted.SaveLayoutToXml(oXMLPath)
bsitmInfo.Caption = "Grid Layout Envelopes Completed Saved"
End Sub
Private Sub ViewEnvelopes_Layout(sender As Object, e As EventArgs) Handles ViewEnvelopes.Layout
If FormLoad = True Then
Exit Sub
End If
Dim oXMLPath = Get_DocGrid_Layout_Filename(ViewEnvelopes.Name)
ViewEnvelopes.SaveLayoutToXml(oXMLPath)
bsitmInfo.Caption = "Grid Layout Envelopes Saved"
End Sub
Private Function Get_DocGrid_Layout_Filename(pGridViewName As String)
Dim EntityRegex As New RegularExpressions.Regex("\s+\(\d+\)")
Dim Filename As String = String.Format("{0}_UserLayout.xml", pGridViewName)
Dim oGridlayoutFullFilename = System.IO.Path.Combine(Application.UserAppDataPath(), Filename)
Return oGridlayoutFullFilename
End Function
Private Sub ViewReceivers_FocusedRowChanged(sender As Object, e As Views.Base.FocusedRowChangedEventArgs) Handles ViewReceivers.FocusedRowChanged
Dim detailView As GridView = TryCast(sender, GridView)
' Sicherstellen, dass die View gültig ist
If detailView Is Nothing Then
Exit Sub
End If
' Prüfen, ob der RowHandle gültig ist
If Not detailView.IsValidRowHandle(e.FocusedRowHandle) Then
Exit Sub
End If
Dim row = detailView.GetRow(e.FocusedRowHandle)
If row Is Nothing Then
Exit Sub
End If
Dim oReceiver As Receiver = CType(row, Receiver)
'Dim oEnvelopeTitle As String = Net.WebUtility.UrlEncode(oEnvelope.Title)
If Not IsNothing(oReceiver) Then
Dim oDT As DataTable = DB_DD_ECM.GetDatatable($"SELECT * FROM TBSIG_RECEIVER WHERE EMAIL_ADDRESS = '{oReceiver.EmailAddress}'")
If Not IsNothing(oDT) Then
If oDT.Rows.Count = 1 Then
RibbonPageGroupReceiver.Enabled = True
Dim oTFA_REG_DL = oDT.Rows(0).Item("TFA_REG_DEADLINE")
Dim oTOTP = oDT.Rows(0).Item("TOTP_SECRET_KEY")
If Not IsDBNull(oTOTP) And Not IsDBNull(oTFA_REG_DL) Then
bbtnitm2Faktor.Enabled = True
Else
bbtnitm2Faktor.Enabled = False
End If
Else
RibbonPageGroupReceiver.Enabled = False
End If
End If
End If
End Sub
End Class

View File

@@ -35,7 +35,9 @@
<package id="System.Buffers" version="4.6.0" targetFramework="net462" />
<package id="System.CodeDom" version="9.0.0" targetFramework="net462" />
<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.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" />
<package id="System.IO.Pipelines" version="9.0.0" targetFramework="net462" />
@@ -48,4 +50,5 @@
<package id="System.Text.Json" version="9.0.0" targetFramework="net462" />
<package id="System.Threading.Tasks.Extensions" version="4.5.4" targetFramework="net462" />
<package id="System.ValueTuple" version="4.5.0" targetFramework="net462" />
<package id="UserManager.Domain" version="3.2.2" targetFramework="net462" />
</packages>

View File

@@ -16,6 +16,7 @@ namespace EnvelopeGenerator.GeneratorAPI.Controllers;
public partial class AuthController : ControllerBase
{
private readonly ILogger<AuthController> _logger;
[Obsolete("Use MediatR")]
private readonly IUserService _userService;
private readonly IDirectorySearchService _dirSearchService;
@@ -25,6 +26,7 @@ public partial class AuthController : ControllerBase
/// <param name="logger">The logger instance.</param>
/// <param name="userService">The user service instance.</param>
/// <param name="dirSearchService">The directory search service instance.</param>
[Obsolete("Use MediatR")]
public AuthController(ILogger<AuthController> logger, IUserService userService, IDirectorySearchService dirSearchService)
{
_logger = logger;

View File

@@ -27,6 +27,7 @@ public class EmailTemplateController : ControllerBase
private readonly IMapper _mapper;
[Obsolete("Use IRepository")]
private readonly IEmailTemplateRepository _repository;
private readonly IMediator _mediator;
@@ -38,6 +39,7 @@ public class EmailTemplateController : ControllerBase
/// <param name="repository">
/// Die AutoMapper-Instanz, die zum Zuordnen von Objekten verwendet wird.
/// </param>
[Obsolete("Use IRepository")]
public EmailTemplateController(IMapper mapper, IEmailTemplateRepository repository, ILogger<EmailTemplateController> logger, IMediator mediator)
{
_mapper = mapper;
@@ -115,4 +117,4 @@ public class EmailTemplateController : ControllerBase
return Ok();
}
}
}
}

View File

@@ -22,7 +22,7 @@
<PackageReference Include="DigitalData.Auth.Client" Version="1.3.7" />
<PackageReference Include="DigitalData.Core.API" Version="2.2.1" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.6" />
<PackageReference Include="NLog" Version="5.2.5" />
<PackageReference Include="NLog.Web.AspNetCore" Version="5.3.0" />
<PackageReference Include="Scalar.AspNetCore" Version="2.2.1" />

View File

@@ -40,7 +40,7 @@ try
builder.Services.AddControllers();
//CORS Policy
// CORS Policy
var allowedOrigins = config.GetSection("AllowedOrigins").Get<string[]>() ??
throw new InvalidOperationException("AllowedOrigins section is missing in the configuration.");
builder.Services.AddCors(options =>
@@ -93,7 +93,7 @@ try
Id = "Bearer"
}
},
new string[] {}
Array.Empty<string>()
}
});
@@ -104,8 +104,12 @@ try
}
});
builder.Services.AddOpenApi();
// DbContext
var connStr = config.GetConnectionString("Default") ?? throw new InvalidOperationException("There is no default connection string in appsettings.json.");
//AddEF Core dbcontext
var useDbMigration = Environment.GetEnvironmentVariable("MIGRATION_TEST_MODE") == true.ToString() || config.GetValue<bool>("UseDbMigration");
var cnnStrName = useDbMigration ? "DbMigrationTest" : "Default";
var connStr = config.GetConnectionString(cnnStrName)
?? throw new InvalidOperationException($"Connection string '{cnnStrName}' is missing in the application configuration.");
builder.Services.Configure<ConnectionString>(cs => cs.Value = connStr);
@@ -129,7 +133,7 @@ try
{
var clientParams = deferredProvider.GetOptions<ClientParams>();
var publicKey = clientParams!.PublicKeys.Get(authTokenKeys.Issuer, authTokenKeys.Audience);
return new List<SecurityKey>() { publicKey.SecurityKey };
return [publicKey.SecurityKey];
},
ValidateIssuer = true,
ValidIssuer = authTokenKeys.Issuer,
@@ -167,7 +171,9 @@ try
});
// User manager
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddUserManager<EGDbContext>();
#pragma warning restore CS0618 // Type or member is obsolete
// LDAP
builder.ConfigureBySection<DirectorySearchOptions>();
@@ -177,9 +183,11 @@ try
builder.Services.AddCookieBasedLocalizer();
// Envelope generator serives
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services
.AddEnvelopeGeneratorInfrastructureServices(sqlExecutorConfigureOptions: executor => executor.ConnectionString = connStr)
.AddEnvelopeGeneratorServices(config);
#pragma warning restore CS0618 // Type or member is obsolete
var app = builder.Build();
@@ -201,10 +209,10 @@ try
app.UseCors("AllowSpecificOriginsPolicy");
// Localizer
string[] supportedCultureNames = { "de-DE", "en-US" };
IList<CultureInfo> list = supportedCultureNames.Select((string cn) => new CultureInfo(cn)).ToList();
CultureInfo cultureInfo = list.FirstOrDefault() ?? throw new ArgumentNullException("supportedCultureNames", "Supported cultures cannot be empty.");
RequestLocalizationOptions requestLocalizationOptions = new RequestLocalizationOptions
string[] supportedCultureNames = ["de-DE", "en-US"];
IList<CultureInfo> list = [.. supportedCultureNames.Select(cn => new CultureInfo(cn))];
var cultureInfo = list.FirstOrDefault() ?? throw new InvalidOperationException("There is no supported culture.");
var requestLocalizationOptions = new RequestLocalizationOptions
{
SupportedCultures = list,
SupportedUICultures = list

View File

@@ -1,5 +1,6 @@
{
"UseSwagger": true,
"UseDbMigration": true,
"DiPMode": true,
"Logging": {
"LogLevel": {
@@ -10,7 +11,8 @@
"AllowedHosts": "*",
"AllowedOrigins": [ "http://localhost:4200" ],
"ConnectionStrings": {
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;",
"DbMigrationTest": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
},
"DirectorySearchOptions": {
"ServerName": "DD-VMP01-DC01",

View File

@@ -53,7 +53,6 @@ public static class DIExtensions
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
services.TryAddScoped<IReceiverRepository, ReceiverRepository>();
services.TryAddScoped<IUserReceiverRepository, UserReceiverRepository>();
services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
services.AddDbRepository<EGDbContext, Config>(context => context.Configs).UseAutoMapper();
@@ -67,7 +66,6 @@ public static class DIExtensions
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, UserReceiver>(context => context.UserReceivers).UseAutoMapper();
services.AddDbRepository<EGDbContext, EnvelopeReceiverReadOnly>(context => context.EnvelopeReceiverReadOnlys).UseAutoMapper();
services.AddSQLExecutor<Envelope>();

View File

@@ -17,8 +17,6 @@ namespace EnvelopeGenerator.Infrastructure;
//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 DbSet<UserReceiver> UserReceivers { get; set; }
public DbSet<Config> Configs { get; set; }
public DbSet<EnvelopeReceiver> EnvelopeReceivers { get; set; }
@@ -61,14 +59,15 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
private readonly DbTriggerParams _triggers;
private readonly ILogger<EGDbContext> _logger;
private readonly ILogger<EGDbContext>? _logger;
public EGDbContext(DbContextOptions<EGDbContext> options, IOptions<DbTriggerParams> triggerParamOptions, ILogger<EGDbContext> logger) : base(options)
public bool IsMigration { get; set; } = false;
public EGDbContext(DbContextOptions<EGDbContext> options, IOptions<DbTriggerParams> triggerParamOptions, ILogger<EGDbContext>? logger = null) : base(options)
{
_triggers = triggerParamOptions.Value;
_logger = logger;
UserReceivers = Set<UserReceiver>();
Configs = Set<Config>();
EnvelopeReceivers = Set<EnvelopeReceiver>();
Envelopes = Set<Envelope>();
@@ -106,7 +105,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
modelBuilder.Entity<EnvelopeHistory>();
modelBuilder.Entity<EnvelopeType>();
modelBuilder.Entity<Receiver>();
modelBuilder.Entity<UserReceiver>();
modelBuilder.Entity<EmailOut>();
// Configure the one-to-many relationship of Envelope
@@ -130,17 +128,20 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
.WithMany(ed => ed.Elements)
.HasForeignKey(dre => dre.DocumentId);
modelBuilder.Entity<EnvelopeHistory>()
.HasOne(eh => eh.Receiver)
.WithMany()
.HasForeignKey(eh => eh.UserReference)
.HasPrincipalKey(e => e.EmailAddress);
if (!IsMigration)
{
modelBuilder.Entity<EnvelopeHistory>()
.HasOne(eh => eh.Receiver)
.WithMany()
.HasForeignKey(eh => eh.UserReference)
.HasPrincipalKey(e => e.EmailAddress);
modelBuilder.Entity<EnvelopeHistory>()
.HasOne(eh => eh.Sender)
.WithMany()
.HasForeignKey(eh => eh.UserReference)
.HasPrincipalKey(e => e.Email);
modelBuilder.Entity<EnvelopeHistory>()
.HasOne(eh => eh.Sender)
.WithMany()
.HasForeignKey(eh => eh.UserReference)
.HasPrincipalKey(e => e.Email);
}
modelBuilder.Entity<EnvelopeReceiverReadOnly>()
.HasOne(erro => erro.Receiver)
@@ -155,7 +156,7 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
.ForEach(tName =>
{
modelBuilder.Entity<T>().ToTable(tb => tb.HasTrigger(tName));
_logger.LogInformation("Trigger '{triggerName}' has been added to the '{entityName}' entity.", tName, typeof(T).Name);
_logger?.LogInformation("Trigger '{triggerName}' has been added to the '{entityName}' entity.", tName, typeof(T).Name);
});
// TODO: call add trigger methods with attributes and reflection
@@ -171,7 +172,6 @@ public class EGDbContext : DbContext, IUserManagerDbContext, IMailDbContext
AddTrigger<EnvelopeReceiverReadOnly>();
AddTrigger<EnvelopeType>();
AddTrigger<Receiver>();
AddTrigger<UserReceiver>();
AddTrigger<EmailOut>();
//configure model builder for user manager tables

View File

@@ -0,0 +1,46 @@
using EnvelopeGenerator.Application.Configurations;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Design;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.Infrastructure
{
public class EGDbContextFactory : IDesignTimeDbContextFactory<EGDbContext>
{
public EGDbContext CreateDbContext(string[] args)
{
var config = new ConfigurationBuilder()
.SetBasePath(Directory.GetCurrentDirectory()) // Önemli!
.AddJsonFile("appsettings.migration.json")
.Build();
// create DbContextOptions
var optionsBuilder = new DbContextOptionsBuilder<EGDbContext>();
optionsBuilder.UseSqlServer(config.GetConnectionString("Default"));
// create DbTriggerParams
var triggerLists = config.GetSection("DbTriggerParams").Get<Dictionary<string, List<string>>>();
var dbTriggerParams = new DbTriggerParams();
if(triggerLists is not null)
foreach (var triggerList in triggerLists)
{
if(triggerList.Value.Count == 0)
continue; // Skip empty trigger lists
var tableName = triggerList.Key;
dbTriggerParams[tableName] = new List<string>();
foreach (var trigger in triggerList.Value)
{
dbTriggerParams[tableName].Add(trigger);
}
}
var dbContext = new EGDbContext(optionsBuilder.Options, Options.Create(dbTriggerParams));
dbContext.IsMigration = true;
return dbContext;
}
}
}

View File

@@ -23,16 +23,37 @@
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="7.0.20" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="7.0.20">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="8.0.17" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.17">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="8.0.17" />
</ItemGroup>
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.5" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="9.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Relational" Version="9.0.6" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="9.0.6">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.6" />
</ItemGroup>
</Project>
<ItemGroup>
<None Update="appsettings.migration.json">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>
</Project>

View File

@@ -12,13 +12,16 @@ namespace EnvelopeGenerator.Infrastructure.Executor;
public class EnvelopeExecutor : SQLExecutor, IEnvelopeExecutor
{
[Obsolete("Use IRepository")]
private readonly IUserRepository _userRepository;
[Obsolete("Use IRepository")]
public EnvelopeExecutor(IServiceProvider provider, IOptions<SQLExecutorParams> sqlExecutorParamsOptions, IUserRepository userRepository) : base(provider, sqlExecutorParamsOptions)
{
_userRepository = userRepository;
}
[Obsolete("Use IRepository")]
public async Task<Envelope> CreateEnvelopeAsync(int userId, string title = "", string message = "", bool tfaEnabled = false, CancellationToken cancellation = default)
{
using var connection = new SqlConnection(Params.ConnectionString);

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,811 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace EnvelopeGenerator.Infrastructure.Migrations
{
/// <inheritdoc />
public partial class InitialCreate : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.EnsureSchema(
name: "dbo");
migrationBuilder.CreateTable(
name: "TBDD_CLIENT_USER",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
USER_ID = table.Column<int>(type: "int", nullable: false),
CLIENT_ID = table.Column<int>(type: "int", nullable: false),
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
ADDED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_CLIENT_USER", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBDD_GROUPS",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
AD_SYNC = table.Column<bool>(type: "bit", nullable: false),
Internal = table.Column<bool>(type: "bit", nullable: false),
Active = table.Column<bool>(type: "bit", nullable: false),
Comment = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ECM_FK_ID = table.Column<int>(type: "int", nullable: false),
ADDED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CHANGED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_GROUPS", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBDD_MODULES",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
Name = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
SHORT_NAME = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_MODULES", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBDD_USER",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
PRENAME = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
NAME = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
USERNAME = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
SHORTNAME = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
EMAIL = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
LANGUAGE = table.Column<string>(type: "nvarchar(5)", maxLength: 5, nullable: false),
COMMENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
DELETED = table.Column<bool>(type: "bit", nullable: false),
DATE_FORMAT = table.Column<string>(type: "nvarchar(10)", maxLength: 10, nullable: false),
ACTIVE = table.Column<bool>(type: "bit", nullable: false),
GENERAL_VIEWER = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: false),
WAN_ENVIRONMENT = table.Column<bool>(type: "bit", nullable: false),
USERID_FK_INT_ECM = table.Column<int>(type: "int", nullable: false),
DELETED_WHEN = table.Column<DateTime>(type: "datetime2", nullable: false),
DELETED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
ADDED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CHANGED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_USER", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBEMLP_EMAIL_OUT",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
REMINDER_TYPE_ID = table.Column<int>(type: "int", nullable: false),
SENDING_PROFILE = table.Column<int>(type: "int", nullable: false),
REFERENCE_ID = table.Column<int>(type: "int", nullable: false),
REFERENCE_STRING = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true),
ENTITY_ID = table.Column<int>(type: "int", nullable: true),
WF_ID = table.Column<int>(type: "int", nullable: false),
WF_REFERENCE = table.Column<string>(type: "varchar(200)", maxLength: 200, nullable: true),
EMAIL_ADRESS = table.Column<string>(type: "varchar(1000)", maxLength: 1000, nullable: false),
EMAIL_SUBJ = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: false),
EMAIL_BODY = table.Column<string>(type: "varchar(max)", nullable: false),
EMAIL_ATTMT1 = table.Column<string>(type: "varchar(512)", maxLength: 512, nullable: true),
EMAIL_SENT = table.Column<DateTime>(type: "datetime2", nullable: true),
COMMENT = table.Column<string>(type: "varchar(500)", maxLength: 500, nullable: true),
ADDED_WHO = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: false),
CHANGED_WHO = table.Column<string>(type: "varchar(50)", maxLength: 50, nullable: true),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime2", nullable: true),
ERROR_TIMESTAMP = table.Column<DateTime>(type: "datetime2", nullable: true),
ERROR_MSG = table.Column<string>(type: "varchar(900)", maxLength: 900, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBEMLP_EMAIL_OUT", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBSIG_CONFIG",
schema: "dbo",
columns: table => new
{
SENDING_PROFILE = table.Column<int>(type: "int", nullable: false),
SIGNATURE_HOST = table.Column<string>(type: "nvarchar(128)", nullable: false),
EXTERNAL_PROGRAM_NAME = table.Column<string>(type: "nvarchar(30)", nullable: true),
EXPORT_PATH = table.Column<string>(type: "nvarchar(256)", nullable: true)
},
constraints: table =>
{
});
migrationBuilder.CreateTable(
name: "TBSIG_EMAIL_TEMPLATE",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
NAME = table.Column<string>(type: "nvarchar(64)", nullable: true),
BODY = table.Column<string>(type: "nvarchar(max)", nullable: true),
SUBJECT = table.Column<string>(type: "nvarchar(512)", nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_EMAIL_TEMPLATE", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE_CERTIFICATE",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ENVELOPE_ID = table.Column<int>(type: "int", nullable: false),
ENVELOPE_UUID = table.Column<string>(type: "nvarchar(36)", nullable: false),
ENVELOPE_SUBJECT = table.Column<string>(type: "nvarchar(512)", nullable: false),
CREATOR_ID = table.Column<int>(type: "int", nullable: false),
CREATOR_NAME = table.Column<string>(type: "nvarchar(128)", nullable: false),
CREATOR_EMAIL = table.Column<string>(type: "nvarchar(128)", nullable: false),
ENVELOPE_STATUS = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE_CERTIFICATE", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE_TYPE",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TITLE = table.Column<string>(type: "nvarchar(128)", nullable: false),
LANGUAGE = table.Column<string>(type: "nvarchar(5)", nullable: true),
EXPIRES_DAYS = table.Column<int>(type: "int", nullable: false),
CERTIFICATION_TYPE = table.Column<int>(type: "int", nullable: false),
USE_ACCESS_CODE = table.Column<bool>(type: "bit", nullable: false),
FINAL_EMAIL_TO_CREATOR = table.Column<int>(type: "int", nullable: false),
FINAL_EMAIL_TO_RECEIVERS = table.Column<int>(type: "int", nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
EXPIRES_WARNING_DAYS = table.Column<int>(type: "int", nullable: false),
SEND_REMINDER_EMAILS = table.Column<bool>(type: "bit", nullable: false),
FIRST_REMINDER_DAYS = table.Column<int>(type: "int", nullable: false),
REMINDER_INTERVAL_DAYS = table.Column<int>(type: "int", nullable: false),
CONTRACT_TYPE = table.Column<int>(type: "int", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE_TYPE", x => x.GUID);
});
migrationBuilder.CreateTable(
name: "TBDD_GROUPS_USER",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
USER_ID = table.Column<int>(type: "int", nullable: false),
GROUP_ID = table.Column<int>(type: "int", nullable: false),
Comment = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ADDED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CHANGED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_GROUPS_USER", x => x.GUID);
table.ForeignKey(
name: "FK_TBDD_GROUPS_USER_TBDD_GROUPS_GROUP_ID",
column: x => x.GROUP_ID,
principalSchema: "dbo",
principalTable: "TBDD_GROUPS",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBDD_GROUPS_USER_TBDD_USER_USER_ID",
column: x => x.USER_ID,
principalSchema: "dbo",
principalTable: "TBDD_USER",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBDD_USER_MODULES",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
USER_ID = table.Column<int>(type: "int", nullable: false),
MODULE_ID = table.Column<int>(type: "int", nullable: false),
COMMENT = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
ADDED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CHANGED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_USER_MODULES", x => x.GUID);
table.ForeignKey(
name: "FK_TBDD_USER_MODULES_TBDD_MODULES_MODULE_ID",
column: x => x.MODULE_ID,
principalSchema: "dbo",
principalTable: "TBDD_MODULES",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBDD_USER_MODULES_TBDD_USER_USER_ID",
column: x => x.USER_ID,
principalSchema: "dbo",
principalTable: "TBDD_USER",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBDD_USER_REPRESENTATION",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
USER_ID = table.Column<int>(type: "int", nullable: true),
REPR_GROUP = table.Column<int>(type: "int", nullable: true),
GROUP_ID = table.Column<int>(type: "int", nullable: true),
REPR_USER = table.Column<int>(type: "int", nullable: true),
VALID_FROM = table.Column<DateTime>(type: "datetime2", nullable: true),
VALID_TO = table.Column<DateTime>(type: "datetime2", nullable: true),
ADDED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
CHANGED_WHO = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBDD_USER_REPRESENTATION", x => x.GUID);
table.ForeignKey(
name: "FK_TBDD_USER_REPRESENTATION_TBDD_GROUPS_GROUP_ID",
column: x => x.GROUP_ID,
principalSchema: "dbo",
principalTable: "TBDD_GROUPS",
principalColumn: "GUID");
table.ForeignKey(
name: "FK_TBDD_USER_REPRESENTATION_TBDD_GROUPS_REPR_GROUP",
column: x => x.REPR_GROUP,
principalSchema: "dbo",
principalTable: "TBDD_GROUPS",
principalColumn: "GUID");
table.ForeignKey(
name: "FK_TBDD_USER_REPRESENTATION_TBDD_USER_REPR_USER",
column: x => x.REPR_USER,
principalSchema: "dbo",
principalTable: "TBDD_USER",
principalColumn: "GUID");
table.ForeignKey(
name: "FK_TBDD_USER_REPRESENTATION_TBDD_USER_USER_ID",
column: x => x.USER_ID,
principalSchema: "dbo",
principalTable: "TBDD_USER",
principalColumn: "GUID");
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
USER_ID = table.Column<int>(type: "int", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
ENVELOPE_UUID = table.Column<string>(type: "nvarchar(36)", nullable: false),
MESSAGE = table.Column<string>(type: "nvarchar(max)", nullable: true),
EXPIRES_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
EXPIRES_WARNING_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
TITLE = table.Column<string>(type: "nvarchar(128)", nullable: true),
CONTRACT_TYPE = table.Column<int>(type: "int", nullable: false),
LANGUAGE = table.Column<string>(type: "nvarchar(5)", nullable: true),
SEND_REMINDER_EMAILS = table.Column<bool>(type: "bit", nullable: false),
FIRST_REMINDER_DAYS = table.Column<int>(type: "int", nullable: false),
REMINDER_INTERVAL_DAYS = table.Column<int>(type: "int", nullable: false),
ENVELOPE_TYPE = table.Column<int>(type: "int", nullable: false),
CERTIFICATION_TYPE = table.Column<int>(type: "int", nullable: false),
USE_ACCESS_CODE = table.Column<bool>(type: "bit", nullable: false),
FINAL_EMAIL_TO_CREATOR = table.Column<int>(type: "int", nullable: false),
FINAL_EMAIL_TO_RECEIVERS = table.Column<int>(type: "int", nullable: false),
EXPIRES_WHEN_DAYS = table.Column<int>(type: "int", nullable: false),
EXPIRES_WARNING_WHEN_DAYS = table.Column<int>(type: "int", nullable: false),
TFA_ENABLED = table.Column<bool>(type: "bit", nullable: false),
DOC_RESULT = table.Column<byte[]>(type: "varbinary(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE", x => x.GUID);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_TBDD_USER_USER_ID",
column: x => x.USER_ID,
principalSchema: "dbo",
principalTable: "TBDD_USER",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_TBSIG_ENVELOPE_TYPE_ENVELOPE_TYPE",
column: x => x.ENVELOPE_TYPE,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE_TYPE",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE_DOCUMENT",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ENVELOPE_ID = table.Column<int>(type: "int", nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
BYTE_DATA = table.Column<byte[]>(type: "varbinary(max)", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE_DOCUMENT", x => x.GUID);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_DOCUMENT_TBSIG_ENVELOPE_ENVELOPE_ID",
column: x => x.ENVELOPE_ID,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBSIG_RECEIVER",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
EMAIL_ADDRESS = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
SIGNATURE = table.Column<string>(type: "nvarchar(64)", nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
TOTP_SECRET_KEY = table.Column<string>(type: "nvarchar(MAX)", nullable: true),
TFA_REG_DEADLINE = table.Column<DateTime>(type: "datetime", nullable: false),
EnvelopeId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_RECEIVER", x => x.GUID);
table.UniqueConstraint("AK_TBSIG_RECEIVER_EMAIL_ADDRESS", x => x.EMAIL_ADDRESS);
table.ForeignKey(
name: "FK_TBSIG_RECEIVER_TBSIG_ENVELOPE_EnvelopeId",
column: x => x.EnvelopeId,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE",
principalColumn: "GUID");
});
migrationBuilder.CreateTable(
name: "TBSIG_DOCUMENT_RECEIVER_ELEMENT",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
DOCUMENT_ID = table.Column<int>(type: "int", nullable: false),
RECEIVER_ID = table.Column<int>(type: "int", nullable: false),
ELEMENT_TYPE = table.Column<int>(type: "int", nullable: false),
POSITION_X = table.Column<double>(type: "float", nullable: false),
POSITION_Y = table.Column<double>(type: "float", nullable: false),
WIDTH = table.Column<double>(type: "float", nullable: false),
HEIGHT = table.Column<double>(type: "float", nullable: false),
PAGE = table.Column<int>(type: "int", nullable: false),
REQUIRED = table.Column<bool>(type: "bit", nullable: false),
TOOLTIP = table.Column<string>(type: "nvarchar(max)", nullable: true),
READ_ONLY = table.Column<bool>(type: "bit", nullable: false),
ANNOTATION_INDEX = table.Column<int>(type: "int", nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_DOCUMENT_RECEIVER_ELEMENT", x => x.GUID);
table.ForeignKey(
name: "FK_TBSIG_DOCUMENT_RECEIVER_ELEMENT_TBSIG_ENVELOPE_DOCUMENT_DOCUMENT_ID",
column: x => x.DOCUMENT_ID,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE_DOCUMENT",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBSIG_DOCUMENT_RECEIVER_ELEMENT_TBSIG_RECEIVER_RECEIVER_ID",
column: x => x.RECEIVER_ID,
principalSchema: "dbo",
principalTable: "TBSIG_RECEIVER",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBSIG_DOCUMENT_STATUS",
schema: "dbo",
columns: table => new
{
GUID = table.Column<int>(type: "int", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ENVELOPE_ID = table.Column<int>(type: "int", nullable: false),
RECEIVER_ID = table.Column<int>(type: "int", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
STATUS_CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
VALUE = table.Column<string>(type: "nvarchar(max)", nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_DOCUMENT_STATUS", x => x.GUID);
table.ForeignKey(
name: "FK_TBSIG_DOCUMENT_STATUS_TBSIG_ENVELOPE_ENVELOPE_ID",
column: x => x.ENVELOPE_ID,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBSIG_DOCUMENT_STATUS_TBSIG_RECEIVER_RECEIVER_ID",
column: x => x.RECEIVER_ID,
principalSchema: "dbo",
principalTable: "TBSIG_RECEIVER",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE_HISTORY",
schema: "dbo",
columns: table => new
{
GUID = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ENVELOPE_ID = table.Column<int>(type: "int", nullable: false),
USER_REFERENCE = table.Column<string>(type: "nvarchar(128)", nullable: false),
STATUS = table.Column<int>(type: "int", nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
ACTION_DATE = table.Column<DateTime>(type: "datetime", nullable: false),
COMMENT = table.Column<string>(type: "nvarchar(max)", nullable: true),
SenderId = table.Column<int>(type: "int", nullable: true),
ReceiverId = table.Column<int>(type: "int", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE_HISTORY", x => x.GUID);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_HISTORY_TBDD_USER_SenderId",
column: x => x.SenderId,
principalSchema: "dbo",
principalTable: "TBDD_USER",
principalColumn: "GUID");
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_HISTORY_TBSIG_ENVELOPE_ENVELOPE_ID",
column: x => x.ENVELOPE_ID,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_HISTORY_TBSIG_RECEIVER_ReceiverId",
column: x => x.ReceiverId,
principalSchema: "dbo",
principalTable: "TBSIG_RECEIVER",
principalColumn: "GUID");
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE_RECEIVER",
schema: "dbo",
columns: table => new
{
ENVELOPE_ID = table.Column<int>(type: "int", nullable: false),
RECEIVER_ID = table.Column<int>(type: "int", nullable: false),
SEQUENCE = table.Column<int>(type: "int", nullable: false),
NAME = table.Column<string>(type: "nvarchar(128)", nullable: true),
JOB_TITLE = table.Column<string>(type: "nvarchar(128)", nullable: true),
COMPANY_NAME = table.Column<string>(type: "nvarchar(128)", nullable: true),
PRIVATE_MESSAGE = table.Column<string>(type: "nvarchar(max)", nullable: true),
ACCESS_CODE = table.Column<string>(type: "nvarchar(64)", nullable: true),
ADDED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime", nullable: false),
PHONE_NUMBER = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE_RECEIVER", x => new { x.ENVELOPE_ID, x.RECEIVER_ID });
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_RECEIVER_TBSIG_ENVELOPE_ENVELOPE_ID",
column: x => x.ENVELOPE_ID,
principalSchema: "dbo",
principalTable: "TBSIG_ENVELOPE",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_RECEIVER_TBSIG_RECEIVER_RECEIVER_ID",
column: x => x.RECEIVER_ID,
principalSchema: "dbo",
principalTable: "TBSIG_RECEIVER",
principalColumn: "GUID",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateTable(
name: "TBSIG_ENVELOPE_RECEIVER_READ_ONLY",
columns: table => new
{
GUID = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
ENVELOPE_ID = table.Column<long>(type: "bigint", nullable: false),
RECEIVER_MAIL = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
DATE_VALID = table.Column<DateTime>(type: "datetime2", nullable: false),
ADDED_WHO = table.Column<string>(type: "nvarchar(250)", maxLength: 250, nullable: false),
ADDED_WHEN = table.Column<DateTime>(type: "datetime2", nullable: false),
CHANGED_WHO = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
CHANGED_WHEN = table.Column<DateTime>(type: "datetime2", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TBSIG_ENVELOPE_RECEIVER_READ_ONLY", x => x.GUID);
table.ForeignKey(
name: "FK_TBSIG_ENVELOPE_RECEIVER_READ_ONLY_TBSIG_RECEIVER_ADDED_WHO",
column: x => x.ADDED_WHO,
principalSchema: "dbo",
principalTable: "TBSIG_RECEIVER",
principalColumn: "EMAIL_ADDRESS",
onDelete: ReferentialAction.Cascade);
});
migrationBuilder.CreateIndex(
name: "IX_TBDD_GROUPS_USER_GROUP_ID",
schema: "dbo",
table: "TBDD_GROUPS_USER",
column: "GROUP_ID");
migrationBuilder.CreateIndex(
name: "IX_TBDD_GROUPS_USER_USER_ID",
schema: "dbo",
table: "TBDD_GROUPS_USER",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBDD_USER_MODULES_MODULE_ID",
schema: "dbo",
table: "TBDD_USER_MODULES",
column: "MODULE_ID");
migrationBuilder.CreateIndex(
name: "IX_TBDD_USER_MODULES_USER_ID",
schema: "dbo",
table: "TBDD_USER_MODULES",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBDD_USER_REPRESENTATION_GROUP_ID",
schema: "dbo",
table: "TBDD_USER_REPRESENTATION",
column: "GROUP_ID");
migrationBuilder.CreateIndex(
name: "IX_TBDD_USER_REPRESENTATION_REPR_GROUP",
schema: "dbo",
table: "TBDD_USER_REPRESENTATION",
column: "REPR_GROUP");
migrationBuilder.CreateIndex(
name: "IX_TBDD_USER_REPRESENTATION_REPR_USER",
schema: "dbo",
table: "TBDD_USER_REPRESENTATION",
column: "REPR_USER");
migrationBuilder.CreateIndex(
name: "IX_TBDD_USER_REPRESENTATION_USER_ID",
schema: "dbo",
table: "TBDD_USER_REPRESENTATION",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_DOCUMENT_RECEIVER_ELEMENT_DOCUMENT_ID",
schema: "dbo",
table: "TBSIG_DOCUMENT_RECEIVER_ELEMENT",
column: "DOCUMENT_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_DOCUMENT_RECEIVER_ELEMENT_RECEIVER_ID",
schema: "dbo",
table: "TBSIG_DOCUMENT_RECEIVER_ELEMENT",
column: "RECEIVER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_DOCUMENT_STATUS_ENVELOPE_ID",
schema: "dbo",
table: "TBSIG_DOCUMENT_STATUS",
column: "ENVELOPE_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_DOCUMENT_STATUS_RECEIVER_ID",
schema: "dbo",
table: "TBSIG_DOCUMENT_STATUS",
column: "RECEIVER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_ENVELOPE_TYPE",
schema: "dbo",
table: "TBSIG_ENVELOPE",
column: "ENVELOPE_TYPE");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_USER_ID",
schema: "dbo",
table: "TBSIG_ENVELOPE",
column: "USER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_DOCUMENT_ENVELOPE_ID",
schema: "dbo",
table: "TBSIG_ENVELOPE_DOCUMENT",
column: "ENVELOPE_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_HISTORY_ENVELOPE_ID",
schema: "dbo",
table: "TBSIG_ENVELOPE_HISTORY",
column: "ENVELOPE_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_HISTORY_ReceiverId",
schema: "dbo",
table: "TBSIG_ENVELOPE_HISTORY",
column: "ReceiverId");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_HISTORY_SenderId",
schema: "dbo",
table: "TBSIG_ENVELOPE_HISTORY",
column: "SenderId");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_RECEIVER_RECEIVER_ID",
schema: "dbo",
table: "TBSIG_ENVELOPE_RECEIVER",
column: "RECEIVER_ID");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_ENVELOPE_RECEIVER_READ_ONLY_ADDED_WHO",
table: "TBSIG_ENVELOPE_RECEIVER_READ_ONLY",
column: "ADDED_WHO");
migrationBuilder.CreateIndex(
name: "IX_TBSIG_RECEIVER_EnvelopeId",
schema: "dbo",
table: "TBSIG_RECEIVER",
column: "EnvelopeId");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "TBDD_CLIENT_USER",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBDD_GROUPS_USER",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBDD_USER_MODULES",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBDD_USER_REPRESENTATION",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBEMLP_EMAIL_OUT");
migrationBuilder.DropTable(
name: "TBSIG_CONFIG",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_DOCUMENT_RECEIVER_ELEMENT",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_DOCUMENT_STATUS",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_EMAIL_TEMPLATE",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE_CERTIFICATE",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE_HISTORY",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE_RECEIVER",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE_RECEIVER_READ_ONLY");
migrationBuilder.DropTable(
name: "TBDD_MODULES",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBDD_GROUPS",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE_DOCUMENT",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_RECEIVER",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBDD_USER",
schema: "dbo");
migrationBuilder.DropTable(
name: "TBSIG_ENVELOPE_TYPE",
schema: "dbo");
}
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class ConfigRepository : CRUDRepository<Config, int, EGDbContext>, IConfigRepository
{
public ConfigRepository(EGDbContext dbContext) : base(dbContext, dbContext.Configs)

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class DocumentReceiverElementRepository : CRUDRepository<DocumentReceiverElement, int, EGDbContext>, IDocumentReceiverElementRepository
{
public DocumentReceiverElementRepository(EGDbContext dbContext) : base(dbContext, dbContext.DocumentReceiverElements)

View File

@@ -1,10 +1,10 @@
using DigitalData.Core.Infrastructure;
using DigitalData.UserManager.Infrastructure.Repositories;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class DocumentStatusRepository : CRUDRepository<DocumentStatus, int, EGDbContext>, IDocumentStatusRepository
{
public DocumentStatusRepository(EGDbContext dbContext) : base(dbContext, dbContext.DocumentStatus)

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class EnvelopeCertificateRepository : CRUDRepository<EnvelopeCertificate, int, EGDbContext>, IEnvelopeCertificateRepository
{
public EnvelopeCertificateRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeCertificates)

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class EnvelopeDocumentRepository : CRUDRepository<EnvelopeDocument, int, EGDbContext>, IEnvelopeDocumentRepository
{
public EnvelopeDocumentRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeDocument)

View File

@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class EnvelopeReceiverReadOnlyRepository : CRUDRepository<EnvelopeReceiverReadOnly, long, EGDbContext>, IEnvelopeReceiverReadOnlyRepository
{
private readonly IEnvelopeRepository _envRepo;

View File

@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class EnvelopeRepository : CRUDRepository<Envelope, int, EGDbContext>, IEnvelopeRepository
{
public EnvelopeRepository(EGDbContext dbContext) : base(dbContext, dbContext.Envelopes)

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class EnvelopeTypeRepository : CRUDRepository<EnvelopeType, int, EGDbContext>, IEnvelopeTypeRepository
{
public EnvelopeTypeRepository(EGDbContext dbContext) : base(dbContext, dbContext.EnvelopeTypes)

View File

@@ -5,6 +5,7 @@ using Microsoft.EntityFrameworkCore;
namespace EnvelopeGenerator.Infrastructure.Repositories;
[Obsolete("Use IRepository")]
public class ReceiverRepository : CRUDRepository<Receiver, int, EGDbContext>, IReceiverRepository
{
public ReceiverRepository(EGDbContext dbContext) : base(dbContext, dbContext.Receivers)

View File

@@ -1,12 +0,0 @@
using DigitalData.Core.Infrastructure;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Application.Contracts.Repositories;
namespace EnvelopeGenerator.Infrastructure.Repositories;
public class UserReceiverRepository : CRUDRepository<UserReceiver, int, EGDbContext>, IUserReceiverRepository
{
public UserReceiverRepository(EGDbContext dbContext) : base(dbContext, dbContext.UserReceivers)
{
}
}

View File

@@ -0,0 +1,13 @@
{
"ConnectionStrings": {
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
},
"DbTriggerParams": {
"Envelope": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ],
"EnvelopeHistory": [ "TBSIG_ENVELOPE_HISTORY_AFT_INS" ],
"EmailOut": [ "TBEMLP_EMAIL_OUT_AFT_INS", "TBEMLP_EMAIL_OUT_AFT_UPD" ],
"EnvelopeReceiverReadOnly": [ "TBSIG_ENVELOPE_RECEIVER_READ_ONLY_UPD" ],
"Receiver": [],
"EmailTemplate": [ "TBSIG_EMAIL_TEMPLATE_AFT_UPD" ]
}
}

View File

@@ -13,9 +13,11 @@ public class CommandManager
{
WriteIndented = true
};
[Obsolete("Use MediatR")]
private readonly IEnvelopeReceiverService _envelopeReceiverService;
private readonly IMediator _mediator;
[Obsolete("Use MediatR")]
public CommandManager(IEnvelopeReceiverService envelopeReceiverService, IMediator mediator)
{
_envelopeReceiverService = envelopeReceiverService;
@@ -29,6 +31,7 @@ public class CommandManager
Console.WriteLine($"v{Assembly.GetExecutingAssembly().GetName().Version}");
}
[Obsolete("Use MediatR")]
[Subcommand]
public IEnvelopeReceiverService EnvelopeReceiver => _envelopeReceiverService;
@@ -55,4 +58,4 @@ public class CommandManager
File.WriteAllBytes(path, document?.ByteData ?? Array.Empty<byte>());
}
}
}
}

View File

@@ -28,7 +28,7 @@ public static class DependencyInjection
});
// Add envelope generator services
services.AddEnvelopeGeneratorInfrastructureServices(options => options.UseSqlServer(connStr));
services.AddEnvelopeGeneratorInfrastructureServices((provider, options) => options.UseSqlServer(connStr));
return services
.AddSingleton<CommandManager>()

View File

@@ -15,7 +15,9 @@ public class Program
var config = builder.Configuration;
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddCommandManagerRunner(config);
#pragma warning restore CS0618 // Type or member is obsolete
var app = builder.Build();

View File

@@ -12,7 +12,8 @@
}
},
"ConnectionStrings": {
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;",
"Dev": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
},
"PSPDFKitLicenseKey": "SXCtGGY9XA-31OGUXQK-r7c6AkdLGPm2ljuyDr1qu0kkhLvydg-Do-fxpNUF4Rq3fS_xAnZRNFRHbXpE6sQ2BMcCSVTcXVJO6tPviexjpiT-HnrDEySlUERJnnvh-tmeOWprxS6BySPnSILkmaVQtUfOIUS-cUbvvEYHTvQBKbSF8di4XHQFyfv49ihr51axm3NVV3AXwh2EiKL5C5XdqBZ4sQ4O7vXBjM2zvxdPxlxdcNYmiU83uAzw7B83O_jubPzya4CdUHh_YH7Nlp2gP56MeG1Sw2JhMtfG3Rj14Sg4ctaeL9p6AEWca5dDjJ2li5tFIV2fQSsw6A_cowLu0gtMm5i8IfJXeIcQbMC2-0wGv1oe9hZYJvFMdzhTM_FiejM0agemxt3lJyzuyP8zbBSOgp7Si6A85krLWPZptyZBTG7pp7IHboUHfPMxCXqi-zMsqewOJtQBE2mjntU-lPryKnssOpMPfswwQX7QSkJYV5EMqNmEhQX6mEkp2wcqFzMC7bJQew1aO4pOpvChUaMvb1vgRek0HxLag0nwQYX2YrYGh7F_xXJs-8HNwJe8H0-eW4x4faayCgM5rB5772CCCsD9ThZcvXFrjNHHLGJ8WuBUFm6LArvSfFQdii_7j-_sqHMpeKZt26NFgivj1A==",
"Content-Security-Policy": [ // The first format parameter {0} will be replaced by the nonce value.

View File

@@ -18,7 +18,7 @@ public class Mock
builder.Configuration.AddJsonFile(configPath, optional: true, reloadOnChange: true);
builder.Services
.AddEnvelopeGeneratorInfrastructureServices(opt =>
.AddEnvelopeGeneratorInfrastructureServices((provider, opt) =>
{
if (useRealDb)
{

View File

@@ -1,18 +1,17 @@
using EnvelopeGenerator.Web.Services;
using Microsoft.AspNetCore.Mvc;
namespace EnvelopeGenerator.Web.Controllers
namespace EnvelopeGenerator.Web.Controllers;
public class BaseController : Controller
{
public class BaseController : Controller
protected readonly DatabaseService database;
protected readonly ILogger _logger;
public BaseController(DatabaseService database, ILogger logger)
{
protected readonly DatabaseService database;
protected readonly ILogger _logger;
public BaseController(DatabaseService database, ILogger logger)
{
this.database = database;
_logger = logger;
}
this.database = database;
_logger = logger;
}
}

View File

@@ -26,6 +26,7 @@ public class DocumentController : BaseController
_envDocService = envDocService;
}
[Obsolete("Use MediatR")]
[NonAction]
public async Task<IActionResult> Get([FromRoute] string envelopeKey, [FromQuery] int index)
{
@@ -53,6 +54,7 @@ public class DocumentController : BaseController
[Authorize(Roles = ReceiverRole.FullyAuth)]
[HttpPost("{envelopeKey}")]
[Obsolete("Use MediatR")]
public async Task<IActionResult> Open(string envelopeKey)
{
try

View File

@@ -171,6 +171,7 @@ public class HomeController : ViewControllerBase
}
}
[Obsolete("Use MediatR")]
private async Task<IActionResult> CreateShowEnvelopeView(string envelopeReceiverId, EnvelopeReceiverDto er)
{
try
@@ -259,6 +260,7 @@ public class HomeController : ViewControllerBase
}
}
[Obsolete("Use MediatR")]
[NonAction]
private async Task<IActionResult?> HandleAccessCodeAsync(Auth auth, EnvelopeReceiverSecretDto er_secret, string envelopeReceiverId)
{
@@ -331,6 +333,7 @@ public class HomeController : ViewControllerBase
#endregion
[HttpPost("EnvelopeKey/{envelopeReceiverId}/Locked")]
[Obsolete("Use MediatR")]
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] Auth auth)
{
try

View File

@@ -3,13 +3,13 @@ using EnvelopeGenerator.Domain.Entities;
using DigitalData.Core.API;
using EnvelopeGenerator.Application.Contracts.Services;
namespace EnvelopeGenerator.Web.Controllers.Test
{
public class TestConfigController : ReadControllerBase<IConfigService, ConfigDto, Config, int>
{
public TestConfigController(ILogger<TestConfigController> logger, IConfigService service) : base(logger, service)
{
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
public class TestConfigController : ReadControllerBase<IConfigService, ConfigDto, Config, int>
{
public TestConfigController(ILogger<TestConfigController> logger, IConfigService service) : base(logger, service)
{
}
}
}

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
public class TestDocumentReceiverElementController : TestControllerBase<IDocumentReceiverElementService, DocumentReceiverElementDto, DocumentReceiverElement, int>
{
public TestDocumentReceiverElementController(ILogger<TestDocumentReceiverElementController> logger, IDocumentReceiverElementService service) : base(logger, service)

View File

@@ -4,53 +4,53 @@ using Microsoft.AspNetCore.Mvc;
using EnvelopeGenerator.Extensions;
using EnvelopeGenerator.Application.Contracts.Services;
namespace EnvelopeGenerator.Web.Controllers.Test
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
public class TestEnvelopeController : TestControllerBase<IEnvelopeService, EnvelopeDto, Envelope, int>
{
public class TestEnvelopeController : TestControllerBase<IEnvelopeService, EnvelopeDto, Envelope, int>
public TestEnvelopeController(ILogger<TestEnvelopeController> logger, IEnvelopeService service) : base(logger, service)
{
public TestEnvelopeController(ILogger<TestEnvelopeController> logger, IEnvelopeService service) : base(logger, service)
}
[NonAction]
public override Task<IActionResult> GetAll() => base.GetAll();
[HttpGet]
public async Task<IActionResult> GetAll([FromQuery] string? envelopeKey = default, [FromQuery] bool withDocuments = false, [FromQuery] bool withHistory = false, [FromQuery] bool withDocumentReceiverElement = false, [FromQuery] bool withUser = false, [FromQuery] bool withAll = true)
{
if (envelopeKey is not null)
{
(var uuid, var signature) = envelopeKey.DecodeEnvelopeReceiverId();
if (uuid is null)
return BadRequest("UUID is null");
var envlopeServiceResult = await _service.ReadByUuidAsync(
uuid: uuid,
withDocuments: withDocuments, withHistory: withHistory, withDocumentReceiverElement: withDocumentReceiverElement, withUser: withUser, withAll: withAll);
if (envlopeServiceResult.IsSuccess)
{
return Ok(envlopeServiceResult.Data);
}
return NotFound();
}
[NonAction]
public override Task<IActionResult> GetAll() => base.GetAll();
[HttpGet]
public async Task<IActionResult> GetAll([FromQuery] string? envelopeKey = default, [FromQuery] bool withDocuments = false, [FromQuery] bool withHistory = false, [FromQuery] bool withDocumentReceiverElement = false, [FromQuery] bool withUser = false, [FromQuery] bool withAll = true)
var result = await _service.ReadAllWithAsync(documents: withDocuments, history: withHistory);
if (result.IsSuccess)
{
if(envelopeKey is not null)
{
(var uuid, var signature) = envelopeKey.DecodeEnvelopeReceiverId();
if (uuid is null)
return BadRequest("UUID is null");
var envlopeServiceResult = await _service.ReadByUuidAsync(
uuid: uuid,
withDocuments: withDocuments, withHistory: withHistory, withDocumentReceiverElement:withDocumentReceiverElement, withUser:withUser, withAll:withAll);
if (envlopeServiceResult.IsSuccess)
{
return Ok(envlopeServiceResult.Data);
}
return NotFound();
}
var result = await _service.ReadAllWithAsync(documents: withDocuments, history: withHistory);
if (result.IsSuccess)
{
return Ok(result);
}
return NotFound(result);
return Ok(result);
}
return NotFound(result);
}
[HttpGet("decode")]
public IActionResult DecodeEnvelopeReceiverId(string envelopeReceiverId, int type = 0)
[HttpGet("decode")]
public IActionResult DecodeEnvelopeReceiverId(string envelopeReceiverId, int type = 0)
{
return type switch
{
return type switch
{
1 => Ok(envelopeReceiverId.GetEnvelopeUuid()),
2 => Ok(envelopeReceiverId.GetReceiverSignature()),
_ => Ok(envelopeReceiverId.DecodeEnvelopeReceiverId()),
};
}
}
1 => Ok(envelopeReceiverId.GetEnvelopeUuid()),
2 => Ok(envelopeReceiverId.GetReceiverSignature()),
_ => Ok(envelopeReceiverId.DecodeEnvelopeReceiverId()),
};
}
}

View File

@@ -3,13 +3,13 @@ using EnvelopeGenerator.Application.Contracts.Services;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Web.Controllers.Test
{
public class TestReceiverController : CRUDControllerBase<IReceiverService, ReceiverCreateDto, ReceiverReadDto, ReceiverUpdateDto, Receiver, int>
{
public TestReceiverController(ILogger<TestReceiverController> logger, IReceiverService service) : base(logger, service)
{
namespace EnvelopeGenerator.Web.Controllers.Test;
[Obsolete("Use MediatR")]
public class TestReceiverController : CRUDControllerBase<IReceiverService, ReceiverCreateDto, ReceiverReadDto, ReceiverUpdateDto, Receiver, int>
{
public TestReceiverController(ILogger<TestReceiverController> logger, IReceiverService service) : base(logger, service)
{
}
}
}

View File

@@ -2,36 +2,34 @@
using Microsoft.AspNetCore.Mvc;
using System.Text.Encodings.Web;
namespace EnvelopeGenerator.Web.Controllers.Test
namespace EnvelopeGenerator.Web.Controllers.Test;
[ApiController]
[Route("api/test/[controller]")]
public class TestSanitizeController : ControllerBase
{
[ApiController]
[Route("api/test/[controller]")]
public class TestSanitizeController : ControllerBase
private readonly HtmlEncoder _htmlEncoder;
private readonly HtmlSanitizer _sanitizer;
public TestSanitizeController(HtmlEncoder htmlEncoder, HtmlSanitizer sanitizer)
{
private readonly HtmlEncoder _htmlEncoder;
private readonly HtmlSanitizer _sanitizer;
public TestSanitizeController(HtmlEncoder htmlEncoder, HtmlSanitizer sanitizer)
{
_htmlEncoder = htmlEncoder;
_sanitizer = sanitizer;
}
[HttpGet("sanitize")]
public IActionResult Sanitize([FromQuery] string? input = null) => Ok(new
{
input,
Sanitized = _sanitizer.Sanitize(input),
SanitizedDocument = _sanitizer.SanitizeDocument(input),
SanitizedDom = _sanitizer.SanitizeDom(input)
});
[HttpGet("encode")]
public IActionResult Encoder([FromQuery] string? input = null) => Ok(new
{
input,
Encoded = _htmlEncoder.Encode(input)
});
_htmlEncoder = htmlEncoder;
_sanitizer = sanitizer;
}
}
[HttpGet("sanitize")]
public IActionResult Sanitize([FromQuery] string input) => Ok(new
{
input,
Sanitized = _sanitizer.Sanitize(input),
SanitizedDocument = _sanitizer.SanitizeDocument(input),
SanitizedDom = _sanitizer.SanitizeDom(input)
});
[HttpGet("encode")]
public IActionResult Encoder([FromQuery] string input) => Ok(new
{
input,
Encoded = _htmlEncoder.Encode(input)
});
}

View File

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

View File

@@ -2113,7 +2113,7 @@
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.15" />
<PackageReference Include="Microsoft.EntityFrameworkCore.SqlServer" Version="7.0.20" />
<PackageReference Include="Microsoft.Extensions.Caching.SqlServer" Version="7.0.20" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
<PackageReference Include="NLog" Version="5.2.5" />

View File

@@ -88,7 +88,10 @@ try
}
//AddEF Core dbcontext
var connStr = config.GetConnectionString(Key.Default) ?? throw new InvalidOperationException("There is no default connection string in appsettings.json.");
var useDbMigration = Environment.GetEnvironmentVariable("MIGRATION_TEST_MODE") == true.ToString() || config.GetValue<bool>("UseDbMigration");
var cnnStrName = useDbMigration ? Key.DbMigrationTest : Key.Default;
var connStr = config.GetConnectionString(cnnStrName)
?? throw new InvalidOperationException($"Connection string '{cnnStrName}' is missing in the application configuration.");
builder.Services.AddDistributedSqlServerCache(options =>
{
@@ -98,6 +101,7 @@ try
});
// Add envelope generator services
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddEnvelopeGeneratorInfrastructureServices((provider, options) =>
{
var logger = provider.GetRequiredService<ILogger<EGDbContext>>();
@@ -106,8 +110,11 @@ try
.EnableSensitiveDataLogging()
.EnableDetailedErrors();
});
#pragma warning restore CS0618 // Type or member is obsolete
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddEnvelopeGeneratorServices(config);
#pragma warning restore CS0618 // Type or member is obsolete
builder.Services.Configure<CookiePolicyOptions>(options =>
{
@@ -174,7 +181,10 @@ try
builder.Services.AddSingleton(sp => sp.GetRequiredService<IOptions<Cultures>>().Value);
// Register mail services
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddScoped<IEnvelopeMailService, EnvelopeMailService>();
#pragma warning restore CS0618 // Type or member is obsolete
builder.Services.AddDispatcher<EGDbContext>();
builder.Services.AddMemoryCache();
@@ -183,7 +193,9 @@ try
builder.ConfigureBySection<AnnotationParams>();
#pragma warning disable CS0618 // Type or member is obsolete
builder.Services.AddUserManager<EGDbContext>();
#pragma warning restore CS0618 // Type or member is obsolete
var app = builder.Build();

View File

@@ -16,7 +16,7 @@
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"swagger": {
"https": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
@@ -25,6 +25,17 @@
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7202;http://localhost:5009"
},
"httpsDbMigration": {
"commandName": "Project",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development",
"MIGRATION_TEST_MODE": "true"
},
"dotnetRunMessages": true,
"applicationUrl": "https://localhost:7202;http://localhost:5009"
}
},
"iisSettings": {

View File

@@ -1,6 +1,7 @@
{
"DiPMode": false, //Please be careful when enabling Development in Production (DiP) mode. It allows Swagger and test controllers to be enabled in a production environment.
"EnableSwagger": true,
"UseDbMigration": false,
"EnableTestControllers": true,
"DetailedErrors": true,
"Logging": {
@@ -12,7 +13,8 @@
}
},
"ConnectionStrings": {
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
"Default": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;",
"DbMigrationTest": "Server=SDD-VMP04-SQL17\\DD_DEVELOP01;Database=DD_ECM_DATA_MIGR_TEST;User Id=sa;Password=dd;Encrypt=false;TrustServerCertificate=True;"
},
"PSPDFKitLicenseKey": "SXCtGGY9XA-31OGUXQK-r7c6AkdLGPm2ljuyDr1qu0kkhLvydg-Do-fxpNUF4Rq3fS_xAnZRNFRHbXpE6sQ2BMcCSVTcXVJO6tPviexjpiT-HnrDEySlUERJnnvh-tmeOWprxS6BySPnSILkmaVQtUfOIUS-cUbvvEYHTvQBKbSF8di4XHQFyfv49ihr51axm3NVV3AXwh2EiKL5C5XdqBZ4sQ4O7vXBjM2zvxdPxlxdcNYmiU83uAzw7B83O_jubPzya4CdUHh_YH7Nlp2gP56MeG1Sw2JhMtfG3Rj14Sg4ctaeL9p6AEWca5dDjJ2li5tFIV2fQSsw6A_cowLu0gtMm5i8IfJXeIcQbMC2-0wGv1oe9hZYJvFMdzhTM_FiejM0agemxt3lJyzuyP8zbBSOgp7Si6A85krLWPZptyZBTG7pp7IHboUHfPMxCXqi-zMsqewOJtQBE2mjntU-lPryKnssOpMPfswwQX7QSkJYV5EMqNmEhQX6mEkp2wcqFzMC7bJQew1aO4pOpvChUaMvb1vgRek0HxLag0nwQYX2YrYGh7F_xXJs-8HNwJe8H0-eW4x4faayCgM5rB5772CCCsD9ThZcvXFrjNHHLGJ8WuBUFm6LArvSfFQdii_7j-_sqHMpeKZt26NFgivj1A==",
"Content-Security-Policy": [ // The first format parameter {0} will be replaced by the nonce value.

View File

@@ -0,0 +1,74 @@
# 📄 PSPDFKit-Integration Vanilla JavaScript
Dieses Projekt zeigt, wie die PDF-Anzeige- und Signaturbibliothek [PSPDFKit](https://www.nutrient.io/sdk/web/getting-started/other-frameworks/javascript/) mithilfe von **Vanilla JavaScript** integriert werden kann.
## 🚀 Verwendungszweck
PSPDFKit wurde in der Webanwendung verwendet, um PDF-Dokumente:
- anzuzeigen,
- zu signieren,
- mit Anmerkungen zu versehen,
- Formularfelder auszufüllen.
Benutzer können Dokumente **direkt über den Browser signieren und versenden**.
---
## 🔧 Wo und wie wurde PSPDFKit verwendet?
### 1. PSPDFKit laden
PSPDFKit wurde mit der Funktion `loadPSPDFKit` in `UI.js` gestartet:
```js
PSPDFKit.load({
container: #app,
document: arrayBuffer,
licenseKey: YOUR_LICENSE_KEY,
...
})
```
### 2. Anmerkungen und Formularfelder
In `annotation.js` werden die folgenden Felder dynamisch zu PDF-Dokumenten hinzugefügt:
- **Signaturfeld** (`SignatureFormField`)
- **Position** (`TextFormField`)
- **Stadt** (`TextFormField`)
- **Datum** (`TextFormField`, wird automatisch mit dem heutigen Datum ausgefüllt)
- **Bezeichnungen** (`Ort`, `Position`, `Date`) dies sind nur lesbare Textfelder.
- **Rahmen für Signaturbild** wird dynamisch erstellt und platziert, wenn der Benutzer unterschreibt.
Die Felder werden entsprechend ihrer Position auf dem PDF berechnet und für jedes Feld wird eine eindeutige ID erstellt.
---
### 3. Anpassungen der Symbolleiste
In `UI.js` ist die Standard-Symbolleiste (`toolbarItems`) von PSPDFKit konfiguriert:
- Es werden nur zulässige Elemente (`sidebar`, `zoom`, `pager`, `search` usw.) angezeigt.
- Je nach Benutzerberechtigung (z. B. schreibgeschützt oder beschreibbar) werden die folgenden speziellen Schaltflächen dynamisch hinzugefügt:
**Beschreibbarer Modus:**
- `Teilen` (SHARE)
- `Logout` (LOGOUT)
- `Zurücksetzen` (RESET)
- `Ablehnen` (REJECT)
- `Finalisieren` (FINISH)
**Nur-Lesemodus:**
- Die Schaltfläche `Teilen` kopiert nur den Link in die Zwischenablage (COPY_URL)
Für mobile Geräte werden zusätzlich vereinfachte Schaltflächen angezeigt.
---
### 📁 Wichtige Dateien
| Datei | Beschreibung |
|-------------------|-----------------------------------------------|
| `app.js` | Hauptanwendungsklasse, Dokumentladen und -steuerung |
| `ui.js` | PSPDFKit-UI-Einrichtung und Symbolleistenverwaltung |
| `annotation.js` | Erstellen und Löschen von Anmerkungsfeldern |