Compare commits

...

64 Commits

Author SHA1 Message Date
Developer 02
3688373481 fix(_Layout): sanitzer entfernt, um Json-Deserilisationsfehler zu vermeiden. 2025-02-11 13:43:01 +01:00
Developer 02
b8fbeee322 fix(HomeController): Zugehörige Datenbindungen hinzugefügt 2025-02-10 17:17:11 +01:00
Developer 02
57e4dfb3fb feat(EnvelopeLocked): Link zum Senden von E-Mails zu LockedFooterBodyAccess hinzugefügt.
- Gebunden mit Modell.
2025-02-10 16:58:57 +01:00
Developer 02
afc8d3baf0 chore: Upgegradet auf 2.10.4
- Resx-Felder aktualisiert.
2025-02-10 15:23:51 +01:00
Developer 02
51d77367ca fix(DIExtensions): aktualisiert, um den richtigen Abschnittsnamen einzugeben.
- ConfigureByTypeName entfernt
2025-02-10 15:05:46 +01:00
Developer 02
614f3768d9 chore(EnvelopeGenerator): Hochgestuft auf 2.10.3 2025-02-10 13:08:57 +01:00
Developer 02
5f780f8d1e fix(EnvelopeSmsHandler): Korrekte Ablaufprüfung und Cache-Aktualisierung in SendTotpAsync
- Die Bedingung für die Überprüfung des Ablaufs wurde korrigiert, so dass sie korrekt null zurückgibt, wenn der gespeicherte Ablauf in der Zukunft liegt.
- Fehlende Cache-Aktualisierung zur Speicherung des neuen Verfallsdatums nach dem Versand der TOTP-SMS hinzugefügt.
2025-02-10 11:48:36 +01:00
Developer 02
20825aa3ea feat(HomeController): Rollenprüfung für 2FA hinzugefügt
- wenn der Benutzer keine PreAuth Rolle hat, wird Status401Unauthorized zurückgegeben
2025-02-10 11:18:54 +01:00
Developer 02
c5b508d274 chore(EnvelopeGenerator): Hochgestuft auf 2.10.2 2025-02-07 14:49:39 +01:00
Developer 02
4eec4451b2 feat(TFARegController): Authentifizierungsbedingung zum Registrierungsendpunkt hinzugefügt 2025-02-07 13:31:54 +01:00
Developer 02
ca4718e159 feat(ControllerBaseExtensions): Erstellte Erweiterungsmethode zum Login über HttpContext mit Umschlag Empfänger und Rolle.
- Implementiert in HomeController
2025-02-07 13:12:27 +01:00
Developer 02
33fcb5b70e refactor(Controllers): FullyAuth-Rollenbedingung für jedes bestehende Auth-Attribut hinzugefügt, um die Autorisierung in Stufen aufzuteilen. 2025-02-07 10:53:17 +01:00
Developer 02
82d8521a25 feat(Constants): Erstellen von Konstanten für die Empfängerrolle, um die Authentifizierungsschritte des Empfängers zu trennen 2025-02-07 09:47:32 +01:00
Developer 02
2f9d07312b chore(Web): Hochgestuft auf 2.10.0 2025-02-06 19:41:47 +01:00
Developer 02
fa36593b26 refactor(Receiver): Entfernt TotpExpiration aus allen DTOs und Entitäten. 2025-02-06 19:41:11 +01:00
Developer 02
9cdb1409c0 feat(TFARegController): Try-Catch zur Methode reg'e hinzugefügt.
- Ausnahme ist so eingestellt, dass sie protokolliert wird.
2025-02-06 19:31:50 +01:00
Developer 02
95785e8c8b chore(Web): Hochgestuft auf 2.10.0 2025-02-06 18:40:37 +01:00
Developer 02
6d6e62c8d0 feat(EnvelopeLocked): Unterstützung für TFA-Registrierungsfrist auf der gesperrten Seite hinzufügen
- Einführung der TFA-Registrierungsfrist, um einen Link zur Einrichtung der Authenticator-App innerhalb eines gültigen Zeitfensters anzuzeigen.
- Aktualisierung der Ansicht, um die Registrierungsfrist anzuzeigen, falls zutreffend, und den Benutzer zur Einrichtung von TFA zu leiten.
2025-02-06 18:39:32 +01:00
Developer 02
1720e137f9 feat(Reg.cshtml): Zeitüberschreitung hinzugefügt.
- TFARegController.Reg aktualisiert, um die Seite _Expired view zu senden, wenn receiver.TfaRegDeadline abläuft.
 - TFARegParams Klasse für TimeLimit Configuration erstellt und mit appsettings konfiguriert.
2025-02-06 17:59:19 +01:00
Developer 02
3e6e2078bb feat(auth): Unterstützung für Authenticator-App-Setup-Link hinzugefügt
- Es wurde ein neuer Abschnitt eingeführt, der einen Link für Benutzer anzeigt, um ihre Authenticator-App einzurichten, wenn viaAuthenticator aktiviert ist.
 - Abruf von envelopeKey aus ViewData hinzugefügt, um den Einrichtungslink zu erstellen.
 - Refactored codeKeyName Initialisierung für saubereren Code.
2025-02-06 15:49:05 +01:00
Developer 02
6b0ec9386c chore: Bootstrap-icons-Bibliothek hinzufügen 2025-02-06 11:55:15 +01:00
Developer 02
ee49538f1e feat(Receiver): EnvelopeReceiver-Eigenschaft zu Entität, ReadDto und Updated Dto hinzugefügt. 2025-02-05 17:17:44 +01:00
Developer 02
311009bc97 feat(Reg): CSS zu .tfaQrCode hinzugefügt 2025-02-05 16:48:11 +01:00
Developer 02
f5028a82fa feat(Reg View): TFA-Registrierungsschritt erstellt 2025-02-05 16:12:42 +01:00
Developer 02
07d70dbd22 feat(TFARegController): QR-Code zu RegView hinzugefügt. 2025-02-05 13:42:55 +01:00
Developer 02
152050ebf4 feat(ViewControllerBase): Erstellt, um allgemeine Eigenschaften von ViewControllern zu behandeln.
- Implementiert in TFARegController.
 - Implementiert in HomeController.
2025-02-05 12:58:30 +01:00
Developer 02
e27daa4b90 feat(TFARegController): Initialisiert den MVC-Controller und den View zur Bearbeitung der TFA-Registrierung. 2025-02-05 11:32:34 +01:00
Developer 02
808a02968b refactor(CodeGenerator): umbenannt in Authenticator 2025-02-03 09:58:57 +01:00
Developer 02
bbd03615e1 feat(EnvelopeSmsHandler): Methode VerifyTotp hinzugefügt, um Totp mit TotpVerificationWindow von TotpSmsParams zu verifizieren. 2025-02-03 09:52:46 +01:00
Developer 02
772d510705 feat(EnvelopeSmsService): SendTotpAsync-Methode hinzufügen, um totp unter Berücksichtigung der Ablaufzeit zu senden. 2025-01-31 14:59:39 +01:00
Developer 02
aa918d875d refactor(JWT): Ungenutzte Schnittstelle und Controller entfernt 2025-01-31 13:10:55 +01:00
Developer 02
28fdf0a115 renamed(SmsParams): umbenannt in GtxMessagingParams 2025-01-31 13:06:11 +01:00
Developer 02
120c8623dd refactor(Application.Configurations): Config-Suffix in Params umbenannt. 2025-01-31 12:51:44 +01:00
Developer 02
363329ca18 refaktor: Vereinfachung der DI-Konfiguration und Verbesserung der Wiederverwendbarkeit
- Entfernte redundante `AddEnvelopeGenerator`-Überladung.
- Einführung der Erweiterungsmethode `ConfigureByTypeName<TOptions>` für eine sauberere Konfiguration.
- Ersetzte explizite Konfigurationsaufrufe durch `ConfigureByTypeName<TOptions>`.
- Verbesserte Wartbarkeit durch Reduzierung von redundantem Code.
- Markierte `ConfigureByTypeName<TOptions>` zur zukünftigen Verlagerung nach `DigitalData.Core`.
2025-01-31 11:54:49 +01:00
Developer 02
eb0c6dabf4 Revert "refactor(EnvelopeSmsService): Initialisiert mit Schnittstelle, DI-Injektion und Konfigurationen."
This reverts commit cd88af6807.
2025-01-31 11:20:43 +01:00
Developer 02
cd88af6807 refactor(EnvelopeSmsService): Initialisiert mit Schnittstelle, DI-Injektion und Konfigurationen. 2025-01-31 11:20:24 +01:00
Developer 02
1941de1928 refactor(EnvelopeSmsService): Initialisiert mit Schnittstelle, DI-Injektion und Konfigurationen. 2025-01-31 11:15:53 +01:00
Developer 02
22347a0202 refactor(MessagingService): umbenannt in SmsSender 2025-01-31 10:37:59 +01:00
Developer 02
e54d9d2da8 feat(TotpSmsParams): Erstellt, um die Konfiguration von Totp zu handhaben 2025-01-31 10:22:37 +01:00
Developer 02
06b1aa9560 refactor(appsetings): Unnötige Konfigurations-Parameter entfernt. 2025-01-30 16:43:14 +01:00
Developer 02
4f35fe54be fix(HomeController): Berechnungsmethode new_expiration aktualisiert, um AddSeconds zu verwenden 2025-01-30 16:37:01 +01:00
Developer 02
84e3e4e18d refactor(HomeController): renamed authentication methods with Handle prefix for clarity 2025-01-30 16:27:09 +01:00
Developer 02
7f26bb4766 refactor(HomeController): Aufteilung in Sub-TFAView-Methoden, um die Lesbarkeit zu verbessern. 2025-01-30 16:12:42 +01:00
Developer 02
f674be5200 chore: Projekt wurde auf 2.9.0 aktualisiert 2025-01-28 10:21:47 +01:00
Developer 02
0718f24339 feat(HomeController): TFAView wurde als separate Methode geschrieben, um Verwirrung zu vermeiden 2025-01-27 17:12:19 +01:00
Developer 02
6abc17c3bf feat(HomeController): Aktualisiert, um SMS über zu senden.
- Unnötige Parameter in SmsParams entfernt.
 - Code-Sendefunktion von IMessagingService entfernt.
 - GetTotpExpirationTime Methode im CodeGenerator entfernt.
2025-01-27 17:09:23 +01:00
Developer 02
cf300d3ade Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-01-27 16:50:44 +01:00
Developer 02
be44f9f436 refactor(HomeController): Statische Eigenschaften SmsTotpStep und SmsFormat hinzugefügt. 2025-01-27 15:01:34 +01:00
Developer 02
80f9107e4e feat(cache): Unterstützung für GetOrSetAsync mit DateTime-Typ hinzugefügt
- GetOrSetAsync für DateTime mit synchronen und asynchronen Fabrikmethoden implementiert.
- Bestehende GetOrSetAsync-Methoden für Zeichenfolgen und asynchrone Zeichenfolgen refaktoriert, um Klarheit und Struktur zu verbessern.
- Code mit Regionen organisiert, um ähnliche Methoden für bessere Lesbarkeit zu gruppieren.
- TODO für weitere Verbesserungen bei der Codegenerierung für GetOrSetAsync-Methoden hinzugefügt.
2025-01-27 14:50:23 +01:00
Developer 02
c6e9ecfbca refactor(cache): Unterstützung für CancellationToken in IDistributedCache-Erweiterungsmethoden hinzufügen
- Aktualisierte `SetLongAsync`, `GetLongAsync`, `SetDateTimeAsync`, `GetDateTimeAsync`, `SetTimeSpanAsync` und `GetTimeSpanAsync`, um optionale `CancellationToken`-Parameter zu unterstützen.
- Modifizierte `GetOrSetAsync`, um zwischen synchronen und asynchronen Fabrikfunktionen zu unterscheiden.
- Sicherstellung einer konsistenten Handhabung von `CancellationToken` in allen Cache-bezogenen Operationen.
2025-01-27 14:23:06 +01:00
Developer 02
af5d7c289d refactor(HomeController): LogInEnvelope aktualisiert, um SMS-Code als TOTP zu verifizieren 2025-01-27 13:47:26 +01:00
Developer 02
3267acbeb3 feat(CodeGenerator): GenerateTotp und VerifyTotp Methoden hinzugefügt. 2025-01-25 00:35:19 +01:00
Developer 02
95efe58e1b chore(Web): Hochgestuft auf 2.8.2 2025-01-24 20:42:01 +01:00
Developer 02
867756242e refactor(EnvelopeReceiver): TFAEnabled wurde in die Envelope-Tabelle für Entität und DTO verschoben.
- Aktualisierte zugehörige Felder in HomeController.
2025-01-24 18:13:29 +01:00
Developer 02
713c2f3ed2 refactor(GTXMessagingResponse): In die Anwendungsschicht verschoben. 2025-01-24 17:11:38 +01:00
Developer01
5a0e258b35 Ms Auswertungen, Dokument anzeigen, Drag and Drop 2025-01-24 14:34:28 +01:00
Developer01
651095976a Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2025-01-03 10:25:22 +01:00
Developer01
fcbee75b9b MS Common 2.1 - Enum VerificationType 2025-01-03 10:25:06 +01:00
Developer 02
dcb25ffc4c chore(Web): auf Projekt 2.8.1 hochgerüstet 2024-12-12 18:49:20 +01:00
Developer 02
618e295634 fix(EnvelopeLocked): falschen Buchstaben aus html entfernen 2024-12-12 18:48:14 +01:00
Developer 02
8a2fa2035a chore : alle Projekte als Debugger konfiguriert. 2024-12-12 18:47:27 +01:00
Developer 02
60109e4deb refactor(annotation.js): Standortzuweisung für mobile Geräte entfernt. 2024-12-12 18:21:28 +01:00
Developer 02
ed6a00dfdf refactor(util): Verschieben von Methoden über Standort nach util.location.js. 2024-12-12 17:11:45 +01:00
Developer 02
c693495928 chore(Web): hochgestuft auf 2.8 2024-12-11 20:09:34 +01:00
2163 changed files with 18311 additions and 1902 deletions

View File

@@ -1,6 +1,6 @@
namespace EnvelopeGenerator.Application.Configurations namespace EnvelopeGenerator.Application.Configurations
{ {
public class CodeGeneratorParams public class AuthenticatorParams
{ {
public string CharPool { get; init; } = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789012345678901234567890123456789"; public string CharPool { get; init; } = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789012345678901234567890123456789";

View File

@@ -1,13 +0,0 @@
namespace EnvelopeGenerator.Application.Configurations
{
public class DispatcherConfig
{
public int SendingProfile { get; init; } = 1;
public string AddedWho { get; init; } = "DDEnvelopGenerator";
public int ReminderTypeId { get; init; } = 202377;
public string EmailAttmt1 { get; init; } = string.Empty;
}
}

View File

@@ -0,0 +1,12 @@
namespace EnvelopeGenerator.Application.Configurations;
public class DispatcherParams
{
public int SendingProfile { get; init; } = 1;
public string AddedWho { get; init; } = "DDEnvelopGenerator";
public int ReminderTypeId { get; init; } = 202377;
public string EmailAttmt1 { get; init; } = string.Empty;
}

View File

@@ -1,19 +0,0 @@
namespace EnvelopeGenerator.Application.Configurations
{
public class EnvelopeReceiverCacheParams
{
/// <summary>
/// Gets the cache key format for SMS codes.
/// The placeholder {0} represents the envelopeReceiverId.
/// </summary>
public string CodeCacheKeyFormat { get; init; } = "sms-code-{0}";
/// <summary>
/// Gets the cache expiration key format for SMS codes.
/// The placeholder {0} represents the envelopeReceiverId.
/// </summary>
public string CodeExpirationCacheKeyFormat { get; init; } = "sms-code-expiration-{0}";
public TimeSpan CodeCacheValidityPeriod { get; init; } = new(0, 5, 0);
}
}

View File

@@ -1,25 +0,0 @@
using DigitalData.Core.Abstractions.Client;
using Microsoft.Extensions.Caching.Distributed;
namespace EnvelopeGenerator.Application.Configurations.GtxMessaging
{
/// <summary>
/// https://www.gtx-messaging.com/en/api-docs/sms-rest-api/
/// </summary>
public class SmsParams : IHttpClientOptions
{
public required string Uri { get; init; }
public string? Path { get; init; }
public Dictionary<string, object>? Headers { get; init; }
public Dictionary<string, object?>? QueryParams { get; init; }
public string RecipientQueryParamName { get; init; } = "to";
public string MessageQueryParamName { get; init; } = "text";
public int CodeLength { get; init; } = 5;
}
}

View File

@@ -0,0 +1,20 @@
using DigitalData.Core.Abstractions.Client;
namespace EnvelopeGenerator.Application.Configurations;
/// <summary>
/// https://www.gtx-messaging.com/en/api-docs/sms-rest-api/
/// </summary>
public class GtxMessagingParams : IHttpClientOptions
{
public required string Uri { get; init; }
public string? Path { get; init; }
public Dictionary<string, object>? Headers { get; init; }
public Dictionary<string, object?>? QueryParams { get; init; }
public string RecipientQueryParamName { get; init; } = "to";
public string MessageQueryParamName { get; init; } = "text";
}

View File

@@ -1,7 +0,0 @@
namespace EnvelopeGenerator.Application.Configurations
{
public class MailConfig
{
public required Dictionary<string, string> Placeholders { get; init; }
}
}

View File

@@ -0,0 +1,6 @@
namespace EnvelopeGenerator.Application.Configurations;
public class MailParams
{
public required Dictionary<string, string> Placeholders { get; init; }
}

View File

@@ -0,0 +1,49 @@
using OtpNet;
using System.Globalization;
namespace EnvelopeGenerator.Application.Configurations
{
public class TotpSmsParams
{
/// <summary>
/// The unit is second.
/// </summary>
public int TotpStep { get; init; } = 90;
public string Format { get; init; } = "Ihr 2FA-Passwort lautet {0}. Gültig bis {1}";
public ExpirationHandler Expiration { get; init; } = new();
public VerificationWindow? TotpVerificationWindow { get; private init; } = VerificationWindow.RfcSpecifiedNetworkDelay;
private IEnumerable<int>? _tvwParams;
public IEnumerable<int>? TotpVerificationWindowParams
{
get => _tvwParams;
init
{
_tvwParams = value;
if(_tvwParams is not null)
TotpVerificationWindow = new(previous: _tvwParams.ElementAtOrDefault(0), future: _tvwParams.ElementAtOrDefault(0));
}
}
public class ExpirationHandler
{
public string CacheKeyFormat { get; init; } = "e{0}_r{1}_sms_code_expiration";
public string Format { get; init; } = "HH:mm:ss";
public string CultureName
{
get => _cultureInfo.Name;
init => _cultureInfo = new(value);
}
private CultureInfo _cultureInfo = new("de-DE");
public CultureInfo CultureInfo => _cultureInfo;
}
}
}

View File

@@ -0,0 +1,19 @@
using OtpNet;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IAuthenticator
{
string GenerateCode(int length);
string GenerateTotpSecretKey(int? length = null);
byte[] GenerateTotpQrCode(string userEmail, string secretKey, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
byte[] GenerateTotpQrCode(string userEmail, int? length = null, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
string GenerateTotp(string secretKey, int step = 30);
bool VerifyTotp(string totpCode, string secretKey, int step = 30, VerificationWindow? window = null);
}
}

View File

@@ -1,13 +0,0 @@
namespace EnvelopeGenerator.Application.Contracts
{
public interface ICodeGenerator
{
string GenerateCode(int length);
public string GenerateTotpSecretKey(int? length = null);
public byte[] GenerateTotpQrCode(string userEmail, string secretKey, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
public byte[] GenerateTotpQrCode(string userEmail, int? length = null, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null);
}
}

View File

@@ -1,17 +0,0 @@
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeReceiverCache
{
Task<string?> GetSmsCodeAsync(string envelopeReceiverId);
/// <summary>
/// Asynchronously stores an SMS verification code in the cache and returns the expiration date of the code.
/// </summary>
/// <param name="envelopeReceiverId">The unique identifier for the recipient of the envelope to associate with the SMS code.</param>
/// <param name="code">The SMS verification code to be stored.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains the expiration date and time of the stored SMS code.</returns>
Task<DateTime> SetSmsCodeAsync(string envelopeReceiverId, string code);
Task<DateTime?> GetSmsCodeExpirationAsync(string envelopeReceiverId);
}
}

View File

@@ -0,0 +1,17 @@
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Contracts;
public interface IEnvelopeSmsHandler
{
/// <summary>
/// If expiration is passed then, sends sms and returns smsResponse and up-to-date expiration; otherwise send expiration.
/// </summary>
/// <param name="er_secret"></param>
/// <param name="cToken"></param>
/// <returns></returns>
Task<(SmsResponse? SmsResponse, DateTime Expiration)> SendTotpAsync(EnvelopeReceiverSecretDto er_secret, CancellationToken cToken = default);
bool VerifyTotp(string totpCode, string secretKey);
}

View File

@@ -1,24 +0,0 @@
using Microsoft.IdentityModel.Tokens;
using System.IdentityModel.Tokens.Jwt;
using System.Security.Claims;
using System.Security.Cryptography;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IJWTService<TClaimValue>
{
public static SymmetricSecurityKey GenerateSecurityKey(int byteSize = 32)
{
using var rng = RandomNumberGenerator.Create();
var randomBytes = new byte[byteSize];
rng.GetBytes(randomBytes);
var securityKey = new SymmetricSecurityKey(randomBytes);
return securityKey;
}
string GenerateToken(TClaimValue claimValue);
JwtSecurityToken? ReadSecurityToken(string token);
}
}

View File

@@ -1,13 +0,0 @@
using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IMessagingService
{
string ServiceProvider { get; }
Task<SmsResponse> SendSmsAsync(string recipient, string message);
Task<SmsResponse> SendSmsCodeAsync(string recipient, string envelopeReceiverId);
}
}

View File

@@ -0,0 +1,11 @@
using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Contracts;
//TODO: move to DigitalData.Core
public interface ISmsSender
{
string ServiceProvider { get; }
Task<SmsResponse> SendSmsAsync(string recipient, string message);
}

View File

@@ -51,7 +51,9 @@ namespace EnvelopeGenerator.Application.DTOs
public int? ExpiresWarningWhenDays { get; set; } public int? ExpiresWarningWhenDays { get; set; }
public bool DmzMoved { get; set; } public bool TFAEnabled { get; init; }
public bool DmzMoved { get; set; }
public UserReadDto? User { get; set; } public UserReadDto? User { get; set; }
public EnvelopeType? EnvelopeType { get; set; } public EnvelopeType? EnvelopeType { get; set; }

View File

@@ -27,7 +27,5 @@ namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
public DateTime? ChangedWhen { get; init; } public DateTime? ChangedWhen { get; init; }
public bool HasPhoneNumber { get; init; } public bool HasPhoneNumber { get; init; }
public bool TFAEnabled { get; init; }
} }
} }

View File

@@ -1,4 +1,4 @@
namespace EnvelopeGenerator.Domain.HttpResponse namespace EnvelopeGenerator.Application.DTOs.Messaging
{ {
public class GtxMessagingResponse : Dictionary<string, object?> { } public class GtxMessagingResponse : Dictionary<string, object?> { }
} }

View File

@@ -4,15 +4,7 @@
{ {
public required bool Ok { get; init; } public required bool Ok { get; init; }
public DateTime? Expiration { get; set; } public bool Failed => !Ok;
public DateTime? AllowedAt { get; set; }
public TimeSpan AllowedAfter => Allowed ? TimeSpan.Zero : AllowedAt!.Value - DateTime.Now;
public bool Allowed => AllowedAt is null || DateTime.Now >= AllowedAt;
public bool Error => !Ok && Allowed;
public dynamic? Errors { get; init; } public dynamic? Errors { get; init; }
} }

View File

@@ -4,7 +4,7 @@ using System.Text;
namespace EnvelopeGenerator.Application.DTOs.Receiver namespace EnvelopeGenerator.Application.DTOs.Receiver
{ {
public record ReceiverCreateDto([EmailAddress] string EmailAddress, string? TotpSecretkey = null, DateTime? TotpExpiration = null) public record ReceiverCreateDto([EmailAddress] string EmailAddress, string? TotpSecretkey = null)
{ {
public string Signature => sha256HexOfMail.Value; public string Signature => sha256HexOfMail.Value;

View File

@@ -4,23 +4,21 @@ using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver; using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using System.Text.Json.Serialization; using System.Text.Json.Serialization;
namespace EnvelopeGenerator.Application.DTOs.Receiver namespace EnvelopeGenerator.Application.DTOs.Receiver;
public record ReceiverReadDto(
int Id,
string EmailAddress,
string Signature,
DateTime AddedWhen
) : BaseDTO<int>(Id), IUnique<int>
{ {
public record ReceiverReadDto( [JsonIgnore]
int Id, public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
string EmailAddress,
string Signature,
DateTime AddedWhen
) : BaseDTO<int>(Id), IUnique<int>
{
[JsonIgnore]
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name; public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
public string? TotpSecretkey { get; set; } = null; public string? TotpSecretkey { get; set; } = null;
[TemplatePlaceholder("[TFA_QR_EXPIRATION]")] public DateTime? TfaRegDeadline { get; set; }
public DateTime? TotpExpiration { get; set; } = null; };
};
}

View File

@@ -1,6 +1,5 @@
using DigitalData.Core.Abstractions; using DigitalData.Core.Abstractions;
namespace EnvelopeGenerator.Application.DTOs.Receiver namespace EnvelopeGenerator.Application.DTOs.Receiver;
{
public record ReceiverUpdateDto(int Id, string? TotpSecretkey = null, DateTime? TotpExpiration = null) : IUnique<int>; public record ReceiverUpdateDto(int Id, string? TotpSecretkey = null, DateTime? TfaRegDeadline = null) : IUnique<int>;
}

View File

@@ -1,59 +1,60 @@
<Project Sdk="Microsoft.NET.Sdk"> <Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup> <PropertyGroup>
<TargetFramework>net7.0</TargetFramework> <TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings> <ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable> <Nullable>enable</Nullable>
</PropertyGroup> </PropertyGroup>
<ItemGroup> <ItemGroup>
<None Remove="Resources\Model.Designer.vb" /> <None Remove="Resources\Model.Designer.vb" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<PackageReference Include="AutoMapper" Version="13.0.1" /> <PackageReference Include="AutoMapper" Version="13.0.1" />
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" /> <PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" /> <PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" /> <PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" /> <PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" />
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" /> <PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" /> <PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
<PackageReference Include="QRCoder" Version="1.6.0" /> <PackageReference Include="Otp.NET" Version="1.4.0" />
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" /> <PackageReference Include="QRCoder" Version="1.6.0" />
<PackageReference Include="UserManager.Application" Version="2.0.0" /> <PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
<PackageReference Include="UserManager.Infrastructure" Version="2.0.0" /> <PackageReference Include="UserManager.Application" Version="2.0.0" />
</ItemGroup> <PackageReference Include="UserManager.Infrastructure" Version="2.0.0" />
</ItemGroup>
<ItemGroup> <ItemGroup>
<ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" /> <ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" />
<ProjectReference Include="..\EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj" /> <ProjectReference Include="..\EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj" />
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<Compile Update="Resources\Model.Designer.cs"> <Compile Update="Resources\Model.Designer.cs">
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
<AutoGen>True</AutoGen> <AutoGen>True</AutoGen>
<DependentUpon>Model.resx</DependentUpon> <DependentUpon>Model.resx</DependentUpon>
</Compile> </Compile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<EmbeddedResource Update="Resources\Model.en.resx"> <EmbeddedResource Update="Resources\Model.en.resx">
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
<LastGenOutput>Model.en.Designer.vb</LastGenOutput> <LastGenOutput>Model.en.Designer.vb</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Resources\Model.resx"> <EmbeddedResource Update="Resources\Model.resx">
<CustomToolNamespace>My.Resources</CustomToolNamespace> <CustomToolNamespace>My.Resources</CustomToolNamespace>
<LastGenOutput>Model.Designer.cs</LastGenOutput> <LastGenOutput>Model.Designer.cs</LastGenOutput>
<Generator>PublicResXFileCodeGenerator</Generator> <Generator>PublicResXFileCodeGenerator</Generator>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Resources\Resource.de-DE.resx"> <EmbeddedResource Update="Resources\Resource.de-DE.resx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Update="Resources\Resource.en-US.resx"> <EmbeddedResource Update="Resources\Resource.en-US.resx">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory> <CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</EmbeddedResource> </EmbeddedResource>
</ItemGroup> </ItemGroup>
</Project> </Project>

View File

@@ -4,79 +4,128 @@ namespace EnvelopeGenerator.Application.Extensions
{ {
public static class CacheExtensions public static class CacheExtensions
{ {
public static Task SetLongAsync(this IDistributedCache cache, string key, long value, DistributedCacheEntryOptions? options = null) public static Task SetLongAsync(this IDistributedCache cache, string key, long value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
=> options is null => options is null
? cache.SetAsync(key, BitConverter.GetBytes(value)) ? cache.SetAsync(key, BitConverter.GetBytes(value), token: cToken)
: cache.SetAsync(key, BitConverter.GetBytes(value), options: options); : cache.SetAsync(key, BitConverter.GetBytes(value), options: options, token: cToken);
public static async Task<long?> GetLongAsync(this IDistributedCache cache, string key) public static async Task<long?> GetLongAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{ {
var value = await cache.GetAsync(key); var value = await cache.GetAsync(key, cToken);
return value is null ? null : BitConverter.ToInt64(value, 0); return value is null ? null : BitConverter.ToInt64(value, 0);
} }
public static Task SetDateTimeAsync(this IDistributedCache cache, string key, DateTime value, DistributedCacheEntryOptions? options = null) 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); => cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken: cToken);
public static async Task<DateTime?> GetDateTimeAsync(this IDistributedCache cache, string key) public static async Task<DateTime?> GetDateTimeAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{ {
var value = await cache.GetAsync(key); var value = await cache.GetAsync(key, cToken);
return value is null ? null : new(BitConverter.ToInt64(value, 0)); return value is null ? null : new(BitConverter.ToInt64(value, 0));
} }
public static Task SetTimeSpanAsync(this IDistributedCache cache, string key, TimeSpan value, DistributedCacheEntryOptions? options = null) 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); => cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken);
public static async Task<TimeSpan?> GetTimeSpanAsync(this IDistributedCache cache, string key) public static async Task<TimeSpan?> GetTimeSpanAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
{ {
var value = await cache.GetAsync(key); var value = await cache.GetAsync(key, cToken);
return value is null ? null : new(BitConverter.ToInt64(value, 0)); return value is null ? null : new(BitConverter.ToInt64(value, 0));
} }
public static string GetOrSet(this IDistributedCache cache, string key, Func<string> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken token = default) //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 = cache.GetString(key); var value = await cache.GetStringAsync(key, cToken);
if (value is null) if (value is null)
{ {
// create new and save // create new and save
value = factory(); value = factory();
void Cache()
{
if (options is null)
cache.SetString(key: key, value: value);
else
cache.SetString(key: key, value: value, options: options);
}
if (cacheInBackground)
_ = Task.Run(() => Cache(), token);
else
Cache();
}
return value;
}
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<string>> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken token = default)
{
var value = await cache.GetStringAsync(key, token: token);
if(value is null)
{
// create new and save
value = await factory();
Task CacheAsync() => options is null Task CacheAsync() => options is null
? cache.SetStringAsync(key: key, value: value, token: token) ? cache.SetStringAsync(key, value, cToken)
: cache.SetStringAsync(key: key, value: value, options: options, token: token); : cache.SetStringAsync(key, value, options, cToken);
if (cacheInBackground) if (cacheInBackground)
_ = Task.Run(async () => await CacheAsync(), token); _ = Task.Run(async () => await CacheAsync(), cToken);
else else
await CacheAsync(); await CacheAsync();
} }
return value; 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
} }
} }

View File

@@ -9,70 +9,61 @@ using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.DependencyInjection; using Microsoft.Extensions.DependencyInjection;
using Microsoft.Extensions.DependencyInjection.Extensions; using Microsoft.Extensions.DependencyInjection.Extensions;
using DigitalData.Core.Client; using DigitalData.Core.Client;
using EnvelopeGenerator.Application.Configurations.GtxMessaging;
using QRCoder; using QRCoder;
namespace EnvelopeGenerator.Application.Extensions namespace EnvelopeGenerator.Application.Extensions;
public static class DIExtensions
{ {
public static class DIExtensions public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config)
{ {
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfigurationSection dispatcherConfigSection, IConfigurationSection mailConfigSection, IConfigurationSection smsConfigSection, IConfigurationSection codeGeneratorConfigSection, IConfigurationSection envelopeReceiverCacheParamsSection) //Inject CRUD Service and repositoriesad
{ services.TryAddScoped<IConfigRepository, ConfigRepository>();
//Inject CRUD Service and repositoriesad services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
services.TryAddScoped<IConfigRepository, ConfigRepository>(); services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>(); services.TryAddScoped<IConfigRepository, ConfigRepository>();
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>(); services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
services.TryAddScoped<IConfigRepository, ConfigRepository>(); services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>(); services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>(); services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>(); services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>(); services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>(); services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>(); services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>(); services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>(); services.TryAddScoped<IReceiverRepository, ReceiverRepository>();
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>(); services.TryAddScoped<IUserReceiverRepository, UserReceiverRepository>();
services.TryAddScoped<IReceiverRepository, ReceiverRepository>(); services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
services.TryAddScoped<IUserReceiverRepository, UserReceiverRepository>(); services.TryAddScoped<IConfigService, ConfigService>();
services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>(); services.TryAddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
services.TryAddScoped<IConfigService, ConfigService>(); services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
services.TryAddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>(); services.TryAddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>(); services.TryAddScoped<IDocumentStatusService, DocumentStatusService>();
services.TryAddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>(); services.TryAddScoped<IEmailTemplateService, EmailTemplateService>();
services.TryAddScoped<IDocumentStatusService, DocumentStatusService>(); services.TryAddScoped<IEnvelopeService, EnvelopeService>();
services.TryAddScoped<IEmailTemplateService, EmailTemplateService>(); services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
services.TryAddScoped<IEnvelopeService, EnvelopeService>(); services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>(); services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>(); services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>(); services.TryAddScoped<IReceiverService, ReceiverService>();
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>(); services.TryAddScoped<IUserReceiverService, UserReceiverService>();
services.TryAddScoped<IReceiverService, ReceiverService>(); services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
services.TryAddScoped<IUserReceiverService, UserReceiverService>();
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
//Auto mapping profiles //Auto mapping profiles
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly); services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
services.AddAutoMapper(typeof(UserMappingProfile).Assembly); services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
services.Configure<DispatcherConfig>(dispatcherConfigSection); services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
services.Configure<MailConfig>(mailConfigSection); services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
services.Configure<CodeGeneratorParams>(codeGeneratorConfigSection); services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
services.Configure<EnvelopeReceiverCacheParams>(envelopeReceiverCacheParamsSection); services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
services.AddHttpClientService<SmsParams>(smsConfigSection); services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
services.TryAddSingleton<IMessagingService, GtxMessagingService>(); services.TryAddSingleton<ISmsSender, GTXSmsSender>();
services.TryAddSingleton<ICodeGenerator, CodeGenerator>(); services.TryAddSingleton<IEnvelopeSmsHandler, EnvelopeSmsHandler>();
services.TryAddSingleton<IEnvelopeReceiverCache, EnvelopeReceiverCache>(); services.TryAddSingleton<IAuthenticator, Authenticator>();
services.TryAddSingleton<QRCodeGenerator>(); services.TryAddSingleton<QRCodeGenerator>();
return services; return services;
}
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator(
dispatcherConfigSection: config.GetSection("DispatcherConfig"),
mailConfigSection: config.GetSection("MailConfig"),
smsConfigSection: config.GetSection("SmsConfig"),
codeGeneratorConfigSection: config.GetSection("CodeGeneratorParams"),
envelopeReceiverCacheParamsSection: config.GetSection("EnvelopeReceiverCacheParams"));
} }
} }

View File

@@ -1,22 +0,0 @@
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Extensions;
using Newtonsoft.Json;
namespace EnvelopeGenerator.Application.Extensions
{
public static class DTOExtensions
{
public static bool IsTotpSecretExpired(this ReceiverReadDto dto, int minutesBeforeExpiration = 30)
=> dto.TotpExpiration < DateTime.Now.AddMinutes(minutesBeforeExpiration * -1);
public static bool IsTotpSecretInvalid(this ReceiverReadDto dto, int minutesBeforeExpiration = 30)
=> dto.IsTotpSecretExpired(minutesBeforeExpiration) || dto.TotpSecretkey is null;
public static bool IsTotpSecretValid(this ReceiverReadDto dto, int minutesBeforeExpiration = 30)
=> !dto.IsTotpSecretInvalid(minutesBeforeExpiration);
public static bool IsTotpValid(this ReceiverReadDto dto, string totp) => dto.TotpSecretkey is null ? throw new ArgumentNullException(nameof(dto), $"TotpSecretkey of DTO cannot validate without TotpSecretkey. Dto: {JsonConvert.SerializeObject(dto)}") : totp.IsValidTotp(dto.TotpSecretkey);
public static bool IsTotpInvalid(this ReceiverReadDto dto, string totp) => !dto.IsTotpValid(totp: totp);
}
}

View File

@@ -1,4 +1,4 @@
using EnvelopeGenerator.Domain.HttpResponse; using EnvelopeGenerator.Application.DTOs.Messaging;
namespace EnvelopeGenerator.Application.Extensions namespace EnvelopeGenerator.Application.Extensions
{ {

View File

@@ -7,7 +7,6 @@ using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Application.DTOs.Receiver; using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Application.Extensions; using EnvelopeGenerator.Application.Extensions;
using EnvelopeGenerator.Domain.Entities; using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Domain.HttpResponse;
namespace EnvelopeGenerator.Application.MappingProfiles namespace EnvelopeGenerator.Application.MappingProfiles
{ {

View File

@@ -163,10 +163,10 @@
<value>Bitte überprüfen Sie die Standortinformationen. Wenn sie falsch sind, korrigieren Sie diese bitte.</value> <value>Bitte überprüfen Sie die Standortinformationen. Wenn sie falsch sind, korrigieren Sie diese bitte.</value>
</data> </data>
<data name="LockedBodyAccess" xml:space="preserve"> <data name="LockedBodyAccess" xml:space="preserve">
<value>Wir haben Ihnen gerade den Zugriffscode an die hinterlegte Email Adresse gesendet. Dies kann evtl. einige Minuten dauern.</value> <value>Wir senden Ihnen nun einen Zugriffscode an Ihre hinterlegte Email-Adresse. Dies kann evtl. einige Minuten dauern!</value>
</data> </data>
<data name="LockedBodyAuthenticator" xml:space="preserve"> <data name="LockedBodyAuthenticator" xml:space="preserve">
<value>Ihr QR-Code ist bis {0} gültig.</value> <value>Bitte geben Sie den in Ihrer Authenticator-App angegebenen TOTP-Code ein.</value>
</data> </data>
<data name="LockedBodyAuthenticatorNew" xml:space="preserve"> <data name="LockedBodyAuthenticatorNew" xml:space="preserve">
<value>Wir haben den QR-Code an Ihre E-Mail-Adresse gesendet. Ihr QR-Code ist bis {0} gültig. Sie können ihn für alle Umschläge verwenden, die Sie an diese E-Mail-Adresse erhalten.</value> <value>Wir haben den QR-Code an Ihre E-Mail-Adresse gesendet. Ihr QR-Code ist bis {0} gültig. Sie können ihn für alle Umschläge verwenden, die Sie an diese E-Mail-Adresse erhalten.</value>
@@ -184,7 +184,7 @@
<value>SMS-Code</value> <value>SMS-Code</value>
</data> </data>
<data name="LockedFooterBodyAccess" xml:space="preserve"> <data name="LockedFooterBodyAccess" xml:space="preserve">
<value>Bitte überprüfen Sie Ihr Email Postfach inklusive Spam-Ordner. Sie können auch den Absender bitten, Ihnen den Code auf anderem Wege zukommen zu lassen.</value> <value>Bitte überprüfen Sie Ihr Email Postfach inklusive Spam-Ordner. Sie können auch den Absender &lt;a class="mail-link" href="mailto:{0}?subject={1}&amp;body={2}" target="_blank"&gt;{0}&lt;/a&gt; bitten, Ihnen den Code auf anderem Wege zukommen zu lassen.</value>
</data> </data>
<data name="LockedFooterBodyAuthenticator" xml:space="preserve"> <data name="LockedFooterBodyAuthenticator" xml:space="preserve">
<value>Der neue QR-Code wird nur einmal für einen bestimmten Zeitraum gesendet und nach dem Scannen in Ihrer Authenticator-App gespeichert. Er kann für alle Umschläge verwendet werden, die an dieselbe E-Mail-Adresse gesendet werden, bis er abläuft. Wenn Sie die QR-Code-Mail nicht erhalten oder sie sowohl aus der Mail als auch aus authenticator löschen, kontaktieren Sie bitte den Absender.</value> <value>Der neue QR-Code wird nur einmal für einen bestimmten Zeitraum gesendet und nach dem Scannen in Ihrer Authenticator-App gespeichert. Er kann für alle Umschläge verwendet werden, die an dieselbe E-Mail-Adresse gesendet werden, bis er abläuft. Wenn Sie die QR-Code-Mail nicht erhalten oder sie sowohl aus der Mail als auch aus authenticator löschen, kontaktieren Sie bitte den Absender.</value>

View File

@@ -163,10 +163,10 @@
<value>Please review the location information. If it is incorrect, kindly make the necessary corrections.</value> <value>Please review the location information. If it is incorrect, kindly make the necessary corrections.</value>
</data> </data>
<data name="LockedBodyAccess" xml:space="preserve"> <data name="LockedBodyAccess" xml:space="preserve">
<value>We have just sent you the access code to the email address you provided. This may take a few minutes.</value> <value>We will now send you an access code to your registered e-mail address. This may take a few minutes!</value>
</data> </data>
<data name="LockedBodyAuthenticator" xml:space="preserve"> <data name="LockedBodyAuthenticator" xml:space="preserve">
<value>Your QR code is valid until {0}.</value> <value>Please enter the TOTP provided in your Authenticator app.</value>
</data> </data>
<data name="LockedBodyAuthenticatorNew" xml:space="preserve"> <data name="LockedBodyAuthenticatorNew" xml:space="preserve">
<value>We have sent the QR code to your e-mail address. Your QR code is valid until {0}. You can use it for all envelopes received at this email address.</value> <value>We have sent the QR code to your e-mail address. Your QR code is valid until {0}. You can use it for all envelopes received at this email address.</value>
@@ -184,7 +184,7 @@
<value>SMS Code</value> <value>SMS Code</value>
</data> </data>
<data name="LockedFooterBodyAccess" xml:space="preserve"> <data name="LockedFooterBodyAccess" xml:space="preserve">
<value>Please check your email inbox including your spam folder. Furthermore, you can also ask the sender to send the code by other means.</value> <value>Please check your email inbox including the spam folder. You can also ask the sender &lt;a class="mail-link" href="mailto:{0}?subject={1}&amp;body={2}" target="_blank"&gt;{0}&lt;/a&gt; to send you the code by other means.</value>
</data> </data>
<data name="LockedFooterBodyAuthenticator" xml:space="preserve"> <data name="LockedFooterBodyAuthenticator" xml:space="preserve">
<value>The new QR code is sent only once for a given period and is saved in your authenticator app once scanned. It can be used for all envelopes received at the same email address until it expires. If you do not receive the QR code mail or delete it both from the mail and from authenticator, please contact the sender.</value> <value>The new QR code is sent only once for a given period and is saved in your authenticator app once scanned. It can be used for all envelopes received at the same email address until it expires. If you do not receive the QR code mail or delete it both from the mail and from authenticator, please contact the sender.</value>

View File

@@ -7,17 +7,17 @@ using System.Text;
namespace EnvelopeGenerator.Application.Services namespace EnvelopeGenerator.Application.Services
{ {
public class CodeGenerator : ICodeGenerator public class Authenticator : IAuthenticator
{ {
public static Lazy<CodeGenerator> LazyStatic => new(() => new CodeGenerator(Options.Create<CodeGeneratorParams>(new()), new QRCodeGenerator())); public static Lazy<Authenticator> LazyStatic => new(() => new Authenticator(Options.Create<AuthenticatorParams>(new()), new QRCodeGenerator()));
public static CodeGenerator Static => LazyStatic.Value; public static Authenticator Static => LazyStatic.Value;
private readonly CodeGeneratorParams _params; private readonly AuthenticatorParams _params;
private readonly QRCodeGenerator _qrCodeGenerator; private readonly QRCodeGenerator _qrCodeGenerator;
public CodeGenerator(IOptions<CodeGeneratorParams> options, QRCodeGenerator qrCodeGenerator) public Authenticator(IOptions<AuthenticatorParams> options, QRCodeGenerator qrCodeGenerator)
{ {
_params = options.Value; _params = options.Value;
_qrCodeGenerator = qrCodeGenerator; _qrCodeGenerator = qrCodeGenerator;
@@ -62,5 +62,10 @@ namespace EnvelopeGenerator.Application.Services
totpUrlFormat: totpUrlFormat, totpUrlFormat: totpUrlFormat,
pixelsPerModule: pixelsPerModule); pixelsPerModule: pixelsPerModule);
} }
public string GenerateTotp(string secretKey, int step = 30) => new Totp(Base32Encoding.ToBytes(secretKey), step).ComputeTotp();
public bool VerifyTotp(string totpCode, string secretKey, int step = 30, VerificationWindow? window = null)
=> new Totp(Base32Encoding.ToBytes(secretKey), step).VerifyTotp(totpCode, out _, window);
} }
} }

View File

@@ -21,19 +21,19 @@ namespace EnvelopeGenerator.Application.Services
{ {
private readonly IEmailTemplateService _tempService; private readonly IEmailTemplateService _tempService;
private readonly IEnvelopeReceiverService _envRcvService; private readonly IEnvelopeReceiverService _envRcvService;
private readonly DispatcherConfig _dConfig; private readonly DispatcherParams _dConfig;
private readonly IConfigService _configService; private readonly IConfigService _configService;
private readonly Dictionary<string, string> _placeholders; private readonly Dictionary<string, string> _placeholders;
private readonly ICodeGenerator _codeGenerator; private readonly IAuthenticator _authenticator;
public EnvelopeMailService(IEmailOutRepository repository, IMapper mapper, IEmailTemplateService tempService, IEnvelopeReceiverService envelopeReceiverService, IOptions<DispatcherConfig> dispatcherConfigOptions, IConfigService configService, IOptions<MailConfig> mailConfig, ICodeGenerator codeGenerator) : base(repository, mapper) 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; _tempService = tempService;
_envRcvService = envelopeReceiverService; _envRcvService = envelopeReceiverService;
_dConfig = dispatcherConfigOptions.Value; _dConfig = dispatcherConfigOptions.Value;
_configService = configService; _configService = configService;
_placeholders = mailConfig.Value.Placeholders; _placeholders = mailConfig.Value.Placeholders;
_codeGenerator = codeGenerator; _authenticator = authenticator;
} }
private async Task<Dictionary<string, string>> CreatePlaceholders(string? accessCode = null, EnvelopeReceiverDto? envelopeReceiverDto = null) private async Task<Dictionary<string, string>> CreatePlaceholders(string? accessCode = null, EnvelopeReceiverDto? envelopeReceiverDto = null)
@@ -164,14 +164,11 @@ namespace EnvelopeGenerator.Application.Services
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver information is missing. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}"); throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver information is missing. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
if (dto.Receiver.TotpSecretkey is null) if (dto.Receiver.TotpSecretkey is null)
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpSecretKey is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}"); throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpSecretKey is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
if (dto.Receiver.TotpExpiration is null)
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpExpiration is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
var totp_qr_64 = _codeGenerator.GenerateTotpQrCode(userEmail: dto.Receiver.EmailAddress, secretKey: dto.Receiver.TotpSecretkey).ToBase64String(); var totp_qr_64 = _authenticator.GenerateTotpQrCode(userEmail: dto.Receiver.EmailAddress, secretKey: dto.Receiver.TotpSecretkey).ToBase64String();
return SendAsync(dto, EmailTemplateType.TotpSecret, new() return SendAsync(dto, EmailTemplateType.TotpSecret, new()
{ {
{"[TFA_QR_CODE]", totp_qr_64 }, {"[TFA_QR_CODE]", totp_qr_64 },
{"[TFA_EXPIRATION]", dto.Receiver.TotpExpiration }
}); });
} }
} }

View File

@@ -1,50 +0,0 @@
using AngleSharp.Dom;
using EnvelopeGenerator.Application.Configurations;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.Extensions;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeReceiverCache : IEnvelopeReceiverCache
{
private readonly EnvelopeReceiverCacheParams _cacheParams;
private readonly DistributedCacheEntryOptions _codeCacheOptions;
private readonly IDistributedCache _cache;
public EnvelopeReceiverCache(IOptions<EnvelopeReceiverCacheParams> cacheParamOptions, IDistributedCache cache)
{
_cacheParams = cacheParamOptions.Value;
_codeCacheOptions = new() { AbsoluteExpirationRelativeToNow = cacheParamOptions.Value.CodeCacheValidityPeriod };
_cache = cache;
}
public async Task<string?> GetSmsCodeAsync(string envelopeReceiverId)
{
var code_key = string.Format(_cacheParams.CodeCacheKeyFormat, envelopeReceiverId);
return await _cache.GetStringAsync(code_key);
}
public async Task<DateTime> SetSmsCodeAsync(string envelopeReceiverId, string code)
{
// set key
var code_key = string.Format(_cacheParams.CodeCacheKeyFormat, envelopeReceiverId);
await _cache.SetStringAsync(code_key, code, _codeCacheOptions);
// set expiration
var code_expiration_key = string.Format(_cacheParams.CodeExpirationCacheKeyFormat, envelopeReceiverId);
var expiration = DateTime.Now + _cacheParams.CodeCacheValidityPeriod;
await _cache.SetDateTimeAsync(code_expiration_key, expiration, _codeCacheOptions);
return expiration;
}
public async Task<DateTime?> GetSmsCodeExpirationAsync(string envelopeReceiverId)
{
var code_expiration_key = string.Format(_cacheParams.CodeExpirationCacheKeyFormat, envelopeReceiverId);
return await _cache.GetDateTimeAsync(code_expiration_key);
}
}
}

View File

@@ -17,13 +17,13 @@ namespace EnvelopeGenerator.Application.Services
{ {
private readonly IStringLocalizer<Resource> _localizer; private readonly IStringLocalizer<Resource> _localizer;
private readonly IMessagingService _messagingService; private readonly ISmsSender _smsSender;
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, IMessagingService messagingService) public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, ISmsSender smsSender)
: base(repository, mapper) : base(repository, mapper)
{ {
_localizer = localizer; _localizer = localizer;
_messagingService = messagingService; _smsSender = smsSender;
} }
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true) public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true)
@@ -171,7 +171,7 @@ namespace EnvelopeGenerator.Application.Services
.Message(Key.PhoneNumberNonexists) .Message(Key.PhoneNumberNonexists)
.Notice(LogLevel.Error, Flag.NotFound, $"An attempt was made to send sms to the user whose phone number is null. Envelope recipient ID is {envelopeReceiverId}, UUID is {uuid} and signature is {signature}."); .Notice(LogLevel.Error, Flag.NotFound, $"An attempt was made to send sms to the user whose phone number is null. Envelope recipient ID is {envelopeReceiverId}, UUID is {uuid} and signature is {signature}.");
var res = await _messagingService.SendSmsAsync(recipient: env_rcv.PhoneNumber, message: message); var res = await _smsSender.SendSmsAsync(recipient: env_rcv.PhoneNumber, message: message);
return Result.Success(res); return Result.Success(res);
} }

View File

@@ -0,0 +1,54 @@
using EnvelopeGenerator.Application.Configurations;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Application.Extensions;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.Application.Services;
public class EnvelopeSmsHandler : IEnvelopeSmsHandler
{
private readonly ISmsSender _sender;
private readonly TotpSmsParams _totpSmsParams;
private readonly IDistributedCache _dCache;
private readonly IAuthenticator _authenticator;
public EnvelopeSmsHandler(ISmsSender sender, IOptions<TotpSmsParams> totpSmsParamsOptions, IDistributedCache distributedCache, IAuthenticator authenticator)
{
_sender = sender;
_totpSmsParams = totpSmsParamsOptions.Value;
_dCache = distributedCache;
_authenticator = authenticator;
}
/// <summary>
/// If expiration is passed then, sends sms and returns smsResponse and up-to-date expiration; otherwise send expiration.
/// </summary>
/// <param name="er_secret"></param>
/// <param name="cToken"></param>
/// <returns></returns>
public async Task<(SmsResponse? SmsResponse, DateTime Expiration)> SendTotpAsync(EnvelopeReceiverSecretDto er_secret, CancellationToken cToken = default)
{
var key = string.Format(_totpSmsParams.Expiration.CacheKeyFormat, er_secret.EnvelopeId, er_secret.ReceiverId);
var expiration = await _dCache.GetDateTimeAsync(key, cToken);
if(expiration is DateTime expirationDateTime && expirationDateTime >= DateTime.Now)
return (null, expirationDateTime);
else
{
var new_expiration = DateTime.Now.AddSeconds(_totpSmsParams.TotpStep);
var totp = _authenticator.GenerateTotp(er_secret.Receiver!.TotpSecretkey!, _totpSmsParams.TotpStep);
var msg = string.Format(_totpSmsParams.Format, totp, new_expiration.ToString(_totpSmsParams.Expiration.Format, _totpSmsParams.Expiration.CultureInfo));
await _dCache.SetDateTimeAsync(key, new_expiration, cToken: cToken);
return (await _sender.SendSmsAsync(er_secret.PhoneNumber!, msg), new_expiration);
}
}
public bool VerifyTotp(string totpCode, string secretKey) => _authenticator
.VerifyTotp(totpCode, secretKey, _totpSmsParams.TotpStep, _totpSmsParams.TotpVerificationWindow);
}

View File

@@ -1,70 +0,0 @@
using AutoMapper;
using DigitalData.Core.Abstractions.Client;
using DigitalData.Core.Client;
using EnvelopeGenerator.Application.Configurations.GtxMessaging;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs.Messaging;
using EnvelopeGenerator.Application.Extensions;
using EnvelopeGenerator.Domain.HttpResponse;
using Microsoft.Extensions.Caching.Distributed;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.Application.Services
{
public class GtxMessagingService : IMessagingService
{
private readonly IHttpClientService<SmsParams> _smsClient;
private readonly SmsParams _smsParams;
private readonly IMapper _mapper;
private readonly ICodeGenerator _codeGen;
private readonly IEnvelopeReceiverCache _erCache;
public string ServiceProvider { get; }
public GtxMessagingService(IHttpClientService<SmsParams> smsClient, IOptions<SmsParams> smsParamsOptions, IMapper mapper, ICodeGenerator codeGenerator, IEnvelopeReceiverCache envelopeReceiverCache)
{
_smsClient = smsClient;
_smsParams = smsParamsOptions.Value;
_mapper = mapper;
ServiceProvider = GetType().Name.Replace("Service", string.Empty);
_codeGen = codeGenerator;
_erCache = envelopeReceiverCache;
}
public async Task<SmsResponse> SendSmsAsync(string recipient, string message)
{
return await _smsClient.FetchAsync(queryParams: new Dictionary<string, object?>()
{
{ _smsParams.RecipientQueryParamName, recipient },
{ _smsParams.MessageQueryParamName, message }
})
.ThenAsync(res => res.Json<GtxMessagingResponse>())
.ThenAsync(_mapper.Map<SmsResponse>);
}
public async Task<SmsResponse> SendSmsCodeAsync(string recipient, string envelopeReceiverId)
{
var code = await _erCache.GetSmsCodeAsync(envelopeReceiverId);
if (code is null)
{
code = _codeGen.GenerateCode(_smsParams.CodeLength);
var expiration = await _erCache.SetSmsCodeAsync(envelopeReceiverId, code);
var res = await SendSmsAsync(recipient: recipient, message: code);
res.Expiration = expiration;
return res;
}
else
{
var code_expiration = await _erCache.GetSmsCodeExpirationAsync(envelopeReceiverId);
return code_expiration is null
? new() { Ok = false }
: new() { Ok = false, AllowedAt = code_expiration };
}
}
}
}

View File

@@ -0,0 +1,40 @@
using AutoMapper;
using DigitalData.Core.Abstractions.Client;
using DigitalData.Core.Client;
using EnvelopeGenerator.Application.Configurations;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs.Messaging;
using Microsoft.Extensions.Options;
namespace EnvelopeGenerator.Application.Services;
//TODO: move to DigitalData.Core
public class GTXSmsSender : ISmsSender
{
private readonly IHttpClientService<GtxMessagingParams> _smsClient;
private readonly GtxMessagingParams _smsParams;
private readonly IMapper _mapper;
public string ServiceProvider { get; }
public GTXSmsSender(IHttpClientService<GtxMessagingParams> smsClient, IOptions<GtxMessagingParams> smsParamsOptions, IMapper mapper)
{
_smsClient = smsClient;
_smsParams = smsParamsOptions.Value;
_mapper = mapper;
ServiceProvider = GetType().Name.Replace("Service", string.Empty);
}
public async Task<SmsResponse> SendSmsAsync(string recipient, string message)
{
return await _smsClient.FetchAsync(queryParams: new Dictionary<string, object?>()
{
{ _smsParams.RecipientQueryParamName, recipient },
{ _smsParams.MessageQueryParamName, message }
})
.ThenAsync(res => res.Json<GtxMessagingResponse>())
.ThenAsync(_mapper.Map<SmsResponse>);
}
}

View File

@@ -77,7 +77,8 @@
End Enum End Enum
Public Enum CertificationType Public Enum CertificationType
ElectronicSignature = 1 AdvancedElectronicSignature = 1
'ElectronicSignature = 1
'QualifiedSignature = 2 'QualifiedSignature = 2
End Enum End Enum
@@ -109,7 +110,13 @@
DocumentForwarded DocumentForwarded
DocumentShared DocumentShared
End Enum End Enum
#End Region
#Region "Role"
Public NotInheritable Class ReceiverRole
Public Const PreAuth As String = "PreAuth"
Public Const FullyAuth As String = "FullyAuth"
End Class
#End Region #End Region
#Region "Constants" #Region "Constants"

View File

@@ -5,4 +5,5 @@
Public Property ExportPath As String = "" Public Property ExportPath As String = ""
Public Property SendingProfile As Integer = 0 Public Property SendingProfile As Integer = 0
Public Property SignatureHost As String = "" Public Property SignatureHost As String = ""
Public Property Default_TFA_Enabled As Boolean = False
End Class End Class

View File

@@ -8,8 +8,8 @@
Public Property Uuid As String = Guid.NewGuid.ToString() Public Property Uuid As String = Guid.NewGuid.ToString()
Public Property UseAccessCode As Boolean = False Public Property UseAccessCode As Boolean = False
Public Property Language As String = "de-DE" Public Property Language As String = "de-DE"
Public Property CertificationType As Constants.CertificationType = Constants.CertificationType.ElectronicSignature Public Property CertificationType As Constants.CertificationType = Constants.CertificationType.AdvancedElectronicSignature
Public Property TFA_Enabled As Boolean = False
Public Property SendReminderEmails As Boolean = False Public Property SendReminderEmails As Boolean = False
Public Property FirstReminderDays As Integer = 0 Public Property FirstReminderDays As Integer = 0
Public Property ReminderIntervalDays As Integer = 0 Public Property ReminderIntervalDays As Integer = 0

View File

@@ -75,6 +75,7 @@ Public Class EnvelopeReceiver
Public Property Sequence As Integer = 0 Public Property Sequence As Integer = 0
Public Property PrivateMessage As String = "" Public Property PrivateMessage As String = ""
Public Property AccessCode As String = "" Public Property AccessCode As String = ""
Public Property PhoneNumber As String = ""
Public Function GetSignature() As String Public Function GetSignature() As String
Return StringEx.GetChecksum(Email.ToUpper) Return StringEx.GetChecksum(Email.ToUpper)

View File

@@ -6,7 +6,8 @@
Public Property ContractType As Integer ' Unbenutzt Public Property ContractType As Integer ' Unbenutzt
Public Property Language As String Public Property Language As String
Public Property CertificationType As Constants.CertificationType = Constants.CertificationType.ElectronicSignature Public Property CertificationType As Constants.CertificationType = Constants.CertificationType.AdvancedElectronicSignature
Public Property TFA_Enabled As Boolean = False
Public Property SendReminderEmails As Boolean = False Public Property SendReminderEmails As Boolean = False
Public Property FirstReminderDays As Integer = 0 Public Property FirstReminderDays As Integer = 0
Public Property ReminderIntervalDays As Integer = 0 Public Property ReminderIntervalDays As Integer = 0

View File

@@ -77,8 +77,8 @@
<Reference Include="DigitalData.Modules.Logging"> <Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath> <HintPath>..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference> </Reference>
<Reference Include="GdPicture.NET.14, Version=14.2.89.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL"> <Reference Include="GdPicture.NET.14, Version=14.2.90.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
<HintPath>..\packages\GdPicture.14.2.89\lib\net462\GdPicture.NET.14.dll</HintPath> <HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
</Reference> </Reference>
<Reference Include="Microsoft.CSharp" /> <Reference Include="Microsoft.CSharp" />
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL"> <Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
@@ -291,11 +291,11 @@
</ItemGroup> </ItemGroup>
<ItemGroup /> <ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" /> <Import Project="$(MSBuildToolsPath)\Microsoft.VisualBasic.targets" />
<Import Project="..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets')" /> <Import Project="..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets" Condition="Exists('..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets')" />
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild"> <Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
<PropertyGroup> <PropertyGroup>
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText> <ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
</PropertyGroup> </PropertyGroup>
<Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.2.89\build\net462\GdPicture.runtimes.windows.targets'))" /> <Error Condition="!Exists('..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\GdPicture.runtimes.windows.14.2.90\build\net462\GdPicture.runtimes.windows.targets'))" />
</Target> </Target>
</Project> </Project>

View File

@@ -21,7 +21,8 @@ Public Class ConfigModel
.ExportPath = oRow.ItemEx("EXPORT_PATH", ""), .ExportPath = oRow.ItemEx("EXPORT_PATH", ""),
.SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0), .SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0),
.SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""), .SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""),
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", "") .ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", ""),
.Default_TFA_Enabled = oRow.ItemEx("DEF_TFA_ENABLED", False)
} }
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)

View File

@@ -2,6 +2,7 @@
Imports System.Web.UI.WebControls Imports System.Web.UI.WebControls
Imports DigitalData.Modules.Base Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.Common.Constants
Public Class EnvelopeModel Public Class EnvelopeModel
Inherits BaseModel Inherits BaseModel
@@ -34,7 +35,7 @@ Public Class EnvelopeModel
.Language = pRow.ItemEx("LANGUAGE", "de-DE"), .Language = pRow.ItemEx("LANGUAGE", "de-DE"),
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())), .Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
.AddedWhen = pRow.Item("ADDED_WHEN"), .AddedWhen = pRow.Item("ADDED_WHEN"),
.CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.ElectronicSignature.ToString())), .CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.AdvancedElectronicSignature.ToString())),
.User = New User(), .User = New User(),
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing), .ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
.ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_WHEN", Nothing), .ExpiresWarningWhen = pRow.ItemEx(Of Date)("EXPIRES_WARNING_WHEN", Nothing),
@@ -45,7 +46,8 @@ Public Class EnvelopeModel
.ReminderIntervalDays = pRow.ItemEx("REMINDER_INTERVAL_DAYS", 0), .ReminderIntervalDays = pRow.ItemEx("REMINDER_INTERVAL_DAYS", 0),
.UseAccessCode = pRow.ItemEx("USE_ACCESS_CODE", False), .UseAccessCode = pRow.ItemEx("USE_ACCESS_CODE", False),
.FinalEmailToCreator = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", Constants.FinalEmailType.No.ToString())), .FinalEmailToCreator = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", Constants.FinalEmailType.No.ToString())),
.FinalEmailToReceivers = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", Constants.FinalEmailType.No.ToString())) .FinalEmailToReceivers = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", Constants.FinalEmailType.No.ToString())),
.TFA_Enabled = pRow.ItemEx("TFA_Enabled", False)
} }
Dim oDOC_RESULT = pRow.Item("DOC_RESULT") Dim oDOC_RESULT = pRow.Item("DOC_RESULT")
If Not IsDBNull(oDOC_RESULT) Then If Not IsDBNull(oDOC_RESULT) Then
@@ -142,13 +144,17 @@ Public Class EnvelopeModel
Public Function Insert(pEnvelope As Envelope) As Boolean Public Function Insert(pEnvelope As Envelope) As Boolean
Try Try
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE] (MESSAGE, ENVELOPE_UUID, STATUS, USER_ID) " Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE] (MESSAGE, ENVELOPE_UUID, STATUS, USER_ID)
oSql += " VALUES (@MESSAGE, @UUID, @STATUS, @USER_ID)" VALUES('',
'{pEnvelope.Uuid}',
'{CInt([Enum].Parse(GetType(EnvelopeStatus), Constants.EnvelopeStatus.EnvelopeCreated))}',
'{pEnvelope.UserId}')"
Dim oCommand As New SqlCommand(oSql) Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty 'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
oCommand.Parameters.Add("UUID", SqlDbType.NVarChar).Value = pEnvelope.Uuid 'oCommand.Parameters.Add("UUID", SqlDbType.NVarChar).Value = pEnvelope.Uuid
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = Constants.EnvelopeStatus.EnvelopeCreated 'oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = Constants.EnvelopeStatus.EnvelopeCreated
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId 'oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId
If Database.ExecuteNonQuery(oCommand) Then If Database.ExecuteNonQuery(oCommand) Then
pEnvelope.Id = GetEnvelopeId(pEnvelope) pEnvelope.Id = GetEnvelopeId(pEnvelope)
@@ -182,9 +188,11 @@ Public Class EnvelopeModel
oSql += " [REMINDER_INTERVAL_DAYS] = @REMINDER_INTERVAL_DAYS, " oSql += " [REMINDER_INTERVAL_DAYS] = @REMINDER_INTERVAL_DAYS, "
oSql += " [SEND_REMINDER_EMAILS] = @SEND_REMINDER_EMAILS, " oSql += " [SEND_REMINDER_EMAILS] = @SEND_REMINDER_EMAILS, "
oSql += " [USE_ACCESS_CODE] = @USE_ACCESS_CODE, " oSql += " [USE_ACCESS_CODE] = @USE_ACCESS_CODE, "
oSql += " [CHANGED_WHEN] = GETDATE() " oSql += " [CHANGED_WHEN] = GETDATE(), "
oSql += " [TFA_Enabled] = @TFA_Enabled"
oSql += " WHERE GUID = @ID AND USER_ID = @USER_ID" oSql += " WHERE GUID = @ID AND USER_ID = @USER_ID"
Dim oCommand As New SqlCommand(oSql) Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("ID", SqlDbType.Int).Value = pEnvelope.Id oCommand.Parameters.Add("ID", SqlDbType.Int).Value = pEnvelope.Id
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId
@@ -206,7 +214,7 @@ Public Class EnvelopeModel
oCommand.Parameters.Add("REMINDER_INTERVAL_DAYS", SqlDbType.Int).Value = pEnvelope.ReminderIntervalDays oCommand.Parameters.Add("REMINDER_INTERVAL_DAYS", SqlDbType.Int).Value = pEnvelope.ReminderIntervalDays
oCommand.Parameters.Add("SEND_REMINDER_EMAILS", SqlDbType.Bit).Value = pEnvelope.SendReminderEmails oCommand.Parameters.Add("SEND_REMINDER_EMAILS", SqlDbType.Bit).Value = pEnvelope.SendReminderEmails
oCommand.Parameters.Add("USE_ACCESS_CODE", SqlDbType.Bit).Value = pEnvelope.UseAccessCode oCommand.Parameters.Add("USE_ACCESS_CODE", SqlDbType.Bit).Value = pEnvelope.UseAccessCode
oCommand.Parameters.Add("TFA_ENABLED", SqlDbType.Bit).Value = pEnvelope.TFA_Enabled
Return Database.ExecuteNonQuery(oCommand, pTransaction) Return Database.ExecuteNonQuery(oCommand, pTransaction)
Catch ex As Exception Catch ex As Exception

View File

@@ -1,4 +1,5 @@
Imports DigitalData.Modules.Base Imports DigitalData.Modules.Base
Imports EnvelopeGenerator.Common.Constants
Public Class EnvelopeTypeModel Public Class EnvelopeTypeModel
Inherits BaseModel Inherits BaseModel
@@ -21,7 +22,8 @@ Public Class EnvelopeTypeModel
.FinalEmailToCreator = pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", 0), .FinalEmailToCreator = pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", 0),
.FinalEmailToReceivers = pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", 0), .FinalEmailToReceivers = pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", 0),
.ContractType = pRow.ItemEx("CONTRACT_TYPE", 0), .ContractType = pRow.ItemEx("CONTRACT_TYPE", 0),
.CertificationType = pRow.ItemEx("CERTIFICATION_TYPE", 0) .CertificationType = pRow.ItemEx("CERTIFICATION_TYPE", 0),
.TFA_Enabled = pRow.ItemEx("TFA_Enabled", 0)
} }
End Function End Function

View File

@@ -33,7 +33,8 @@ Public Class ReceiverModel
.Status = ReceiverSignedStatus, .Status = ReceiverSignedStatus,
.ColorType = DirectCast(pColorIndex + 1, ColorType), .ColorType = DirectCast(pColorIndex + 1, ColorType),
.AccessCode = pRow.ItemEx("ACCESS_CODE", ""), .AccessCode = pRow.ItemEx("ACCESS_CODE", ""),
.SignedDate = SignedDate .SignedDate = SignedDate,
.PhoneNumber = pRow.ItemEx("PHONE_NUMBER", "")
} }
End Function End Function
@@ -56,25 +57,29 @@ Public Class ReceiverModel
Public Function Insert(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean Public Function Insert(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
Try Try
Dim oSql As String = "INSERT INTO [dbo].[TBSIG_RECEIVER] Dim oCheck = $"SELECT COUNT(GUID) FROM [dbo].[TBSIG_RECEIVER] WHERE SIGNATURE = '{pReceiver.GetSignature()}'"
Dim oExists = Database.GetScalarValue(oCheck)
If oExists = 0 Then
Dim oSql As String = $"INSERT INTO [dbo].[TBSIG_RECEIVER]
([EMAIL_ADDRESS] ([EMAIL_ADDRESS]
,[SIGNATURE]) ,[SIGNATURE])
VALUES VALUES
(@EMAIL ('{pReceiver.Email}'
,@SIGNATURE)" ,'{pReceiver.GetSignature()}')"
Dim oCommand = New SqlCommand(oSql) Dim oCommand = New SqlCommand(oSql)
oCommand.Parameters.Add("EMAIL", SqlDbType.NVarChar).Value = pReceiver.Email Dim oResult = Database.ExecuteNonQuery(oCommand)
oCommand.Parameters.Add("SIGNATURE", SqlDbType.NVarChar).Value = pReceiver.GetSignature() If oResult = True Then
pReceiver.Id = GetReceiverIdByEmail(pReceiver.Email, pTransaction)
Dim oResult = Database.ExecuteNonQuery(oCommand) Return True
If oResult = True Then Else
pReceiver.Id = GetReceiverIdByEmail(pReceiver.Email, pTransaction) Return False
End If
Else Else
Return False Logger.Warn($"Receiver [{pReceiver.Email}] already existing! Check collecting not existing Receivers!")
Return True
End If End If
Return True
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
Return False Return False
@@ -83,18 +88,18 @@ Public Class ReceiverModel
Public Function Update(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean Public Function Update(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
Try Try
Dim oSql As String = "UPDATE [dbo].[TBSIG_USER_RECEIVER] Dim oSql As String = $"UPDATE [dbo].[TBSIG_USER_RECEIVER]
SET [NAME] = @NAME SET [NAME] = '{pReceiver.Name}'
,[COMPANY_NAME] = @COMPANY ,[COMPANY_NAME] = '{pReceiver.Company}'
,[JOB_TITLE] = @JOB ,[JOB_TITLE] = '{pReceiver.JobTitle}'
WHERE RECEIVER_ID = @RECEIVER_ID" WHERE RECEIVER_ID = {pReceiver.Id}"
Dim oCommand = New SqlCommand(oSql) Dim oCommand = New SqlCommand(oSql)
oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name 'oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name
oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company 'oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company
oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle 'oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle
oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.Int).Value = pReceiver.Id 'oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.Int).Value = pReceiver.Id
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pReceiver.Id 'oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pReceiver.Id
Return Database.ExecuteNonQuery(oCommand, pTransaction) Return Database.ExecuteNonQuery(oCommand, pTransaction)
Catch ex As Exception Catch ex As Exception
@@ -113,7 +118,7 @@ Public Class ReceiverModel
End Function End Function
Public Function Assign(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean Public Function Assign(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE_RECEIVER] Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE_RECEIVER]
([ENVELOPE_ID] ([ENVELOPE_ID]
,[RECEIVER_ID] ,[RECEIVER_ID]
,[PRIVATE_MESSAGE] ,[PRIVATE_MESSAGE]
@@ -121,26 +126,28 @@ Public Class ReceiverModel
,[NAME] ,[NAME]
,[JOB_TITLE] ,[JOB_TITLE]
,[COMPANY_NAME] ,[COMPANY_NAME]
,[SEQUENCE]) ,[SEQUENCE]
,[PHONE_NUMBER])
VALUES VALUES
(@ENVELOPE_ID ('{pEnvelope.Id}'
,@RECEIVER_ID ,'{pReceiver.Id}'
,@MESSAGE ,'{pReceiver.PrivateMessage}'
,@ACCESS_CODE ,'{pReceiver.AccessCode}'
,@NAME ,'{pReceiver.Name}'
,@JOB ,'{pReceiver.JobTitle}'
,@COMPANY ,'{pReceiver.Company}'
,@SEQUENCE)" ,'{pReceiver.Sequence}'
,'{pReceiver.PhoneNumber}')"
Dim oCommand As New SqlCommand(oSql) Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.NVarChar).Value = pEnvelope.Id 'oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.NVarChar).Value = pEnvelope.Id
oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.NVarChar).Value = pReceiver.Id 'oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.NVarChar).Value = pReceiver.Id
oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = pReceiver.PrivateMessage 'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = pReceiver.PrivateMessage
oCommand.Parameters.Add("ACCESS_CODE", SqlDbType.NVarChar).Value = pReceiver.AccessCode 'oCommand.Parameters.Add("ACCESS_CODE", SqlDbType.NVarChar).Value = pReceiver.AccessCode
oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name 'oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name
oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle 'oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle
oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company 'oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company
oCommand.Parameters.Add("SEQUENCE", SqlDbType.NVarChar).Value = pReceiver.Sequence 'oCommand.Parameters.Add("SEQUENCE", SqlDbType.NVarChar).Value = pReceiver.Sequence
Return Database.ExecuteNonQuery(oCommand, pTransaction) Return Database.ExecuteNonQuery(oCommand, pTransaction)
End Function End Function
@@ -266,6 +273,22 @@ Public Class ReceiverModel
Return String.Empty Return String.Empty
End Try End Try
End Function End Function
Public Function GetLastUsedReceiverPhone(pEmailAddress As String, pUserId As Integer) As String
Try
Dim oSql As String
oSql = "SELECT TOP 1 [PHONE_NUMBER] FROM dbo.VWSIG_ENVELOPE_RECEIVERS "
oSql += $" WHERE ENV_USERID_CREATED = {pUserId}) "
oSql += $" AND EMAIL_ADDRESS = '{pEmailAddress}' "
oSql += " AND Len([PHONE_NUMBER]) > 0 "
oSql += " ORDER BY [ADDED_WHEN] DESC"
Return Database.GetScalarValue(oSql)
Catch ex As Exception
Logger.Error(ex)
Return String.Empty
End Try
End Function
Private Function GetReceiverIdByEmail(pEmailAddress As String, pTransaction As SqlTransaction) As Integer Private Function GetReceiverIdByEmail(pEmailAddress As String, pTransaction As SqlTransaction) As Integer
Try Try

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' indem Sie "*" wie unten gezeigt eingeben: ' indem Sie "*" wie unten gezeigt eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.0.0.0")> <Assembly: AssemblyVersion("2.2.0.0")>
<Assembly: AssemblyFileVersion("2.0.0.0")> <Assembly: AssemblyFileVersion("2.2.0.0")>

View File

@@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Dialog Concat PDF" xml:space="preserve">
<value>Please select the PDF documents you would like to link/concat:</value>
</data>
<data name="Do you really want to delete this envelope" xml:space="preserve"> <data name="Do you really want to delete this envelope" xml:space="preserve">
<value>Do you really want to delete this envelope?</value> <value>Do you really want to delete this envelope?</value>
</data> </data>
@@ -141,6 +144,12 @@
<data name="Document forwarded" xml:space="preserve"> <data name="Document forwarded" xml:space="preserve">
<value>Document forwarded to receiver: {0}</value> <value>Document forwarded to receiver: {0}</value>
</data> </data>
<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"> <data name="Edit Envelope" xml:space="preserve">
<value>Edit Envelope</value> <value>Edit Envelope</value>
</data> </data>
@@ -171,6 +180,9 @@
<data name="Error email Validation" xml:space="preserve"> <data name="Error email Validation" xml:space="preserve">
<value>The email [ @Mail ] could not be varified!</value> <value>The email [ @Mail ] could not be varified!</value>
</data> </data>
<data name="Error phone Validation" xml:space="preserve">
<value />
</data>
<data name="Error sending the envelope" xml:space="preserve"> <data name="Error sending the envelope" xml:space="preserve">
<value>Error sending the envelope:</value> <value>Error sending the envelope:</value>
</data> </data>
@@ -193,7 +205,7 @@
<value>Receiver {0} has an invalid Email Address.</value> <value>Receiver {0} has an invalid Email Address.</value>
</data> </data>
<data name="Invitation successfully resend" xml:space="preserve"> <data name="Invitation successfully resend" xml:space="preserve">
<value>Invitation has been send once again!</value> <value>Invitation to [@Mail] has been send once again!</value>
</data> </data>
<data name="Missing Documents" xml:space="preserve"> <data name="Missing Documents" xml:space="preserve">
<value>Missing Documents</value> <value>Missing Documents</value>

View File

@@ -117,6 +117,9 @@
<resheader name="writer"> <resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<data name="Dialog Concat PDF" xml:space="preserve">
<value>Bitte wählen Sie die PDF-Dokumente die Sie verketten möchten:</value>
</data>
<data name="Do you really want to delete this envelope" xml:space="preserve"> <data name="Do you really want to delete this envelope" xml:space="preserve">
<value>Wollen Sie diesen Umschlag wirklich löschen?</value> <value>Wollen Sie diesen Umschlag wirklich löschen?</value>
</data> </data>
@@ -141,6 +144,9 @@
<data name="Document forwarded" xml:space="preserve"> <data name="Document forwarded" xml:space="preserve">
<value>Umschlag an Empfänger {0} weitergeleitet.</value> <value>Umschlag an Empfänger {0} weitergeleitet.</value>
</data> </data>
<data name="Drop only one file" xml:space="preserve">
<value>Aktuell ist per Drag and Drop nur eine PDF-Datei erlaubt.</value>
</data>
<data name="Edit Envelope" xml:space="preserve"> <data name="Edit Envelope" xml:space="preserve">
<value>Bearbeite Umschlag</value> <value>Bearbeite Umschlag</value>
</data> </data>
@@ -171,6 +177,10 @@
<data name="Error email Validation" xml:space="preserve"> <data name="Error email Validation" xml:space="preserve">
<value>Die Email-Adresse [ @Mail ] konnte nicht validiert werden!</value> <value>Die Email-Adresse [ @Mail ] konnte nicht validiert werden!</value>
</data> </data>
<data name="Error phone Validation" xml:space="preserve">
<value>The mobile phone number [@PhoneNr] could not be validated.
Pattern: +491234567890</value>
</data>
<data name="Error sending the envelope" xml:space="preserve"> <data name="Error sending the envelope" xml:space="preserve">
<value>Fehler beim Senden des Umschlags:</value> <value>Fehler beim Senden des Umschlags:</value>
</data> </data>
@@ -193,7 +203,7 @@
<value>Empfänger {0} hat keine gültige Email Addresse.</value> <value>Empfänger {0} hat keine gültige Email Addresse.</value>
</data> </data>
<data name="Invitation successfully resend" xml:space="preserve"> <data name="Invitation successfully resend" xml:space="preserve">
<value>Die Einladung wurde nochmal versendet!</value> <value>Die Einladung an [@Mail] wurde nochmal versendet!</value>
</data> </data>
<data name="Missing Documents" xml:space="preserve"> <data name="Missing Documents" xml:space="preserve">
<value>Fehlendes Dokument</value> <value>Fehlendes Dokument</value>

View File

@@ -64,6 +64,15 @@ Namespace My.Resources
End Set End Set
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Bitte wählen Sie die PDF-Dokumente die Sie verketten möchten: ähnelt.
'''</summary>
Public Shared ReadOnly Property Dialog_Concat_PDF() As String
Get
Return ResourceManager.GetString("Dialog Concat PDF", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich löschen? ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich löschen? ähnelt.
'''</summary> '''</summary>
@@ -136,6 +145,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Aktuell ist per Drag and Drop nur eine PDF-Datei erlaubt. ähnelt.
'''</summary>
Public Shared ReadOnly Property Drop_only_one_file() As String
Get
Return ResourceManager.GetString("Drop only one file", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Bearbeite Umschlag ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Bearbeite Umschlag ähnelt.
'''</summary> '''</summary>
@@ -226,6 +244,16 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die The mobile phone number [@PhoneNr] could not be validated.
'''Pattern: +491234567890 ähnelt.
'''</summary>
Public Shared ReadOnly Property Error_phone_Validation() As String
Get
Return ResourceManager.GetString("Error phone Validation", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Fehler beim Senden des Umschlags: ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Fehler beim Senden des Umschlags: ähnelt.
'''</summary> '''</summary>
@@ -290,7 +318,7 @@ Namespace My.Resources
End Property End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Die Einladung wurde nochmal versendet! ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Die Einladung an [@Mail] wurde nochmal versendet! ähnelt.
'''</summary> '''</summary>
Public Shared ReadOnly Property Invitation_successfully_resend() As String Public Shared ReadOnly Property Invitation_successfully_resend() As String
Get Get

View File

@@ -91,6 +91,15 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Fortgeschrittene Elektronische Signatur ähnelt.
'''</summary>
Public Shared ReadOnly Property AdvancedElectronicSignature() As String
Get
Return ResourceManager.GetString("AdvancedElectronicSignature", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Abgeschlossen ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Abgeschlossen ähnelt.
'''</summary> '''</summary>
@@ -154,15 +163,6 @@ Namespace My.Resources
End Get End Get
End Property End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Elektronische Signatur ähnelt.
'''</summary>
Public Shared ReadOnly Property ElectronicSignature() As String
Get
Return ResourceManager.GetString("ElectronicSignature", resourceCulture)
End Get
End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Archiviert ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Archiviert ähnelt.
'''</summary> '''</summary>
@@ -306,16 +306,16 @@ Namespace My.Resources
Return ResourceManager.GetString("PartlySigned", resourceCulture) Return ResourceManager.GetString("PartlySigned", resourceCulture)
End Get End Get
End Property End Property
''''<summary> '''<summary>
'''' Sucht eine lokalisierte Zeichenfolge, die Qualifizierte Signatur ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Qualifizierte Signatur ähnelt.
''''</summary> '''</summary>
'Public Shared ReadOnly Property QualifiedSignature() As String Public Shared ReadOnly Property QualifiedSignature() As String
' Get Get
' Return ResourceManager.GetString("QualifiedSignature", resourceCulture) Return ResourceManager.GetString("QualifiedSignature", resourceCulture)
' End Get End Get
'End Property End Property
'''<summary> '''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Arbeitsanweisung ähnelt. ''' Sucht eine lokalisierte Zeichenfolge, die Arbeitsanweisung ähnelt.
'''</summary> '''</summary>

View File

@@ -126,6 +126,9 @@
<data name="AccessCodeRequested" xml:space="preserve"> <data name="AccessCodeRequested" xml:space="preserve">
<value>Accesscode requested</value> <value>Accesscode requested</value>
</data> </data>
<data name="AdvancedElectronicSignature" xml:space="preserve">
<value>Advanced electronic signature</value>
</data>
<data name="Completed" xml:space="preserve"> <data name="Completed" xml:space="preserve">
<value>Completed</value> <value>Completed</value>
</data> </data>
@@ -144,9 +147,6 @@
<data name="Draft" xml:space="preserve"> <data name="Draft" xml:space="preserve">
<value>Draft</value> <value>Draft</value>
</data> </data>
<data name="ElectronicSignature" xml:space="preserve">
<value>Electronic Signature</value>
</data>
<data name="EnvelopeArchived" xml:space="preserve"> <data name="EnvelopeArchived" xml:space="preserve">
<value>Archived</value> <value>Archived</value>
</data> </data>

View File

@@ -126,6 +126,9 @@
<data name="AccessCodeRequested" xml:space="preserve"> <data name="AccessCodeRequested" xml:space="preserve">
<value>Zugriffscode angefordert</value> <value>Zugriffscode angefordert</value>
</data> </data>
<data name="AdvancedElectronicSignature" xml:space="preserve">
<value>Fortgeschrittene Elektronische Signatur</value>
</data>
<data name="Completed" xml:space="preserve"> <data name="Completed" xml:space="preserve">
<value>Abgeschlossen</value> <value>Abgeschlossen</value>
</data> </data>
@@ -147,9 +150,6 @@
<data name="Draft" xml:space="preserve"> <data name="Draft" xml:space="preserve">
<value>Entwurf</value> <value>Entwurf</value>
</data> </data>
<data name="ElectronicSignature" xml:space="preserve">
<value>Elektronische Signatur</value>
</data>
<data name="EnvelopeArchived" xml:space="preserve"> <data name="EnvelopeArchived" xml:space="preserve">
<value>Archiviert</value> <value>Archiviert</value>
</data> </data>

View File

@@ -1,7 +1,7 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<packages> <packages>
<package id="GdPicture" version="14.2.89" targetFramework="net462" /> <package id="GdPicture" version="14.2.90" targetFramework="net462" />
<package id="GdPicture.runtimes.windows" version="14.2.89" targetFramework="net462" /> <package id="GdPicture.runtimes.windows" version="14.2.90" targetFramework="net462" />
<package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net462" /> <package id="Microsoft.Extensions.Logging.Abstractions" version="2.1.1" targetFramework="net462" />
<package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" /> <package id="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
<package id="Quartz" version="3.8.0" targetFramework="net462" /> <package id="Quartz" version="3.8.0" targetFramework="net462" />

View File

@@ -84,6 +84,9 @@ namespace EnvelopeGenerator.Domain.Entities
[Column("EXPIRES_WARNING_WHEN_DAYS")] [Column("EXPIRES_WARNING_WHEN_DAYS")]
public int? ExpiresWarningWhenDays { get; set; } public int? ExpiresWarningWhenDays { get; set; }
[Column("TFA_ENABLED", TypeName = "bit")]
public bool TFAEnabled { get; set; }
/// <summary> /// <summary>
/// The sender of envelope /// The sender of envelope
/// </summary> /// </summary>

View File

@@ -45,10 +45,7 @@ namespace EnvelopeGenerator.Domain.Entities
[StringLength(20)] [StringLength(20)]
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")] [RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
public string? PhoneNumber { get; set; } public string? PhoneNumber { get; set; }
[Column("TFA_ENABLED", TypeName = "bit")]
public bool TFAEnabled { get; set; }
[NotMapped] [NotMapped]
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId); public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);

View File

@@ -2,34 +2,33 @@
using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema; using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities namespace EnvelopeGenerator.Domain.Entities;
[Table("TBSIG_RECEIVER", Schema = "dbo")]
public class Receiver : IUnique<int>
{ {
[Table("TBSIG_RECEIVER", Schema = "dbo")] [Key]
public class Receiver : IUnique<int> [DatabaseGenerated(DatabaseGeneratedOption.Identity)]
{ [Column("GUID")]
[Key] public int Id { get; set; }
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")] [Required, EmailAddress]
public int Id { get; set; } [Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
public required string EmailAddress { get; set; }
[Required, EmailAddress]
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
public required string EmailAddress { get; set; }
[Required] [Required]
[Column("SIGNATURE", TypeName = "nvarchar(64)")] [Column("SIGNATURE", TypeName = "nvarchar(64)")]
public required string Signature { get; set; } public required string Signature { get; set; }
[Required] [Required]
[Column("ADDED_WHEN", TypeName = "datetime")] [Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; } public DateTime AddedWhen { get; set; }
[Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")] [Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")]
public string? TotpSecretkey { get; set; } public string? TotpSecretkey { get; set; }
[Column("TOTP_EXPIRATION", TypeName = "datetime")] [Column("TFA_REG_DEADLINE", TypeName = "datetime")]
public DateTime? TotpExpiration { get; set; } public DateTime? TfaRegDeadline { get; set; }
public IEnumerable<EnvelopeReceiver>? EnvelopeReceivers { get; init; } public IEnumerable<EnvelopeReceiver>? EnvelopeReceivers { get; init; }
}
} }

View File

@@ -65,7 +65,8 @@ Public Class EnvelopeEditorController
Public Function CreateEnvelope() As Envelope Public Function CreateEnvelope() As Envelope
Dim oEnvelope As New Envelope() With { Dim oEnvelope As New Envelope() With {
.UserId = State.UserId, .UserId = State.UserId,
.User = UserModel.SelectUser() .User = UserModel.SelectUser(),
.TFA_Enabled = DEF_TF_ENABLED
} }
If EnvelopeModel.Insert(oEnvelope) Then If EnvelopeModel.Insert(oEnvelope) Then
@@ -87,11 +88,13 @@ Public Class EnvelopeEditorController
Public Function SaveReceivers(pEnvelope As Envelope, pReceiversFromGrid As List(Of EnvelopeReceiver)) As Boolean Public Function SaveReceivers(pEnvelope As Envelope, pReceiversFromGrid As List(Of EnvelopeReceiver)) As Boolean
Dim oExistingReceivers As List(Of EnvelopeReceiver) = ReceiverModel.ListReceivers(pReceiversFromGrid).ToList() Dim oExistingReceivers As List(Of EnvelopeReceiver) = ReceiverModel.ListReceivers(pReceiversFromGrid).ToList()
Dim oExistingAddresses = oExistingReceivers.Select(Function(r) r.Email) Dim oExistingAddresses = oExistingReceivers.Select(Function(r) r.Email)
Logger.Debug($"oExistingReceivers.count: {oExistingReceivers.Count}")
Logger.Debug($"oExistingAddresses.count: {oExistingAddresses.Count}")
Dim oNewReceivers = pReceiversFromGrid.Where(Function(r) Dim oNewReceivers = pReceiversFromGrid.Where(Function(r)
If r.Email Is Nothing Then Return False If r.Email Is Nothing Then Return False
Return Not oExistingAddresses.Contains(r.Email) Return Not oExistingAddresses.Contains(r.Email)
End Function).ToList() End Function).ToList()
Logger.Debug($"oNewReceivers.count: {oNewReceivers.Count}")
If CreateNewReceivers(oNewReceivers) = False Then If CreateNewReceivers(oNewReceivers) = False Then
Return False Return False
End If End If
@@ -406,4 +409,11 @@ Public Class EnvelopeEditorController
Return String.Empty Return String.Empty
End If End If
End Function End Function
Public Function GetLastPhoneByEmailAdress(pEmailAdress As String) As String
If (String.IsNullOrEmpty(pEmailAdress) = False) Then
Return ReceiverModel.GetLastUsedReceiverPhone(pEmailAdress, Envelope.UserId)
Else
Return String.Empty
End If
End Function
End Class End Class

View File

@@ -76,10 +76,10 @@
<HintPath>..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath> <HintPath>..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.GUIs.Common"> <Reference Include="DigitalData.GUIs.Common">
<HintPath>..\..\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath> <HintPath>..\..\2_DLL Projekte\DDMonorepo\GUIs.Common\bin\Debug\DigitalData.GUIs.Common.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Base"> <Reference Include="DigitalData.Modules.Base">
<HintPath>..\..\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath> <HintPath>..\..\2_DLL Projekte\DDModules\Base\bin\Debug\DigitalData.Modules.Base.dll</HintPath>
</Reference> </Reference>
<Reference Include="DigitalData.Modules.Config, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL"> <Reference Include="DigitalData.Modules.Config, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion> <SpecificVersion>False</SpecificVersion>
@@ -107,6 +107,7 @@
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath> <HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
</Reference> </Reference>
<Reference Include="System" /> <Reference Include="System" />
<Reference Include="System.ComponentModel.DataAnnotations" />
<Reference Include="System.Configuration" /> <Reference Include="System.Configuration" />
<Reference Include="System.Core" /> <Reference Include="System.Core" />
<Reference Include="System.Data.Linq" /> <Reference Include="System.Data.Linq" />
@@ -142,12 +143,6 @@
<Compile Include="Controllers\EnvelopeListController.vb" /> <Compile Include="Controllers\EnvelopeListController.vb" />
<Compile Include="Controllers\FieldEditorController.vb" /> <Compile Include="Controllers\FieldEditorController.vb" />
<Compile Include="Controllers\BaseController.vb" /> <Compile Include="Controllers\BaseController.vb" />
<Compile Include="frmChooseDocVariant.Designer.vb">
<DependentUpon>frmChooseDocVariant.vb</DependentUpon>
</Compile>
<Compile Include="frmChooseDocVariant.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmEnvelopeEditor.vb"> <Compile Include="frmEnvelopeEditor.vb">
<SubType>Form</SubType> <SubType>Form</SubType>
</Compile> </Compile>
@@ -196,9 +191,6 @@
<DesignTime>True</DesignTime> <DesignTime>True</DesignTime>
</Compile> </Compile>
<Compile Include="My Project\AssemblyInfo.vb" /> <Compile Include="My Project\AssemblyInfo.vb" />
<EmbeddedResource Include="frmChooseDocVariant.resx">
<DependentUpon>frmChooseDocVariant.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmEnvelopeEditor.en.resx"> <EmbeddedResource Include="frmEnvelopeEditor.en.resx">
<DependentUpon>frmEnvelopeEditor.vb</DependentUpon> <DependentUpon>frmEnvelopeEditor.vb</DependentUpon>
<SubType>Designer</SubType> <SubType>Designer</SubType>
@@ -213,6 +205,7 @@
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmEnvelopeMainData.resx"> <EmbeddedResource Include="frmEnvelopeMainData.resx">
<DependentUpon>frmEnvelopeMainData.vb</DependentUpon> <DependentUpon>frmEnvelopeMainData.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource> </EmbeddedResource>
<EmbeddedResource Include="frmFieldEditor.en.resx"> <EmbeddedResource Include="frmFieldEditor.en.resx">
<DependentUpon>frmFieldEditor.vb</DependentUpon> <DependentUpon>frmFieldEditor.vb</DependentUpon>

View File

@@ -1,5 +1,6 @@
Imports DigitalData.Modules.Database Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.Common
Module ModuleSettings Module ModuleSettings
Public ENVELOPE_TEMP_DOCUMENT As String = "" Public ENVELOPE_TEMP_DOCUMENT As String = ""
@@ -7,4 +8,12 @@ Module ModuleSettings
Public Directory2Delete As String = "" Public Directory2Delete As String = ""
Public MS_GDPICTUREKEY As String = "" Public MS_GDPICTUREKEY As String = ""
Public DB_DD_ECM As MSSQLServer = Nothing Public DB_DD_ECM As MSSQLServer = Nothing
Public DEF_TF_ENABLED As Boolean = False
Public MYUSER As User
Public MyTempFiles As TempFiles
Public SQL_REP_ENV_USER_LM As String = ""
Public SQL_REP_ENV_USER_TM As String = ""
Public SQL_REP_ENV_USER_Y As String = ""
Public SQL_REP_ENV_USER_ALL As String = ""
Public DT_CHARTS As DataTable
End Module End Module

View File

@@ -1,75 +0,0 @@
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
Partial Class frmChooseDocVariant
Inherits DevExpress.XtraEditors.XtraForm
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
<System.Diagnostics.DebuggerNonUserCode()> _
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
components.Dispose()
End If
Finally
MyBase.Dispose(disposing)
End Try
End Sub
'Wird vom Windows Form-Designer benötigt.
Private components As System.ComponentModel.IContainer
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
Private Sub InitializeComponent()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmChooseDocVariant))
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
Me.SimpleButton2 = New DevExpress.XtraEditors.SimpleButton()
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.SuspendLayout()
'
'LabelControl1
'
Me.LabelControl1.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.LabelControl1.Appearance.Options.UseFont = True
Me.LabelControl1.Location = New System.Drawing.Point(12, 26)
Me.LabelControl1.Name = "LabelControl1"
Me.LabelControl1.Size = New System.Drawing.Size(625, 17)
Me.LabelControl1.TabIndex = 2
Me.LabelControl1.Text = "In diesem Dialog wählen Sie die Dokumente aus, welche dann zu einem Dokument verk" &
"ettet werden!"
'
'SimpleButton2
'
Me.SimpleButton2.Appearance.Font = New System.Drawing.Font("Segoe UI", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.SimpleButton2.Appearance.Options.UseFont = True
Me.SimpleButton2.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.SimpleButton2.Location = New System.Drawing.Point(142, 85)
Me.SimpleButton2.Name = "SimpleButton2"
Me.SimpleButton2.Size = New System.Drawing.Size(343, 50)
Me.SimpleButton2.TabIndex = 3
Me.SimpleButton2.Text = "Mehrere PDF auswählen und automatisch verketten"
'
'OpenFileDialog1
'
Me.OpenFileDialog1.FileName = "OpenFileDialog1"
Me.OpenFileDialog1.Filter = "PDF Files|*.pdf"
'
'frmChooseDocVariant
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.ClientSize = New System.Drawing.Size(644, 189)
Me.Controls.Add(Me.SimpleButton2)
Me.Controls.Add(Me.LabelControl1)
Me.IconOptions.SvgImage = CType(resources.GetObject("frmChooseDocVariant.IconOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.Name = "frmChooseDocVariant"
Me.Text = "Mehrere Dokumente"
Me.ResumeLayout(False)
Me.PerformLayout()
End Sub
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
Friend WithEvents SimpleButton2 As DevExpress.XtraEditors.SimpleButton
Friend WithEvents OpenFileDialog1 As OpenFileDialog
End Class

View File

@@ -1,179 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<root>
<!--
Microsoft ResX Schema
Version 2.0
The primary goals of this format is to allow a simple XML format
that is mostly human readable. The generation and parsing of the
various data types are done through the TypeConverter classes
associated with the data types.
Example:
... ado.net/XML headers & schema ...
<resheader name="resmimetype">text/microsoft-resx</resheader>
<resheader name="version">2.0</resheader>
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
<value>[base64 mime encoded serialized .NET Framework object]</value>
</data>
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
<comment>This is a comment</comment>
</data>
There are any number of "resheader" rows that contain simple
name/value pairs.
Each data row contains a name, and value. The row also contains a
type or mimetype. Type corresponds to a .NET class that support
text/value conversion through the TypeConverter architecture.
Classes that don't support this are serialized and stored with the
mimetype set.
The mimetype is used for serialized objects, and tells the
ResXResourceReader how to depersist the object. This is currently not
extensible. For a given mimetype the value must be set accordingly:
Note - application/x-microsoft.net.object.binary.base64 is the format
that the ResXResourceWriter will generate, however the reader can
read any of the formats listed below.
mimetype: application/x-microsoft.net.object.binary.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.soap.base64
value : The object must be serialized with
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
: and then encoded with base64 encoding.
mimetype: application/x-microsoft.net.object.bytearray.base64
value : The object must be serialized into a byte array
: using a System.ComponentModel.TypeConverter
: and then encoded with base64 encoding.
-->
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
<xsd:element name="root" msdata:IsDataSet="true">
<xsd:complexType>
<xsd:choice maxOccurs="unbounded">
<xsd:element name="metadata">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" />
</xsd:sequence>
<xsd:attribute name="name" use="required" type="xsd:string" />
<xsd:attribute name="type" type="xsd:string" />
<xsd:attribute name="mimetype" type="xsd:string" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="assembly">
<xsd:complexType>
<xsd:attribute name="alias" type="xsd:string" />
<xsd:attribute name="name" type="xsd:string" />
</xsd:complexType>
</xsd:element>
<xsd:element name="data">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
<xsd:attribute ref="xml:space" />
</xsd:complexType>
</xsd:element>
<xsd:element name="resheader">
<xsd:complexType>
<xsd:sequence>
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
</xsd:sequence>
<xsd:attribute name="name" type="xsd:string" use="required" />
</xsd:complexType>
</xsd:element>
</xsd:choice>
</xsd:complexType>
</xsd:element>
</xsd:schema>
<resheader name="resmimetype">
<value>text/microsoft-resx</value>
</resheader>
<resheader name="version">
<value>2.0</value>
</resheader>
<resheader name="reader">
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<resheader name="writer">
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader>
<assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
<data name="SimpleButton2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJYEAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
LlJlZHtmaWxsOiNEMTFDMUM7fQo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gxLjZ2LTMuMWgydi0xLjNoLTJ2LTIuMkgyNlYxNHoi
IGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs=
</value>
</data>
<metadata name="OpenFileDialog1.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
<value>17, 17</value>
</metadata>
<data name="frmChooseDocVariant.IconOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANYEAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
Y2U9InByZXNlcnZlIiBpZD0iTG9naWNhbCIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KPC9z
dHlsZT4NCiAgPHBhdGggZD0iTTUsNGgyM1YzYzAtMC42LTAuNC0xLTEtMUg1QzMuMywyLDIsMy4zLDIs
NXYyMmMwLDEuNywxLjMsMywzLDNoMj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AuOGgtMi4yQzExLjQsMTUuNCwxMS40LDE0Ljks
MTEuNiwxNC40eiIgY2xhc3M9IkJsdWUiIC8+DQo8L3N2Zz4L
</value>
</data>
</root>

View File

@@ -1,96 +0,0 @@
Imports DevExpress.XtraSplashScreen
Imports EnvelopeGenerator.Common
Imports DigitalData.Modules.Logging
Imports GdPicture14
Public Class frmChooseDocVariant
Private TempFiles As TempFiles
Public Property State As State
Private Logger As Logger
Private Sub frmChooseDocVariant_Load(sender As Object, e As EventArgs) Handles Me.Load
ENVELOPE_TEMP_DOCUMENT = ""
TempFiles = New TempFiles(State.LogConfig)
TempFiles.Create()
Logger = State.LogConfig.GetLogger()
End Sub
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs)
OpenFileDialog1.Multiselect = False
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
ENVELOPE_TEMP_DOCUMENT = OpenFileDialog1.FileName
End If
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
' Else
' SplashScreenManager.CloseOverlayForm(oHandle)
' End If
End Sub
Private Sub SimpleButton2_Click(sender As Object, e As EventArgs) Handles SimpleButton2.Click
OpenFileDialog1.Multiselect = True
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oErr As Boolean = False
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim oIDX As Integer = 0
For Each oFile As String In OpenFileDialog1.FileNames
oIDX += 1
Next
Dim arPDF As GdPicturePDF() = New GdPicturePDF(oIDX) {}
oIDX = 0
For Each oFile As String In OpenFileDialog1.FileNames
arPDF(oIDX) = New GdPicturePDF()
If arPDF(oIDX).LoadFromFile(oFile) <> GdPictureStatus.OK Then
MsgBox($"PDF Statsu of file {oFile} is not OK. Please check PDF-conformity!", MsgBoxStyle.Critical)
oErr = True
Exit For
End If
oIDX += 1
Next
If oErr = False Then
Dim dstPDF As GdPicturePDF = arPDF(0).MergeDocuments(arPDF)
Dim oStatus As GdPictureStatus = arPDF(0).GetStat()
If oStatus = GdPictureStatus.OK Then
MsgBox("All documents have been successfully merged.", MsgBoxStyle.Information)
Dim oTempFolder = TempFiles.TempPath
Dim oTempFilename = String.Concat(oTempFolder, "\", $"MergedDoc.pdf")
If System.IO.File.Exists(oTempFilename) Then
System.IO.File.Delete(oTempFilename)
End If
If dstPDF.SaveToFile(oTempFilename) = GdPictureStatus.OK Then
MessageBox.Show("Merged document has been successfully saved.", "Example: MergeDocuments")
ENVELOPE_TEMP_DOCUMENT = oTempFilename
dstPDF.CloseDocument()
End If
Else
MessageBox.Show("The MergeDocuments() method has failed with the status: " + oStatus.ToString(), "Example: MergeDocuments")
End If
dstPDF.Dispose()
oIDX = 0
For Each oFile As String In OpenFileDialog1.FileNames
arPDF(oIDX).CloseDocument()
oIDX += 1
Next
End If
End If
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
End Sub
Private Sub LabelControl1_Click(sender As Object, e As EventArgs) Handles LabelControl1.Click
End Sub
End Class

View File

@@ -56,16 +56,16 @@ Partial Public Class frmEnvelopeEditor
Me.txtCreatorEmailLabel = New DevExpress.XtraBars.BarStaticItem() Me.txtCreatorEmailLabel = New DevExpress.XtraBars.BarStaticItem()
Me.txtEnvelopeIdLabel2 = New DevExpress.XtraBars.BarStaticItem() Me.txtEnvelopeIdLabel2 = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem1 = New DevExpress.XtraBars.BarButtonItem()
Me.BarStaticItem1 = New DevExpress.XtraBars.BarStaticItem() Me.bsitm_info = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem() Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
Me.bbtnitm_ConcatFiles = New DevExpress.XtraBars.BarButtonItem()
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupDocuments = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupDocuments = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupInvitation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupInvitation = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupAddSignature = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupAddSignature = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroupReceiver = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroupReceiver = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonStatusBar1 = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
Me.LayoutControlGroup4 = New DevExpress.XtraLayout.LayoutControlGroup() Me.LayoutControlGroup4 = New DevExpress.XtraLayout.LayoutControlGroup()
Me.LayoutControlGroup5 = New DevExpress.XtraLayout.LayoutControlGroup() Me.LayoutControlGroup5 = New DevExpress.XtraLayout.LayoutControlGroup()
@@ -82,6 +82,7 @@ Partial Public Class frmEnvelopeEditor
Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox() Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
Me.colName = New DevExpress.XtraGrid.Columns.GridColumn() Me.colName = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colAccessCode = New DevExpress.XtraGrid.Columns.GridColumn() Me.colAccessCode = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colPhoneNumber = New DevExpress.XtraGrid.Columns.GridColumn()
Me.RepositoryItemEmailEdit = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit() Me.RepositoryItemEmailEdit = New DevExpress.XtraEditors.Repository.RepositoryItemTextEdit()
Me.RepositoryItemPictureEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit() Me.RepositoryItemPictureEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit()
Me.RepositoryItemColorPickEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemColorPickEdit() Me.RepositoryItemColorPickEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemColorPickEdit()
@@ -100,7 +101,7 @@ Partial Public Class frmEnvelopeEditor
Me.EnvelopeDocumentBindingSource = New System.Windows.Forms.BindingSource(Me.components) Me.EnvelopeDocumentBindingSource = New System.Windows.Forms.BindingSource(Me.components)
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog() Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
Me.txtEnvelopeIdLabel = New DevExpress.XtraBars.BarStaticItem() Me.txtEnvelopeIdLabel = New DevExpress.XtraBars.BarStaticItem()
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem() Me.btnShowFile = New DevExpress.XtraBars.BarButtonItem()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.Panel1.SuspendLayout() Me.SplitContainerControl1.Panel1.SuspendLayout()
@@ -243,9 +244,9 @@ Partial Public Class frmEnvelopeEditor
'RibbonControl1 'RibbonControl1
' '
Me.RibbonControl1.ExpandCollapseItem.Id = 0 Me.RibbonControl1.ExpandCollapseItem.Id = 0
Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnSave, Me.btnCancel, Me.btnNewFile, Me.btnDeleteFile, Me.btnSendEnvelope, Me.btnEditFields, Me.btnDeleteReceiver, Me.btnEditData, Me.txtCreatorEmailLabel, Me.txtEnvelopeIdLabel2, Me.BarButtonItem1, Me.BarStaticItem1, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4}) Me.RibbonControl1.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl1.ExpandCollapseItem, Me.RibbonControl1.SearchEditItem, Me.btnSave, Me.btnCancel, Me.btnNewFile, Me.btnDeleteFile, Me.btnSendEnvelope, Me.btnEditFields, Me.btnDeleteReceiver, Me.btnEditData, Me.txtCreatorEmailLabel, Me.txtEnvelopeIdLabel2, Me.BarButtonItem1, Me.bsitm_info, Me.BarButtonItem2, Me.BarButtonItem3, Me.bbtnitm_ConcatFiles, Me.btnShowFile})
resources.ApplyResources(Me.RibbonControl1, "RibbonControl1") resources.ApplyResources(Me.RibbonControl1, "RibbonControl1")
Me.RibbonControl1.MaxItemId = 17 Me.RibbonControl1.MaxItemId = 18
Me.RibbonControl1.Name = "RibbonControl1" Me.RibbonControl1.Name = "RibbonControl1"
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1}) Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False] Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
@@ -334,10 +335,10 @@ Partial Public Class frmEnvelopeEditor
Me.BarButtonItem1.Id = 12 Me.BarButtonItem1.Id = 12
Me.BarButtonItem1.Name = "BarButtonItem1" Me.BarButtonItem1.Name = "BarButtonItem1"
' '
'BarStaticItem1 'bsitm_info
' '
Me.BarStaticItem1.Id = 13 Me.bsitm_info.Id = 13
Me.BarStaticItem1.Name = "BarStaticItem1" Me.bsitm_info.Name = "bsitm_info"
' '
'BarButtonItem2 'BarButtonItem2
' '
@@ -351,9 +352,16 @@ Partial Public Class frmEnvelopeEditor
Me.BarButtonItem3.Id = 15 Me.BarButtonItem3.Id = 15
Me.BarButtonItem3.Name = "BarButtonItem3" Me.BarButtonItem3.Name = "BarButtonItem3"
' '
'bbtnitm_ConcatFiles
'
resources.ApplyResources(Me.bbtnitm_ConcatFiles, "bbtnitm_ConcatFiles")
Me.bbtnitm_ConcatFiles.Id = 16
Me.bbtnitm_ConcatFiles.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitm_ConcatFiles.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.bbtnitm_ConcatFiles.Name = "bbtnitm_ConcatFiles"
'
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroupDocuments, Me.RibbonPageGroupInvitation, Me.RibbonPageGroupAddSignature, Me.RibbonPageGroupReceiver, Me.RibbonPageGroup2}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroupDocuments, Me.RibbonPageGroupInvitation, Me.RibbonPageGroupAddSignature, Me.RibbonPageGroupReceiver})
Me.RibbonPage1.Name = "RibbonPage1" Me.RibbonPage1.Name = "RibbonPage1"
resources.ApplyResources(Me.RibbonPage1, "RibbonPage1") resources.ApplyResources(Me.RibbonPage1, "RibbonPage1")
' '
@@ -368,8 +376,9 @@ Partial Public Class frmEnvelopeEditor
'RibbonPageGroupDocuments 'RibbonPageGroupDocuments
' '
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnNewFile) Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnNewFile)
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.BarButtonItem4) Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.bbtnitm_ConcatFiles)
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnDeleteFile) Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnDeleteFile)
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnShowFile)
Me.RibbonPageGroupDocuments.Name = "RibbonPageGroupDocuments" Me.RibbonPageGroupDocuments.Name = "RibbonPageGroupDocuments"
resources.ApplyResources(Me.RibbonPageGroupDocuments, "RibbonPageGroupDocuments") resources.ApplyResources(Me.RibbonPageGroupDocuments, "RibbonPageGroupDocuments")
' '
@@ -392,17 +401,11 @@ Partial Public Class frmEnvelopeEditor
Me.RibbonPageGroupReceiver.Name = "RibbonPageGroupReceiver" Me.RibbonPageGroupReceiver.Name = "RibbonPageGroupReceiver"
resources.ApplyResources(Me.RibbonPageGroupReceiver, "RibbonPageGroupReceiver") resources.ApplyResources(Me.RibbonPageGroupReceiver, "RibbonPageGroupReceiver")
' '
'RibbonPageGroup2
'
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem3)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2")
'
'RibbonStatusBar1 'RibbonStatusBar1
' '
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtCreatorEmailLabel) Me.RibbonStatusBar1.ItemLinks.Add(Me.txtCreatorEmailLabel)
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtEnvelopeIdLabel2) Me.RibbonStatusBar1.ItemLinks.Add(Me.txtEnvelopeIdLabel2)
Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItem1) Me.RibbonStatusBar1.ItemLinks.Add(Me.bsitm_info)
resources.ApplyResources(Me.RibbonStatusBar1, "RibbonStatusBar1") resources.ApplyResources(Me.RibbonStatusBar1, "RibbonStatusBar1")
Me.RibbonStatusBar1.Name = "RibbonStatusBar1" Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1 Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
@@ -482,7 +485,7 @@ Partial Public Class frmEnvelopeEditor
'ViewReceivers 'ViewReceivers
' '
Me.ViewReceivers.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple Me.ViewReceivers.BorderStyle = DevExpress.XtraEditors.Controls.BorderStyles.Simple
Me.ViewReceivers.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colColor, Me.colEmail, Me.colName, Me.colAccessCode}) Me.ViewReceivers.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colColor, Me.colEmail, Me.colName, Me.colAccessCode, Me.colPhoneNumber})
Me.ViewReceivers.GridControl = Me.GridReceivers Me.ViewReceivers.GridControl = Me.GridReceivers
Me.ViewReceivers.Name = "ViewReceivers" Me.ViewReceivers.Name = "ViewReceivers"
Me.ViewReceivers.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[True] Me.ViewReceivers.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[True]
@@ -542,6 +545,12 @@ Partial Public Class frmEnvelopeEditor
Me.colAccessCode.OptionsColumn.AllowEdit = False Me.colAccessCode.OptionsColumn.AllowEdit = False
Me.colAccessCode.OptionsColumn.ReadOnly = True Me.colAccessCode.OptionsColumn.ReadOnly = True
' '
'colPhoneNumber
'
resources.ApplyResources(Me.colPhoneNumber, "colPhoneNumber")
Me.colPhoneNumber.FieldName = "PhoneNumber"
Me.colPhoneNumber.Name = "colPhoneNumber"
'
'RepositoryItemEmailEdit 'RepositoryItemEmailEdit
' '
resources.ApplyResources(Me.RepositoryItemEmailEdit, "RepositoryItemEmailEdit") resources.ApplyResources(Me.RepositoryItemEmailEdit, "RepositoryItemEmailEdit")
@@ -675,15 +684,16 @@ Partial Public Class frmEnvelopeEditor
Me.txtEnvelopeIdLabel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph Me.txtEnvelopeIdLabel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
Me.txtEnvelopeIdLabel.Tag = "Envelope-ID: {0}" Me.txtEnvelopeIdLabel.Tag = "Envelope-ID: {0}"
' '
'BarButtonItem4 'btnShowFile
' '
resources.ApplyResources(Me.BarButtonItem4, "BarButtonItem4") resources.ApplyResources(Me.btnShowFile, "btnShowFile")
Me.BarButtonItem4.Id = 16 Me.btnShowFile.Id = 17
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage) Me.btnShowFile.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
Me.BarButtonItem4.Name = "BarButtonItem4" Me.btnShowFile.Name = "btnShowFile"
' '
'frmEnvelopeEditor 'frmEnvelopeEditor
' '
Me.AllowDrop = True
resources.ApplyResources(Me, "$this") resources.ApplyResources(Me, "$this")
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.Controls.Add(Me.SplitContainerControl1) Me.Controls.Add(Me.SplitContainerControl1)
@@ -804,11 +814,12 @@ Partial Public Class frmEnvelopeEditor
Friend WithEvents txtEnvelopeIdLabel2 As DevExpress.XtraBars.BarStaticItem Friend WithEvents txtEnvelopeIdLabel2 As DevExpress.XtraBars.BarStaticItem
Friend WithEvents colPageCount As DevExpress.XtraGrid.Columns.TileViewColumn Friend WithEvents colPageCount As DevExpress.XtraGrid.Columns.TileViewColumn
Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem1 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarStaticItem1 As DevExpress.XtraBars.BarStaticItem Friend WithEvents bsitm_info As DevExpress.XtraBars.BarStaticItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents bbtnitm_ConcatFiles As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem Friend WithEvents colPhoneNumber As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents btnShowFile As DevExpress.XtraBars.BarButtonItem
#End Region #End Region

View File

@@ -213,7 +213,7 @@
</value> </value>
</data> </data>
<data name="btnNewFile.Caption" xml:space="preserve"> <data name="btnNewFile.Caption" xml:space="preserve">
<value>Ein Dokument hinzufügen</value> <value>Ein PDF-Dokument hinzufügen</value>
</data> </data>
<data name="btnNewFile.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnNewFile.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
@@ -322,35 +322,30 @@
</value> </value>
</data> </data>
<data name="btnEditData.Caption" xml:space="preserve"> <data name="btnEditData.Caption" xml:space="preserve">
<value>Titel und Typ</value> <value>Eigenschaften</value>
</data> </data>
<data name="btnEditData.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="btnEditData.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.Sv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C40LTEu LDE0LjMsMjZ6IiBjbGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L
MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu
NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw
YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu
NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy
NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw==
</value> </value>
</data> </data>
<data name="txtCreatorEmailLabel.Caption" xml:space="preserve"> <data name="txtCreatorEmailLabel.Caption" xml:space="preserve">
@@ -417,10 +412,10 @@
<data name="BarButtonItem3.Caption" xml:space="preserve"> <data name="BarButtonItem3.Caption" xml:space="preserve">
<value>BarButtonItem3</value> <value>BarButtonItem3</value>
</data> </data>
<data name="BarButtonItem4.Caption" xml:space="preserve"> <data name="bbtnitm_ConcatFiles.Caption" xml:space="preserve">
<value>Mehrere Dokumente hinzufügen</value> <value>Mehrere PDF-Dokumente verketten</value>
</data> </data>
<data name="BarButtonItem4.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="bbtnitm_ConcatFiles.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40 AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
@@ -436,6 +431,36 @@
LDguNSwzMS41LDgsMzEsOHogTTYsNXYxN0gyVjJoMTZ2Mkg3QzYuNSw0LDYsNC41LDYsNXogTTEyLDl2 LDguNSwzMS41LDgsMzEsOHogTTYsNXYxN0gyVjJoMTZ2Mkg3QzYuNSw0LDYsNC41LDYsNXogTTEyLDl2
MTdIOFY2aDE2djJIMTMgIEMxMi41LDgsMTIsOC41LDEyLDl6IE0zMCwzMEgxNFYxMGgxNlYzMHoiIGNs MTdIOFY2aDE2djJIMTMgIEMxMi41LDgsMTIsOC41LDEyLDl6IE0zMCwzMEgxNFYxMGgxNlYzMHoiIGNs
YXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs= YXNzPSJCbGFjayIgLz4NCjwvc3ZnPgs=
</value>
</data>
<data name="btnShowFile.Caption" xml:space="preserve">
<value>Dokument anzeigen</value>
</data>
<data name="BarButtonItem4.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value>
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAJYEAAAC77u/
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjx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TUuNCwxMi40LDE1LjMsMTIuMSwx
NS4zeiAgICBNMzAsMTJ2MTJINlYxMkgzMHogTTE0LjgsMTYuNWMwLTAuOC0wLjItMS41LTAuNi0xLjlj
LTAuNC0wLjQtMS0wLjctMS44LTAuN0gxMHY4aDEuNnYtMi43aDAuNmMwLjgsMCwxLjQtMC4zLDEuOS0w
LjggICBDMTQuNSwxOCwxNC44LDE3LjMsMTQuOCwxNi41eiBNMjEuMiwxNy45YzAtMi42LTEuMS0zLjkt
My40LTMuOWgtMi4xdjhoMi4yYzEuMSwwLDEuOS0wLjQsMi41LTEuMUMyMC45LDIwLjIsMjEuMiwxOS4y
LDIxLjIsMTcuOXogICAgTTI2LDE0aC0zLjd2OGgxLjZ2LTMuMWgydi0xLjNoLTJ2LTIuMkgyNlYxNHoi
IGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs=
</value> </value>
</data> </data>
<data name="RibbonControl1.Location" type="System.Drawing.Point, System.Drawing"> <data name="RibbonControl1.Location" type="System.Drawing.Point, System.Drawing">
@@ -445,7 +470,7 @@
<value>Umschlag</value> <value>Umschlag</value>
</data> </data>
<data name="RibbonPageGroupDocuments.Text" xml:space="preserve"> <data name="RibbonPageGroupDocuments.Text" xml:space="preserve">
<value>Dateien</value> <value>Dokument-Funktionen</value>
</data> </data>
<data name="RibbonPageGroupInvitation.Text" xml:space="preserve"> <data name="RibbonPageGroupInvitation.Text" xml:space="preserve">
<value>Prozess</value> <value>Prozess</value>
@@ -456,9 +481,6 @@
<data name="RibbonPageGroupReceiver.Text" xml:space="preserve"> <data name="RibbonPageGroupReceiver.Text" xml:space="preserve">
<value>Empfänger</value> <value>Empfänger</value>
</data> </data>
<data name="RibbonPageGroup2.Text" xml:space="preserve">
<value>RibbonPageGroup2</value>
</data>
<data name="RibbonPage1.Text" xml:space="preserve"> <data name="RibbonPage1.Text" xml:space="preserve">
<value>Start</value> <value>Start</value>
</data> </data>
@@ -605,7 +627,7 @@
<value>0</value> <value>0</value>
</data> </data>
<data name="colColor.Width" type="System.Int32, mscorlib"> <data name="colColor.Width" type="System.Int32, mscorlib">
<value>37</value> <value>32</value>
</data> </data>
<data name="RepositoryItemComboBox1.AutoHeight" type="System.Boolean, mscorlib"> <data name="RepositoryItemComboBox1.AutoHeight" type="System.Boolean, mscorlib">
<value>False</value> <value>False</value>
@@ -620,7 +642,7 @@
<value>1</value> <value>1</value>
</data> </data>
<data name="colEmail.Width" type="System.Int32, mscorlib"> <data name="colEmail.Width" type="System.Int32, mscorlib">
<value>341</value> <value>275</value>
</data> </data>
<data name="colName.Caption" xml:space="preserve"> <data name="colName.Caption" xml:space="preserve">
<value>Anrede Email</value> <value>Anrede Email</value>
@@ -632,7 +654,7 @@
<value>2</value> <value>2</value>
</data> </data>
<data name="colName.Width" type="System.Int32, mscorlib"> <data name="colName.Width" type="System.Int32, mscorlib">
<value>344</value> <value>227</value>
</data> </data>
<data name="colAccessCode.Caption" xml:space="preserve"> <data name="colAccessCode.Caption" xml:space="preserve">
<value>Zugriffscode</value> <value>Zugriffscode</value>
@@ -644,7 +666,19 @@
<value>3</value> <value>3</value>
</data> </data>
<data name="colAccessCode.Width" type="System.Int32, mscorlib"> <data name="colAccessCode.Width" type="System.Int32, mscorlib">
<value>147</value> <value>109</value>
</data>
<data name="colPhoneNumber.Caption" xml:space="preserve">
<value>Mobilnummer</value>
</data>
<data name="colPhoneNumber.Visible" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="colPhoneNumber.VisibleIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="colPhoneNumber.Width" type="System.Int32, mscorlib">
<value>226</value>
</data> </data>
<data name="RepositoryItemEmailEdit.AutoHeight" type="System.Boolean, mscorlib"> <data name="RepositoryItemEmailEdit.AutoHeight" type="System.Boolean, mscorlib">
<value>False</value> <value>False</value>
@@ -1073,10 +1107,10 @@
<data name="&gt;&gt;BarButtonItem1.Type" xml:space="preserve"> <data name="&gt;&gt;BarButtonItem1.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;BarStaticItem1.Name" xml:space="preserve"> <data name="&gt;&gt;bsitm_info.Name" xml:space="preserve">
<value>BarStaticItem1</value> <value>bsitm_info</value>
</data> </data>
<data name="&gt;&gt;BarStaticItem1.Type" xml:space="preserve"> <data name="&gt;&gt;bsitm_info.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;BarButtonItem2.Name" xml:space="preserve"> <data name="&gt;&gt;BarButtonItem2.Name" xml:space="preserve">
@@ -1091,10 +1125,10 @@
<data name="&gt;&gt;BarButtonItem3.Type" xml:space="preserve"> <data name="&gt;&gt;BarButtonItem3.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;BarButtonItem4.Name" xml:space="preserve"> <data name="&gt;&gt;bbtnitm_ConcatFiles.Name" xml:space="preserve">
<value>BarButtonItem4</value> <value>bbtnitm_ConcatFiles</value>
</data> </data>
<data name="&gt;&gt;BarButtonItem4.Type" xml:space="preserve"> <data name="&gt;&gt;bbtnitm_ConcatFiles.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;RibbonPage1.Name" xml:space="preserve"> <data name="&gt;&gt;RibbonPage1.Name" xml:space="preserve">
@@ -1133,12 +1167,6 @@
<data name="&gt;&gt;RibbonPageGroupReceiver.Type" xml:space="preserve"> <data name="&gt;&gt;RibbonPageGroupReceiver.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;RibbonPageGroup2.Name" xml:space="preserve">
<value>RibbonPageGroup2</value>
</data>
<data name="&gt;&gt;RibbonPageGroup2.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;LayoutControlGroup4.Name" xml:space="preserve"> <data name="&gt;&gt;LayoutControlGroup4.Name" xml:space="preserve">
<value>LayoutControlGroup4</value> <value>LayoutControlGroup4</value>
</data> </data>
@@ -1205,6 +1233,12 @@
<data name="&gt;&gt;colAccessCode.Type" xml:space="preserve"> <data name="&gt;&gt;colAccessCode.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;colPhoneNumber.Name" xml:space="preserve">
<value>colPhoneNumber</value>
</data>
<data name="&gt;&gt;colPhoneNumber.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RepositoryItemEmailEdit.Name" xml:space="preserve"> <data name="&gt;&gt;RepositoryItemEmailEdit.Name" xml:space="preserve">
<value>RepositoryItemEmailEdit</value> <value>RepositoryItemEmailEdit</value>
</data> </data>
@@ -1295,6 +1329,12 @@
<data name="&gt;&gt;txtEnvelopeIdLabel.Type" xml:space="preserve"> <data name="&gt;&gt;txtEnvelopeIdLabel.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;btnShowFile.Name" xml:space="preserve">
<value>btnShowFile</value>
</data>
<data name="&gt;&gt;btnShowFile.Type" xml:space="preserve">
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;$this.Name" xml:space="preserve"> <data name="&gt;&gt;$this.Name" xml:space="preserve">
<value>frmEnvelopeEditor</value> <value>frmEnvelopeEditor</value>
</data> </data>

View File

@@ -1,6 +1,7 @@
Imports System.ComponentModel Imports System.ComponentModel
Imports System.Data.SqlClient Imports System.Data.SqlClient
Imports System.IO Imports System.IO
Imports System.Text.RegularExpressions
Imports DevExpress.Export.Xl Imports DevExpress.Export.Xl
Imports DevExpress.Utils.CommonDialogs Imports DevExpress.Utils.CommonDialogs
Imports DevExpress.Utils.Drawing Imports DevExpress.Utils.Drawing
@@ -17,6 +18,7 @@ Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.Common Imports EnvelopeGenerator.Common
Imports EnvelopeGenerator.Common.Constants Imports EnvelopeGenerator.Common.Constants
Imports EnvelopeGenerator.Common.My Imports EnvelopeGenerator.Common.My
Imports GdPicture14
Partial Public Class frmEnvelopeEditor Partial Public Class frmEnvelopeEditor
Public Property Envelope As Envelope Public Property Envelope As Envelope
@@ -31,7 +33,7 @@ Partial Public Class frmEnvelopeEditor
Private Const COL_NAME = "Name" Private Const COL_NAME = "Name"
Private Const COL_EMAIL = "Email" Private Const COL_EMAIL = "Email"
Private Const COL_CODE = "AccessCode" Private Const COL_CODE = "AccessCode"
Private Const COL_PHONE = "PhoneNumber"
Public Property State As State Public Property State As State
Private TempFiles As TempFiles Private TempFiles As TempFiles
@@ -51,14 +53,7 @@ Partial Public Class frmEnvelopeEditor
End If End If
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim oDocument = Await Controller.CreateDocument(OpenFileDialog1.FileName) Await AddDocument(OpenFileDialog1.FileName)
If oDocument IsNot Nothing Then
Documents.Add(oDocument)
' Update_File_DB(OpenFileDialog1.FileName)
Else
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
End If
End If End If
Catch ex As Exception Catch ex As Exception
@@ -73,15 +68,31 @@ Partial Public Class frmEnvelopeEditor
' End If ' End If
End Sub End Sub
Private Async Function AddDocument(pfilePath As String) As Threading.Tasks.Task(Of Boolean)
Dim oDocument = Await Controller.CreateDocument(pfilePath)
If oDocument IsNot Nothing Then
Documents.Add(oDocument)
' Update_File_DB(OpenFileDialog1.FileName)
ClearBsiItem()
Return True
Else
MsgBox(Resources.Envelope.Document_Could_Not_Be_Saved, MsgBoxStyle.Critical, Text)
Return False
End If
End Function
Private Sub frmEditor_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub frmEditor_Load(sender As Object, e As EventArgs) Handles Me.Load
Logger = State.LogConfig.GetLogger() Logger = State.LogConfig.GetLogger()
Logger.Debug("Loading Configuration..") Logger.Debug("Loading Configuration..")
TempFiles = New TempFiles(State.LogConfig) TempFiles = New TempFiles(State.LogConfig)
TempFiles.Create() TempFiles.Create()
If Envelope Is Nothing Then If Envelope Is Nothing Then
Logger.Debug("Loading Controller..")
Controller = New EnvelopeEditorController(State) Controller = New EnvelopeEditorController(State)
' Get additional data ' Get additional data
Logger.Debug("Loading oDataForm..")
Dim oDataForm As New frmEnvelopeMainData() With { Dim oDataForm As New frmEnvelopeMainData() With {
.State = State, .State = State,
.Envelope = Controller.Envelope, .Envelope = Controller.Envelope,
@@ -116,6 +127,7 @@ Partial Public Class frmEnvelopeEditor
End If End If
WriteBytetoPath(oTempFilename, docItem.Byte_Data) WriteBytetoPath(oTempFilename, docItem.Byte_Data)
docItem.Filepath = oTempFilename docItem.Filepath = oTempFilename
GridDocuments.Tag = docItem.Filepath
End If End If
If docItem.Thumbnail Is Nothing Then If docItem.Thumbnail Is Nothing Then
docItem.Thumbnail = Controller.CreateThumbnail(docItem.Filepath) docItem.Thumbnail = Controller.CreateThumbnail(docItem.Filepath)
@@ -139,7 +151,7 @@ Partial Public Class frmEnvelopeEditor
RepositoryItemComboBox1.Items.AddRange(AllReceiverEmails) RepositoryItemComboBox1.Items.AddRange(AllReceiverEmails)
SetAccessCodeColumnVisible() SetAccessCodeColumnVisible()
SetPhoneNumberColumnVisible()
txtEnvelopeIdLabel2.Caption = String.Format(txtEnvelopeIdLabel2.Tag.ToString, Controller.Envelope.Id) txtEnvelopeIdLabel2.Caption = String.Format(txtEnvelopeIdLabel2.Tag.ToString, Controller.Envelope.Id)
txtCreatorEmailLabel.Caption = String.Format(txtCreatorEmailLabel.Tag.ToString, Controller.Envelope.User.Email) txtCreatorEmailLabel.Caption = String.Format(txtCreatorEmailLabel.Tag.ToString, Controller.Envelope.User.Email)
@@ -153,6 +165,13 @@ Partial Public Class frmEnvelopeEditor
colAccessCode.Visible = False colAccessCode.Visible = False
End If End If
End Sub End Sub
Private Sub SetPhoneNumberColumnVisible()
If Envelope.TFA_Enabled = True Then
colPhoneNumber.Visible = True
Else
colPhoneNumber.Visible = False
End If
End Sub
Private Sub btnDeleteFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteFile.ItemClick Private Sub btnDeleteFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteFile.ItemClick
If ViewDocuments.GetSelectedRows().Count > 0 Then If ViewDocuments.GetSelectedRows().Count > 0 Then
@@ -166,14 +185,18 @@ Partial Public Class frmEnvelopeEditor
If Controller.DeleteDocument(oDocument) Then If Controller.DeleteDocument(oDocument) Then
Documents.Remove(oDocument) Documents.Remove(oDocument)
GridDocuments.DataSource = Nothing GridDocuments.DataSource = Nothing
ClearBsiItem()
End If End If
End If End If
End Sub End Sub
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
Try Try
SaveEnvelopeWithOutValidation() If SaveEnvelopeWithOutValidation() = True Then
bsitm_info.Caption = "Data saved succeddfully " + Now.ToString
Else
bsitm_info.Caption = "Exceprion - Error saving Data. Check LOG"
End If
Catch ex As Exception Catch ex As Exception
Logger.Error(ex) Logger.Error(ex)
End Try End Try
@@ -439,7 +462,7 @@ Partial Public Class frmEnvelopeEditor
oForm.ShowDialog() oForm.ShowDialog()
SetAccessCodeColumnVisible() SetAccessCodeColumnVisible()
SetPhoneNumberColumnVisible()
SetFormTitle(Controller.Envelope.Title) SetFormTitle(Controller.Envelope.Title)
End Sub End Sub
@@ -491,10 +514,14 @@ Partial Public Class frmEnvelopeEditor
Private Sub DocumentButtons_Enable() Private Sub DocumentButtons_Enable()
If ViewDocuments.RowCount = 0 Then If ViewDocuments.RowCount = 0 Then
btnNewFile.Enabled = True btnNewFile.Enabled = True
bbtnitm_ConcatFiles.Enabled = True
btnDeleteFile.Enabled = False btnDeleteFile.Enabled = False
btnShowFile.Enabled = False
Else Else
btnNewFile.Enabled = False btnNewFile.Enabled = False
bbtnitm_ConcatFiles.Enabled = False
btnDeleteFile.Enabled = True btnDeleteFile.Enabled = True
btnShowFile.Enabled = True
End If End If
End Sub End Sub
@@ -555,25 +582,35 @@ Partial Public Class frmEnvelopeEditor
If IsValidEmailAddress(oEmailAdress) = True Then If IsValidEmailAddress(oEmailAdress) = True Then
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress) Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
Dim oAccessCode As String = Helpers.GetAccessCode() Dim oAccessCode As String = Helpers.GetAccessCode()
Dim oPhoneNumber As String = Controller.GetLastPhoneByEmailAdress(oEmailAdress)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress) ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName) ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode) ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
CellValueChanged = False ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
Else Else
Dim oMsg = Resources.Envelope.Error_email_Validation Dim oMsg = Resources.Envelope.Error_email_Validation
oMsg = oMsg.Replace("@Mail", oEmailAdress) oMsg = oMsg.Replace("@Mail", oEmailAdress)
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text) MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle) ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
End If End If
CellValueChanged = False
End If End If
End If End If
ElseIf e.Column.FieldName = COL_PHONE And CellValueChanged = False Then
CellValueChanged = True
Dim oPhoneNumber As String = DirectCast(e.Value.ToString.ToLower, String)
oPhoneNumber = Trim(oPhoneNumber)
If IsValidMobilePhoneNumber(oPhoneNumber) = True Then
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
Else
Dim oMsg = Resources.Envelope.Error_phone_Validation
oMsg = oMsg.Replace("@PhoneNr", oPhoneNumber)
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
End If
CellValueChanged = False
End If End If
End Sub End Sub
Private Sub email_validation()
End Sub
Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean
Try Try
If pEmailAddress.Contains("@") Then If pEmailAddress.Contains("@") Then
@@ -587,21 +624,150 @@ Partial Public Class frmEnvelopeEditor
Return False Return False
End Try End Try
End Function End Function
Private Function IsValidMobilePhoneNumber(pPhoneNumber As String) As Boolean
Try
Dim pattern As String = "^\+49\d{10,14}$"
Dim regex As New Regex(pattern)
Return regex.IsMatch(pPhoneNumber)
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click Private Sub RibbonControl1_Click(sender As Object, e As EventArgs) Handles RibbonControl1.Click
End Sub End Sub
Private Async Sub bbtnitm_ConcatFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm_ConcatFiles.ItemClick
ENVELOPE_TEMP_DOCUMENT = String.Empty
OpenFileDialog1.Multiselect = True
OpenFileDialog1.Title = Resources.Envelope.Dialog_Concat_PDF
Dim oSuccess As Boolean = False
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oErr As Boolean = False
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
Dim oIDX As Integer = -1
For Each oFile As String In OpenFileDialog1.FileNames
oIDX += 1
Next
Private Sub BarButtonItem3_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem3.ItemClick Dim arPDF As GdPicturePDF() = New GdPicturePDF(oIDX) {}
frmChooseDocVariant.ShowDialog() oIDX = 0
End Sub For Each oFile As String In OpenFileDialog1.FileNames
arPDF(oIDX) = New GdPicturePDF()
If arPDF(oIDX).LoadFromFile(oFile) <> GdPictureStatus.OK Then
MsgBox($"PDF Status of file {oFile} is not OK. Please check PDF-conformity!", MsgBoxStyle.Critical)
oErr = True
Exit For
End If
oIDX += 1
Next
If oErr = False Then
Private Sub BarButtonItem4_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem4.ItemClick Dim dstPDF As GdPicturePDF = arPDF(0).MergeDocuments(arPDF)
Dim oStatus As GdPictureStatus = arPDF(0).GetStat()
If oStatus = GdPictureStatus.OK Then
Dim oTempFolder = MyTempFiles.TempPath
If Not Directory.Exists(oTempFolder) Then
Directory.CreateDirectory(oTempFolder)
End If
Dim oTempFilename = String.Concat(oTempFolder, "\", $"MergedDoc.pdf")
'wenn es das MergedDocument schon gibt dann löschen
If System.IO.File.Exists(oTempFilename) Then
System.IO.File.Delete(oTempFilename)
End If
If dstPDF.SaveToFile(oTempFilename) = GdPictureStatus.OK Then
ENVELOPE_TEMP_DOCUMENT = oTempFilename
dstPDF.CloseDocument()
oSuccess = True
Else
MsgBox("Unexpected format-error within the final document!", MsgBoxStyle.Critical)
oSuccess = False
End If
Else
MessageBox.Show("The MergeDocuments() method has failed with the status: " + oStatus.ToString(), "Example: MergeDocuments")
oSuccess = False
End If
dstPDF.Dispose()
oIDX = 0
For Each oFile As String In OpenFileDialog1.FileNames
arPDF(oIDX).CloseDocument()
oIDX += 1
Next
If oSuccess = True And ENVELOPE_TEMP_DOCUMENT <> String.Empty Then
Await AddDocument(ENVELOPE_TEMP_DOCUMENT)
End If
End If
End If
Catch ex As Exception
Logger.Error(ex)
Finally
SplashScreenManager.CloseOverlayForm(oHandle)
End Try
'frmChooseDocVariant.ShowDialog()
End Sub End Sub
Private Sub ViewReceivers_CellValueChanging(sender As Object, e As CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanging Private Sub frmEnvelopeEditor_DragEnter(sender As Object, e As DragEventArgs) Handles Me.DragEnter
ClearBsiItem()
' Prüfen, ob die Daten vom Typ Datei sind
If e.Data.GetDataPresent(DataFormats.FileDrop) Then
' prüfen ob es schon eine Datei gibt
If Documents.Count > 0 Then
e.Effect = DragDropEffects.None
bsitm_info.Caption = Resources.Envelope.Only_one_file_is_allowed
bsitm_info.ItemAppearance.Normal.BackColor = Color.Red
bsitm_info.ItemAppearance.Normal.ForeColor = Color.Yellow
Else
' Effekt auf "Kopieren" setzen, um Drag-and-Drop zu ermöglichen
e.Effect = DragDropEffects.Copy
End If
Else
e.Effect = DragDropEffects.None
End If
End Sub
Sub ClearBsiItem()
bsitm_info.Caption = ""
bsitm_info.ItemAppearance.Normal.BackColor = Color.Transparent
bsitm_info.ItemAppearance.Normal.ForeColor = Color.Black
End Sub
Private Async Sub frmEnvelopeEditor_DragDrop(sender As Object, e As DragEventArgs) Handles Me.DragDrop
' Den Pfad der Datei(en) erhalten
Dim ofiles() As String = CType(e.Data.GetData(DataFormats.FileDrop), String())
' Beispiel: Ersten Dateipfad anzeigen
If ofiles IsNot Nothing AndAlso ofiles.Length > 0 Then
If Not ofiles(0).ToString.EndsWith("pdf") Then
bsitm_info.Caption = Resources.Envelope.Drop_only_one_file
bsitm_info.ItemAppearance.Normal.BackColor = Color.Red
bsitm_info.ItemAppearance.Normal.ForeColor = Color.Yellow
Else
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Await AddDocument(ofiles(0))
SplashScreenManager.CloseOverlayForm(oHandle)
' MessageBox.Show("Dateipfad: " & ofiles(0), "Datei abgelegt", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End If
End Sub End Sub
Private Sub GridDocuments_DoubleClick(sender As Object, e As EventArgs) Handles GridDocuments.DoubleClick
showdocument()
End Sub
Private Sub btnShowFile_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnShowFile.ItemClick
showDocument
End Sub
Sub showdocument()
If Not IsNothing(Documents) Then
Process.Start(Documents.Item(0).Filepath)
End If
End Sub
End Class End Class

View File

@@ -25,6 +25,7 @@ Partial Class frmEnvelopeMainData
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEnvelopeMainData)) Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEnvelopeMainData))
Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl() Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl()
Me.chked_2Faktor = New DevExpress.XtraEditors.CheckEdit()
Me.txtTitle = New DevExpress.XtraEditors.TextEdit() Me.txtTitle = New DevExpress.XtraEditors.TextEdit()
Me.cmbEnvelopeType = New DevExpress.XtraEditors.ComboBoxEdit() Me.cmbEnvelopeType = New DevExpress.XtraEditors.ComboBoxEdit()
Me.btOK = New DevExpress.XtraEditors.SimpleButton() Me.btOK = New DevExpress.XtraEditors.SimpleButton()
@@ -62,9 +63,11 @@ Partial Class frmEnvelopeMainData
Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem12 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem12 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem13 = New DevExpress.XtraLayout.LayoutControlItem() Me.LayoutControlItem13 = New DevExpress.XtraLayout.LayoutControlItem()
Me.LayoutControlItem16 = New DevExpress.XtraLayout.LayoutControlItem()
Me.AdornerUIManager1 = New DevExpress.Utils.VisualEffects.AdornerUIManager(Me.components) Me.AdornerUIManager1 = New DevExpress.Utils.VisualEffects.AdornerUIManager(Me.components)
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.LayoutControl1.SuspendLayout() Me.LayoutControl1.SuspendLayout()
CType(Me.chked_2Faktor.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.txtTitle.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.txtTitle.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbEnvelopeType.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.cmbEnvelopeType.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.cmbCertificationType.Properties, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.cmbCertificationType.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -100,11 +103,13 @@ Partial Class frmEnvelopeMainData
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.LayoutControlItem16, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.AdornerUIManager1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.AdornerUIManager1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'LayoutControl1 'LayoutControl1
' '
Me.LayoutControl1.Controls.Add(Me.chked_2Faktor)
Me.LayoutControl1.Controls.Add(Me.txtTitle) Me.LayoutControl1.Controls.Add(Me.txtTitle)
Me.LayoutControl1.Controls.Add(Me.cmbEnvelopeType) Me.LayoutControl1.Controls.Add(Me.cmbEnvelopeType)
Me.LayoutControl1.Controls.Add(Me.btOK) Me.LayoutControl1.Controls.Add(Me.btOK)
@@ -124,6 +129,15 @@ Partial Class frmEnvelopeMainData
Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(855, 189, 650, 400) Me.LayoutControl1.OptionsCustomizationForm.DesignTimeCustomizationFormPositionAndSize = New System.Drawing.Rectangle(855, 189, 650, 400)
Me.LayoutControl1.Root = Me.Root Me.LayoutControl1.Root = Me.Root
' '
'chked_2Faktor
'
resources.ApplyResources(Me.chked_2Faktor, "chked_2Faktor")
Me.chked_2Faktor.Name = "chked_2Faktor"
Me.chked_2Faktor.Properties.Appearance.Font = CType(resources.GetObject("chked_2Faktor.Properties.Appearance.Font"), System.Drawing.Font)
Me.chked_2Faktor.Properties.Appearance.Options.UseFont = True
Me.chked_2Faktor.Properties.Caption = resources.GetString("chked_2Faktor.Properties.Caption")
Me.chked_2Faktor.StyleController = Me.LayoutControl1
'
'txtTitle 'txtTitle
' '
resources.ApplyResources(Me.txtTitle, "txtTitle") resources.ApplyResources(Me.txtTitle, "txtTitle")
@@ -311,16 +325,16 @@ Partial Class frmEnvelopeMainData
'EmptySpaceItem2 'EmptySpaceItem2
' '
Me.EmptySpaceItem2.AllowHotTrack = False Me.EmptySpaceItem2.AllowHotTrack = False
Me.EmptySpaceItem2.Location = New System.Drawing.Point(0, 416) Me.EmptySpaceItem2.Location = New System.Drawing.Point(0, 441)
Me.EmptySpaceItem2.Name = "EmptySpaceItem2" Me.EmptySpaceItem2.Name = "EmptySpaceItem2"
Me.EmptySpaceItem2.Size = New System.Drawing.Size(565, 88) Me.EmptySpaceItem2.Size = New System.Drawing.Size(565, 63)
Me.EmptySpaceItem2.TextSize = New System.Drawing.Size(0, 0) Me.EmptySpaceItem2.TextSize = New System.Drawing.Size(0, 0)
' '
'groupFinalEmail 'groupFinalEmail
' '
Me.groupFinalEmail.GroupStyle = DevExpress.Utils.GroupStyle.Light Me.groupFinalEmail.GroupStyle = DevExpress.Utils.GroupStyle.Light
Me.groupFinalEmail.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem9, Me.LayoutControlItem14}) Me.groupFinalEmail.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem9, Me.LayoutControlItem14})
Me.groupFinalEmail.Location = New System.Drawing.Point(0, 323) Me.groupFinalEmail.Location = New System.Drawing.Point(0, 348)
Me.groupFinalEmail.Name = "groupFinalEmail" Me.groupFinalEmail.Name = "groupFinalEmail"
Me.groupFinalEmail.Size = New System.Drawing.Size(565, 93) Me.groupFinalEmail.Size = New System.Drawing.Size(565, 93)
resources.ApplyResources(Me.groupFinalEmail, "groupFinalEmail") resources.ApplyResources(Me.groupFinalEmail, "groupFinalEmail")
@@ -348,7 +362,7 @@ Partial Class frmEnvelopeMainData
Me.groupExpiration.Enabled = False Me.groupExpiration.Enabled = False
Me.groupExpiration.GroupStyle = DevExpress.Utils.GroupStyle.Light Me.groupExpiration.GroupStyle = DevExpress.Utils.GroupStyle.Light
Me.groupExpiration.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem10, Me.LayoutControlItem11}) Me.groupExpiration.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem10, Me.LayoutControlItem11})
Me.groupExpiration.Location = New System.Drawing.Point(0, 230) Me.groupExpiration.Location = New System.Drawing.Point(0, 255)
Me.groupExpiration.Name = "groupExpiration" Me.groupExpiration.Name = "groupExpiration"
Me.groupExpiration.Size = New System.Drawing.Size(565, 93) Me.groupExpiration.Size = New System.Drawing.Size(565, 93)
resources.ApplyResources(Me.groupExpiration, "groupExpiration") resources.ApplyResources(Me.groupExpiration, "groupExpiration")
@@ -376,7 +390,7 @@ Partial Class frmEnvelopeMainData
Me.groupReminders.Enabled = False Me.groupReminders.Enabled = False
Me.groupReminders.GroupStyle = DevExpress.Utils.GroupStyle.Light Me.groupReminders.GroupStyle = DevExpress.Utils.GroupStyle.Light
Me.groupReminders.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem5, Me.LayoutControlItem6, Me.LayoutControlItem7}) Me.groupReminders.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem5, Me.LayoutControlItem6, Me.LayoutControlItem7})
Me.groupReminders.Location = New System.Drawing.Point(0, 115) Me.groupReminders.Location = New System.Drawing.Point(0, 140)
Me.groupReminders.Name = "groupReminders" Me.groupReminders.Name = "groupReminders"
Me.groupReminders.Size = New System.Drawing.Size(565, 115) Me.groupReminders.Size = New System.Drawing.Size(565, 115)
resources.ApplyResources(Me.groupReminders, "groupReminders") resources.ApplyResources(Me.groupReminders, "groupReminders")
@@ -411,10 +425,10 @@ Partial Class frmEnvelopeMainData
'groupOptions 'groupOptions
' '
Me.groupOptions.GroupStyle = DevExpress.Utils.GroupStyle.Light Me.groupOptions.GroupStyle = DevExpress.Utils.GroupStyle.Light
Me.groupOptions.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem8, Me.LayoutControlItem12, Me.LayoutControlItem13}) Me.groupOptions.Items.AddRange(New DevExpress.XtraLayout.BaseLayoutItem() {Me.LayoutControlItem8, Me.LayoutControlItem12, Me.LayoutControlItem13, Me.LayoutControlItem16})
Me.groupOptions.Location = New System.Drawing.Point(0, 0) Me.groupOptions.Location = New System.Drawing.Point(0, 0)
Me.groupOptions.Name = "groupOptions" Me.groupOptions.Name = "groupOptions"
Me.groupOptions.Size = New System.Drawing.Size(565, 115) Me.groupOptions.Size = New System.Drawing.Size(565, 140)
resources.ApplyResources(Me.groupOptions, "groupOptions") resources.ApplyResources(Me.groupOptions, "groupOptions")
' '
'LayoutControlItem8 'LayoutControlItem8
@@ -438,12 +452,21 @@ Partial Class frmEnvelopeMainData
'LayoutControlItem13 'LayoutControlItem13
' '
Me.LayoutControlItem13.Control = Me.chkUseAccessCode Me.LayoutControlItem13.Control = Me.chkUseAccessCode
Me.LayoutControlItem13.Location = New System.Drawing.Point(0, 48) Me.LayoutControlItem13.Location = New System.Drawing.Point(0, 73)
Me.LayoutControlItem13.Name = "LayoutControlItem13" Me.LayoutControlItem13.Name = "LayoutControlItem13"
Me.LayoutControlItem13.Size = New System.Drawing.Size(541, 22) Me.LayoutControlItem13.Size = New System.Drawing.Size(541, 22)
Me.LayoutControlItem13.TextSize = New System.Drawing.Size(0, 0) Me.LayoutControlItem13.TextSize = New System.Drawing.Size(0, 0)
Me.LayoutControlItem13.TextVisible = False Me.LayoutControlItem13.TextVisible = False
' '
'LayoutControlItem16
'
Me.LayoutControlItem16.Control = Me.chked_2Faktor
Me.LayoutControlItem16.Location = New System.Drawing.Point(0, 48)
Me.LayoutControlItem16.Name = "LayoutControlItem16"
Me.LayoutControlItem16.Size = New System.Drawing.Size(541, 25)
Me.LayoutControlItem16.TextSize = New System.Drawing.Size(0, 0)
Me.LayoutControlItem16.TextVisible = False
'
'AdornerUIManager1 'AdornerUIManager1
' '
Me.AdornerUIManager1.Owner = Me Me.AdornerUIManager1.Owner = Me
@@ -461,6 +484,7 @@ Partial Class frmEnvelopeMainData
Me.ShowInTaskbar = False Me.ShowInTaskbar = False
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.LayoutControl1.ResumeLayout(False) Me.LayoutControl1.ResumeLayout(False)
CType(Me.chked_2Faktor.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.txtTitle.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.txtTitle.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbEnvelopeType.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.cmbEnvelopeType.Properties, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.cmbCertificationType.Properties, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.cmbCertificationType.Properties, System.ComponentModel.ISupportInitialize).EndInit()
@@ -496,6 +520,7 @@ Partial Class frmEnvelopeMainData
CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem8, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem12, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.LayoutControlItem13, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.LayoutControlItem16, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.AdornerUIManager1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.AdornerUIManager1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
@@ -540,4 +565,6 @@ Partial Class frmEnvelopeMainData
Friend WithEvents LayoutControlItem14 As DevExpress.XtraLayout.LayoutControlItem Friend WithEvents LayoutControlItem14 As DevExpress.XtraLayout.LayoutControlItem
Friend WithEvents EmptySpaceItem2 As DevExpress.XtraLayout.EmptySpaceItem Friend WithEvents EmptySpaceItem2 As DevExpress.XtraLayout.EmptySpaceItem
Friend WithEvents groupAllOptions As DevExpress.XtraLayout.LayoutControlGroup Friend WithEvents groupAllOptions As DevExpress.XtraLayout.LayoutControlGroup
Friend WithEvents chked_2Faktor As DevExpress.XtraEditors.CheckEdit
Friend WithEvents LayoutControlItem16 As DevExpress.XtraLayout.LayoutControlItem
End Class End Class

View File

@@ -118,13 +118,40 @@
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
</resheader> </resheader>
<assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" /> <assembly alias="System.Drawing" name="System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
<data name="chked_2Faktor.Location" type="System.Drawing.Point, System.Drawing">
<value>27, 210</value>
</data>
<data name="chked_2Faktor.Properties.Appearance.Font" type="System.Drawing.Font, System.Drawing">
<value>Segoe UI, 10pt, style=Bold</value>
</data>
<data name="chked_2Faktor.Properties.Caption" xml:space="preserve">
<value>2 Faktor -Authentifizierung aktivieren</value>
</data>
<data name="chked_2Faktor.Size" type="System.Drawing.Size, System.Drawing">
<value>537, 21</value>
</data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="chked_2Faktor.TabIndex" type="System.Int32, mscorlib">
<value>21</value>
</data>
<data name="&gt;&gt;chked_2Faktor.Name" xml:space="preserve">
<value>chked_2Faktor</value>
</data>
<data name="&gt;&gt;chked_2Faktor.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.CheckEdit, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;chked_2Faktor.Parent" xml:space="preserve">
<value>LayoutControl1</value>
</data>
<data name="&gt;&gt;chked_2Faktor.ZOrder" xml:space="preserve">
<value>4</value>
</data>
<data name="txtTitle.Location" type="System.Drawing.Point, System.Drawing"> <data name="txtTitle.Location" type="System.Drawing.Point, System.Drawing">
<value>204, 45</value> <value>204, 45</value>
</data> </data>
<data name="txtTitle.Size" type="System.Drawing.Size, System.Drawing"> <data name="txtTitle.Size" type="System.Drawing.Size, System.Drawing">
<value>363, 20</value> <value>363, 20</value>
</data> </data>
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
<data name="txtTitle.TabIndex" type="System.Int32, mscorlib"> <data name="txtTitle.TabIndex" type="System.Int32, mscorlib">
<value>4</value> <value>4</value>
</data> </data>
@@ -138,7 +165,7 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;txtTitle.ZOrder" xml:space="preserve"> <data name="&gt;&gt;txtTitle.ZOrder" xml:space="preserve">
<value>4</value> <value>5</value>
</data> </data>
<data name="cmbEnvelopeType.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbEnvelopeType.Location" type="System.Drawing.Point, System.Drawing">
<value>204, 69</value> <value>204, 69</value>
@@ -163,7 +190,7 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;cmbEnvelopeType.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cmbEnvelopeType.ZOrder" xml:space="preserve">
<value>5</value> <value>6</value>
</data> </data>
<data name="btOK.Location" type="System.Drawing.Point, System.Drawing"> <data name="btOK.Location" type="System.Drawing.Point, System.Drawing">
<value>22, 636</value> <value>22, 636</value>
@@ -191,7 +218,7 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;btOK.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btOK.ZOrder" xml:space="preserve">
<value>6</value> <value>7</value>
</data> </data>
<data name="btCancel.Location" type="System.Drawing.Point, System.Drawing"> <data name="btCancel.Location" type="System.Drawing.Point, System.Drawing">
<value>92, 636</value> <value>92, 636</value>
@@ -218,7 +245,7 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;btCancel.ZOrder" xml:space="preserve"> <data name="&gt;&gt;btCancel.ZOrder" xml:space="preserve">
<value>7</value> <value>8</value>
</data> </data>
<data name="cmbCertificationType.Enabled" type="System.Boolean, mscorlib"> <data name="cmbCertificationType.Enabled" type="System.Boolean, mscorlib">
<value>False</value> <value>False</value>
@@ -245,10 +272,10 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;cmbCertificationType.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cmbCertificationType.ZOrder" xml:space="preserve">
<value>8</value> <value>9</value>
</data> </data>
<data name="chkSendReminderEmails.Location" type="System.Drawing.Point, System.Drawing"> <data name="chkSendReminderEmails.Location" type="System.Drawing.Point, System.Drawing">
<value>27, 277</value> <value>27, 302</value>
</data> </data>
<data name="chkSendReminderEmails.Properties.Caption" xml:space="preserve"> <data name="chkSendReminderEmails.Properties.Caption" xml:space="preserve">
<value>Erinnerungen senden</value> <value>Erinnerungen senden</value>
@@ -269,13 +296,13 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;chkSendReminderEmails.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkSendReminderEmails.ZOrder" xml:space="preserve">
<value>9</value> <value>10</value>
</data> </data>
<data name="spnFirstReminderDays.EditValue" type="System.Decimal, mscorlib"> <data name="spnFirstReminderDays.EditValue" type="System.Decimal, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="spnFirstReminderDays.Location" type="System.Drawing.Point, System.Drawing"> <data name="spnFirstReminderDays.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 299</value> <value>207, 324</value>
</data> </data>
<data name="spnFirstReminderDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2"> <data name="spnFirstReminderDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value> <value>Combo</value>
@@ -296,13 +323,13 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;spnFirstReminderDays.ZOrder" xml:space="preserve"> <data name="&gt;&gt;spnFirstReminderDays.ZOrder" xml:space="preserve">
<value>10</value> <value>11</value>
</data> </data>
<data name="spnReminderIntervalDays.EditValue" type="System.Decimal, mscorlib"> <data name="spnReminderIntervalDays.EditValue" type="System.Decimal, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="spnReminderIntervalDays.Location" type="System.Drawing.Point, System.Drawing"> <data name="spnReminderIntervalDays.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 323</value> <value>207, 348</value>
</data> </data>
<data name="spnReminderIntervalDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2"> <data name="spnReminderIntervalDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value> <value>Combo</value>
@@ -323,13 +350,13 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;spnReminderIntervalDays.ZOrder" xml:space="preserve"> <data name="&gt;&gt;spnReminderIntervalDays.ZOrder" xml:space="preserve">
<value>11</value> <value>12</value>
</data> </data>
<data name="spnExpiresDays.EditValue" type="System.Decimal, mscorlib"> <data name="spnExpiresDays.EditValue" type="System.Decimal, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="spnExpiresDays.Location" type="System.Drawing.Point, System.Drawing"> <data name="spnExpiresDays.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 392</value> <value>207, 417</value>
</data> </data>
<data name="spnExpiresDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2"> <data name="spnExpiresDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value> <value>Combo</value>
@@ -350,13 +377,13 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;spnExpiresDays.ZOrder" xml:space="preserve"> <data name="&gt;&gt;spnExpiresDays.ZOrder" xml:space="preserve">
<value>12</value> <value>13</value>
</data> </data>
<data name="spnExpiresWarningDays.EditValue" type="System.Decimal, mscorlib"> <data name="spnExpiresWarningDays.EditValue" type="System.Decimal, mscorlib">
<value>0</value> <value>0</value>
</data> </data>
<data name="spnExpiresWarningDays.Location" type="System.Drawing.Point, System.Drawing"> <data name="spnExpiresWarningDays.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 416</value> <value>207, 441</value>
</data> </data>
<data name="spnExpiresWarningDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2"> <data name="spnExpiresWarningDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value> <value>Combo</value>
@@ -377,7 +404,7 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;spnExpiresWarningDays.ZOrder" xml:space="preserve"> <data name="&gt;&gt;spnExpiresWarningDays.ZOrder" xml:space="preserve">
<value>13</value> <value>14</value>
</data> </data>
<data name="cmbLanguage.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbLanguage.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 186</value> <value>207, 186</value>
@@ -401,10 +428,10 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;cmbLanguage.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cmbLanguage.ZOrder" xml:space="preserve">
<value>14</value> <value>15</value>
</data> </data>
<data name="chkUseAccessCode.Location" type="System.Drawing.Point, System.Drawing"> <data name="chkUseAccessCode.Location" type="System.Drawing.Point, System.Drawing">
<value>27, 210</value> <value>27, 235</value>
</data> </data>
<data name="chkUseAccessCode.Properties.Caption" xml:space="preserve"> <data name="chkUseAccessCode.Properties.Caption" xml:space="preserve">
<value>Verwende Zugriffscode</value> <value>Verwende Zugriffscode</value>
@@ -425,10 +452,10 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;chkUseAccessCode.ZOrder" xml:space="preserve"> <data name="&gt;&gt;chkUseAccessCode.ZOrder" xml:space="preserve">
<value>15</value> <value>16</value>
</data> </data>
<data name="cmbEmailToCreator.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbEmailToCreator.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 485</value> <value>207, 510</value>
</data> </data>
<data name="cmbEmailToCreator.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2"> <data name="cmbEmailToCreator.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value> <value>Combo</value>
@@ -449,10 +476,10 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;cmbEmailToCreator.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cmbEmailToCreator.ZOrder" xml:space="preserve">
<value>16</value> <value>17</value>
</data> </data>
<data name="cmbEmailToReceivers.Location" type="System.Drawing.Point, System.Drawing"> <data name="cmbEmailToReceivers.Location" type="System.Drawing.Point, System.Drawing">
<value>207, 509</value> <value>207, 534</value>
</data> </data>
<data name="cmbEmailToReceivers.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2"> <data name="cmbEmailToReceivers.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
<value>Combo</value> <value>Combo</value>
@@ -473,7 +500,7 @@
<value>LayoutControl1</value> <value>LayoutControl1</value>
</data> </data>
<data name="&gt;&gt;cmbEmailToReceivers.ZOrder" xml:space="preserve"> <data name="&gt;&gt;cmbEmailToReceivers.ZOrder" xml:space="preserve">
<value>17</value> <value>18</value>
</data> </data>
<data name="LayoutControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms"> <data name="LayoutControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value> <value>Fill</value>
@@ -727,6 +754,12 @@
<data name="&gt;&gt;LayoutControlItem13.Type" xml:space="preserve"> <data name="&gt;&gt;LayoutControlItem13.Type" xml:space="preserve">
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;LayoutControlItem16.Name" xml:space="preserve">
<value>LayoutControlItem16</value>
</data>
<data name="&gt;&gt;LayoutControlItem16.Type" xml:space="preserve">
<value>DevExpress.XtraLayout.LayoutControlItem, DevExpress.XtraLayout.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;AdornerUIManager1.Name" xml:space="preserve"> <data name="&gt;&gt;AdornerUIManager1.Name" xml:space="preserve">
<value>AdornerUIManager1</value> <value>AdornerUIManager1</value>
</data> </data>

View File

@@ -4,7 +4,7 @@ Imports EnvelopeGenerator.Common.Constants
Imports System.ComponentModel Imports System.ComponentModel
Public Class frmEnvelopeMainData Public Class frmEnvelopeMainData
Private FormLoaded As Boolean = False
Public Property Envelope As Envelope = New Envelope() Public Property Envelope As Envelope = New Envelope()
Public Property NewEnvelopeMode As Boolean = True Public Property NewEnvelopeMode As Boolean = True
@@ -20,70 +20,87 @@ Public Class frmEnvelopeMainData
End Sub End Sub
Private Sub frmEnvelopeMainData_Load(sender As Object, e As EventArgs) Handles MyBase.Load Private Sub frmEnvelopeMainData_Load(sender As Object, e As EventArgs) Handles MyBase.Load
If NewEnvelopeMode = True Then Try
Me.Text = Resources.Envelope.New_Envelope If NewEnvelopeMode = True Then
Else Me.Text = Resources.Envelope.New_Envelope
Me.Text = Resources.Envelope.Edit_Envelope Else
cmbEnvelopeType.ReadOnly = True Me.Text = Resources.Envelope.Edit_Envelope
End If cmbEnvelopeType.ReadOnly = True
End If
EnvelopeTypeModel = New EnvelopeTypeModel(State) EnvelopeTypeModel = New EnvelopeTypeModel(State)
Dim oTypes = EnvelopeTypeModel.List() Dim oTypes = EnvelopeTypeModel.List()
If oTypes.Count = 0 Then If oTypes.Count = 0 Then
MsgBox("No templates in Database!", MsgBoxStyle.Exclamation, Text) MsgBox("No templates in Database!", MsgBoxStyle.Exclamation, Text)
Close() Close()
Exit Sub Exit Sub
End If End If
Dim certificationTypeList = [Enum].GetValues(GetType(CertificationType)).Cast(Of CertificationType)()
Dim oTranslatedCertificationTypeList = certificationTypeList.Select(AddressOf TranslateCertificationType).ToList()
cmbCertificationType.Properties.Items.AddRange(oTranslatedCertificationTypeList) ' Dim oTranslatedVerificationTypeList = VerificationTypeList.Select(AddressOf TranslateVerificationTypeType).ToList()
Dim finalEmailTypeList = [Enum].GetValues(GetType(FinalEmailType)).Cast(Of FinalEmailType)() Dim certificationTypeList = [Enum].GetValues(GetType(CertificationType)).Cast(Of CertificationType)()
Dim oTranslatedFinalEmailTypeList = FinalEmailTypeList.Select(AddressOf TranslateFinalEmailType).ToList() Dim oTranslatedCertificationTypeList = certificationTypeList.Select(AddressOf TranslateCertificationType).ToList()
cmbEmailToCreator.Properties.Items.AddRange(oTranslatedFinalEmailTypeList) cmbCertificationType.Properties.Items.AddRange(oTranslatedCertificationTypeList)
cmbEmailToReceivers.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
cmbEnvelopeType.Properties.Items.AddRange(oTypes.ToList)
cmbLanguage.Properties.Items.AddRange(New List(Of String) From {"de", "en"})
groupAllOptions.Expanded = False Dim finalEmailTypeList = [Enum].GetValues(GetType(FinalEmailType)).Cast(Of FinalEmailType)()
Dim oTranslatedFinalEmailTypeList = finalEmailTypeList.Select(AddressOf TranslateFinalEmailType).ToList()
If NewEnvelopeMode = True Then cmbEmailToCreator.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
Dim oType = oTypes.FirstOrDefault() cmbEmailToReceivers.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
' This will trigger loading values from the type cmbEnvelopeType.Properties.Items.AddRange(oTypes.ToList)
cmbEnvelopeType.EditValue = oType cmbLanguage.Properties.Items.AddRange(New List(Of String) From {"de", "en"})
Else
' This will trigger loading values from the type groupAllOptions.Expanded = False
cmbEnvelopeType.EditValue = Envelope.EnvelopeType
' cmbEnvelopeType.SelectedIndex = Convert.ToInt32(Envelope.EnvelopeType) - 1 If NewEnvelopeMode = True Then
' cmbEnvelopeType.SelectedIndex = Envelope.Type.Id - 1 Dim oType = oTypes.FirstOrDefault()
' cmbEnvelopeType.SelectedItem = cmbEnvelopeType.Properties.Items.Cast(Of EnvelopeType).Where(Function(i) i.Id = Envelope.EnvelopeType.Id).SingleOrDefault()
' This will trigger loading values from the type
cmbEnvelopeType.EditValue = oType
chked_2Faktor.EditValue = DEF_TF_ENABLED
Else
' This will trigger loading values from the type
cmbEnvelopeType.EditValue = Envelope.EnvelopeType
' cmbEnvelopeType.SelectedIndex = Convert.ToInt32(Envelope.EnvelopeType) - 1
' cmbEnvelopeType.SelectedIndex = Envelope.Type.Id - 1
' cmbEnvelopeType.SelectedItem = cmbEnvelopeType.Properties.Items.Cast(Of EnvelopeType).Where(Function(i) i.Id = Envelope.EnvelopeType.Id).SingleOrDefault()
' Now we can override these values with the values from envelope
txtTitle.EditValue = Envelope.Title
chkUseAccessCode.EditValue = Envelope.UseAccessCode
chked_2Faktor.EditValue = Envelope.TFA_Enabled
cmbCertificationType.SelectedIndex = Convert.ToInt32(Envelope.CertificationType) - 1
cmbEmailToCreator.SelectedIndex = Convert.ToInt32(Envelope.FinalEmailToCreator)
cmbEmailToReceivers.SelectedIndex = Convert.ToInt32(Envelope.FinalEmailToReceivers)
End If
Catch ex As Exception
MsgBox(ex.Message, MsgBoxStyle.Critical, "Unexpected Error loading form:")
End Try
' Now we can override these values with the values from envelope
txtTitle.EditValue = Envelope.Title
chkUseAccessCode.EditValue = Envelope.UseAccessCode
cmbCertificationType.SelectedIndex = Convert.ToInt32(Envelope.CertificationType) - 1
cmbEmailToCreator.SelectedIndex = Convert.ToInt32(Envelope.FinalEmailToCreator)
cmbEmailToReceivers.SelectedIndex = Convert.ToInt32(Envelope.FinalEmailToReceivers)
End If
End Sub End Sub
Private Sub CheckAccessCode()
If Envelope.TFA_Enabled = True Then
chkUseAccessCode.Checked = True
chkUseAccessCode.Enabled = False
Else
chkUseAccessCode.Enabled = True
End If
End Sub
Private Function TranslateCertificationType(pType As CertificationType) As String Private Function TranslateCertificationType(pType As CertificationType) As String
Return Resources.Model.ResourceManager.GetString(pType.ToString()) Return Resources.Model.ResourceManager.GetString(pType.ToString())
End Function End Function
Private Function TranslateFinalEmailType(pType As FinalEmailType) As String Private Function TranslateFinalEmailType(pType As FinalEmailType) As String
Return Resources.Model.ResourceManager.GetString(pType.ToString()) Return Resources.Model.ResourceManager.GetString(pType.ToString())
End Function End Function
Private Sub btOK_Click(sender As Object, e As EventArgs) Handles btOK.Click Private Sub btOK_Click(sender As Object, e As EventArgs) Handles btOK.Click
Dim Validator As Validator = New Validator(State.LogConfig, AdornerUIManager1) Dim Validator As Validator = New Validator(State.LogConfig, AdornerUIManager1)
Dim oMissingParams = Validator.Validate(txtTitle) Dim oMissingParams = Validator.Validate(txtTitle)
@@ -110,13 +127,16 @@ Public Class frmEnvelopeMainData
Envelope.ExpiresWarningWhenDays = spnExpiresWarningDays.EditValue Envelope.ExpiresWarningWhenDays = spnExpiresWarningDays.EditValue
Envelope.FinalEmailToCreator = cmbEmailToCreator.SelectedIndex Envelope.FinalEmailToCreator = cmbEmailToCreator.SelectedIndex
Envelope.FinalEmailToReceivers = cmbEmailToReceivers.SelectedIndex Envelope.FinalEmailToReceivers = cmbEmailToReceivers.SelectedIndex
Envelope.TFA_Enabled = chked_2Faktor.EditValue
' ContractType kann zzt nicht über die Oberfläche gesetzt werden ' ContractType kann zzt nicht über die Oberfläche gesetzt werden
Envelope.ContractType = ContractType.Contract Envelope.ContractType = ContractType.Contract
End Sub End Sub
Private Sub frmEnvelopeMainData_Shown(sender As Object, e As EventArgs) Handles Me.Shown Private Sub frmEnvelopeMainData_Shown(sender As Object, e As EventArgs) Handles Me.Shown
SetFormHeight() SetFormHeight()
CheckAccessCode()
FormLoaded = True
End Sub End Sub
Private Sub SetFormHeight() Private Sub SetFormHeight()
@@ -152,4 +172,15 @@ Public Class frmEnvelopeMainData
cmbEmailToReceivers.SelectedIndex = oSelectedType.FinalEmailToReceivers cmbEmailToReceivers.SelectedIndex = oSelectedType.FinalEmailToReceivers
End Sub End Sub
Private Sub chked_2Faktor_CheckedChanged(sender As Object, e As EventArgs) Handles chked_2Faktor.CheckedChanged
If FormLoaded = True Then
If chked_2Faktor.Checked = True Then
chkUseAccessCode.Checked = True
chkUseAccessCode.Enabled = False
Else
chkUseAccessCode.Enabled = True
End If
End If
End Sub
End Class End Class

View File

@@ -65,7 +65,7 @@ Partial Class frmMain
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPageGroup2 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageFunctions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage() Me.RibbonPage2 = New DevExpress.XtraBars.Ribbon.RibbonPage()
Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup() Me.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar() Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
@@ -85,8 +85,20 @@ Partial Class frmMain
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn() Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn() Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn7 = New DevExpress.XtraGrid.Columns.GridColumn() Me.GridColumn7 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.XtraTabPageAdmin = New DevExpress.XtraTab.XtraTabPage()
Me.GridControlData = New DevExpress.XtraGrid.GridControl()
Me.GridViewData = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
Me.GroupControl1 = New DevExpress.XtraEditors.GroupControl()
Me.btnEnvelopes_All = New DevExpress.XtraEditors.SimpleButton()
Me.btnEnvelopes_thisYear = New DevExpress.XtraEditors.SimpleButton()
Me.btnEnvelopes_lastmonth = New DevExpress.XtraEditors.SimpleButton()
Me.btnEnvelopes_thismonth = New DevExpress.XtraEditors.SimpleButton()
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components) Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog() Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
Me.GroupControl2 = New DevExpress.XtraEditors.GroupControl()
Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl()
Me.ChartControl1 = New DevExpress.XtraCharts.ChartControl()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.Panel1.SuspendLayout() Me.SplitContainerControl1.Panel1.SuspendLayout()
@@ -105,6 +117,21 @@ Partial Class frmMain
CType(Me.ViewReceiversCompleted, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ViewReceiversCompleted, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ViewHistoryCompleted, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ViewHistoryCompleted, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.ViewCompleted, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.ViewCompleted, System.ComponentModel.ISupportInitialize).BeginInit()
Me.XtraTabPageAdmin.SuspendLayout()
CType(Me.GridControlData, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.GridViewData, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.PanelControl1.SuspendLayout()
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.GroupControl1.SuspendLayout()
CType(Me.GroupControl2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl2.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl2.Panel1.SuspendLayout()
CType(Me.SplitContainerControl2.Panel2, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl2.Panel2.SuspendLayout()
Me.SplitContainerControl2.SuspendLayout()
CType(Me.ChartControl1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'SplashScreenManager1 'SplashScreenManager1
@@ -134,7 +161,7 @@ Partial Class frmMain
resources.ApplyResources(Me.XtraTabControlMain, "XtraTabControlMain") resources.ApplyResources(Me.XtraTabControlMain, "XtraTabControlMain")
Me.XtraTabControlMain.Name = "XtraTabControlMain" Me.XtraTabControlMain.Name = "XtraTabControlMain"
Me.XtraTabControlMain.SelectedTabPage = Me.XtraTabPage1 Me.XtraTabControlMain.SelectedTabPage = Me.XtraTabPage1
Me.XtraTabControlMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2}) Me.XtraTabControlMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPageAdmin})
' '
'XtraTabPage1 'XtraTabPage1
' '
@@ -426,7 +453,7 @@ Partial Class frmMain
' '
'RibbonPage1 'RibbonPage1
' '
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroup2}) Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageFunctions})
Me.RibbonPage1.Name = "RibbonPage1" Me.RibbonPage1.Name = "RibbonPage1"
resources.ApplyResources(Me.RibbonPage1, "RibbonPage1") resources.ApplyResources(Me.RibbonPage1, "RibbonPage1")
' '
@@ -445,15 +472,15 @@ Partial Class frmMain
Me.RibbonPageGroup1.Name = "RibbonPageGroup1" Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
resources.ApplyResources(Me.RibbonPageGroup1, "RibbonPageGroup1") resources.ApplyResources(Me.RibbonPageGroup1, "RibbonPageGroup1")
' '
'RibbonPageGroup2 'RibbonPageFunctions
' '
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnShowDocument) Me.RibbonPageFunctions.ItemLinks.Add(Me.btnShowDocument)
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnContactReceiver) Me.RibbonPageFunctions.ItemLinks.Add(Me.btnContactReceiver)
Me.RibbonPageGroup2.ItemLinks.Add(Me.bbtnitmInfoMail) Me.RibbonPageFunctions.ItemLinks.Add(Me.bbtnitmInfoMail)
Me.RibbonPageGroup2.ItemLinks.Add(Me.bbtnitmEB) Me.RibbonPageFunctions.ItemLinks.Add(Me.bbtnitmEB)
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem2) Me.RibbonPageFunctions.ItemLinks.Add(Me.BarButtonItem2)
Me.RibbonPageGroup2.Name = "RibbonPageGroup2" Me.RibbonPageFunctions.Name = "RibbonPageFunctions"
resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2") resources.ApplyResources(Me.RibbonPageFunctions, "RibbonPageFunctions")
' '
'RibbonPage2 'RibbonPage2
' '
@@ -606,6 +633,70 @@ Partial Class frmMain
Me.GridColumn7.FieldName = "AddedWhen" Me.GridColumn7.FieldName = "AddedWhen"
Me.GridColumn7.Name = "GridColumn7" Me.GridColumn7.Name = "GridColumn7"
' '
'XtraTabPageAdmin
'
Me.XtraTabPageAdmin.Controls.Add(Me.SplitContainerControl2)
Me.XtraTabPageAdmin.Controls.Add(Me.PanelControl1)
Me.XtraTabPageAdmin.Name = "XtraTabPageAdmin"
resources.ApplyResources(Me.XtraTabPageAdmin, "XtraTabPageAdmin")
'
'GridControlData
'
resources.ApplyResources(Me.GridControlData, "GridControlData")
Me.GridControlData.MainView = Me.GridViewData
Me.GridControlData.MenuManager = Me.RibbonControl
Me.GridControlData.Name = "GridControlData"
Me.GridControlData.ViewCollection.AddRange(New DevExpress.XtraGrid.Views.Base.BaseView() {Me.GridViewData})
'
'GridViewData
'
Me.GridViewData.GridControl = Me.GridControlData
Me.GridViewData.Name = "GridViewData"
'
'PanelControl1
'
Me.PanelControl1.Controls.Add(Me.GroupControl2)
Me.PanelControl1.Controls.Add(Me.GroupControl1)
resources.ApplyResources(Me.PanelControl1, "PanelControl1")
Me.PanelControl1.Name = "PanelControl1"
'
'GroupControl1
'
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_All)
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_thisYear)
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_lastmonth)
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_thismonth)
resources.ApplyResources(Me.GroupControl1, "GroupControl1")
Me.GroupControl1.Name = "GroupControl1"
'
'btnEnvelopes_All
'
Me.btnEnvelopes_All.Appearance.BackColor = System.Drawing.Color.MediumTurquoise
Me.btnEnvelopes_All.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEnvelopes_All, "btnEnvelopes_All")
Me.btnEnvelopes_All.Name = "btnEnvelopes_All"
'
'btnEnvelopes_thisYear
'
Me.btnEnvelopes_thisYear.Appearance.BackColor = System.Drawing.Color.LightSeaGreen
Me.btnEnvelopes_thisYear.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEnvelopes_thisYear, "btnEnvelopes_thisYear")
Me.btnEnvelopes_thisYear.Name = "btnEnvelopes_thisYear"
'
'btnEnvelopes_lastmonth
'
Me.btnEnvelopes_lastmonth.Appearance.BackColor = System.Drawing.Color.Turquoise
Me.btnEnvelopes_lastmonth.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEnvelopes_lastmonth, "btnEnvelopes_lastmonth")
Me.btnEnvelopes_lastmonth.Name = "btnEnvelopes_lastmonth"
'
'btnEnvelopes_thismonth
'
Me.btnEnvelopes_thismonth.Appearance.BackColor = System.Drawing.Color.Aquamarine
Me.btnEnvelopes_thismonth.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEnvelopes_thismonth, "btnEnvelopes_thismonth")
Me.btnEnvelopes_thismonth.Name = "btnEnvelopes_thismonth"
'
'RefreshTimer 'RefreshTimer
' '
Me.RefreshTimer.Interval = 120000 Me.RefreshTimer.Interval = 120000
@@ -614,6 +705,33 @@ Partial Class frmMain
' '
resources.ApplyResources(Me.SaveFileDialog1, "SaveFileDialog1") resources.ApplyResources(Me.SaveFileDialog1, "SaveFileDialog1")
' '
'GroupControl2
'
resources.ApplyResources(Me.GroupControl2, "GroupControl2")
Me.GroupControl2.Name = "GroupControl2"
'
'SplitContainerControl2
'
resources.ApplyResources(Me.SplitContainerControl2, "SplitContainerControl2")
Me.SplitContainerControl2.Name = "SplitContainerControl2"
'
'SplitContainerControl2.Panel1
'
Me.SplitContainerControl2.Panel1.Controls.Add(Me.GridControlData)
resources.ApplyResources(Me.SplitContainerControl2.Panel1, "SplitContainerControl2.Panel1")
'
'SplitContainerControl2.Panel2
'
Me.SplitContainerControl2.Panel2.Controls.Add(Me.ChartControl1)
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
Me.SplitContainerControl2.SplitterPosition = 501
'
'ChartControl1
'
resources.ApplyResources(Me.ChartControl1, "ChartControl1")
Me.ChartControl1.Name = "ChartControl1"
Me.ChartControl1.SeriesSerializable = New DevExpress.XtraCharts.Series(-1) {}
'
'frmMain 'frmMain
' '
resources.ApplyResources(Me, "$this") resources.ApplyResources(Me, "$this")
@@ -643,6 +761,21 @@ Partial Class frmMain
CType(Me.ViewReceiversCompleted, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.ViewReceiversCompleted, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.ViewHistoryCompleted, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.ViewHistoryCompleted, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.ViewCompleted, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.ViewCompleted, System.ComponentModel.ISupportInitialize).EndInit()
Me.XtraTabPageAdmin.ResumeLayout(False)
CType(Me.GridControlData, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.GridViewData, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.PanelControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.PanelControl1.ResumeLayout(False)
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.GroupControl1.ResumeLayout(False)
CType(Me.GroupControl2, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.SplitContainerControl2.Panel1, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl2.Panel1.ResumeLayout(False)
CType(Me.SplitContainerControl2.Panel2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl2.Panel2.ResumeLayout(False)
CType(Me.SplitContainerControl2, System.ComponentModel.ISupportInitialize).EndInit()
Me.SplitContainerControl2.ResumeLayout(False)
CType(Me.ChartControl1, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
Me.PerformLayout() Me.PerformLayout()
@@ -692,7 +825,7 @@ Partial Class frmMain
Friend WithEvents txtRefreshLabel As DevExpress.XtraBars.BarStaticItem Friend WithEvents txtRefreshLabel As DevExpress.XtraBars.BarStaticItem
Friend WithEvents btnShowDocument As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnShowDocument As DevExpress.XtraBars.BarButtonItem
Friend WithEvents btnContactReceiver As DevExpress.XtraBars.BarButtonItem Friend WithEvents btnContactReceiver As DevExpress.XtraBars.BarButtonItem
Friend WithEvents RibbonPageGroup2 As DevExpress.XtraBars.Ribbon.RibbonPageGroup Friend WithEvents RibbonPageFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
Friend WithEvents colEnvelopeId As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents colEnvelopeId As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents ViewHistoryCompleted As DevExpress.XtraGrid.Views.Grid.GridView Friend WithEvents ViewHistoryCompleted As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents ColHistoryStatusCompleted As DevExpress.XtraGrid.Columns.GridColumn Friend WithEvents ColHistoryStatusCompleted As DevExpress.XtraGrid.Columns.GridColumn
@@ -709,4 +842,16 @@ Partial Class frmMain
Friend WithEvents bbtnitmEB As DevExpress.XtraBars.BarButtonItem Friend WithEvents bbtnitmEB As DevExpress.XtraBars.BarButtonItem
Friend WithEvents bbtnitmInfoMail As DevExpress.XtraBars.BarButtonItem Friend WithEvents bbtnitmInfoMail As DevExpress.XtraBars.BarButtonItem
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
Friend WithEvents XtraTabPageAdmin As DevExpress.XtraTab.XtraTabPage
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
Friend WithEvents GroupControl1 As DevExpress.XtraEditors.GroupControl
Friend WithEvents btnEnvelopes_thisYear As DevExpress.XtraEditors.SimpleButton
Friend WithEvents btnEnvelopes_lastmonth As DevExpress.XtraEditors.SimpleButton
Friend WithEvents btnEnvelopes_thismonth As DevExpress.XtraEditors.SimpleButton
Friend WithEvents btnEnvelopes_All As DevExpress.XtraEditors.SimpleButton
Friend WithEvents GridControlData As DevExpress.XtraGrid.GridControl
Friend WithEvents GridViewData As DevExpress.XtraGrid.Views.Grid.GridView
Friend WithEvents GroupControl2 As DevExpress.XtraEditors.GroupControl
Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl
Friend WithEvents ChartControl1 As DevExpress.XtraCharts.ChartControl
End Class End Class

View File

@@ -764,7 +764,7 @@
<data name="RibbonPageGroup1.Text" xml:space="preserve"> <data name="RibbonPageGroup1.Text" xml:space="preserve">
<value>Daten</value> <value>Daten</value>
</data> </data>
<data name="RibbonPageGroup2.Text" xml:space="preserve"> <data name="RibbonPageFunctions.Text" xml:space="preserve">
<value>Funktionen</value> <value>Funktionen</value>
</data> </data>
<data name="RibbonPage1.Text" xml:space="preserve"> <data name="RibbonPage1.Text" xml:space="preserve">
@@ -1025,6 +1025,291 @@
<data name="&gt;&gt;XtraTabPage2.ZOrder" xml:space="preserve"> <data name="&gt;&gt;XtraTabPage2.ZOrder" xml:space="preserve">
<value>1</value> <value>1</value>
</data> </data>
<data name="SplitContainerControl2.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="SplitContainerControl2.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 79</value>
</data>
<data name="GridControlData.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Fill</value>
</data>
<data name="GridControlData.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
<value>501, 388</value>
</data>
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="&gt;&gt;GridControlData.Name" xml:space="preserve">
<value>GridControlData</value>
</data>
<data name="&gt;&gt;GridControlData.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.GridControl, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;GridControlData.Parent" xml:space="preserve">
<value>SplitContainerControl2.Panel1</value>
</data>
<data name="&gt;&gt;GridControlData.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="SplitContainerControl2.Panel1.Text" xml:space="preserve">
<value>Panel1</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel1.Name" xml:space="preserve">
<value>SplitContainerControl2.Panel1</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel1.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SplitGroupPanel, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel1.Parent" xml:space="preserve">
<value>SplitContainerControl2</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="ChartControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>17, 6</value>
</data>
<data name="ChartControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>300, 200</value>
</data>
<data name="ChartControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;ChartControl1.Name" xml:space="preserve">
<value>ChartControl1</value>
</data>
<data name="&gt;&gt;ChartControl1.Type" xml:space="preserve">
<value>DevExpress.XtraCharts.ChartControl, DevExpress.XtraCharts.v21.2.UI, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;ChartControl1.Parent" xml:space="preserve">
<value>SplitContainerControl2.Panel2</value>
</data>
<data name="&gt;&gt;ChartControl1.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="SplitContainerControl2.Panel2.Text" xml:space="preserve">
<value>Panel2</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel2.Name" xml:space="preserve">
<value>SplitContainerControl2.Panel2</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel2.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SplitGroupPanel, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel2.Parent" xml:space="preserve">
<value>SplitContainerControl2</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Panel2.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>1088, 388</value>
</data>
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Name" xml:space="preserve">
<value>SplitContainerControl2</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SplitContainerControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.Parent" xml:space="preserve">
<value>XtraTabPageAdmin</value>
</data>
<data name="&gt;&gt;SplitContainerControl2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="GroupControl2.Location" type="System.Drawing.Point, System.Drawing">
<value>496, 5</value>
</data>
<data name="GroupControl2.Size" type="System.Drawing.Size, System.Drawing">
<value>427, 68</value>
</data>
<data name="GroupControl2.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="GroupControl2.Text" xml:space="preserve">
<value>Diagramme</value>
</data>
<data name="&gt;&gt;GroupControl2.Name" xml:space="preserve">
<value>GroupControl2</value>
</data>
<data name="&gt;&gt;GroupControl2.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.GroupControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;GroupControl2.Parent" xml:space="preserve">
<value>PanelControl1</value>
</data>
<data name="&gt;&gt;GroupControl2.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnEnvelopes_All.Location" type="System.Drawing.Point, System.Drawing">
<value>339, 26</value>
</data>
<data name="btnEnvelopes_All.Size" type="System.Drawing.Size, System.Drawing">
<value>104, 35</value>
</data>
<data name="btnEnvelopes_All.TabIndex" type="System.Int32, mscorlib">
<value>3</value>
</data>
<data name="btnEnvelopes_All.Text" xml:space="preserve">
<value>Insgesamt</value>
</data>
<data name="&gt;&gt;btnEnvelopes_All.Name" xml:space="preserve">
<value>btnEnvelopes_All</value>
</data>
<data name="&gt;&gt;btnEnvelopes_All.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;btnEnvelopes_All.Parent" xml:space="preserve">
<value>GroupControl1</value>
</data>
<data name="&gt;&gt;btnEnvelopes_All.ZOrder" xml:space="preserve">
<value>0</value>
</data>
<data name="btnEnvelopes_thisYear.Location" type="System.Drawing.Point, System.Drawing">
<value>229, 26</value>
</data>
<data name="btnEnvelopes_thisYear.Size" type="System.Drawing.Size, System.Drawing">
<value>104, 35</value>
</data>
<data name="btnEnvelopes_thisYear.TabIndex" type="System.Int32, mscorlib">
<value>2</value>
</data>
<data name="btnEnvelopes_thisYear.Text" xml:space="preserve">
<value>Dieses Jahr</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thisYear.Name" xml:space="preserve">
<value>btnEnvelopes_thisYear</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thisYear.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thisYear.Parent" xml:space="preserve">
<value>GroupControl1</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thisYear.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="btnEnvelopes_lastmonth.Location" type="System.Drawing.Point, System.Drawing">
<value>119, 26</value>
</data>
<data name="btnEnvelopes_lastmonth.Size" type="System.Drawing.Size, System.Drawing">
<value>104, 35</value>
</data>
<data name="btnEnvelopes_lastmonth.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="btnEnvelopes_lastmonth.Text" xml:space="preserve">
<value>Letzten Monat</value>
</data>
<data name="&gt;&gt;btnEnvelopes_lastmonth.Name" xml:space="preserve">
<value>btnEnvelopes_lastmonth</value>
</data>
<data name="&gt;&gt;btnEnvelopes_lastmonth.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;btnEnvelopes_lastmonth.Parent" xml:space="preserve">
<value>GroupControl1</value>
</data>
<data name="&gt;&gt;btnEnvelopes_lastmonth.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="btnEnvelopes_thismonth.Location" type="System.Drawing.Point, System.Drawing">
<value>9, 26</value>
</data>
<data name="btnEnvelopes_thismonth.Size" type="System.Drawing.Size, System.Drawing">
<value>104, 35</value>
</data>
<data name="btnEnvelopes_thismonth.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="btnEnvelopes_thismonth.Text" xml:space="preserve">
<value>Diesen Monat</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thismonth.Name" xml:space="preserve">
<value>btnEnvelopes_thismonth</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thismonth.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thismonth.Parent" xml:space="preserve">
<value>GroupControl1</value>
</data>
<data name="&gt;&gt;btnEnvelopes_thismonth.ZOrder" xml:space="preserve">
<value>3</value>
</data>
<data name="GroupControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>11, 5</value>
</data>
<data name="GroupControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>453, 68</value>
</data>
<data name="GroupControl1.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
</data>
<data name="GroupControl1.Text" xml:space="preserve">
<value>Umschläge pro User</value>
</data>
<data name="&gt;&gt;GroupControl1.Name" xml:space="preserve">
<value>GroupControl1</value>
</data>
<data name="&gt;&gt;GroupControl1.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.GroupControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;GroupControl1.Parent" xml:space="preserve">
<value>PanelControl1</value>
</data>
<data name="&gt;&gt;GroupControl1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="PanelControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
<value>Top</value>
</data>
<data name="PanelControl1.Location" type="System.Drawing.Point, System.Drawing">
<value>0, 0</value>
</data>
<data name="PanelControl1.Size" type="System.Drawing.Size, System.Drawing">
<value>1088, 79</value>
</data>
<data name="PanelControl1.TabIndex" type="System.Int32, mscorlib">
<value>0</value>
</data>
<data name="&gt;&gt;PanelControl1.Name" xml:space="preserve">
<value>PanelControl1</value>
</data>
<data name="&gt;&gt;PanelControl1.Type" xml:space="preserve">
<value>DevExpress.XtraEditors.PanelControl, DevExpress.Utils.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;PanelControl1.Parent" xml:space="preserve">
<value>XtraTabPageAdmin</value>
</data>
<data name="&gt;&gt;PanelControl1.ZOrder" xml:space="preserve">
<value>1</value>
</data>
<data name="XtraTabPageAdmin.Size" type="System.Drawing.Size, System.Drawing">
<value>1088, 467</value>
</data>
<data name="XtraTabPageAdmin.Text" xml:space="preserve">
<value>Auswertungen (Admin)</value>
</data>
<data name="&gt;&gt;XtraTabPageAdmin.Name" xml:space="preserve">
<value>XtraTabPageAdmin</value>
</data>
<data name="&gt;&gt;XtraTabPageAdmin.Type" xml:space="preserve">
<value>DevExpress.XtraTab.XtraTabPage, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;XtraTabPageAdmin.Parent" xml:space="preserve">
<value>XtraTabControlMain</value>
</data>
<data name="&gt;&gt;XtraTabPageAdmin.ZOrder" xml:space="preserve">
<value>2</value>
</data>
<data name="&gt;&gt;XtraTabControlMain.Name" xml:space="preserve"> <data name="&gt;&gt;XtraTabControlMain.Name" xml:space="preserve">
<value>XtraTabControlMain</value> <value>XtraTabControlMain</value>
</data> </data>
@@ -1098,7 +1383,7 @@
<value>True</value> <value>True</value>
</metadata> </metadata>
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089"> <metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<value>263</value> <value>108</value>
</metadata> </metadata>
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing"> <data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
<value>6, 13</value> <value>6, 13</value>
@@ -1108,83 +1393,83 @@
</data> </data>
<data name="frmMain.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> <data name="frmMain.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
<value> <value>
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8 iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
YQUAAAAJcEhZcwAACxEAAAsRAX9kX5EAABGASURBVHhe7d2/rhxJFcfxfQQ/BA+w5gXwA/AAhA7I2ZzE DQAACw0B7QfALAAAEYBJREFUeF7t3b+uHEkVx/F9BD8ED7DmBfAD8ACEDsjZnMQJuXMSJxsRICJEgGRB
CblzEicbESAiRIBkQUICWgkJiQgHRCRsQkJyqZ89bfq2z8z0dNepOqfqG3ykde+903+m63TVOVV9v3p6 QgJaCQmJCAdEJGxCQnKpnz1t+rbPzPR016k6p+obfKR1773Tf6brdNU5VX2/enp6CunbH7x8Ubwq3hTv
egrp2x+8fFG8Kt4U74r3xYfiCQhM96juVd2zund1D7+w7vEIzI096CIVrwtdOBo6RqN7Wve27vEwAcHc ivfFh+IJCEz3qO5V3bO6d3UPv7Du8QjMjT3oIhWvC104GjpGo3ta97bu8TABwdzYii5E8U3xXWFdNGBU
2IouRPFN8V1hXTRgVLrnuwcDc6O3ctLqFikaWhcGmI3awiurrXgzN3opJ6mIR/cesKltvLbajhdzY206 uue7BwNzo7dy0uoWKRpaFwaYjdrCK6uteDM3eiknqYhH9x6wqW28ttqOF3NjbTqpy8lZJw3guWaBwNxY
qcvJWScN4LlmgcDcWEs5ia8LZUStkwRwm9rO11bbqsXceFY5aCX33l5OAsA5aksuyUJz4xnlQJXgo7sP SzmJrwtlRK2TBHCb2s7XVtuqxdx4VjloJffeXk4C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Wp
xjPKAWrtAEMCoC61qbtz+x9lbjyrHKiGBCwlBupQW6rS5d8yN9ZSDloJQnIDwDFqO6cTfbeYG2srJ6F3 u3P7H2VuPKscqIYELCUG6lBbqtLl3zI31lIOWglCcgPAMWo7pxN9t5gbaysnoXcMMiwA9lFbMd/hV5u5
DDIsAPZRWzHf4VebudGLTupyctZJA7Nr1vAX5kZv5SSVKOTPkAGfqC1UT/DtYW5spZy0koXqFfCnyTEb 0YtO6nJy1kkDs2vW8BfmRm/lJJUo5M+QAZ+oLVRP8O1hbmylnLSSheoV8KfJMRvd87r3XZJ7e5kbe9CF
3fO6912Se3uZG3vQhbhcEEVDhgkYje5p3dvdG/2auTECXaRCQwVNLtKFU0aUwIDodI/qXtU9q3tX93CY uFwQRUOGCRiN7mnd290b/Zq5MQJdpEJDBU0u0oVTRpTAgOh0j+pe1T2re1f3cJgG/9zTV/8DjLb7xxzb
Bv/c01f/A4y2+8cc2/IPAAAAAElFTkSuQmCC 8g8AAAAASUVORK5CYII=
</value> </value>
</data> </data>
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms"> <data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
@@ -1403,10 +1688,10 @@
<data name="&gt;&gt;RibbonPageGroup1.Type" xml:space="preserve"> <data name="&gt;&gt;RibbonPageGroup1.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;RibbonPageGroup2.Name" xml:space="preserve"> <data name="&gt;&gt;RibbonPageFunctions.Name" xml:space="preserve">
<value>RibbonPageGroup2</value> <value>RibbonPageFunctions</value>
</data> </data>
<data name="&gt;&gt;RibbonPageGroup2.Type" xml:space="preserve"> <data name="&gt;&gt;RibbonPageFunctions.Type" xml:space="preserve">
<value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraBars.Ribbon.RibbonPageGroup, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;RibbonPage2.Name" xml:space="preserve"> <data name="&gt;&gt;RibbonPage2.Name" xml:space="preserve">
@@ -1505,6 +1790,12 @@
<data name="&gt;&gt;GridColumn7.Type" xml:space="preserve"> <data name="&gt;&gt;GridColumn7.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value> <value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data> </data>
<data name="&gt;&gt;GridViewData.Name" xml:space="preserve">
<value>GridViewData</value>
</data>
<data name="&gt;&gt;GridViewData.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Views.Grid.GridView, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;RefreshTimer.Name" xml:space="preserve"> <data name="&gt;&gt;RefreshTimer.Name" xml:space="preserve">
<value>RefreshTimer</value> <value>RefreshTimer</value>
</data> </data>

View File

@@ -40,17 +40,22 @@ Public Class frmMain
TempFiles = New TempFiles(LogConfig) TempFiles = New TempFiles(LogConfig)
TempFiles.Create() TempFiles.Create()
MyTempFiles = TempFiles
RefreshHelper = New RefreshHelper(ViewEnvelopes, "Id") RefreshHelper = New RefreshHelper(ViewEnvelopes, "Id")
Controller = New EnvelopeListController(State) Controller = New EnvelopeListController(State)
Try Try
Me.LookAndFeel.UseDefaultLookAndFeel = False Me.LookAndFeel.UseDefaultLookAndFeel = False
LookAndFeel.SetSkinStyle(SkinStyle.Office2019White, SkinSvgPalette.DefaultSkin) LookAndFeel.SetSkinStyle(SkinStyle.Office2019White, SkinSvgPalette.DefaultSkin)
Catch ex As Exception Catch ex As Exception
End Try End Try
If MYUSER.IsAdmin Then
XtraTabControlMain.TabPages(2).PageVisible = True
Else
XtraTabControlMain.TabPages(2).PageVisible = False
End If
LoadEnvelopeData() LoadEnvelopeData()
End Sub End Sub
@@ -190,6 +195,8 @@ Public Class frmMain
End Sub End Sub
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged
RibbonPageFunctions.Enabled = True
RibbonPageEnvelopeActions.Enabled = True
Select Case XtraTabControlMain.SelectedTabPageIndex Select Case XtraTabControlMain.SelectedTabPageIndex
Case 1 Case 1
btnEditEnvelope.Enabled = False btnEditEnvelope.Enabled = False
@@ -206,6 +213,10 @@ Public Class frmMain
bbtnitmEB.Enabled = False bbtnitmEB.Enabled = False
LoadEnvelopeData() LoadEnvelopeData()
txtEnvelopeIdLabel.Caption = "No Envelope selected" txtEnvelopeIdLabel.Caption = "No Envelope selected"
Case 2
RibbonPageFunctions.Enabled = False
RibbonPageEnvelopeActions.Enabled = False
End Select End Select
End Sub End Sub
@@ -565,7 +576,8 @@ Public Class frmMain
For Each oReceiver As EnvelopeReceiver In Receivers For Each oReceiver As EnvelopeReceiver In Receivers
If oReceiver.Email = selReceiver.Email Then If oReceiver.Email = selReceiver.Email Then
If oController.ActionService.ResendReceiver(oEnvelope, oReceiver) = True Then If oController.ActionService.ResendReceiver(oEnvelope, oReceiver) = True Then
MsgBox(Resources.Envelope.Invitation_successfully_resend, MsgBoxStyle.Information, Text) Dim oMsg = Resources.Envelope.Invitation_successfully_resend.Replace("@Mail", oReceiver.Email)
MsgBox(oMsg, MsgBoxStyle.Information, Text)
End If End If
End If End If
@@ -583,4 +595,49 @@ Public Class frmMain
txtEnvelopeIdLabel.Caption = String.Format(txtEnvelopeIdLabel.Tag, oEnvelope.Id) txtEnvelopeIdLabel.Caption = String.Format(txtEnvelopeIdLabel.Tag, oEnvelope.Id)
End Sub End Sub
Private Sub btnEnvelopes_thismonth_Click(sender As Object, e As EventArgs) Handles btnEnvelopes_thismonth.Click
If SQL_REP_ENV_USER_TM <> String.Empty Then
Result_Execute(SQL_REP_ENV_USER_TM)
Else
GridControlData.DataSource = Nothing
End If
End Sub
Private Sub btnEnvelopes_lastmonth_Click(sender As Object, e As EventArgs) Handles btnEnvelopes_lastmonth.Click
If SQL_REP_ENV_USER_LM <> String.Empty Then
Result_Execute(SQL_REP_ENV_USER_LM)
Else
GridControlData.DataSource = Nothing
End If
End Sub
Private Sub btnEnvelopes_thisYear_Click(sender As Object, e As EventArgs) Handles btnEnvelopes_thisYear.Click
If SQL_REP_ENV_USER_Y <> String.Empty Then
Result_Execute(SQL_REP_ENV_USER_Y)
Else
GridControlData.DataSource = Nothing
End If
End Sub
Private Sub btnEnvelopes_All_Click(sender As Object, e As EventArgs) Handles btnEnvelopes_All.Click
If SQL_REP_ENV_USER_ALL <> String.Empty Then
Result_Execute(SQL_REP_ENV_USER_ALL)
Else
GridControlData.DataSource = Nothing
End If
End Sub
Private Sub Result_Execute(mySQL As String)
Try
Dim oDT As DataTable = DB_DD_ECM.GetDatatable(mySQL)
If Not IsNothing(oDT) Then
GridControlData.DataSource = oDT
Else
GridControlData.DataSource = Nothing
End If
Catch ex As Exception
End Try
End Sub
End Class End Class

View File

@@ -77,12 +77,30 @@ Public Class frmSplashScreen
Worker.ReportProgress(40, "Initializing Configuration") Worker.ReportProgress(40, "Initializing Configuration")
Thread.Sleep(300) Thread.Sleep(300)
Dim oSQl = "SELECT * FROM TBDD_SQL_COMMANDS"
Dim oDT = oState.Database.GetDatatable(oSQl)
For Each oROW As DataRow In oDT.Rows
If oROW.Item("TITLE") = "REPORT ENV USER THIS_MONTH" Then
SQL_REP_ENV_USER_TM = oROW.Item("SQL_COMMAND")
ElseIf oROW.Item("TITLE") = "REPORT ENV USER LAST_MONTH" Then
SQL_REP_ENV_USER_LM = oROW.Item("SQL_COMMAND")
ElseIf oROW.Item("TITLE") = "REPORT ENV USER YEAR" Then
SQL_REP_ENV_USER_Y = oROW.Item("SQL_COMMAND")
ElseIf oROW.Item("TITLE") = "REPORT ENV USER ALL" Then
SQL_REP_ENV_USER_ALL = oROW.Item("SQL_COMMAND")
End If
Next
oSQl = "SELECT * FROM TBSIG_CHART"
DT_CHARTS = oState.Database.GetDatatable(oSQl)
Dim ConfigModel = New ConfigModel(oState) Dim ConfigModel = New ConfigModel(oState)
oState.DbConfig = ConfigModel.LoadConfiguration() oState.DbConfig = ConfigModel.LoadConfiguration()
DEF_TF_ENABLED = oState.DbConfig.Default_TFA_Enabled
' DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND ' DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND
Worker.ReportProgress(60, "Initializing User") Worker.ReportProgress(60, "Initializing User")
Dim oKey = oState.Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' and ACTIVE = 1") Dim oKey = oState.Database.GetScalarValue("SELECT LICENSE FROM TBDD_3RD_PARTY_MODULES WHERE NAME = 'GDPICTURE' and ACTIVE = 1")
Thread.Sleep(300) Thread.Sleep(300)
If oKey.ToString <> String.Empty Then If oKey.ToString <> String.Empty Then
MS_GDPICTUREKEY = oKey MS_GDPICTUREKEY = oKey
End If End If
@@ -98,6 +116,7 @@ Public Class frmSplashScreen
If oUser IsNot Nothing Then If oUser IsNot Nothing Then
oUserModel.CheckUserLogin(oUser) oUserModel.CheckUserLogin(oUser)
End If End If
MYUSER = oUser
Worker.ReportProgress(100, "Starting Application") Worker.ReportProgress(100, "Starting Application")
Thread.Sleep(300) Thread.Sleep(300)

View File

@@ -1,9 +1,6 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<configuration> <configuration>
<configSections> <configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
<section name="EnvelopeGenerator.Service.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false"/>
</sectionGroup>
</configSections> </configSections>
<startup> <startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/> <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
@@ -16,11 +13,4 @@
</dependentAssembly> </dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<applicationSettings>
<EnvelopeGenerator.Service.My.MySettings>
<setting name="RunInDMZ" serializeAs="String">
<value>False</value>
</setting>
</EnvelopeGenerator.Service.My.MySettings>
</applicationSettings>
</configuration> </configuration>

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben: ' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")> ' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("1.7.1.0")> <Assembly: AssemblyVersion("1.8.0.0")>
<Assembly: AssemblyFileVersion("1.7.1.0")> <Assembly: AssemblyFileVersion("1.8.0.0")>

View File

@@ -1,10 +1,10 @@
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
' <auto-generated> ' <auto-generated>
' This code was generated by a tool. ' Dieser Code wurde von einem Tool generiert.
' Runtime Version:4.0.30319.42000 ' Laufzeitversion:4.0.30319.42000
' '
' Changes to this file may cause incorrect behavior and will be lost if ' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
' the code is regenerated. ' der Code erneut generiert wird.
' </auto-generated> ' </auto-generated>
'------------------------------------------------------------------------------ '------------------------------------------------------------------------------
@@ -22,7 +22,7 @@ Namespace My
Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings)
#Region "My.Settings Auto-Save Functionality" #Region "Automatische My.Settings-Speicherfunktion"
#If _MyType = "WindowsForms" Then #If _MyType = "WindowsForms" Then
Private Shared addedHandler As Boolean Private Shared addedHandler As Boolean
@@ -53,15 +53,6 @@ Namespace My
Return defaultInstance Return defaultInstance
End Get End Get
End Property End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Public ReadOnly Property RunInDMZ() As Boolean
Get
Return CType(Me("RunInDMZ"),Boolean)
End Get
End Property
End Class End Class
End Namespace End Namespace

View File

@@ -1,9 +1,5 @@
<?xml version='1.0' encoding='utf-8'?> <?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true"> <SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles /> <Profiles />
<Settings> <Settings />
<Setting Name="RunInDMZ" Type="System.Boolean" Scope="Application">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile> </SettingsFile>

View File

@@ -1,4 +1,7 @@
using EnvelopeGenerator.Web.Models; using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
using EnvelopeGenerator.Web.Models;
using Microsoft.AspNetCore.Authentication.Cookies;
using Microsoft.AspNetCore.Authentication;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using System.Security.Claims; using System.Security.Claims;
@@ -6,6 +9,7 @@ namespace EnvelopeGenerator.Web.Controllers
{ {
public static class ControllerBaseExtensions public static class ControllerBaseExtensions
{ {
#region Auth
public static string? GetClaimValue(this ControllerBase controller, string claimType) => controller.User.FindFirstValue(claimType); public static string? GetClaimValue(this ControllerBase controller, string claimType) => controller.User.FindFirstValue(claimType);
public static string? GetAuthEnvelopeUuid(this ControllerBase controller) => controller.User.FindFirstValue(ClaimTypes.NameIdentifier); public static string? GetAuthEnvelopeUuid(this ControllerBase controller) => controller.User.FindFirstValue(ClaimTypes.NameIdentifier);
@@ -23,7 +27,35 @@ namespace EnvelopeGenerator.Web.Controllers
var env_id_str = controller.User.FindFirstValue(EnvelopeClaimTypes.Id); var env_id_str = controller.User.FindFirstValue(EnvelopeClaimTypes.Id);
return int.TryParse(env_id_str, out int env_id) ? env_id : null; return int.TryParse(env_id_str, out int env_id) ? env_id : null;
} }
public static async Task SignInEnvelopeAsync(this HttpContext context, EnvelopeReceiverDto er, string receiverRole)
{
var claims = new List<Claim> {
new(ClaimTypes.NameIdentifier, er.Envelope!.Uuid),
new(ClaimTypes.Hash, er.Receiver!.Signature),
new(ClaimTypes.Name, er.Name ?? string.Empty),
new(ClaimTypes.Email, er.Receiver.EmailAddress),
new(EnvelopeClaimTypes.Title, er.Envelope.Title),
new(EnvelopeClaimTypes.Id, er.Envelope.Id.ToString()),
new(ClaimTypes.Role, receiverRole)
};
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
var authProperties = new AuthenticationProperties
{
AllowRefresh = false,
IsPersistent = false
};
await context.SignInAsync(
CookieAuthenticationDefaults.AuthenticationScheme,
new ClaimsPrincipal(claimsIdentity),
authProperties);
}
#endregion
#region View error
//TODO: integrate localizer for ready-to-use views //TODO: integrate localizer for ready-to-use views
public static ViewResult ViewError(this Controller controller, ErrorViewModel errorViewModel) => controller.View("_Error", errorViewModel); public static ViewResult ViewError(this Controller controller, ErrorViewModel errorViewModel) => controller.View("_Error", errorViewModel);
@@ -61,5 +93,6 @@ namespace EnvelopeGenerator.Web.Controllers
Subtitle = "Ein unerwarteter Fehler ist aufgetreten", Subtitle = "Ein unerwarteter Fehler ist aufgetreten",
Body = "Bitte kontaktieren Sie das IT-Team." Body = "Bitte kontaktieren Sie das IT-Team."
}); });
} #endregion
}
} }

View File

@@ -3,12 +3,12 @@ using EnvelopeGenerator.Common;
using EnvelopeGenerator.Web.Services; using EnvelopeGenerator.Web.Services;
using EnvelopeGenerator.Application.Contracts; using EnvelopeGenerator.Application.Contracts;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using EnvelopeGenerator.Application;
using EnvelopeGenerator.Extensions; using EnvelopeGenerator.Extensions;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Web.Controllers namespace EnvelopeGenerator.Web.Controllers
{ {
[Authorize] [Authorize(Roles = ReceiverRole.FullyAuth)]
[Route("api/[controller]")] [Route("api/[controller]")]
public class DocumentController : BaseController public class DocumentController : BaseController
{ {
@@ -48,7 +48,7 @@ namespace EnvelopeGenerator.Web.Controllers
} }
} }
[Authorize] [Authorize(Roles = ReceiverRole.FullyAuth)]
[HttpPost("{envelopeKey}")] [HttpPost("{envelopeKey}")]
public async Task<IActionResult> Open(string envelopeKey) public async Task<IActionResult> Open(string envelopeKey)
{ {

View File

@@ -10,7 +10,7 @@ using EnvelopeGenerator.Extensions;
namespace EnvelopeGenerator.Web.Controllers namespace EnvelopeGenerator.Web.Controllers
{ {
[Authorize] [Authorize(Roles = ReceiverRole.FullyAuth)]
[ApiController] [ApiController]
[Route("api/[controller]")] [Route("api/[controller]")]
public class EnvelopeController : BaseController public class EnvelopeController : BaseController
@@ -64,7 +64,7 @@ namespace EnvelopeGenerator.Web.Controllers
} }
} }
[Authorize] [Authorize(Roles = ReceiverRole.FullyAuth)]
[HttpPost("{envelopeKey}")] [HttpPost("{envelopeKey}")]
public async Task<IActionResult> Update(string envelopeKey, int index) public async Task<IActionResult> Update(string envelopeKey, int index)
{ {
@@ -110,7 +110,7 @@ namespace EnvelopeGenerator.Web.Controllers
} }
} }
[Authorize] [Authorize(Roles = ReceiverRole.FullyAuth)]
[HttpPost("reject")] [HttpPost("reject")]
public async Task<IActionResult> Reject([FromBody] string? reason = null) public async Task<IActionResult> Reject([FromBody] string? reason = null)
{ {

File diff suppressed because it is too large Load Diff

View File

@@ -4,6 +4,7 @@ using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Newtonsoft.Json; using Newtonsoft.Json;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Web.Controllers namespace EnvelopeGenerator.Web.Controllers
{ {
@@ -28,7 +29,7 @@ namespace EnvelopeGenerator.Web.Controllers
} }
[HttpPost] [HttpPost]
[Authorize] [Authorize(Roles = ReceiverRole.FullyAuth)]
public async Task<IActionResult> CreateAsync([FromBody] EnvelopeReceiverReadOnlyCreateDto createDto) public async Task<IActionResult> CreateAsync([FromBody] EnvelopeReceiverReadOnlyCreateDto createDto)
{ {
try try

View File

@@ -0,0 +1,87 @@
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Web.Models;
using Ganss.Xss;
using Microsoft.AspNetCore.Mvc;
using EnvelopeGenerator.Extensions;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Resources;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Extensions;
using Microsoft.Extensions.Options;
using Microsoft.AspNetCore.Authorization;
namespace EnvelopeGenerator.Web.Controllers;
//TODO: Add authorization as well as limiting the link duration (intermediate token with different role) or sign it
[Route("tfa")]
public class TFARegController : ViewControllerBase
{
private readonly IEnvelopeReceiverService _envRcvService;
private readonly IAuthenticator _authenticator;
private readonly IReceiverService _rcvService;
private readonly TFARegParams _params;
public TFARegController(ILogger<TFARegController> logger, HtmlSanitizer sanitizer, Cultures cultures, IStringLocalizer<Resource> localizer, IEnvelopeReceiverService erService, IAuthenticator authenticator, IReceiverService receiverService, IOptions<TFARegParams> tfaRegParamsOptions) : base(logger, sanitizer, cultures, localizer)
{
_envRcvService = erService;
_authenticator = authenticator;
_rcvService = receiverService;
_params = tfaRegParamsOptions.Value;
}
[Authorize]
[HttpGet("{envelopeReceiverId}")]
public async Task<IActionResult> Reg(string envelopeReceiverId)
{
try
{
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
if (uuid is null || signature is null)
{
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[WebKey.WrongEnvelopeReceiverId]);
return Unauthorized();
}
var er_secret_res = await _envRcvService.ReadWithSecretByUuidSignatureAsync(uuid: uuid, signature: signature);
if (er_secret_res.IsFailed)
{
_logger.LogNotice(er_secret_res.Notices);
return this.ViewEnvelopeNotFound();
}
var er_secret = er_secret_res.Data;
if (!er_secret.Envelope!.TFAEnabled)
return Unauthorized();
var rcv = er_secret.Receiver;
// Generate QR code as base 64
rcv!.TotpSecretkey = _authenticator.GenerateTotpSecretKey();
await _rcvService.UpdateAsync(rcv);
var totp_qr_64 = _authenticator.GenerateTotpQrCode(userEmail: rcv.EmailAddress, secretKey: rcv.TotpSecretkey).ToBase64String();
// Calculate RFA registiration deadline
if (rcv.TfaRegDeadline is null)
{
rcv.TfaRegDeadline = _params.Deadline;
await _rcvService.UpdateAsync(rcv);
}
else if (rcv.TfaRegDeadline <= DateTime.Now)
return View("_Expired");
ViewData["RegDeadline"] = rcv.TfaRegDeadline;
ViewData["TotpQR64"] = totp_qr_64;
return View();
}
catch(Exception ex)
{
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex, message: _localizer[WebKey.UnexpectedError]);
return this.ViewInnerServiceError();
}
}
}

View File

@@ -1,42 +0,0 @@
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.Services;
using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Mvc;
using System.Security.Claims;
namespace EnvelopeGenerator.Web.Controllers.Test
{
[ApiController]
[Route("api/test/[controller]")]
public class TestAuthController : ControllerBase
{
private readonly IJWTService<string> _authService;
public TestAuthController(IJWTService<string> authService)
{
_authService = authService;
}
[HttpPost]
public IActionResult ProvideToken([FromQuery] string value)
{
var token = _authService.GenerateToken(value);
return Ok(token);
}
[HttpGet]
public IActionResult GetSecurityToken([FromQuery] string token)
{
var sToken = _authService.ReadSecurityToken(token);
return Ok(sToken);
}
[HttpGet("Username")]
[Authorize]
public IActionResult Getname()
{
var username = User.Claims?.FirstOrDefault(c => c.Type == ClaimTypes.Name)?.Value;
return Ok(username);
}
}
}

View File

@@ -7,9 +7,9 @@ namespace EnvelopeGenerator.Web.Controllers.Test
[ApiController] [ApiController]
public class TestMessagingController : ControllerBase public class TestMessagingController : ControllerBase
{ {
private readonly IMessagingService _service; private readonly ISmsSender _service;
public TestMessagingController(IMessagingService service) public TestMessagingController(ISmsSender service)
{ {
_service = service; _service = service;
} }

View File

@@ -0,0 +1,23 @@
using EnvelopeGenerator.Web.Models;
using Ganss.Xss;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Resources;
namespace EnvelopeGenerator.Web.Controllers;
public class ViewControllerBase : Controller
{
protected readonly ILogger _logger;
protected readonly HtmlSanitizer _sanitizer;
protected readonly Cultures _cultures;
protected readonly IStringLocalizer<Resource> _localizer;
public ViewControllerBase(ILogger logger, HtmlSanitizer sanitizer, Cultures cultures, IStringLocalizer<Resource> localizer)
{
_logger = logger;
_sanitizer = sanitizer;
_cultures = cultures;
_localizer = localizer;
}
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,17 @@
namespace EnvelopeGenerator.Web.Models;
/// <summary>
/// Represents the parameters for two-factor authentication (2FA) registration.
/// </summary>
public class TFARegParams
{
/// <summary>
/// The maximum allowed time for completing the registration process.
/// </summary>
public TimeSpan TimeLimit { get; init; } = new(0, 30, 0);
/// <summary>
/// The deadline for registration, calculated as the current time plus the <see cref="TimeLimit"/>.
/// </summary>
public DateTime Deadline => DateTime.Now.AddTicks(TimeLimit.Ticks);
}

View File

@@ -49,6 +49,8 @@ try
// Add higher order services // Add higher order services
builder.Services.AddScoped<EnvelopeOldService>(); builder.Services.AddScoped<EnvelopeOldService>();
builder.ConfigureBySection<TFARegParams>();
// Add controllers and razor views // Add controllers and razor views
builder.Services.AddControllersWithViews(options => builder.Services.AddControllersWithViews(options =>
{ {

View File

@@ -2,20 +2,23 @@
@using Newtonsoft.Json @using Newtonsoft.Json
@model Auth; @model Auth;
@{ @{
//TODO: Create view model
var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string; var nonce = _accessor.HttpContext?.Items["csp-nonce"] as string;
var logo = _logoOpt.Value; var logo = _logoOpt.Value;
ViewData["Title"] = _localizer[WebKey.DocProtected]; ViewData["Title"] = _localizer[WebKey.DocProtected];
var userCulture = ViewData["UserCulture"] as Culture; var userCulture = ViewData["UserCulture"] as Culture;
string codeType = ViewData["CodeType"] is string _codeType ? _codeType : "accessCode"; string codeType = ViewData["CodeType"] is string _codeType ? _codeType : "accessCode";
string codePropName = char.ToUpper(codeType[0]) + codeType.Substring(1); string codeKeyName = (char.ToUpper(codeType[0]) + codeType.Substring(1)).Replace("Code", "");
string codeKeyName = codePropName.Replace("Code", "");
bool viaSms = codeType == "smsCode"; bool viaSms = codeType == "smsCode";
bool viaAuthenticator = codeType == "authenticatorCode"; bool viaAuthenticator = codeType == "authenticatorCode";
bool viaTFA = viaSms || viaAuthenticator; bool viaTFA = viaSms || viaAuthenticator;
DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null; DateTime? smsExpiration = ViewData["SmsExpiration"] is DateTime _smsExpiration ? _smsExpiration : null;
DateTime? qrCodeExpiration = ViewData["QRCodeExpiration"] is DateTime _qrCodeExpiration ? _qrCodeExpiration : null;
bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled; bool tfaEnabled = ViewData["TFAEnabled"] is bool _tfaEnabled && _tfaEnabled;
bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber; bool hasPhoneNumber = ViewData["HasPhoneNumber"] is bool _hasPhoneNumber && _hasPhoneNumber;
var envelopeKey = ViewData["EnvelopeKey"] as string;
DateTime? tfaRegDeadline = ViewData["TfaRegDeadline"] is DateTime _deadline ? _deadline : null;
var senderEmail = ViewData["SenderEmail"] as string ?? string.Empty;
var envelopeTitle = ViewData["EnvelopeTitle"] as string ?? string.Empty;
} }
<div class="page container py-4 px-4"> <div class="page container py-4 px-4">
<header class="text-center"> <header class="text-center">
@@ -31,12 +34,25 @@
</div> </div>
<h1>@_localizer[WebKey.Formats.LockedTitle.Format(codeKeyName)]</h1> <h1>@_localizer[WebKey.Formats.LockedTitle.Format(codeKeyName)]</h1>
</header> </header>
@if (viaAuthenticator && (tfaRegDeadline is null || tfaRegDeadline > DateTime.Now))
{
<section class="text-center"> <section class="text-center">
<p>@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value.Format(qrCodeExpiration.ToString())</p> <p class="m-0 p-0">
Klicken Sie auf den
<a class="icon-link m-0 p-0" href="/tfa/@envelopeKey" style="text-decoration: none;" target="_blank">
Link
<i class="bi bi-box-arrow-up-right"></i>
</a>
um Ihre Authenticator-App einzurichten.
</p>
</section>
}
<section class="text-center">
<p>@_localizer[WebKey.Formats.LockedBody.Format(codeKeyName)].Value</p>
</section> </section>
<div class="row m-0 p-0"> <div class="row m-0 p-0">
<div class="access-code-panel justify-content-center align-items-center p-0 m-0"> <div class="access-code-panel justify-content-center align-items-center p-0 m-0">
<form id="form-access-code" class="form form-floating mb-0" method="post"> <form id="form-access-code" class="form form-floating mb-0" method="post">
<div class="form-floating access-code-form-floating"> <div class="form-floating access-code-form-floating">
<input type="password" id="access_code" class="form-control" name="@codeType" placeholder="@_localizer[WebKey.Formats.LockedCodeLabel.Format(codeKeyName)]" required="required"> <input type="password" id="access_code" class="form-control" name="@codeType" placeholder="@_localizer[WebKey.Formats.LockedCodeLabel.Format(codeKeyName)]" required="required">
<label for="access_code">@_localizer[WebKey.Formats.LockedCodeLabel.Format(codeKeyName)]</label> <label for="access_code">@_localizer[WebKey.Formats.LockedCodeLabel.Format(codeKeyName)]</label>
@@ -47,21 +63,21 @@
</button> </button>
@if (tfaEnabled) @if (tfaEnabled)
{ {
<div class="form-check form-switch tfa-sms"> <div class="form-check form-switch tfa-sms">
@if(hasPhoneNumber) @if(hasPhoneNumber)
{ {
<input asp-for="UserSelectSMS" class="form-check-input" name="userSelectSMS" type="checkbox" role="switch" id="flexSwitchCheckChecked"> <input asp-for="UserSelectSMS" class="form-check-input" name="userSelectSMS" type="checkbox" role="switch" id="flexSwitchCheckChecked">
} }
else else
{ {
<input asp-for="UserSelectSMS" class="form-check-input" name="userSelectSMS" type="checkbox" role="switch" id="flexSwitchCheckChecked" disabled)> <input asp-for="UserSelectSMS" class="form-check-input" name="userSelectSMS" type="checkbox" role="switch" id="flexSwitchCheckChecked" disabled>
} }
<label class="form-check-label" for="flexSwitchCheckChecked">2FA per SMS</label> <label class="form-check-label" for="flexSwitchCheckChecked">2FA per SMS</label>
</div> </div>
} }
@if (smsExpiration is not null) @if (smsExpiration is not null)
{ {
<div id="sms-timer" class="alert alert-primary" role="alert">00:00</div> <div id="sms-timer" class="alert alert-primary" role="alert">00:00</div>
} }
</div> </div>
</form> </form>
@@ -69,15 +85,15 @@
</div> </div>
@if (ViewData["ErrorMessage"] is string errMsg) @if (ViewData["ErrorMessage"] is string errMsg)
{ {
<div id="access-code-error-message" class="alert alert-danger row" role="alert"> <div id="access-code-error-message" class="alert alert-danger row" role="alert">
@_sanitizer.Sanitize(errMsg) @_sanitizer.Sanitize(errMsg)
</div> </div>
} }
<section class="no-receiver-explanation text-center"> <section class="no-receiver-explanation text-center">
<details> <details>
<summary>@_localizer[WebKey.Formats.LockedFooterTitle.Format(codeKeyName)]</summary> <summary>@_localizer[WebKey.Formats.LockedFooterTitle.Format(codeKeyName)]</summary>
<p>@_localizer[WebKey.Formats.LockedFooterBody.Format(codeKeyName)]</p> <p>@Html.Raw(_localizer[WebKey.Formats.LockedFooterBody.Format(codeKeyName)].Value.Format(senderEmail, "Envelope - " + envelopeTitle, string.Empty))</p>
</details> </details>
</section> </section>
</div> </div>

View File

@@ -0,0 +1,25 @@
@{
ViewData["Title"] = "Abgelaufen";
var head = ViewData["Head"] as string ?? "Abgelaufen!";
var body = ViewData["Body"] as string ?? "Die Gültigkeitsdauer der Verbindung ist abgelaufen.";
}
<div class="page container p-5">
<header class="text-center">
<div class="icon expired">
<svg width="72" height="72" viewBox="0 0 48 48" version="1" xmlns="http://www.w3.org/2000/svg" enable-background="new 0 0 48 48">
<circle fill="#00ACC1" cx="17" cy="17" r="14" />
<circle fill="#eee" cx="17" cy="17" r="11" />
<rect x="16" y="8" width="2" height="9" />
<rect x="18.2" y="16" transform="matrix(-.707 .707 -.707 -.707 46.834 19.399)" width="2.4" height="6.8" />
<circle cx="17" cy="17" r="2" />
<circle fill="#00ACC1" cx="17" cy="17" r="1" />
<path fill="#FFC107" d="M11.9,42l14.4-24.1c0.8-1.3,2.7-1.3,3.4,0L44.1,42c0.8,1.3-0.2,3-1.7,3H13.6C12.1,45,11.1,43.3,11.9,42z" />
<path fill="#263238" d="M26.4,39.9c0-0.2,0-0.4,0.1-0.6s0.2-0.3,0.3-0.5s0.3-0.2,0.5-0.3s0.4-0.1,0.6-0.1s0.5,0,0.7,0.1 s0.4,0.2,0.5,0.3s0.2,0.3,0.3,0.5s0.1,0.4,0.1,0.6s0,0.4-0.1,0.6s-0.2,0.3-0.3,0.5s-0.3,0.2-0.5,0.3s-0.4,0.1-0.7,0.1 s-0.5,0-0.6-0.1s-0.4-0.2-0.5-0.3s-0.2-0.3-0.3-0.5S26.4,40.1,26.4,39.9z M29.2,36.8h-2.3L26.5,27h3L29.2,36.8z" />
</svg>
</div>
<h1>@head</h1>
</header>
<section class="text-center">
<p>@body</p>
</section>
</div>

View File

@@ -26,6 +26,7 @@
<link rel="stylesheet" href="~/lib/alertifyjs/css/alertify.min.css" /> <link rel="stylesheet" href="~/lib/alertifyjs/css/alertify.min.css" />
<link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet"> <link href="https://fonts.googleapis.com/icon?family=Material+Symbols+Outlined" rel="stylesheet">
<link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" /> <link rel="stylesheet" href="https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:opsz,wght,FILL,GRAD@24,400,0,0" />
<link rel="stylesheet" href="~/lib/bootstrap-icons/font/bootstrap-icons.min.css">
</head> </head>
<body> <body>
<style> <style>
@@ -67,7 +68,7 @@
{ {
ContractResolver = new CamelCasePropertyNamesContractResolver() ContractResolver = new CamelCasePropertyNamesContractResolver()
}; };
var lStrsJson = JsonConvert.SerializeObject(_localizer.ToDictionary(), settings).TrySanitize(_sanitizer); var lStrsJson = JsonConvert.SerializeObject(_localizer.ToDictionary(), settings);
} }
<script nonce="@nonce"> <script nonce="@nonce">
var localized = @Html.Raw(lStrsJson) var localized = @Html.Raw(lStrsJson)

View File

@@ -0,0 +1,75 @@
@using System.Globalization
@{
ViewData["Title"] = "2FA Registrierung";
var totpQR64 = ViewData["TotpQR64"] as string;
var regDeadline = ViewData["RegDeadline"] is DateTime _dateTime ? _dateTime : throw new InvalidOperationException("RegDeadline is not added to view in Reg.cshtml view.");
}
<div class="page container p-5">
<header class="text-center">
<div class="icon locked mt-4 mb-1">
<svg xmlns="http://www.w3.org/2000/svg" width="72" height="72" fill="currentColor" class="bi bi-shield-lock" viewBox="0 0 16 16">
<path d="M5.338 1.59a61 61 0 0 0-2.837.856.48.48 0 0 0-.328.39c-.554 4.157.726 7.19 2.253 9.188a10.7 10.7 0 0 0 2.287 2.233c.346.244.652.42.893.533q.18.085.293.118a1 1 0 0 0 .101.025 1 1 0 0 0 .1-.025q.114-.034.294-.118c.24-.113.547-.29.893-.533a10.7 10.7 0 0 0 2.287-2.233c1.527-1.997 2.807-5.031 2.253-9.188a.48.48 0 0 0-.328-.39c-.651-.213-1.75-.56-2.837-.855C9.552 1.29 8.531 1.067 8 1.067c-.53 0-1.552.223-2.662.524zM5.072.56C6.157.265 7.31 0 8 0s1.843.265 2.928.56c1.11.3 2.229.655 2.887.87a1.54 1.54 0 0 1 1.044 1.262c.596 4.477-.787 7.795-2.465 9.99a11.8 11.8 0 0 1-2.517 2.453 7 7 0 0 1-1.048.625c-.28.132-.581.24-.829.24s-.548-.108-.829-.24a7 7 0 0 1-1.048-.625 11.8 11.8 0 0 1-2.517-2.453C1.928 10.487.545 7.169 1.141 2.692A1.54 1.54 0 0 1 2.185 1.43 63 63 0 0 1 5.072.56" />
<path d="M9.5 6.5a1.5 1.5 0 0 1-1 1.415l.385 1.99a.5.5 0 0 1-.491.595h-.788a.5.5 0 0 1-.49-.595l.384-1.99a1.5 1.5 0 1 1 2-1.415" />
</svg>
</div>
<h2 class="mb-0">2-Factor Authentication (2FA)</h2>
<h2>Registrierung</h2>
</header>
<section class="text-center">
<p class="p-0 m-0"> @string.Format("Diese Seite ist bis {0} sichtbar.", regDeadline.ToString("d. MMM, HH:mm", new CultureInfo("de-DE")))</p>
</section>
<section class="text-start mt-4">
<div class="accordion" id="tfaRegStep">
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<p class="fw-bolder">Schritt 1 - Download einer 2FA Applikation</p>
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" data-bs-parent="#tfaRegStep">
<div class="accordion-body">
<p class="text-wrap fw-medium">Bitte nehmen Sie Ihr Smartphone zur Hand und laden eine Applikation herunter, die zur Zwei-Faktor-Authentifizierung (2FA) benutzt werden kann.</p>
<p class="text-wrap fw-light">Folgende Applikationen empfehlen wir</p>
<ul class="list-group text-start">
<li class="list-group-item">
<a href="https://support.google.com/accounts/answer/1066447?hl=de&co=GENIE.Platform%3DAndroid" target="_blank" style="text-decoration: none;">
<samp>Google Authenticator</samp>
</a>
</li>
<li class="list-group-item">
<a href="https://support.microsoft.com/de-de/account-billing/microsoft-authenticator-herunterladen-351498fc-850a-45da-b7b6-27e523b8702a" target="_blank" style="text-decoration: none;">
<samp>Microsoft Authenticator</samp>
</a>
</li>
</ul>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseTwo" aria-expanded="false" aria-controls="collapseTwo">
<p class="fw-bolder">Schritt 2 - Scannen des QR-Codes</p>
</button>
</h2>
<div id="collapseTwo" class="accordion-collapse collapse" data-bs-parent="#tfaRegStep">
<div class="accordion-body">
<div class="text-center m-0 p-0"><img class="tfaQrCode" src="data:image/png;base64,@totpQR64"></div>
<p class="text-wrap fw-medium">Sobald Sie eine Zwei-Faktor-Authentifizierung App installiert haben, können Sie fortfahren und innerhalb der Applikation die Option zum Scannen eines QR-Codes suchen und bestätigen. Im Anschluss, sobald die Kamera freigegeben wurde, können Sie den QR-Code von uns scannen.</p>
</div>
</div>
</div>
<div class="accordion-item">
<h2 class="accordion-header">
<button class="accordion-button collapsed" type="button" data-bs-toggle="collapse" data-bs-target="#collapseThree" aria-expanded="false" aria-controls="collapseThree">
<p class="fw-bolder">Schritt 3 - Verifizierung des Codes</p>
</button>
</h2>
<div id="collapseThree" class="accordion-collapse collapse" data-bs-parent="#tfaRegStep">
<div class="accordion-body">
<p class="text-wrap fw-medium">Sie können nun in der Zwei-Faktor-Authentifizierung App einen Zahlencode zur Verifizierung des Vorganges ablesen. Bitte tragen Sie diesen Code in das unten aufgeführte Eingabefeld ein und Klicken auf <samp>Absenden</samp>.</p>
</div>
</div>
</div>
</div>
</section>
</div>

View File

@@ -70,11 +70,6 @@
} }
] ]
}, },
"Jwt": {
"Issuer": null,
"Audience": null,
"Key": "8RGnd7x0G2TYLOIW4m_qlIls7MfbAIGNrpQJzMAUIvULHOLiG723znRa_MG-Z4yw3SErusOU4hTui2rVBMcCaQ"
},
"ContactLink": { "ContactLink": {
"Label": "Kontakt", "Label": "Kontakt",
"Href": "https://digitaldata.works/", "Href": "https://digitaldata.works/",
@@ -113,30 +108,28 @@
"ShowPageClass": "dd-show-logo", "ShowPageClass": "dd-show-logo",
"LockedPageClass": "dd-locked-logo" "LockedPageClass": "dd-locked-logo"
}, },
"DispatcherConfig": { "DispatcherParams": {
"SendingProfile": 1, "SendingProfile": 1,
"AddedWho": "DDEnvelopGenerator", "AddedWho": "DDEnvelopGenerator",
"ReminderTypeId": 202377, "ReminderTypeId": 202377,
"EmailAttmt1": "" "EmailAttmt1": ""
}, },
"MailConfig": { "MailParams": {
"Placeholders": { "Placeholders": {
"[NAME_PORTAL]": "signFlow", "[NAME_PORTAL]": "signFlow",
"[SIGNATURE_TYPE]": "signieren", "[SIGNATURE_TYPE]": "signieren",
"[REASON]": "" "[REASON]": ""
} }
}, },
"GTXMessagingConfig": { "GtxMessagingParams": {
"AuthKey": "ep$?A!Gs"
},
"SmsConfig": {
"Uri": "https://rest.gtx-messaging.net", "Uri": "https://rest.gtx-messaging.net",
"Path": "smsc/sendsms/f566f7e5-bdf2-4a9a-bf52-ed88215a432e/json", "Path": "smsc/sendsms/f566f7e5-bdf2-4a9a-bf52-ed88215a432e/json",
"Headers": {}, "Headers": {},
"QueryParams": { "QueryParams": {
"from": "signFlow" "from": "signFlow"
}, }
"CodeCacheValidityPeriod": "00:10:00"
}, },
"EnvelopeReceiverCacheParams": {} "TFARegParams": {
"TimeLimit": "00:30:00"
}
} }

View File

@@ -618,4 +618,8 @@ footer#page-footer {
.collapse { .collapse {
height: 4rem; height: 4rem;
} }
}
#tfaRegStep .tfaQrCode {
width: 7rem;
} }

File diff suppressed because one or more lines are too long

View File

@@ -82,7 +82,6 @@
}) })
//city //city
var location = await getLocation();
const id_city = PSPDFKit.generateInstantId() const id_city = PSPDFKit.generateInstantId()
const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({ const annotation_city = new PSPDFKit.Annotations.WidgetAnnotation({
id: id_city, id: id_city,
@@ -102,8 +101,8 @@
const formFieldCity = new PSPDFKit.FormFields.TextFormField({ const formFieldCity = new PSPDFKit.FormFields.TextFormField({
name: id_city, name: id_city,
annotationIds: PSPDFKit.Immutable.List([annotation_city.id]), annotationIds: PSPDFKit.Immutable.List([annotation_city.id]),
value: IS_MOBILE_DEVICE ? location.city : "", value: "",
readOnly: IS_MOBILE_DEVICE readOnly: false
}) })
this.markFieldAsRequired(formFieldCity); this.markFieldAsRequired(formFieldCity);

View File

@@ -1,50 +1,5 @@
const B64ToBuff = (base64String) => new Uint8Array(Array.from(atob(base64String), char => char.charCodeAt(0))).buffer; const B64ToBuff = (base64String) => new Uint8Array(Array.from(atob(base64String), char => char.charCodeAt(0))).buffer;
function getCoordinates() {
return new Promise((resolve, reject) => {
if (navigator.geolocation) {
navigator.geolocation.getCurrentPosition(
position => resolve(position.coords),
error => reject(error)
);
} else {
reject(new Error("Geolocation is not supported by this browser."));
}
});
}
async function getCity() {
try {
const coords = await getCoordinates();
const response = await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${coords.latitude}&lon=${coords.longitude}`);
const data = await response.json();
if (data && data.address) {
const city = data.address.city || data.address.town || data.address.village || data.address.hamlet;
const postalCode = data.address.postcode;
return postalCode + ' ' + city || '';
}
} catch {
return '';
}
}
async function getLocation() {
try {
const coords = await getCoordinates();
const response = await fetch(`https://nominatim.openstreetmap.org/reverse?format=json&lat=${coords.latitude}&lon=${coords.longitude}`);
const data = await response.json();
if (data && data.address) {
const city = data.address.city || data.address.town || data.address.village || data.address.hamlet;
const postalCode = data.address.postcode;
return { postalCode: postalCode, city: city };
}
} catch {
return { postalCode: '', city: '' };
}
}
const getLocaleDateString = _ => new Date().toLocaleDateString('de-DE') const getLocaleDateString = _ => new Date().toLocaleDateString('de-DE')
function detailedCurrentDate() { function detailedCurrentDate() {

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