Compare commits
177 Commits
feat/locat
...
feat/two-f
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3688373481 | ||
|
|
b8fbeee322 | ||
|
|
57e4dfb3fb | ||
|
|
afc8d3baf0 | ||
|
|
51d77367ca | ||
|
|
614f3768d9 | ||
|
|
5f780f8d1e | ||
|
|
20825aa3ea | ||
|
|
c5b508d274 | ||
|
|
4eec4451b2 | ||
|
|
ca4718e159 | ||
|
|
33fcb5b70e | ||
|
|
82d8521a25 | ||
|
|
2f9d07312b | ||
|
|
fa36593b26 | ||
|
|
9cdb1409c0 | ||
|
|
95785e8c8b | ||
|
|
6d6e62c8d0 | ||
|
|
1720e137f9 | ||
|
|
3e6e2078bb | ||
|
|
6b0ec9386c | ||
|
|
ee49538f1e | ||
|
|
311009bc97 | ||
|
|
f5028a82fa | ||
|
|
07d70dbd22 | ||
|
|
152050ebf4 | ||
|
|
e27daa4b90 | ||
|
|
808a02968b | ||
|
|
bbd03615e1 | ||
|
|
772d510705 | ||
|
|
aa918d875d | ||
|
|
28fdf0a115 | ||
|
|
120c8623dd | ||
|
|
363329ca18 | ||
|
|
eb0c6dabf4 | ||
|
|
cd88af6807 | ||
|
|
1941de1928 | ||
|
|
22347a0202 | ||
|
|
e54d9d2da8 | ||
|
|
06b1aa9560 | ||
|
|
4f35fe54be | ||
|
|
84e3e4e18d | ||
|
|
7f26bb4766 | ||
|
|
f674be5200 | ||
|
|
0718f24339 | ||
|
|
6abc17c3bf | ||
|
|
cf300d3ade | ||
|
|
be44f9f436 | ||
|
|
80f9107e4e | ||
|
|
c6e9ecfbca | ||
|
|
af5d7c289d | ||
|
|
3267acbeb3 | ||
|
|
95efe58e1b | ||
|
|
867756242e | ||
|
|
713c2f3ed2 | ||
|
|
5a0e258b35 | ||
|
|
651095976a | ||
|
|
fcbee75b9b | ||
|
|
dcb25ffc4c | ||
|
|
618e295634 | ||
|
|
8a2fa2035a | ||
|
|
60109e4deb | ||
|
|
ed6a00dfdf | ||
|
|
c693495928 | ||
|
|
241991721d | ||
|
|
c41d5c4a76 | ||
|
|
27db664b4d | ||
|
|
ba2518cdd2 | ||
|
|
72a0cb78c7 | ||
|
|
e82d7552c2 | ||
|
|
4b50b6c35d | ||
|
|
103d8da6b2 | ||
|
|
15f3bd1bbd | ||
|
|
10a5adeeee | ||
|
|
3b5c6086a9 | ||
|
|
abda0d14e8 | ||
|
|
569ebc87cc | ||
|
|
6b6c8e407c | ||
|
|
556d02870e | ||
|
|
c6fc665002 | ||
|
|
030fd0e45b | ||
|
|
31e647d3e5 | ||
|
|
6dfdd48ec0 | ||
|
|
85cacc822d | ||
|
|
535ca23c86 | ||
|
|
7f1009e402 | ||
|
|
ea4b35f4b4 | ||
|
|
8e1b4e0832 | ||
|
|
4f5b8f9d76 | ||
|
|
f06b41492e | ||
|
|
f0f1275e75 | ||
|
|
085f37de16 | ||
|
|
1657a99aa6 | ||
|
|
ff6d27df8e | ||
|
|
76bd1a102f | ||
|
|
6a6da39bc4 | ||
|
|
137d8e09d4 | ||
|
|
bed51992d2 | ||
|
|
a371abaabe | ||
|
|
90c6e87224 | ||
|
|
4af1534194 | ||
|
|
f39ac57009 | ||
|
|
88d01e4ac7 | ||
|
|
85c33eb0f8 | ||
|
|
1bc31fe0ee | ||
|
|
2e790b4e4c | ||
|
|
19485860a5 | ||
|
|
e33d859603 | ||
|
|
46b8bde162 | ||
|
|
a6468c2ff1 | ||
|
|
40a21a0b89 | ||
|
|
fa44b82493 | ||
|
|
cdec5485c6 | ||
|
|
2a963a1861 | ||
|
|
9d1a2e7254 | ||
|
|
b779ef6f0b | ||
|
|
0c81a86610 | ||
|
|
b11f32bd3c | ||
|
|
b8d9963fac | ||
|
|
e77532ebfd | ||
|
|
ec37518245 | ||
|
|
a1618fc8d0 | ||
|
|
6b65fc28fd | ||
|
|
a763fd6a24 | ||
|
|
28a8e20b63 | ||
|
|
155f80e8b3 | ||
|
|
d8f74971f3 | ||
|
|
44dc7185c6 | ||
|
|
551ba595b6 | ||
|
|
4b77713df4 | ||
|
|
f1ca1e9067 | ||
|
|
0469f057c9 | ||
|
|
b4a97abe6b | ||
|
|
423b293197 | ||
|
|
27618a343e | ||
|
|
fe106c5a8c | ||
|
|
941b98b1a4 | ||
|
|
168c33bfea | ||
|
|
40c25ee111 | ||
|
|
608d79d35b | ||
|
|
62d396932d | ||
|
|
62dcb41526 | ||
|
|
360bb9b3d8 | ||
|
|
1f57914f9e | ||
|
|
9c431ddf56 | ||
|
|
61ff2f8cde | ||
|
|
f2ee509727 | ||
|
|
da06daf776 | ||
|
|
d3104500d4 | ||
|
|
d23b8b9187 | ||
|
|
ec206ab33a | ||
|
|
de6d4b9dd8 | ||
|
|
2943fe0e2d | ||
|
|
33e99f584a | ||
|
|
4a62ab0c56 | ||
|
|
132acd35cc | ||
|
|
ed80839777 | ||
|
|
2114615584 | ||
|
|
6e6f3fd2ed | ||
|
|
5da306acd3 | ||
|
|
18ef1d19b5 | ||
|
|
b76ebd2abc | ||
|
|
d55233061d | ||
|
|
949001791c | ||
|
|
30f93f2439 | ||
|
|
36ffb9511c | ||
|
|
bf84d5c63a | ||
|
|
57f8d0e398 | ||
|
|
bb8bd8ed40 | ||
|
|
ba832acad3 | ||
|
|
6490a3cb82 | ||
|
|
4c077c90db | ||
|
|
9bd5e63128 | ||
|
|
15ce7c9384 | ||
|
|
8707a5cdb5 | ||
|
|
47c7070700 | ||
|
|
fcc3223eb1 |
@@ -0,0 +1,19 @@
|
||||
namespace EnvelopeGenerator.Application.Configurations
|
||||
{
|
||||
public class AuthenticatorParams
|
||||
{
|
||||
public string CharPool { get; init; } = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz01234567890123456789012345678901234567890123456789";
|
||||
|
||||
//TODO: Increase the DefaultTotpSecretKeyLength (e.g. to 32) but make sure that the QR code is generated correctly and can be scanned by the authenticator.
|
||||
public int DefaultTotpSecretKeyLength { get; init; } = 20;
|
||||
|
||||
public string TotpIssuer { get; init; } = "signFlow";
|
||||
|
||||
/// <summary>
|
||||
/// 0 is user email, 1 is secret key and 2 is issuer.
|
||||
/// </summary>
|
||||
public string TotpUrlFormat { get; init; } = "otpauth://totp/{0}?secret={1}&issuer={2}";
|
||||
|
||||
public int TotpQRPixelsPerModule { get; init; } = 20;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Configurations
|
||||
{
|
||||
public class MailConfig
|
||||
{
|
||||
public required Dictionary<string, string> Placeholders { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
namespace EnvelopeGenerator.Application.Configurations;
|
||||
|
||||
public class MailParams
|
||||
{
|
||||
public required Dictionary<string, string> Placeholders { get; init; }
|
||||
}
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
19
EnvelopeGenerator.Application/Contracts/IAuthenticator.cs
Normal file
19
EnvelopeGenerator.Application/Contracts/IAuthenticator.cs
Normal 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);
|
||||
}
|
||||
}
|
||||
@@ -8,10 +8,12 @@ namespace EnvelopeGenerator.Application.Contracts
|
||||
{
|
||||
public interface IEnvelopeMailService : IEmailOutService
|
||||
{
|
||||
Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType);
|
||||
Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType, Dictionary<string, object>? optionalPlaceholders = null);
|
||||
|
||||
Task<DataResult<int>> SendAsync(EnvelopeReceiverReadOnlyDto dto);
|
||||
Task<DataResult<int>> SendAsync(EnvelopeReceiverReadOnlyDto dto, Dictionary<string, object>? optionalPlaceholders = null);
|
||||
|
||||
Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
|
||||
|
||||
Task<DataResult<int>> SendTFAQrCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Contracts
|
||||
@@ -9,15 +9,17 @@ namespace EnvelopeGenerator.Application.Contracts
|
||||
public interface IEnvelopeReceiverService : IBasicCRUDService<EnvelopeReceiverDto, EnvelopeReceiver, (int Envelope, int Receiver)>
|
||||
{
|
||||
|
||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false);
|
||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true);
|
||||
|
||||
Task<DataResult<IEnumerable<EnvelopeReceiverSecretDto>>> ReadSecretByUuidAsync(string uuid, bool withEnvelope = false, bool withReceiver = true);
|
||||
Task<DataResult<IEnumerable<string?>>> ReadAccessCodeByUuidAsync(string uuid, bool withEnvelope = false, bool withReceiver = true);
|
||||
|
||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true);
|
||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true);
|
||||
|
||||
Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true);
|
||||
Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
|
||||
|
||||
Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true);
|
||||
Task<DataResult<EnvelopeReceiverSecretDto>> ReadWithSecretByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
|
||||
|
||||
Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
|
||||
|
||||
Task<DataResult<string>> ReadAccessCodeByIdAsync(int envelopeId, int receiverId);
|
||||
|
||||
@@ -30,5 +32,7 @@ namespace EnvelopeGenerator.Application.Contracts
|
||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
||||
|
||||
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
|
||||
|
||||
Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message);
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.Core.Abstractions.Application;
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
@@ -7,8 +8,10 @@ namespace EnvelopeGenerator.Application.Contracts
|
||||
{
|
||||
public interface IReceiverService : ICRUDService<ReceiverCreateDto, ReceiverReadDto, ReceiverUpdateDto, Receiver, int>
|
||||
{
|
||||
public Task<DataResult<ReceiverReadDto>> ReadByAsync(string? emailAddress = null, string? signature = null);
|
||||
Task<DataResult<ReceiverReadDto>> ReadByAsync(string? emailAddress = null, string? signature = null);
|
||||
|
||||
public Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
|
||||
Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
|
||||
|
||||
Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto) where TUpdateDto : IUnique<int>;
|
||||
}
|
||||
}
|
||||
11
EnvelopeGenerator.Application/Contracts/ISmsSender.cs
Normal file
11
EnvelopeGenerator.Application/Contracts/ISmsSender.cs
Normal 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);
|
||||
}
|
||||
@@ -1,63 +0,0 @@
|
||||
using DigitalData.UserManager.Application.MappingProfiles;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Application.MappingProfiles;
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||
using EnvelopeGenerator.Infrastructure.Repositories;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace EnvelopeGenerator.Application
|
||||
{
|
||||
public static class DIExtensions
|
||||
{
|
||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration dispatcherConfigSection, IConfiguration mailConfigSection)
|
||||
{
|
||||
//Inject CRUD Service and repositoriesad
|
||||
services.AddScoped<IConfigRepository, ConfigRepository>();
|
||||
services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||
services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||
services.AddScoped<IConfigRepository, ConfigRepository>();
|
||||
services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||
services.AddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
||||
services.AddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||
services.AddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
||||
services.AddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
||||
services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||
services.AddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
||||
services.AddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
||||
services.AddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||
services.AddScoped<IReceiverRepository, ReceiverRepository>();
|
||||
services.AddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
||||
services.AddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
|
||||
services.AddScoped<IConfigService, ConfigService>();
|
||||
services.AddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
|
||||
services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||
services.AddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
|
||||
services.AddScoped<IDocumentStatusService, DocumentStatusService>();
|
||||
services.AddScoped<IEmailTemplateService, EmailTemplateService>();
|
||||
services.AddScoped<IEnvelopeService, EnvelopeService>();
|
||||
services.AddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
||||
services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||
services.AddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
||||
services.AddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||
services.AddScoped<IReceiverService, ReceiverService>();
|
||||
services.AddScoped<IUserReceiverService, UserReceiverService>();
|
||||
services.AddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
|
||||
|
||||
//Auto mapping profiles
|
||||
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
||||
|
||||
services.Configure<DispatcherConfig>(dispatcherConfigSection);
|
||||
services.Configure<MailConfig>(mailConfigSection);
|
||||
|
||||
return services;
|
||||
}
|
||||
|
||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config) => services.AddEnvelopeGenerator(
|
||||
dispatcherConfigSection: config.GetSection("DispatcherConfig"),
|
||||
mailConfigSection: config.GetSection("MailConfig"));
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,5 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs
|
||||
@@ -8,11 +9,9 @@ namespace EnvelopeGenerator.Application.DTOs
|
||||
int SendingProfile,
|
||||
string SignatureHost,
|
||||
string ExternalProgramName,
|
||||
string ExportPath,
|
||||
string DocumentPathDmz,
|
||||
string ExportPathDmz,
|
||||
string DocumentPathMoveAftsend) : IUnique<int>
|
||||
string ExportPath) : IUnique<int>
|
||||
{
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single row in the database.");
|
||||
|
||||
@@ -51,7 +51,9 @@ namespace EnvelopeGenerator.Application.DTOs
|
||||
|
||||
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 EnvelopeType? EnvelopeType { get; set; }
|
||||
|
||||
|
||||
@@ -25,5 +25,7 @@ namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
||||
public DateTime AddedWhen { get; init; }
|
||||
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
|
||||
public bool HasPhoneNumber { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,9 @@
|
||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeReceiver
|
||||
{
|
||||
public record EnvelopeReceiverSecretDto(string? AccessCode) : EnvelopeReceiverDto;
|
||||
public record EnvelopeReceiverSecretDto() : EnvelopeReceiverDto()
|
||||
{
|
||||
public string? AccessCode { get; init; }
|
||||
|
||||
public string? PhoneNumber { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
namespace EnvelopeGenerator.Application.DTOs.Messaging
|
||||
{
|
||||
public class GtxMessagingResponse : Dictionary<string, object?> { }
|
||||
}
|
||||
11
EnvelopeGenerator.Application/DTOs/Messaging/SmsResponse.cs
Normal file
11
EnvelopeGenerator.Application/DTOs/Messaging/SmsResponse.cs
Normal file
@@ -0,0 +1,11 @@
|
||||
namespace EnvelopeGenerator.Application.DTOs.Messaging
|
||||
{
|
||||
public record SmsResponse
|
||||
{
|
||||
public required bool Ok { get; init; }
|
||||
|
||||
public bool Failed => !Ok;
|
||||
|
||||
public dynamic? Errors { get; init; }
|
||||
}
|
||||
}
|
||||
@@ -4,7 +4,7 @@ using System.Text;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver
|
||||
{
|
||||
public record ReceiverCreateDto([EmailAddress] string EmailAddress)
|
||||
public record ReceiverCreateDto([EmailAddress] string EmailAddress, string? TotpSecretkey = null)
|
||||
{
|
||||
public string Signature => sha256HexOfMail.Value;
|
||||
|
||||
|
||||
@@ -1,19 +1,24 @@
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver
|
||||
{
|
||||
public record ReceiverReadDto(
|
||||
int Id,
|
||||
string EmailAddress,
|
||||
string Signature,
|
||||
DateTime AddedWhen
|
||||
) : BaseDTO<int>(Id)
|
||||
{
|
||||
[JsonIgnore]
|
||||
public IEnumerable<EnvelopeReceiverBasicDto>? EnvelopeReceivers { get; init; }
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
|
||||
public string? LastUsedName => EnvelopeReceivers?.LastOrDefault()?.Name;
|
||||
};
|
||||
}
|
||||
public record ReceiverReadDto(
|
||||
int Id,
|
||||
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? TotpSecretkey { get; set; } = null;
|
||||
|
||||
public DateTime? TfaRegDeadline { get; set; }
|
||||
};
|
||||
@@ -1,6 +1,5 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver
|
||||
{
|
||||
public record ReceiverUpdateDto(int Id) : IUnique<int>;
|
||||
}
|
||||
namespace EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
|
||||
public record ReceiverUpdateDto(int Id, string? TotpSecretkey = null, DateTime? TfaRegDeadline = null) : IUnique<int>;
|
||||
@@ -1,56 +1,60 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net7.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\Model.Designer.vb" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Remove="Resources\Model.Designer.vb" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||
<PackageReference Include="UserManager.Application" Version="2.0.0" />
|
||||
<PackageReference Include="UserManager.Infrastructure" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="AutoMapper" Version="13.0.1" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
|
||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
|
||||
<PackageReference Include="UserManager.Application" Version="2.0.0" />
|
||||
<PackageReference Include="UserManager.Infrastructure" Version="2.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" />
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" />
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Infrastructure\EnvelopeGenerator.Infrastructure.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources\Model.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Model.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Update="Resources\Model.Designer.cs">
|
||||
<DesignTime>True</DesignTime>
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Model.resx</DependentUpon>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resources\Model.en.resx">
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<LastGenOutput>Model.en.Designer.vb</LastGenOutput>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Model.resx">
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<LastGenOutput>Model.Designer.cs</LastGenOutput>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Resource.de-DE.resx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Resource.en-US.resx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<EmbeddedResource Update="Resources\Model.en.resx">
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<LastGenOutput>Model.en.Designer.vb</LastGenOutput>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Model.resx">
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<LastGenOutput>Model.Designer.cs</LastGenOutput>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Resource.de-DE.resx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Update="Resources\Resource.en-US.resx">
|
||||
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
131
EnvelopeGenerator.Application/Extensions/CacheExtensions.cs
Normal file
131
EnvelopeGenerator.Application/Extensions/CacheExtensions.cs
Normal file
@@ -0,0 +1,131 @@
|
||||
using Microsoft.Extensions.Caching.Distributed;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Extensions
|
||||
{
|
||||
public static class CacheExtensions
|
||||
{
|
||||
public static Task SetLongAsync(this IDistributedCache cache, string key, long value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
|
||||
=> options is null
|
||||
? cache.SetAsync(key, BitConverter.GetBytes(value), token: cToken)
|
||||
: cache.SetAsync(key, BitConverter.GetBytes(value), options: options, token: cToken);
|
||||
|
||||
public static async Task<long?> GetLongAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
|
||||
{
|
||||
var value = await cache.GetAsync(key, cToken);
|
||||
return value is null ? null : BitConverter.ToInt64(value, 0);
|
||||
}
|
||||
|
||||
public static Task SetDateTimeAsync(this IDistributedCache cache, string key, DateTime value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
|
||||
=> cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken: cToken);
|
||||
|
||||
public static async Task<DateTime?> GetDateTimeAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
|
||||
{
|
||||
var value = await cache.GetAsync(key, cToken);
|
||||
return value is null ? null : new(BitConverter.ToInt64(value, 0));
|
||||
}
|
||||
|
||||
public static Task SetTimeSpanAsync(this IDistributedCache cache, string key, TimeSpan value, DistributedCacheEntryOptions? options = null, CancellationToken cToken = default)
|
||||
=> cache.SetLongAsync(key: key, value: value.Ticks, options: options, cToken);
|
||||
|
||||
public static async Task<TimeSpan?> GetTimeSpanAsync(this IDistributedCache cache, string key, CancellationToken cToken = default)
|
||||
{
|
||||
var value = await cache.GetAsync(key, cToken);
|
||||
return value is null ? null : new(BitConverter.ToInt64(value, 0));
|
||||
}
|
||||
|
||||
//TODO: use code generator
|
||||
#region GetOrSetAsync
|
||||
|
||||
#region string
|
||||
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<string> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
|
||||
{
|
||||
var value = await cache.GetStringAsync(key, cToken);
|
||||
if (value is null)
|
||||
{
|
||||
// create new and save
|
||||
value = factory();
|
||||
|
||||
Task CacheAsync() => options is null
|
||||
? cache.SetStringAsync(key, value, cToken)
|
||||
: cache.SetStringAsync(key, value, options, cToken);
|
||||
|
||||
if (cacheInBackground)
|
||||
_ = Task.Run(async () => await CacheAsync(), cToken);
|
||||
else
|
||||
await CacheAsync();
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
|
||||
public static async Task<string> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<string>> factoryAsync, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
|
||||
{
|
||||
var value = await cache.GetStringAsync(key, cToken);
|
||||
if(value is null)
|
||||
{
|
||||
// create new and save
|
||||
value = await factoryAsync();
|
||||
|
||||
Task CacheAsync() => options is null
|
||||
? cache.SetStringAsync(key: key, value: value, token: cToken)
|
||||
: cache.SetStringAsync(key: key, value: value, options: options, token: cToken);
|
||||
|
||||
if (cacheInBackground)
|
||||
_ = Task.Run(async () => await CacheAsync(), cToken);
|
||||
else
|
||||
await CacheAsync();
|
||||
}
|
||||
|
||||
return value;
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region DateTime
|
||||
public static async Task<DateTime> GetOrSetAsync(this IDistributedCache cache, string key, Func<DateTime> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
|
||||
{
|
||||
if (await cache.GetDateTimeAsync(key, cToken) is DateTime dateTimeValue)
|
||||
return dateTimeValue;
|
||||
else
|
||||
{
|
||||
// create new and save
|
||||
var newValue = factory();
|
||||
|
||||
Task CacheAsync() => options is null
|
||||
? cache.SetDateTimeAsync(key, newValue, cToken: cToken)
|
||||
: cache.SetDateTimeAsync(key, newValue, options, cToken);
|
||||
|
||||
if (cacheInBackground)
|
||||
_ = Task.Run(async () => await CacheAsync(), cToken);
|
||||
else
|
||||
await CacheAsync();
|
||||
|
||||
return newValue;
|
||||
}
|
||||
}
|
||||
|
||||
public static async Task<DateTime> GetOrSetAsync(this IDistributedCache cache, string key, Func<Task<DateTime>> factory, DistributedCacheEntryOptions? options = null, bool cacheInBackground = false, CancellationToken cToken = default)
|
||||
{
|
||||
if (await cache.GetDateTimeAsync(key, cToken) is DateTime dateTimeValue)
|
||||
return dateTimeValue;
|
||||
else
|
||||
{
|
||||
// create new and save
|
||||
var newValue = await factory();
|
||||
|
||||
Task CacheAsync() => options is null
|
||||
? cache.SetDateTimeAsync(key, newValue, cToken: cToken)
|
||||
: cache.SetDateTimeAsync(key, newValue, options, cToken);
|
||||
|
||||
if (cacheInBackground)
|
||||
_ = Task.Run(async () => await CacheAsync(), cToken);
|
||||
else
|
||||
await CacheAsync();
|
||||
|
||||
return newValue;
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
69
EnvelopeGenerator.Application/Extensions/DIExtensions.cs
Normal file
69
EnvelopeGenerator.Application/Extensions/DIExtensions.cs
Normal file
@@ -0,0 +1,69 @@
|
||||
using DigitalData.UserManager.Application.MappingProfiles;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Application.MappingProfiles;
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||
using EnvelopeGenerator.Infrastructure.Repositories;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using DigitalData.Core.Client;
|
||||
using QRCoder;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Extensions;
|
||||
|
||||
public static class DIExtensions
|
||||
{
|
||||
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services, IConfiguration config)
|
||||
{
|
||||
//Inject CRUD Service and repositoriesad
|
||||
services.TryAddScoped<IConfigRepository, ConfigRepository>();
|
||||
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||
services.TryAddScoped<IConfigRepository, ConfigRepository>();
|
||||
services.TryAddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
|
||||
services.TryAddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
|
||||
services.TryAddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
|
||||
services.TryAddScoped<IEnvelopeRepository, EnvelopeRepository>();
|
||||
services.TryAddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
|
||||
services.TryAddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
|
||||
services.TryAddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
|
||||
services.TryAddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
|
||||
services.TryAddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
|
||||
services.TryAddScoped<IReceiverRepository, ReceiverRepository>();
|
||||
services.TryAddScoped<IUserReceiverRepository, UserReceiverRepository>();
|
||||
services.TryAddScoped<IEnvelopeReceiverReadOnlyRepository, EnvelopeReceiverReadOnlyRepository>();
|
||||
services.TryAddScoped<IConfigService, ConfigService>();
|
||||
services.TryAddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
|
||||
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||
services.TryAddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
|
||||
services.TryAddScoped<IDocumentStatusService, DocumentStatusService>();
|
||||
services.TryAddScoped<IEmailTemplateService, EmailTemplateService>();
|
||||
services.TryAddScoped<IEnvelopeService, EnvelopeService>();
|
||||
services.TryAddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
|
||||
services.TryAddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
|
||||
services.TryAddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
|
||||
services.TryAddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
|
||||
services.TryAddScoped<IReceiverService, ReceiverService>();
|
||||
services.TryAddScoped<IUserReceiverService, UserReceiverService>();
|
||||
services.TryAddScoped<IEnvelopeReceiverReadOnlyService, EnvelopeReceiverReadOnlyService>();
|
||||
|
||||
//Auto mapping profiles
|
||||
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
|
||||
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
|
||||
|
||||
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
||||
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||
services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
|
||||
services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
|
||||
|
||||
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
|
||||
services.TryAddSingleton<ISmsSender, GTXSmsSender>();
|
||||
services.TryAddSingleton<IEnvelopeSmsHandler, EnvelopeSmsHandler>();
|
||||
services.TryAddSingleton<IAuthenticator, Authenticator>();
|
||||
services.TryAddSingleton<QRCodeGenerator>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Extensions
|
||||
{
|
||||
public static class MappingExtensions
|
||||
{
|
||||
public static bool Ok(this GtxMessagingResponse gtxMessagingResponse)
|
||||
=> gtxMessagingResponse.TryGetValue("message-status", out var status)
|
||||
&& status?.ToString()?.ToLower() == "ok";
|
||||
|
||||
public static string ToBase64String(this byte[] bytes)
|
||||
=> Convert.ToBase64String(bytes);
|
||||
}
|
||||
}
|
||||
@@ -14,6 +14,7 @@
|
||||
public static readonly string PossibleSecurityBreach = nameof(PossibleSecurityBreach);
|
||||
public static readonly string WrongEnvelopeReceiverId = nameof(WrongEnvelopeReceiverId);
|
||||
public static readonly string EnvelopeOrReceiverNonexists = nameof(EnvelopeOrReceiverNonexists);
|
||||
public static readonly string PhoneNumberNonexists = nameof(PhoneNumberNonexists);
|
||||
public static readonly string Default = nameof(Default);
|
||||
}
|
||||
}
|
||||
@@ -3,7 +3,9 @@ using EnvelopeGenerator.Application.DTOs;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.MappingProfiles
|
||||
@@ -43,13 +45,20 @@ namespace EnvelopeGenerator.Application.MappingProfiles
|
||||
CreateMap<EnvelopeHistoryCreateDto, EnvelopeHistory>();
|
||||
CreateMap<EnvelopeReceiverDto, EnvelopeReceiver>();
|
||||
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
||||
CreateMap<ReceiverReadDto, Receiver>();
|
||||
CreateMap<ReceiverReadDto, Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
|
||||
CreateMap<ReceiverCreateDto, Receiver>();
|
||||
CreateMap<ReceiverUpdateDto, Receiver>();
|
||||
CreateMap<UserReceiverDto, UserReceiver>();
|
||||
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyCreateDto, EnvelopeReceiverReadOnly>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, EnvelopeReceiverReadOnly>();
|
||||
|
||||
// Messaging mappings
|
||||
// for GTX messaging
|
||||
CreateMap<GtxMessagingResponse, SmsResponse>()
|
||||
.ConstructUsing(gtxRes => gtxRes.Ok()
|
||||
? new SmsResponse() { Ok = true }
|
||||
: new SmsResponse() { Ok = false, Errors = gtxRes });
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -156,27 +156,63 @@
|
||||
<data name="Hello" xml:space="preserve">
|
||||
<value>Hallo</value>
|
||||
</data>
|
||||
<data name="LocakedOpen" xml:space="preserve">
|
||||
<value>Öffnen</value>
|
||||
<data name="HomePageDescription" xml:space="preserve">
|
||||
<value>Das digitale Unterschriftenportal ist eine Plattform, die entwickelt wurde, um Ihre Dokumente sicher zu unterschreiben und zu verwalten. Mit seiner benutzerfreundlichen Oberfläche können Sie Ihre Dokumente schnell hochladen, die Unterschriftsprozesse verfolgen und Ihre digitalen Unterschriftenanwendungen einfach durchführen. Dieses Portal beschleunigt Ihren Arbeitsablauf mit rechtlich gültigen Unterschriften und erhöht gleichzeitig die Sicherheit Ihrer Dokumente.</value>
|
||||
</data>
|
||||
<data name="LocationWarning" xml:space="preserve">
|
||||
<value>Bitte überprüfen Sie die Standortinformationen. Wenn sie falsch sind, korrigieren Sie diese bitte.</value>
|
||||
</data>
|
||||
<data name="LockedAccessCode" xml:space="preserve">
|
||||
<data name="LockedBodyAccess" xml:space="preserve">
|
||||
<value>Wir senden Ihnen nun einen Zugriffscode an Ihre hinterlegte Email-Adresse. Dies kann evtl. einige Minuten dauern!</value>
|
||||
</data>
|
||||
<data name="LockedBodyAuthenticator" xml:space="preserve">
|
||||
<value>Bitte geben Sie den in Ihrer Authenticator-App angegebenen TOTP-Code ein.</value>
|
||||
</data>
|
||||
<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>
|
||||
</data>
|
||||
<data name="LockedBodySms" xml:space="preserve">
|
||||
<value>Wir haben soeben den Zugangscode als SMS an die von Ihnen angegebene Telefonnummer gesendet.</value>
|
||||
</data>
|
||||
<data name="LockedCodeLabelAccess" xml:space="preserve">
|
||||
<value>Zugriffscode</value>
|
||||
</data>
|
||||
<data name="LockedBody" xml:space="preserve">
|
||||
<value>Wir haben Ihnen gerade den Zugriffscode an die hinterlegte Email Adresse gesendet. Dies kann evtl. einige Minuten dauern.</value>
|
||||
<data name="LockedCodeLabelAuthenticator" xml:space="preserve">
|
||||
<value>TOTP</value>
|
||||
</data>
|
||||
<data name="LockedFooterBody" 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>
|
||||
<data name="LockedCodeLabelSms" xml:space="preserve">
|
||||
<value>SMS-Code</value>
|
||||
</data>
|
||||
<data name="LockedFooterTitle" 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 <a class="mail-link" href="mailto:{0}?subject={1}&body={2}" target="_blank">{0}</a> bitten, Ihnen den Code auf anderem Wege zukommen zu lassen.</value>
|
||||
</data>
|
||||
<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>
|
||||
</data>
|
||||
<data name="LockedFooterBodySms" xml:space="preserve">
|
||||
<value>Sie können den Absender bitten, Ihre Rufnummer zu überprüfen. Die Telefonnummer muss mit der Ortsvorwahl eingegeben werden. Andernfalls können Sie beantragen, den Zwei-Faktor-Schutz zu entfernen.</value>
|
||||
</data>
|
||||
<data name="LockedFooterTitleAccess" xml:space="preserve">
|
||||
<value>Sie haben keinen Zugriffscode erhalten?</value>
|
||||
</data>
|
||||
<data name="LockedTitle" xml:space="preserve">
|
||||
<data name="LockedFooterTitleAuthenticator" xml:space="preserve">
|
||||
<value>Sie haben keinen QR-Code erhalten?</value>
|
||||
</data>
|
||||
<data name="LockedFooterTitleSms" xml:space="preserve">
|
||||
<value>Sie haben keine SMS erhalten?</value>
|
||||
</data>
|
||||
<data name="LockedTitleAccess" xml:space="preserve">
|
||||
<value>Dokument erfordert einen Zugriffscode</value>
|
||||
</data>
|
||||
<data name="LockedTitleAuthenticator" xml:space="preserve">
|
||||
<value>2-Faktor-Authentifizierung</value>
|
||||
</data>
|
||||
<data name="LockedTitleSms" xml:space="preserve">
|
||||
<value>2-Faktor-Authentifizierung</value>
|
||||
</data>
|
||||
<data name="Privacy" xml:space="preserve">
|
||||
<value>Datenschutz</value>
|
||||
</data>
|
||||
<data name="ReadOnlyMessage" xml:space="preserve">
|
||||
<value>Weitergeleitet von {0}. Gültig bis {1}.</value>
|
||||
</data>
|
||||
|
||||
@@ -156,27 +156,63 @@
|
||||
<data name="Hello" xml:space="preserve">
|
||||
<value>Hello</value>
|
||||
</data>
|
||||
<data name="LocakedOpen" xml:space="preserve">
|
||||
<value>Open</value>
|
||||
<data name="HomePageDescription" xml:space="preserve">
|
||||
<value>The Digital Signature Portal is a platform developed for securely signing and managing your documents. With its user-friendly interface, you can quickly upload your documents, track the signing processes, and easily carry out your digital signature applications. This portal accelerates your workflow with legally valid signatures while enhancing the security of your documents.</value>
|
||||
</data>
|
||||
<data name="LocationWarning" xml:space="preserve">
|
||||
<value>Please review the location information. If it is incorrect, kindly make the necessary corrections.</value>
|
||||
</data>
|
||||
<data name="LockedAccessCode" xml:space="preserve">
|
||||
<data name="LockedBodyAccess" xml:space="preserve">
|
||||
<value>We will now send you an access code to your registered e-mail address. This may take a few minutes!</value>
|
||||
</data>
|
||||
<data name="LockedBodyAuthenticator" xml:space="preserve">
|
||||
<value>Please enter the TOTP provided in your Authenticator app.</value>
|
||||
</data>
|
||||
<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>
|
||||
</data>
|
||||
<data name="LockedBodySms" xml:space="preserve">
|
||||
<value>We have just sent the access code as an SMS to the phone number you provided.</value>
|
||||
</data>
|
||||
<data name="LockedCodeLabelAccess" xml:space="preserve">
|
||||
<value>Access Code</value>
|
||||
</data>
|
||||
<data name="LockedBody" 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>
|
||||
<data name="LockedCodeLabelAuthenticator" xml:space="preserve">
|
||||
<value>TOTP</value>
|
||||
</data>
|
||||
<data name="LockedFooterBody" 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>
|
||||
<data name="LockedCodeLabelSms" xml:space="preserve">
|
||||
<value>SMS Code</value>
|
||||
</data>
|
||||
<data name="LockedFooterTitle" xml:space="preserve">
|
||||
<data name="LockedFooterBodyAccess" xml:space="preserve">
|
||||
<value>Please check your email inbox including the spam folder. You can also ask the sender <a class="mail-link" href="mailto:{0}?subject={1}&body={2}" target="_blank">{0}</a> to send you the code by other means.</value>
|
||||
</data>
|
||||
<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>
|
||||
</data>
|
||||
<data name="LockedFooterBodySms" xml:space="preserve">
|
||||
<value>You can ask the sender to check your phone number. The phone number must be entered with the area code. Otherwise you can request to remove the two-factor protection.</value>
|
||||
</data>
|
||||
<data name="LockedFooterTitleAccess" xml:space="preserve">
|
||||
<value>You have not received an access code?</value>
|
||||
</data>
|
||||
<data name="LockedTitle" xml:space="preserve">
|
||||
<data name="LockedFooterTitleAuthenticator" xml:space="preserve">
|
||||
<value>You have not received a QR code?</value>
|
||||
</data>
|
||||
<data name="LockedFooterTitleSms" xml:space="preserve">
|
||||
<value>You have not received an SMS?</value>
|
||||
</data>
|
||||
<data name="LockedTitleAccess" xml:space="preserve">
|
||||
<value>Document requires an access code</value>
|
||||
</data>
|
||||
<data name="LockedTitleAuthenticator" xml:space="preserve">
|
||||
<value>2-Factor Authentication</value>
|
||||
</data>
|
||||
<data name="LockedTitleSms" xml:space="preserve">
|
||||
<value>2-Factor Authentication</value>
|
||||
</data>
|
||||
<data name="Privacy" xml:space="preserve">
|
||||
<value>Privacy</value>
|
||||
</data>
|
||||
<data name="ReadOnlyMessage" xml:space="preserve">
|
||||
<value>Forwarded by {0}. Valid until {1}.</value>
|
||||
</data>
|
||||
|
||||
71
EnvelopeGenerator.Application/Services/Authenticator.cs
Normal file
71
EnvelopeGenerator.Application/Services/Authenticator.cs
Normal file
@@ -0,0 +1,71 @@
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using Microsoft.Extensions.Options;
|
||||
using OtpNet;
|
||||
using QRCoder;
|
||||
using System.Text;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
public class Authenticator : IAuthenticator
|
||||
{
|
||||
public static Lazy<Authenticator> LazyStatic => new(() => new Authenticator(Options.Create<AuthenticatorParams>(new()), new QRCodeGenerator()));
|
||||
|
||||
public static Authenticator Static => LazyStatic.Value;
|
||||
|
||||
private readonly AuthenticatorParams _params;
|
||||
|
||||
private readonly QRCodeGenerator _qrCodeGenerator;
|
||||
|
||||
public Authenticator(IOptions<AuthenticatorParams> options, QRCodeGenerator qrCodeGenerator)
|
||||
{
|
||||
_params = options.Value;
|
||||
_qrCodeGenerator = qrCodeGenerator;
|
||||
}
|
||||
|
||||
public string GenerateCode(int length)
|
||||
{
|
||||
//TODO: Inject Random as a singleton to support multithreading to improve performance.
|
||||
Random random = new();
|
||||
|
||||
if (length <= 0)
|
||||
throw new ArgumentException("Password length must be greater than 0.");
|
||||
|
||||
var passwordBuilder = new StringBuilder(length);
|
||||
|
||||
for (int i = 0; i < length; i++)
|
||||
passwordBuilder.Append(_params.CharPool[random.Next(_params.CharPool.Length)]);
|
||||
|
||||
return passwordBuilder.ToString();
|
||||
}
|
||||
|
||||
public string GenerateTotpSecretKey(int? length = null)
|
||||
=> Base32Encoding.ToString(KeyGeneration.GenerateRandomKey(length ?? _params.DefaultTotpSecretKeyLength));
|
||||
|
||||
public byte[] GenerateTotpQrCode(string userEmail, string secretKey, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null)
|
||||
{
|
||||
var url = string.Format(totpUrlFormat ?? _params.TotpUrlFormat,
|
||||
Uri.EscapeDataString(userEmail),
|
||||
Uri.EscapeDataString(secretKey),
|
||||
Uri.EscapeDataString(issuer ?? _params.TotpIssuer));
|
||||
using var qrCodeData = _qrCodeGenerator.CreateQrCode(url, QRCodeGenerator.ECCLevel.Q);
|
||||
using var qrCode = new BitmapByteQRCode(qrCodeData);
|
||||
return qrCode.GetGraphic(pixelsPerModule ?? _params.TotpQRPixelsPerModule);
|
||||
}
|
||||
|
||||
public byte[] GenerateTotpQrCode(string userEmail, int? length = null, string? issuer = null, string? totpUrlFormat = null, int? pixelsPerModule = null)
|
||||
{
|
||||
return GenerateTotpQrCode(
|
||||
userEmail: userEmail,
|
||||
secretKey: GenerateTotpSecretKey(length: length),
|
||||
issuer: issuer,
|
||||
totpUrlFormat: totpUrlFormat,
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -12,6 +12,8 @@ using static EnvelopeGenerator.Common.Constants;
|
||||
using EnvelopeGenerator.Extensions;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Application.Configurations;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
@@ -19,20 +21,22 @@ namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
private readonly IEmailTemplateService _tempService;
|
||||
private readonly IEnvelopeReceiverService _envRcvService;
|
||||
private readonly DispatcherConfig _dConfig;
|
||||
private readonly DispatcherParams _dConfig;
|
||||
private readonly IConfigService _configService;
|
||||
private readonly Dictionary<string, string> _placeholders;
|
||||
private readonly IAuthenticator _authenticator;
|
||||
|
||||
public EnvelopeMailService(IEmailOutRepository repository, IMapper mapper, IEmailTemplateService tempService, IEnvelopeReceiverService envelopeReceiverService, IOptions<DispatcherConfig> dispatcherConfigOptions, IConfigService configService, IOptions<MailConfig> mailConfig) : 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;
|
||||
_envRcvService = envelopeReceiverService;
|
||||
_dConfig = dispatcherConfigOptions.Value;
|
||||
_configService = configService;
|
||||
_placeholders = mailConfig.Value.Placeholders;
|
||||
_authenticator = authenticator;
|
||||
}
|
||||
|
||||
private async Task<Dictionary<string, string>> CreatePlaceholders(string? accessCode = null, EnvelopeReceiverDto? envelopeReceiverDto = null, EnvelopeReceiverReadOnlyDto? readOnlyDto = null)
|
||||
private async Task<Dictionary<string, string>> CreatePlaceholders(string? accessCode = null, EnvelopeReceiverDto? envelopeReceiverDto = null)
|
||||
{
|
||||
if (accessCode is not null)
|
||||
_placeholders["[DOCUMENT_ACCESS_CODE]"] = accessCode;
|
||||
@@ -63,10 +67,8 @@ namespace EnvelopeGenerator.Application.Services
|
||||
|
||||
return _placeholders;
|
||||
}
|
||||
|
||||
public async Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto dto) => await SendAsync(dto: dto, tempType: Constants.EmailTemplateType.DocumentAccessCodeReceived);
|
||||
|
||||
public async Task<DataResult<int>> SendAsync(EnvelopeReceiverDto dto, Constants.EmailTemplateType tempType)
|
||||
|
||||
public async Task<DataResult<int>> SendAsync(EnvelopeReceiverDto dto, EmailTemplateType tempType, Dictionary<string, object>? optionalPlaceholders = null)
|
||||
{
|
||||
var tempSerResult = await _tempService.ReadByNameAsync(tempType);
|
||||
if (tempSerResult.IsFailed)
|
||||
@@ -104,14 +106,19 @@ namespace EnvelopeGenerator.Application.Services
|
||||
|
||||
var placeholders = await CreatePlaceholders(accessCode: accessCode, envelopeReceiverDto: dto);
|
||||
|
||||
// Add optional place holders.
|
||||
if (optionalPlaceholders is not null)
|
||||
foreach (var oph in optionalPlaceholders)
|
||||
placeholders[oph.Key] = oph.Value.ToString() ?? "NULL";
|
||||
|
||||
//TODO: remove the requirement to add the models using reflections
|
||||
return await CreateWithTemplateAsync(createDto: mail,placeholders: placeholders,
|
||||
dto, dto.Envelope.User!, dto.Envelope);
|
||||
}
|
||||
|
||||
public async Task<DataResult<int>> SendAsync(EnvelopeReceiverReadOnlyDto dto)
|
||||
public async Task<DataResult<int>> SendAsync(EnvelopeReceiverReadOnlyDto dto, Dictionary<string, object>? optionalPlaceholders = null)
|
||||
{
|
||||
var tempSerResult = await _tempService.ReadByNameAsync(Constants.EmailTemplateType.DocumentShared);
|
||||
var tempSerResult = await _tempService.ReadByNameAsync(EmailTemplateType.DocumentShared);
|
||||
if (tempSerResult.IsFailed)
|
||||
return tempSerResult.ToFail<int>().Notice(LogLevel.Error, Flag.DataIntegrityIssue, $"The email cannot send because '{Constants.EmailTemplateType.DocumentShared}' template cannot found.");
|
||||
var temp = tempSerResult.Data;
|
||||
@@ -140,7 +147,29 @@ namespace EnvelopeGenerator.Application.Services
|
||||
|
||||
var placeholders = await CreatePlaceholders(readOnlyDto: dto);
|
||||
|
||||
// Add optional place holders.
|
||||
if (optionalPlaceholders is not null)
|
||||
foreach (var oph in optionalPlaceholders)
|
||||
placeholders[oph.Key] = oph.Value.ToString() ?? "NULL";
|
||||
|
||||
return await CreateWithTemplateAsync(createDto: mail, placeholders: placeholders, dto.Envelope);
|
||||
}
|
||||
|
||||
public async Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto dto) => await SendAsync(dto: dto, tempType: EmailTemplateType.DocumentAccessCodeReceived);
|
||||
|
||||
public Task<DataResult<int>> SendTFAQrCodeAsync(EnvelopeReceiverDto dto)
|
||||
{
|
||||
// Check if receiver or secret key is null
|
||||
if (dto.Receiver is null)
|
||||
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)
|
||||
throw new ArgumentNullException(nameof(dto), $"TFA Qr Code cannot sent. Receiver.TotpSecretKey is null. Envelope receiver dto is {JsonConvert.SerializeObject(dto)}");
|
||||
|
||||
var totp_qr_64 = _authenticator.GenerateTotpQrCode(userEmail: dto.Receiver.EmailAddress, secretKey: dto.Receiver.TotpSecretkey).ToBase64String();
|
||||
return SendAsync(dto, EmailTemplateType.TotpSecret, new()
|
||||
{
|
||||
{"[TFA_QR_CODE]", totp_qr_64 },
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,6 +9,7 @@ using EnvelopeGenerator.Infrastructure.Contracts;
|
||||
using Microsoft.Extensions.Localization;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using EnvelopeGenerator.Extensions;
|
||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
@@ -16,33 +17,36 @@ namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
private readonly IStringLocalizer<Resource> _localizer;
|
||||
|
||||
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper)
|
||||
private readonly ISmsSender _smsSender;
|
||||
|
||||
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, ISmsSender smsSender)
|
||||
: base(repository, mapper)
|
||||
{
|
||||
_localizer = localizer;
|
||||
_smsSender = smsSender;
|
||||
}
|
||||
|
||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true)
|
||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true)
|
||||
{
|
||||
var env_rcvs = await _repository.ReadBySignatureAsync(signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver);
|
||||
var env_rcvs = await _repository.ReadBySignatureAsync(signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly);
|
||||
return Result.Success(_mapper.Map<IEnumerable<EnvelopeReceiverDto>>(env_rcvs));
|
||||
}
|
||||
|
||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false)
|
||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true)
|
||||
{
|
||||
var env_rcvs = await _repository.ReadByUuidAsync(uuid: uuid, withEnvelope: withEnvelope, withReceiver: withReceiver);
|
||||
var env_rcvs = await _repository.ReadByUuidAsync(uuid: uuid, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly);
|
||||
return Result.Success(_mapper.Map<IEnumerable<EnvelopeReceiverDto>>(env_rcvs));
|
||||
}
|
||||
|
||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverSecretDto>>> ReadSecretByUuidAsync(string uuid, bool withEnvelope = false, bool withReceiver = true)
|
||||
public async Task<DataResult<IEnumerable<string?>>> ReadAccessCodeByUuidAsync(string uuid, bool withEnvelope = false, bool withReceiver = true)
|
||||
{
|
||||
var env_rcvs = await _repository.ReadByUuidAsync(uuid: uuid, withEnvelope: withEnvelope, withReceiver: withReceiver);
|
||||
return Result.Success(_mapper.Map<IEnumerable<EnvelopeReceiverSecretDto>>(env_rcvs));
|
||||
return Result.Success(env_rcvs.Select(er => er.AccessCode));
|
||||
}
|
||||
|
||||
public async Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true)
|
||||
public async Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true)
|
||||
{
|
||||
var env_rcv = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver);
|
||||
var env_rcv = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly);
|
||||
if (env_rcv is null)
|
||||
return Result.Fail<EnvelopeReceiverDto>()
|
||||
.Message(Key.EnvelopeReceiverNotFound);
|
||||
@@ -50,7 +54,17 @@ namespace EnvelopeGenerator.Application.Services
|
||||
return Result.Success(_mapper.Map<EnvelopeReceiverDto>(env_rcv));
|
||||
}
|
||||
|
||||
public async Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true)
|
||||
public async Task<DataResult<EnvelopeReceiverSecretDto>> ReadWithSecretByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true)
|
||||
{
|
||||
var env_rcv = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly);
|
||||
if (env_rcv is null)
|
||||
return Result.Fail<EnvelopeReceiverSecretDto>()
|
||||
.Message(Key.EnvelopeReceiverNotFound);
|
||||
|
||||
return Result.Success(_mapper.Map<EnvelopeReceiverSecretDto>(env_rcv));
|
||||
}
|
||||
|
||||
public async Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true)
|
||||
{
|
||||
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
|
||||
|
||||
@@ -61,7 +75,7 @@ namespace EnvelopeGenerator.Application.Services
|
||||
.Notice(LogLevel.Warning, EnvelopeFlag.WrongEnvelopeReceiverId)
|
||||
.Notice(LogLevel.Warning, Flag.PossibleSecurityBreach);
|
||||
|
||||
return await ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver);
|
||||
return await ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly);
|
||||
}
|
||||
|
||||
public async Task<DataResult<bool>> VerifyAccessCodeAsync(string uuid, string signature, string accessCode)
|
||||
@@ -135,5 +149,31 @@ namespace EnvelopeGenerator.Application.Services
|
||||
var er = await _repository.ReadLastByReceiver(mail);
|
||||
return er is null ? Result.Fail<string?>().Notice(LogLevel.None, Flag.NotFound) : Result.Success(er.Name);
|
||||
}
|
||||
|
||||
public async Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message)
|
||||
{
|
||||
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
|
||||
|
||||
if (uuid is null || signature is null)
|
||||
return Result.Fail<SmsResponse>()
|
||||
.Message(_localizer[Key.WrongEnvelopeReceiverId])
|
||||
.Notice(LogLevel.Warning, (uuid, signature).ToTitle())
|
||||
.Notice(LogLevel.Warning, EnvelopeFlag.WrongEnvelopeReceiverId)
|
||||
.Notice(LogLevel.Warning, Flag.PossibleSecurityBreach);
|
||||
|
||||
var env_rcv = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: false, withReceiver: false);
|
||||
if (env_rcv is null)
|
||||
return Result.Fail<SmsResponse>()
|
||||
.Message(Key.EnvelopeReceiverNotFound);
|
||||
|
||||
if (env_rcv.PhoneNumber is null)
|
||||
return Result.Fail<SmsResponse>()
|
||||
.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}.");
|
||||
|
||||
var res = await _smsSender.SendSmsAsync(recipient: env_rcv.PhoneNumber, message: message);
|
||||
|
||||
return Result.Success(res);
|
||||
}
|
||||
}
|
||||
}
|
||||
54
EnvelopeGenerator.Application/Services/EnvelopeSmsHandler.cs
Normal file
54
EnvelopeGenerator.Application/Services/EnvelopeSmsHandler.cs
Normal 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);
|
||||
}
|
||||
40
EnvelopeGenerator.Application/Services/GTXSmsSender.cs
Normal file
40
EnvelopeGenerator.Application/Services/GTXSmsSender.cs
Normal 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>);
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,8 @@ using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Infrastructure.Contracts;
|
||||
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||
using DigitalData.Core.DTO;
|
||||
using DigitalData.Core.Abstractions;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services
|
||||
{
|
||||
@@ -34,5 +36,17 @@ namespace EnvelopeGenerator.Application.Services
|
||||
|
||||
return await _repository.DeleteAsync(rcv) ? Result.Success() : Result.Fail();
|
||||
}
|
||||
|
||||
public virtual async Task<Result> UpdateAsync<TUpdateDto>(TUpdateDto updateDto) where TUpdateDto : IUnique<int>
|
||||
{
|
||||
var val = await _repository.ReadByIdAsync(updateDto.Id);
|
||||
if (val == null)
|
||||
{
|
||||
return Result.Fail().Notice(LogLevel.Warning, Flag.NotFound, $"{updateDto.Id} is not found in update process of {GetType()} entity.");
|
||||
}
|
||||
|
||||
var entity = _mapper.Map(updateDto, val);
|
||||
return (await _repository.UpdateAsync(entity)) ? Result.Success() : Result.Fail();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -77,8 +77,9 @@
|
||||
End Enum
|
||||
|
||||
Public Enum CertificationType
|
||||
ElectronicSignature = 1
|
||||
QualifiedSignature = 2
|
||||
AdvancedElectronicSignature = 1
|
||||
'ElectronicSignature = 1
|
||||
'QualifiedSignature = 2
|
||||
End Enum
|
||||
|
||||
Public Enum FinalEmailType
|
||||
@@ -99,6 +100,7 @@
|
||||
DocumentCompleted
|
||||
DocumentAccessCodeReceived
|
||||
DocumentShared
|
||||
TotpSecret
|
||||
End Enum
|
||||
|
||||
Public Enum EncodeType
|
||||
@@ -108,7 +110,13 @@
|
||||
DocumentForwarded
|
||||
DocumentShared
|
||||
End Enum
|
||||
#End Region
|
||||
|
||||
#Region "Role"
|
||||
Public NotInheritable Class ReceiverRole
|
||||
Public Const PreAuth As String = "PreAuth"
|
||||
Public Const FullyAuth As String = "FullyAuth"
|
||||
End Class
|
||||
#End Region
|
||||
|
||||
#Region "Constants"
|
||||
|
||||
@@ -3,13 +3,7 @@
|
||||
Public Property DocumentPathOrigin As String = ""
|
||||
Public Property DocumentPath As String = ""
|
||||
Public Property ExportPath As String = ""
|
||||
Public Property DocumentPath_DMZ As String = ""
|
||||
Public Property ExportPath_DMZ As String = ""
|
||||
Public Property DOCUMENT_PATH_MOVE_AFTSEND As String = ""
|
||||
Public Property FINISHED_PATH_EX_DMZ As String = ""
|
||||
Public Property EML_PATH_EX_DMZ As String = ""
|
||||
Public Property SendingProfile As Integer = 0
|
||||
Public Property SignatureHost As String = ""
|
||||
Public Property NetUse_necessary As Boolean = False
|
||||
Public Property NetUse_Finish As Boolean = False
|
||||
Public Property Default_TFA_Enabled As Boolean = False
|
||||
End Class
|
||||
|
||||
@@ -8,8 +8,8 @@
|
||||
Public Property Uuid As String = Guid.NewGuid.ToString()
|
||||
Public Property UseAccessCode As Boolean = False
|
||||
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 FirstReminderDays As Integer = 0
|
||||
Public Property ReminderIntervalDays As Integer = 0
|
||||
|
||||
@@ -75,6 +75,7 @@ Public Class EnvelopeReceiver
|
||||
Public Property Sequence As Integer = 0
|
||||
Public Property PrivateMessage As String = ""
|
||||
Public Property AccessCode As String = ""
|
||||
Public Property PhoneNumber As String = ""
|
||||
|
||||
Public Function GetSignature() As String
|
||||
Return StringEx.GetChecksum(Email.ToUpper)
|
||||
|
||||
@@ -6,7 +6,8 @@
|
||||
Public Property ContractType As Integer ' Unbenutzt
|
||||
|
||||
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 FirstReminderDays As Integer = 0
|
||||
Public Property ReminderIntervalDays As Integer = 0
|
||||
|
||||
@@ -77,8 +77,8 @@
|
||||
<Reference Include="DigitalData.Modules.Logging">
|
||||
<HintPath>..\..\2_DLL Projekte\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.2.89.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.2.89\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
<Reference Include="GdPicture.NET.14, Version=14.2.90.0, Culture=neutral, PublicKeyToken=f52a2e60ad468dbb, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\GdPicture.14.2.90\lib\net462\GdPicture.NET.14.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=2.1.1.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
@@ -260,11 +260,13 @@
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Model.en.Designer.vb</LastGenOutput>
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="Strings\Model.resx">
|
||||
<CustomToolNamespace>My.Resources</CustomToolNamespace>
|
||||
<Generator>PublicResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Model.Designer.vb</LastGenOutput>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
@@ -289,11 +291,11 @@
|
||||
</ItemGroup>
|
||||
<ItemGroup />
|
||||
<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">
|
||||
<PropertyGroup>
|
||||
<ErrorText>Dieses Projekt verweist auf mindestens ein NuGet-Paket, das auf diesem Computer fehlt. Verwenden Sie die Wiederherstellung von NuGet-Paketen, um die fehlenden Dateien herunterzuladen. Weitere Informationen finden Sie unter "http://go.microsoft.com/fwlink/?LinkID=322105". Die fehlende Datei ist "{0}".</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\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>
|
||||
</Project>
|
||||
@@ -82,49 +82,14 @@ Namespace Jobs
|
||||
|
||||
Logger.Debug("Loading ReportCreator..")
|
||||
ReportCreator = New ReportCreator(LogConfig, oState)
|
||||
Logger.Debug("My.Settings.RuninDMZ: [{0}]", My.Settings.RuninDMZ.ToString)
|
||||
Logger.Debug("My.Settings.NetUse_Usr: [{0}]", My.Settings.NetUse_Usr)
|
||||
|
||||
Config.DocumentPath = Config.DocumentPath
|
||||
|
||||
If My.Settings.RuninDMZ = True Then
|
||||
If Config.DocumentPath_DMZ <> String.Empty Then
|
||||
Logger.Debug("RuninDMZ - Using DocumentPath_DMZ: [{0}] - Overwrite Document-Path", Config.DocumentPath_DMZ)
|
||||
Config.DocumentPath = Config.DocumentPath_DMZ
|
||||
Config.NetUse_necessary = True
|
||||
Else
|
||||
Config.DocumentPath = Config.DocumentPath
|
||||
End If
|
||||
Else
|
||||
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||
Logger.Debug("Using DMZRemotePath: [{0}] - Overwrite Document-Path ...", Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Config.DocumentPath = Config.DOCUMENT_PATH_MOVE_AFTSEND
|
||||
Config.NetUse_Finish = True
|
||||
|
||||
Else
|
||||
Config.DocumentPath = Config.DocumentPath
|
||||
End If
|
||||
End If
|
||||
Logger.Debug("DocumentPath: [{0}]", Config.DocumentPath)
|
||||
|
||||
If My.Settings.RuninDMZ = True Then
|
||||
If Config.FINISHED_PATH_EX_DMZ <> String.Empty Then
|
||||
Logger.Debug("RuninDMZ - FINISHED_PATH_EX_DMZ configured: [{0}]", Config.FINISHED_PATH_EX_DMZ)
|
||||
Config.NetUse_Finish = True
|
||||
End If
|
||||
If Config.ExportPath_DMZ <> String.Empty Then
|
||||
Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
|
||||
Config.ExportPath = Config.ExportPath_DMZ
|
||||
End If
|
||||
End If
|
||||
|
||||
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
|
||||
|
||||
If Config.NetUse_Finish = True Then
|
||||
If NetUse_Command(Config.DocumentPath, My.Settings.NetUse_Usr, My.Settings.NetUse_PW) = True Then
|
||||
Logger.Debug("NetUse_Finish = successful!")
|
||||
End If
|
||||
End If
|
||||
|
||||
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
|
||||
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTime} ORDER BY GUID"
|
||||
Dim oTable = Database.GetDatatable(oSql)
|
||||
@@ -157,10 +122,6 @@ Namespace Jobs
|
||||
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
|
||||
Throw New ArgumentNullException("EnvelopeData")
|
||||
End If
|
||||
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||
oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!")
|
||||
End If
|
||||
Logger.Debug("Burning Annotations to pdf ...")
|
||||
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
|
||||
If oBurnedDocument Is Nothing Then
|
||||
@@ -196,13 +157,6 @@ Namespace Jobs
|
||||
Throw New ExportDocumentException("Could not export final document to disk!", ex)
|
||||
End Try
|
||||
|
||||
If Config.NetUse_Finish = True Then
|
||||
If Config.FINISHED_PATH_EX_DMZ <> String.Empty Then
|
||||
If My.Settings.NetUse_PW <> String.Empty And My.Settings.NetUse_Usr <> String.Empty Then
|
||||
Clean_DNZ_PAth(Config.FINISHED_PATH_EX_DMZ)
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
Logger.Info("Writing EB-bytes to database...")
|
||||
Update_File_DB(oOutputFilePath, oEnvelope.Id)
|
||||
|
||||
@@ -287,48 +241,48 @@ Namespace Jobs
|
||||
data = br.ReadBytes(CInt(numBytes))
|
||||
Return data
|
||||
End Function
|
||||
Private Function NetUse_Command(pDestinationPath As String, pUsername As String, pPassword As String)
|
||||
Dim oDectryptedPW = Helpers.Decrypt(My.Settings.NetUse_PW)
|
||||
Dim netUseCommand As String = $"net use {pDestinationPath} /user:{pUsername} {oDectryptedPW}"
|
||||
Logger.Debug("EXECUTING NetUse_Command for " & pDestinationPath)
|
||||
Dim processInfo As New ProcessStartInfo("cmd.exe", $"/C {netUseCommand}")
|
||||
processInfo.RedirectStandardOutput = True
|
||||
processInfo.UseShellExecute = False
|
||||
processInfo.CreateNoWindow = True
|
||||
'Private Function NetUse_Command(pDestinationPath As String, pUsername As String, pPassword As String)
|
||||
' Dim oDectryptedPW = Helpers.Decrypt(My.Settings.NetUse_PW)
|
||||
' Dim netUseCommand As String = $"net use {pDestinationPath} /user:{pUsername} {oDectryptedPW}"
|
||||
' Logger.Debug("EXECUTING NetUse_Command for " & pDestinationPath)
|
||||
' Dim processInfo As New ProcessStartInfo("cmd.exe", $"/C {netUseCommand}")
|
||||
' processInfo.RedirectStandardOutput = True
|
||||
' processInfo.UseShellExecute = False
|
||||
' processInfo.CreateNoWindow = True
|
||||
|
||||
Using process As Process = Process.Start(processInfo)
|
||||
process.WaitForExit()
|
||||
' Using process As Process = Process.Start(processInfo)
|
||||
' process.WaitForExit()
|
||||
|
||||
' Prüfe den Rückgabewert des net use Befehls
|
||||
If process.ExitCode = 0 Then
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
End Using
|
||||
End Function
|
||||
' ' Prüfe den Rückgabewert des net use Befehls
|
||||
' If process.ExitCode = 0 Then
|
||||
' Return True
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' End Using
|
||||
'End Function
|
||||
|
||||
Private Function Clean_DNZ_PAth(pSourcePath As String) As Boolean
|
||||
Dim oFilename = System.IO.Path.GetFileName(pSourcePath)
|
||||
'Private Function Clean_DNZ_PAth(pSourcePath As String) As Boolean
|
||||
' Dim oFilename = System.IO.Path.GetFileName(pSourcePath)
|
||||
|
||||
Logger.Debug("## Starting Clean_DNZ_PAth ...")
|
||||
Logger.Debug("## pSourcePath {0}", pSourcePath)
|
||||
' Logger.Debug("## Starting Clean_DNZ_PAth ...")
|
||||
' Logger.Debug("## pSourcePath {0}", pSourcePath)
|
||||
|
||||
Dim oDirectorySource = Path.Combine(pSourcePath, ParentFolderUID)
|
||||
' Dim oDirectorySource = Path.Combine(pSourcePath, ParentFolderUID)
|
||||
|
||||
Try
|
||||
Logger.Debug($"Deleting oDirectorySource {oDirectorySource} ...")
|
||||
Directory.Delete(oDirectorySource, True)
|
||||
Console.WriteLine($"Folder successfully deleted!")
|
||||
Logger.Debug($"...Deleted!")
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
' Try
|
||||
' Logger.Debug($"Deleting oDirectorySource {oDirectorySource} ...")
|
||||
' Directory.Delete(oDirectorySource, True)
|
||||
' Console.WriteLine($"Folder successfully deleted!")
|
||||
' Logger.Debug($"...Deleted!")
|
||||
' Return True
|
||||
' Catch ex As Exception
|
||||
' Logger.Error(ex)
|
||||
' Return False
|
||||
' End Try
|
||||
|
||||
|
||||
End Function
|
||||
'End Function
|
||||
Private Function SendFinalEmails(pEnvelope As Envelope) As Boolean ', pAttachment As String
|
||||
Dim oMailToCreator = pEnvelope.FinalEmailToCreator
|
||||
Dim oMailToReceivers = pEnvelope.FinalEmailToReceivers
|
||||
@@ -398,15 +352,7 @@ Namespace Jobs
|
||||
Dim oAnnotations = pEnvelopeData.AnnotationData
|
||||
Dim oInputPath = ""
|
||||
If IsNothing(pEnvelopeData.DocAsByte) Then
|
||||
If My.Settings.RuninDMZ Then
|
||||
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
||||
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
|
||||
ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
|
||||
Logger.Debug("Replacing Path in pData.DocumentPath ...")
|
||||
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
|
||||
Else
|
||||
oInputPath = pEnvelopeData.DocumentPath
|
||||
End If
|
||||
oInputPath = pEnvelopeData.DocumentPath
|
||||
Logger.Info($"Input path: [{oInputPath}]")
|
||||
Else
|
||||
Logger.Info($"we got bytes..")
|
||||
|
||||
@@ -16,17 +16,13 @@ Public Class ConfigModel
|
||||
Dim oRow As DataRow = oTable.Rows.Item(0)
|
||||
|
||||
Return New DbConfig() With {
|
||||
.DocumentPath = oRow.ItemEx("DOCUMENT_PATH", ""),
|
||||
.DocumentPathOrigin = oRow.ItemEx("DOCUMENT_PATH", ""),
|
||||
.DocumentPath_DMZ = oRow.ItemEx("DOCUMENT_PATH_DMZ", ""),
|
||||
.ExportPath = oRow.ItemEx("EXPORT_PATH", ""),
|
||||
.ExportPath_DMZ = oRow.ItemEx("EXPORT_PATH_DMZ", ""),
|
||||
.SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0),
|
||||
.SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""),
|
||||
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", ""),
|
||||
.DOCUMENT_PATH_MOVE_AFTSEND = oRow.ItemEx("DOCUMENT_PATH_MOVE_AFTSEND", ""),
|
||||
.FINISHED_PATH_EX_DMZ = oRow.ItemEx("FINISHED_PATH_EX_DMZ", ""),
|
||||
.EML_PATH_EX_DMZ = oRow.ItemEx("EML_PATH_EX_DMZ", "")
|
||||
.DocumentPath = oRow.ItemEx("DOCUMENT_PATH", ""),
|
||||
.DocumentPathOrigin = oRow.ItemEx("DOCUMENT_PATH", ""),
|
||||
.ExportPath = oRow.ItemEx("EXPORT_PATH", ""),
|
||||
.SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0),
|
||||
.SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""),
|
||||
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", ""),
|
||||
.Default_TFA_Enabled = oRow.ItemEx("DEF_TFA_ENABLED", False)
|
||||
}
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
|
||||
@@ -2,6 +2,7 @@
|
||||
Imports System.Web.UI.WebControls
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
|
||||
Public Class EnvelopeModel
|
||||
Inherits BaseModel
|
||||
@@ -34,7 +35,7 @@ Public Class EnvelopeModel
|
||||
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
|
||||
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
|
||||
.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(),
|
||||
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_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),
|
||||
.UseAccessCode = pRow.ItemEx("USE_ACCESS_CODE", False),
|
||||
.FinalEmailToCreator = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", Constants.FinalEmailType.No.ToString())),
|
||||
.FinalEmailToReceivers = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", Constants.FinalEmailType.No.ToString()))
|
||||
.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")
|
||||
If Not IsDBNull(oDOC_RESULT) Then
|
||||
@@ -142,13 +144,17 @@ Public Class EnvelopeModel
|
||||
|
||||
Public Function Insert(pEnvelope As Envelope) As Boolean
|
||||
Try
|
||||
Dim oSql = "INSERT INTO [dbo].[TBSIG_ENVELOPE] (MESSAGE, ENVELOPE_UUID, STATUS, USER_ID) "
|
||||
oSql += " VALUES (@MESSAGE, @UUID, @STATUS, @USER_ID)"
|
||||
Dim oSql = $"INSERT INTO [dbo].[TBSIG_ENVELOPE] (MESSAGE, ENVELOPE_UUID, STATUS, USER_ID)
|
||||
VALUES('',
|
||||
'{pEnvelope.Uuid}',
|
||||
'{CInt([Enum].Parse(GetType(EnvelopeStatus), Constants.EnvelopeStatus.EnvelopeCreated))}',
|
||||
'{pEnvelope.UserId}')"
|
||||
Dim oCommand As New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
|
||||
oCommand.Parameters.Add("UUID", SqlDbType.NVarChar).Value = pEnvelope.Uuid
|
||||
oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = Constants.EnvelopeStatus.EnvelopeCreated
|
||||
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId
|
||||
'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = String.Empty
|
||||
'oCommand.Parameters.Add("UUID", SqlDbType.NVarChar).Value = pEnvelope.Uuid
|
||||
'oCommand.Parameters.Add("STATUS", SqlDbType.Int).Value = Constants.EnvelopeStatus.EnvelopeCreated
|
||||
'oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pEnvelope.UserId
|
||||
|
||||
|
||||
If Database.ExecuteNonQuery(oCommand) Then
|
||||
pEnvelope.Id = GetEnvelopeId(pEnvelope)
|
||||
@@ -182,9 +188,11 @@ Public Class EnvelopeModel
|
||||
oSql += " [REMINDER_INTERVAL_DAYS] = @REMINDER_INTERVAL_DAYS, "
|
||||
oSql += " [SEND_REMINDER_EMAILS] = @SEND_REMINDER_EMAILS, "
|
||||
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"
|
||||
|
||||
|
||||
Dim oCommand As New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("ID", SqlDbType.Int).Value = pEnvelope.Id
|
||||
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("SEND_REMINDER_EMAILS", SqlDbType.Bit).Value = pEnvelope.SendReminderEmails
|
||||
oCommand.Parameters.Add("USE_ACCESS_CODE", SqlDbType.Bit).Value = pEnvelope.UseAccessCode
|
||||
|
||||
oCommand.Parameters.Add("TFA_ENABLED", SqlDbType.Bit).Value = pEnvelope.TFA_Enabled
|
||||
Return Database.ExecuteNonQuery(oCommand, pTransaction)
|
||||
|
||||
Catch ex As Exception
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
Imports DigitalData.Modules.Base
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
|
||||
Public Class EnvelopeTypeModel
|
||||
Inherits BaseModel
|
||||
@@ -21,7 +22,8 @@ Public Class EnvelopeTypeModel
|
||||
.FinalEmailToCreator = pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", 0),
|
||||
.FinalEmailToReceivers = pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", 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
|
||||
|
||||
|
||||
@@ -33,7 +33,8 @@ Public Class ReceiverModel
|
||||
.Status = ReceiverSignedStatus,
|
||||
.ColorType = DirectCast(pColorIndex + 1, ColorType),
|
||||
.AccessCode = pRow.ItemEx("ACCESS_CODE", ""),
|
||||
.SignedDate = SignedDate
|
||||
.SignedDate = SignedDate,
|
||||
.PhoneNumber = pRow.ItemEx("PHONE_NUMBER", "")
|
||||
}
|
||||
End Function
|
||||
|
||||
@@ -56,25 +57,29 @@ Public Class ReceiverModel
|
||||
|
||||
Public Function Insert(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
|
||||
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]
|
||||
,[SIGNATURE])
|
||||
VALUES
|
||||
(@EMAIL
|
||||
,@SIGNATURE)"
|
||||
('{pReceiver.Email}'
|
||||
,'{pReceiver.GetSignature()}')"
|
||||
|
||||
Dim oCommand = New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("EMAIL", SqlDbType.NVarChar).Value = pReceiver.Email
|
||||
oCommand.Parameters.Add("SIGNATURE", SqlDbType.NVarChar).Value = pReceiver.GetSignature()
|
||||
|
||||
Dim oResult = Database.ExecuteNonQuery(oCommand)
|
||||
If oResult = True Then
|
||||
pReceiver.Id = GetReceiverIdByEmail(pReceiver.Email, pTransaction)
|
||||
Dim oCommand = New SqlCommand(oSql)
|
||||
Dim oResult = Database.ExecuteNonQuery(oCommand)
|
||||
If oResult = True Then
|
||||
pReceiver.Id = GetReceiverIdByEmail(pReceiver.Email, pTransaction)
|
||||
Return True
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Else
|
||||
Return False
|
||||
Logger.Warn($"Receiver [{pReceiver.Email}] already existing! Check collecting not existing Receivers!")
|
||||
Return True
|
||||
End If
|
||||
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
@@ -83,18 +88,18 @@ Public Class ReceiverModel
|
||||
|
||||
Public Function Update(pReceiver As EnvelopeReceiver, pTransaction As SqlTransaction) As Boolean
|
||||
Try
|
||||
Dim oSql As String = "UPDATE [dbo].[TBSIG_USER_RECEIVER]
|
||||
SET [NAME] = @NAME
|
||||
,[COMPANY_NAME] = @COMPANY
|
||||
,[JOB_TITLE] = @JOB
|
||||
WHERE RECEIVER_ID = @RECEIVER_ID"
|
||||
Dim oSql As String = $"UPDATE [dbo].[TBSIG_USER_RECEIVER]
|
||||
SET [NAME] = '{pReceiver.Name}'
|
||||
,[COMPANY_NAME] = '{pReceiver.Company}'
|
||||
,[JOB_TITLE] = '{pReceiver.JobTitle}'
|
||||
WHERE RECEIVER_ID = {pReceiver.Id}"
|
||||
|
||||
Dim oCommand = New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name
|
||||
oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company
|
||||
oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle
|
||||
oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.Int).Value = pReceiver.Id
|
||||
oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pReceiver.Id
|
||||
'oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name
|
||||
'oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company
|
||||
'oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle
|
||||
'oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.Int).Value = pReceiver.Id
|
||||
'oCommand.Parameters.Add("USER_ID", SqlDbType.Int).Value = pReceiver.Id
|
||||
|
||||
Return Database.ExecuteNonQuery(oCommand, pTransaction)
|
||||
Catch ex As Exception
|
||||
@@ -113,7 +118,7 @@ Public Class ReceiverModel
|
||||
End Function
|
||||
|
||||
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]
|
||||
,[RECEIVER_ID]
|
||||
,[PRIVATE_MESSAGE]
|
||||
@@ -121,26 +126,28 @@ Public Class ReceiverModel
|
||||
,[NAME]
|
||||
,[JOB_TITLE]
|
||||
,[COMPANY_NAME]
|
||||
,[SEQUENCE])
|
||||
,[SEQUENCE]
|
||||
,[PHONE_NUMBER])
|
||||
VALUES
|
||||
(@ENVELOPE_ID
|
||||
,@RECEIVER_ID
|
||||
,@MESSAGE
|
||||
,@ACCESS_CODE
|
||||
,@NAME
|
||||
,@JOB
|
||||
,@COMPANY
|
||||
,@SEQUENCE)"
|
||||
('{pEnvelope.Id}'
|
||||
,'{pReceiver.Id}'
|
||||
,'{pReceiver.PrivateMessage}'
|
||||
,'{pReceiver.AccessCode}'
|
||||
,'{pReceiver.Name}'
|
||||
,'{pReceiver.JobTitle}'
|
||||
,'{pReceiver.Company}'
|
||||
,'{pReceiver.Sequence}'
|
||||
,'{pReceiver.PhoneNumber}')"
|
||||
|
||||
Dim oCommand As New SqlCommand(oSql)
|
||||
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.NVarChar).Value = pEnvelope.Id
|
||||
oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.NVarChar).Value = pReceiver.Id
|
||||
oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = pReceiver.PrivateMessage
|
||||
oCommand.Parameters.Add("ACCESS_CODE", SqlDbType.NVarChar).Value = pReceiver.AccessCode
|
||||
oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name
|
||||
oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle
|
||||
oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company
|
||||
oCommand.Parameters.Add("SEQUENCE", SqlDbType.NVarChar).Value = pReceiver.Sequence
|
||||
'oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.NVarChar).Value = pEnvelope.Id
|
||||
'oCommand.Parameters.Add("RECEIVER_ID", SqlDbType.NVarChar).Value = pReceiver.Id
|
||||
'oCommand.Parameters.Add("MESSAGE", SqlDbType.NVarChar).Value = pReceiver.PrivateMessage
|
||||
'oCommand.Parameters.Add("ACCESS_CODE", SqlDbType.NVarChar).Value = pReceiver.AccessCode
|
||||
'oCommand.Parameters.Add("NAME", SqlDbType.NVarChar).Value = pReceiver.Name
|
||||
'oCommand.Parameters.Add("JOB", SqlDbType.NVarChar).Value = pReceiver.JobTitle
|
||||
'oCommand.Parameters.Add("COMPANY", SqlDbType.NVarChar).Value = pReceiver.Company
|
||||
'oCommand.Parameters.Add("SEQUENCE", SqlDbType.NVarChar).Value = pReceiver.Sequence
|
||||
|
||||
Return Database.ExecuteNonQuery(oCommand, pTransaction)
|
||||
End Function
|
||||
@@ -266,6 +273,22 @@ Public Class ReceiverModel
|
||||
Return String.Empty
|
||||
End Try
|
||||
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
|
||||
Try
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' indem Sie "*" wie unten gezeigt eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.9.3.0")>
|
||||
<Assembly: AssemblyFileVersion("1.9.3.0")>
|
||||
<Assembly: AssemblyVersion("2.2.0.0")>
|
||||
<Assembly: AssemblyFileVersion("2.2.0.0")>
|
||||
|
||||
@@ -15,7 +15,7 @@ Option Explicit On
|
||||
Namespace My
|
||||
|
||||
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
|
||||
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.9.0.0"), _
|
||||
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
|
||||
Partial Friend NotInheritable Class MySettings
|
||||
Inherits Global.System.Configuration.ApplicationSettingsBase
|
||||
@@ -53,33 +53,6 @@ Namespace My
|
||||
Return defaultInstance
|
||||
End Get
|
||||
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
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("dd-gan\Administrator")> _
|
||||
Public ReadOnly Property NetUse_Usr() As String
|
||||
Get
|
||||
Return CType(Me("NetUse_Usr"),String)
|
||||
End Get
|
||||
End Property
|
||||
|
||||
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
|
||||
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
|
||||
Global.System.Configuration.DefaultSettingValueAttribute("sY4vnATDXwosbTJGip6SqA==")> _
|
||||
Public ReadOnly Property NetUse_PW() As String
|
||||
Get
|
||||
Return CType(Me("NetUse_PW"),String)
|
||||
End Get
|
||||
End Property
|
||||
End Class
|
||||
End Namespace
|
||||
|
||||
|
||||
@@ -1,15 +1,5 @@
|
||||
<?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 />
|
||||
<Settings>
|
||||
<Setting Name="RuninDMZ" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
<Setting Name="NetUse_Usr" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">dd-gan\Administrator</Value>
|
||||
</Setting>
|
||||
<Setting Name="NetUse_PW" Type="System.String" Scope="Application">
|
||||
<Value Profile="(Default)">sY4vnATDXwosbTJGip6SqA==</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -45,7 +45,7 @@ Public Class ActionService
|
||||
Return oSendResult
|
||||
End Function
|
||||
Public Function ResendReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||
EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
|
||||
Return EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</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">
|
||||
<value>Do you really want to delete this envelope?</value>
|
||||
</data>
|
||||
@@ -141,6 +144,12 @@
|
||||
<data name="Document forwarded" xml:space="preserve">
|
||||
<value>Document forwarded to receiver: {0}</value>
|
||||
</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">
|
||||
<value>Edit Envelope</value>
|
||||
</data>
|
||||
@@ -168,6 +177,12 @@
|
||||
<data name="Envelope-Editor" xml:space="preserve">
|
||||
<value>Envelope-Editor</value>
|
||||
</data>
|
||||
<data name="Error email Validation" xml:space="preserve">
|
||||
<value>The email [ @Mail ] could not be varified!</value>
|
||||
</data>
|
||||
<data name="Error phone Validation" xml:space="preserve">
|
||||
<value />
|
||||
</data>
|
||||
<data name="Error sending the envelope" xml:space="preserve">
|
||||
<value>Error sending the envelope:</value>
|
||||
</data>
|
||||
@@ -190,7 +205,7 @@
|
||||
<value>Receiver {0} has an invalid Email Address.</value>
|
||||
</data>
|
||||
<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 name="Missing Documents" xml:space="preserve">
|
||||
<value>Missing Documents</value>
|
||||
|
||||
@@ -117,6 +117,9 @@
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</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">
|
||||
<value>Wollen Sie diesen Umschlag wirklich löschen?</value>
|
||||
</data>
|
||||
@@ -141,6 +144,9 @@
|
||||
<data name="Document forwarded" xml:space="preserve">
|
||||
<value>Umschlag an Empfänger {0} weitergeleitet.</value>
|
||||
</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">
|
||||
<value>Bearbeite Umschlag</value>
|
||||
</data>
|
||||
@@ -168,6 +174,13 @@
|
||||
<data name="Envelope-Editor" xml:space="preserve">
|
||||
<value>Umschlag-Editor</value>
|
||||
</data>
|
||||
<data name="Error email Validation" xml:space="preserve">
|
||||
<value>Die Email-Adresse [ @Mail ] konnte nicht validiert werden!</value>
|
||||
</data>
|
||||
<data name="Error phone Validation" xml:space="preserve">
|
||||
<value>The mobile phone number [@PhoneNr] could not be validated.
|
||||
Pattern: +491234567890</value>
|
||||
</data>
|
||||
<data name="Error sending the envelope" xml:space="preserve">
|
||||
<value>Fehler beim Senden des Umschlags:</value>
|
||||
</data>
|
||||
@@ -190,7 +203,7 @@
|
||||
<value>Empfänger {0} hat keine gültige Email Addresse.</value>
|
||||
</data>
|
||||
<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 name="Missing Documents" xml:space="preserve">
|
||||
<value>Fehlendes Dokument</value>
|
||||
|
||||
@@ -64,6 +64,15 @@ Namespace My.Resources
|
||||
End Set
|
||||
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>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich löschen? ähnelt.
|
||||
'''</summary>
|
||||
@@ -136,6 +145,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Bearbeite Umschlag ähnelt.
|
||||
'''</summary>
|
||||
@@ -217,6 +235,25 @@ Namespace My.Resources
|
||||
End Get
|
||||
End Property
|
||||
|
||||
'''<summary>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Die Email-Adresse [ @Mail ] konnte nicht validiert werden! ähnelt.
|
||||
'''</summary>
|
||||
Public Shared ReadOnly Property Error_email_Validation() As String
|
||||
Get
|
||||
Return ResourceManager.GetString("Error email Validation", resourceCulture)
|
||||
End Get
|
||||
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>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Fehler beim Senden des Umschlags: ähnelt.
|
||||
'''</summary>
|
||||
@@ -281,7 +318,7 @@ Namespace My.Resources
|
||||
End Property
|
||||
|
||||
'''<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>
|
||||
Public Shared ReadOnly Property Invitation_successfully_resend() As String
|
||||
Get
|
||||
|
||||
18
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
18
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
@@ -91,6 +91,15 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Abgeschlossen ähnelt.
|
||||
'''</summary>
|
||||
@@ -154,15 +163,6 @@ Namespace My.Resources
|
||||
End Get
|
||||
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>
|
||||
''' Sucht eine lokalisierte Zeichenfolge, die Archiviert ähnelt.
|
||||
'''</summary>
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
<data name="AccessCodeRequested" xml:space="preserve">
|
||||
<value>Accesscode requested</value>
|
||||
</data>
|
||||
<data name="AdvancedElectronicSignature" xml:space="preserve">
|
||||
<value>Advanced electronic signature</value>
|
||||
</data>
|
||||
<data name="Completed" xml:space="preserve">
|
||||
<value>Completed</value>
|
||||
</data>
|
||||
@@ -144,9 +147,6 @@
|
||||
<data name="Draft" xml:space="preserve">
|
||||
<value>Draft</value>
|
||||
</data>
|
||||
<data name="ElectronicSignature" xml:space="preserve">
|
||||
<value>Electronic Signature</value>
|
||||
</data>
|
||||
<data name="EnvelopeArchived" xml:space="preserve">
|
||||
<value>Archived</value>
|
||||
</data>
|
||||
|
||||
@@ -126,6 +126,9 @@
|
||||
<data name="AccessCodeRequested" xml:space="preserve">
|
||||
<value>Zugriffscode angefordert</value>
|
||||
</data>
|
||||
<data name="AdvancedElectronicSignature" xml:space="preserve">
|
||||
<value>Fortgeschrittene Elektronische Signatur</value>
|
||||
</data>
|
||||
<data name="Completed" xml:space="preserve">
|
||||
<value>Abgeschlossen</value>
|
||||
</data>
|
||||
@@ -147,9 +150,6 @@
|
||||
<data name="Draft" xml:space="preserve">
|
||||
<value>Entwurf</value>
|
||||
</data>
|
||||
<data name="ElectronicSignature" xml:space="preserve">
|
||||
<value>Elektronische Signatur</value>
|
||||
</data>
|
||||
<data name="EnvelopeArchived" xml:space="preserve">
|
||||
<value>Archiviert</value>
|
||||
</data>
|
||||
|
||||
@@ -2,9 +2,6 @@
|
||||
<configuration>
|
||||
|
||||
<configSections>
|
||||
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
|
||||
<section name="EnvelopeGenerator.Common.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
|
||||
</sectionGroup>
|
||||
</configSections>
|
||||
<system.diagnostics>
|
||||
<sources>
|
||||
@@ -29,17 +26,4 @@
|
||||
</sharedListeners>
|
||||
</system.diagnostics>
|
||||
|
||||
<applicationSettings>
|
||||
<EnvelopeGenerator.Common.My.MySettings>
|
||||
<setting name="RuninDMZ" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
<setting name="NetUse_Usr" serializeAs="String">
|
||||
<value>dd-gan\Administrator</value>
|
||||
</setting>
|
||||
<setting name="NetUse_PW" serializeAs="String">
|
||||
<value>sY4vnATDXwosbTJGip6SqA==</value>
|
||||
</setting>
|
||||
</EnvelopeGenerator.Common.My.MySettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="GdPicture" version="14.2.89" targetFramework="net462" />
|
||||
<package id="GdPicture.runtimes.windows" version="14.2.89" targetFramework="net462" />
|
||||
<package id="GdPicture" version="14.2.90" 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="Newtonsoft.Json" version="13.0.3" targetFramework="net462" />
|
||||
<package id="Quartz" version="3.8.0" targetFramework="net462" />
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace EnvelopeGenerator.Domain.Entities
|
||||
{
|
||||
@@ -23,19 +24,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
|
||||
public string? ExportPath { get; init; }
|
||||
|
||||
[Column("DOCUMENT_PATH_DMZ", TypeName = "nvarchar(512)")]
|
||||
[Required]
|
||||
public string? DocumentPathDmz { get; init; }
|
||||
|
||||
[Column("EXPORT_PATH_DMZ", TypeName = "nvarchar(512)")]
|
||||
[Required]
|
||||
public required string ExportPathDmz { get; init; }
|
||||
|
||||
[Column("DOCUMENT_PATH_MOVE_AFTSEND", TypeName = "nvarchar(512)")]
|
||||
[Required]
|
||||
public required string DocumentPathMoveAftsend { get; init; }
|
||||
|
||||
[Obsolete("Configuration does not have an ID; it represents a single table in the database.")]
|
||||
[NotMapped]
|
||||
[JsonIgnore]
|
||||
public int Id => throw new InvalidOperationException("This configuration does not support an ID as it represents a single table in the database.");
|
||||
}
|
||||
}
|
||||
@@ -84,6 +84,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("EXPIRES_WARNING_WHEN_DAYS")]
|
||||
public int? ExpiresWarningWhenDays { get; set; }
|
||||
|
||||
[Column("TFA_ENABLED", TypeName = "bit")]
|
||||
public bool TFAEnabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The sender of envelope
|
||||
/// </summary>
|
||||
|
||||
@@ -16,21 +16,10 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("ENVELOPE_ID")]
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("FILENAME", TypeName = "nvarchar(256)")]
|
||||
public required string Filename { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("FILEPATH", TypeName = "nvarchar(256)")]
|
||||
public required string Filepath { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public required DateTime AddedWhen { get; set; }
|
||||
|
||||
[Column("FILENAME_ORIGINAL", TypeName = "nvarchar(256)")]
|
||||
public required string FilenameOriginal { get; set; }
|
||||
|
||||
[Column("BYTE_DATA", TypeName = "varbinary(max)")]
|
||||
public byte[]? ByteData { get; init; }
|
||||
|
||||
|
||||
@@ -41,6 +41,15 @@ namespace EnvelopeGenerator.Domain.Entities
|
||||
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||
public DateTime? ChangedWhen { get; set; }
|
||||
|
||||
[Column("PHONE_NUMBER")]
|
||||
[StringLength(20)]
|
||||
[RegularExpression(@"^\+[0-9]+$", ErrorMessage = "Phone number must start with '+' followed by digits.")]
|
||||
public string? PhoneNumber { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public (int Envelope, int Receiver) Id => (Envelope: EnvelopeId, Receiver: ReceiverId);
|
||||
|
||||
[NotMapped]
|
||||
public bool HasPhoneNumber => PhoneNumber is not null;
|
||||
}
|
||||
}
|
||||
@@ -2,28 +2,33 @@
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
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")]
|
||||
public class Receiver : IUnique<int>
|
||||
{
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required, EmailAddress]
|
||||
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
|
||||
public required string EmailAddress { get; set; }
|
||||
[Key]
|
||||
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
|
||||
[Column("GUID")]
|
||||
public int Id { get; set; }
|
||||
|
||||
[Required, EmailAddress]
|
||||
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
|
||||
public required string EmailAddress { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
|
||||
public required string Signature { get; set; }
|
||||
[Required]
|
||||
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
|
||||
public required string Signature { get; set; }
|
||||
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
[Required]
|
||||
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||
public DateTime AddedWhen { get; set; }
|
||||
|
||||
public IEnumerable<EnvelopeReceiver>? EnvelopeReceivers { get; init; }
|
||||
}
|
||||
[Column("TOTP_SECRET_KEY", TypeName = "nvarchar(MAX)")]
|
||||
public string? TotpSecretkey { get; set; }
|
||||
|
||||
[Column("TFA_REG_DEADLINE", TypeName = "datetime")]
|
||||
public DateTime? TfaRegDeadline { get; set; }
|
||||
|
||||
public IEnumerable<EnvelopeReceiver>? EnvelopeReceivers { get; init; }
|
||||
}
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
|
||||
<PackageReference Include="UserManager.Domain" Version="1.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
@@ -10,6 +10,7 @@
|
||||
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
|
||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
||||
14
EnvelopeGenerator.Extensions/StringExtension.cs
Normal file
14
EnvelopeGenerator.Extensions/StringExtension.cs
Normal file
@@ -0,0 +1,14 @@
|
||||
using OtpNet;
|
||||
|
||||
namespace EnvelopeGenerator.Extensions
|
||||
{
|
||||
public static class StringExtension
|
||||
{
|
||||
public static bool IsValidTotp(this string totp, string secret)
|
||||
{
|
||||
var secret_bytes = Base32Encoding.ToBytes(secret);
|
||||
var secret_totp = new Totp(secret_bytes);
|
||||
return secret_totp.VerifyTotp(totp, out _, VerificationWindow.RfcSpecifiedNetworkDelay);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -65,7 +65,8 @@ Public Class EnvelopeEditorController
|
||||
Public Function CreateEnvelope() As Envelope
|
||||
Dim oEnvelope As New Envelope() With {
|
||||
.UserId = State.UserId,
|
||||
.User = UserModel.SelectUser()
|
||||
.User = UserModel.SelectUser(),
|
||||
.TFA_Enabled = DEF_TF_ENABLED
|
||||
}
|
||||
|
||||
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
|
||||
Dim oExistingReceivers As List(Of EnvelopeReceiver) = ReceiverModel.ListReceivers(pReceiversFromGrid).ToList()
|
||||
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)
|
||||
If r.Email Is Nothing Then Return False
|
||||
Return Not oExistingAddresses.Contains(r.Email)
|
||||
End Function).ToList()
|
||||
|
||||
Logger.Debug($"oNewReceivers.count: {oNewReceivers.Count}")
|
||||
If CreateNewReceivers(oNewReceivers) = False Then
|
||||
Return False
|
||||
End If
|
||||
@@ -406,4 +409,11 @@ Public Class EnvelopeEditorController
|
||||
Return String.Empty
|
||||
End If
|
||||
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
|
||||
|
||||
@@ -76,10 +76,10 @@
|
||||
<HintPath>..\..\2_DLL Projekte\DDMonorepo\Controls.DocumentViewer\bin\Debug\DigitalData.Controls.DocumentViewer.dll</HintPath>
|
||||
</Reference>
|
||||
<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 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 Include="DigitalData.Modules.Config, Version=1.2.2.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<SpecificVersion>False</SpecificVersion>
|
||||
@@ -107,6 +107,7 @@
|
||||
<HintPath>..\packages\NLog.5.0.5\lib\net46\NLog.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Data.Linq" />
|
||||
@@ -204,6 +205,7 @@
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmEnvelopeMainData.resx">
|
||||
<DependentUpon>frmEnvelopeMainData.vb</DependentUpon>
|
||||
<SubType>Designer</SubType>
|
||||
</EmbeddedResource>
|
||||
<EmbeddedResource Include="frmFieldEditor.en.resx">
|
||||
<DependentUpon>frmFieldEditor.vb</DependentUpon>
|
||||
|
||||
@@ -1,10 +1,19 @@
|
||||
Imports DigitalData.Modules.Database
|
||||
Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
|
||||
Module ModuleSettings
|
||||
Public DOCUMENT_PATH_MOVE_AFTSEND As String = ""
|
||||
Public ENVELOPE_TEMP_DOCUMENT As String = ""
|
||||
Public CurrLogConfig As LogConfig
|
||||
Public Directory2Delete As String = ""
|
||||
Public MS_GDPICTUREKEY As String = ""
|
||||
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
|
||||
|
||||
@@ -11,7 +11,7 @@ Imports System.Runtime.InteropServices
|
||||
<Assembly: AssemblyCompany("Digital Data")>
|
||||
<Assembly: AssemblyProduct("Envelope Generator")>
|
||||
<Assembly: AssemblyCopyright("Copyright © 2024")>
|
||||
<Assembly: AssemblyTrademark("2.4.5.0")>
|
||||
<Assembly: AssemblyTrademark("2.8.0.0")>
|
||||
<Assembly: AssemblyCulture("")>
|
||||
|
||||
' Setting ComVisible to false makes the types in this assembly not visible
|
||||
@@ -32,5 +32,5 @@ Imports System.Runtime.InteropServices
|
||||
' You can specify all the values or you can default the Build and Revision Numbers
|
||||
' by using the '*' as shown below:
|
||||
' [assembly: AssemblyVersion("1.0.*")]
|
||||
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||
<Assembly: AssemblyVersion("2.8.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||
|
||||
55
EnvelopeGenerator.Form/frmEnvelopeEditor.Designer.vb
generated
55
EnvelopeGenerator.Form/frmEnvelopeEditor.Designer.vb
generated
@@ -56,8 +56,10 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.txtCreatorEmailLabel = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.txtEnvelopeIdLabel2 = New DevExpress.XtraBars.BarStaticItem()
|
||||
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.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.bbtnitm_ConcatFiles = New DevExpress.XtraBars.BarButtonItem()
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonPageGroupDocuments = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
@@ -80,6 +82,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.RepositoryItemComboBox1 = New DevExpress.XtraEditors.Repository.RepositoryItemComboBox()
|
||||
Me.colName = 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.RepositoryItemPictureEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemPictureEdit()
|
||||
Me.RepositoryItemColorPickEdit1 = New DevExpress.XtraEditors.Repository.RepositoryItemColorPickEdit()
|
||||
@@ -98,6 +101,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.EnvelopeDocumentBindingSource = New System.Windows.Forms.BindingSource(Me.components)
|
||||
Me.OpenFileDialog1 = New System.Windows.Forms.OpenFileDialog()
|
||||
Me.txtEnvelopeIdLabel = New DevExpress.XtraBars.BarStaticItem()
|
||||
Me.btnShowFile = New DevExpress.XtraBars.BarButtonItem()
|
||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
||||
@@ -240,9 +244,9 @@ Partial Public Class frmEnvelopeEditor
|
||||
'RibbonControl1
|
||||
'
|
||||
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.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")
|
||||
Me.RibbonControl1.MaxItemId = 15
|
||||
Me.RibbonControl1.MaxItemId = 18
|
||||
Me.RibbonControl1.Name = "RibbonControl1"
|
||||
Me.RibbonControl1.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1})
|
||||
Me.RibbonControl1.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||
@@ -331,10 +335,10 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.BarButtonItem1.Id = 12
|
||||
Me.BarButtonItem1.Name = "BarButtonItem1"
|
||||
'
|
||||
'BarStaticItem1
|
||||
'bsitm_info
|
||||
'
|
||||
Me.BarStaticItem1.Id = 13
|
||||
Me.BarStaticItem1.Name = "BarStaticItem1"
|
||||
Me.bsitm_info.Id = 13
|
||||
Me.bsitm_info.Name = "bsitm_info"
|
||||
'
|
||||
'BarButtonItem2
|
||||
'
|
||||
@@ -342,6 +346,19 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.BarButtonItem2.Id = 14
|
||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
||||
'
|
||||
'BarButtonItem3
|
||||
'
|
||||
resources.ApplyResources(Me.BarButtonItem3, "BarButtonItem3")
|
||||
Me.BarButtonItem3.Id = 15
|
||||
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
|
||||
'
|
||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageGroup1, Me.RibbonPageGroupDocuments, Me.RibbonPageGroupInvitation, Me.RibbonPageGroupAddSignature, Me.RibbonPageGroupReceiver})
|
||||
@@ -359,7 +376,9 @@ Partial Public Class frmEnvelopeEditor
|
||||
'RibbonPageGroupDocuments
|
||||
'
|
||||
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnNewFile)
|
||||
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.bbtnitm_ConcatFiles)
|
||||
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnDeleteFile)
|
||||
Me.RibbonPageGroupDocuments.ItemLinks.Add(Me.btnShowFile)
|
||||
Me.RibbonPageGroupDocuments.Name = "RibbonPageGroupDocuments"
|
||||
resources.ApplyResources(Me.RibbonPageGroupDocuments, "RibbonPageGroupDocuments")
|
||||
'
|
||||
@@ -386,7 +405,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
'
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtCreatorEmailLabel)
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.txtEnvelopeIdLabel2)
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.BarStaticItem1)
|
||||
Me.RibbonStatusBar1.ItemLinks.Add(Me.bsitm_info)
|
||||
resources.ApplyResources(Me.RibbonStatusBar1, "RibbonStatusBar1")
|
||||
Me.RibbonStatusBar1.Name = "RibbonStatusBar1"
|
||||
Me.RibbonStatusBar1.Ribbon = Me.RibbonControl1
|
||||
@@ -466,7 +485,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
'ViewReceivers
|
||||
'
|
||||
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.Name = "ViewReceivers"
|
||||
Me.ViewReceivers.OptionsBehavior.AllowDeleteRows = DevExpress.Utils.DefaultBoolean.[True]
|
||||
@@ -526,6 +545,12 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.colAccessCode.OptionsColumn.AllowEdit = False
|
||||
Me.colAccessCode.OptionsColumn.ReadOnly = True
|
||||
'
|
||||
'colPhoneNumber
|
||||
'
|
||||
resources.ApplyResources(Me.colPhoneNumber, "colPhoneNumber")
|
||||
Me.colPhoneNumber.FieldName = "PhoneNumber"
|
||||
Me.colPhoneNumber.Name = "colPhoneNumber"
|
||||
'
|
||||
'RepositoryItemEmailEdit
|
||||
'
|
||||
resources.ApplyResources(Me.RepositoryItemEmailEdit, "RepositoryItemEmailEdit")
|
||||
@@ -659,8 +684,16 @@ Partial Public Class frmEnvelopeEditor
|
||||
Me.txtEnvelopeIdLabel.PaintStyle = DevExpress.XtraBars.BarItemPaintStyle.CaptionGlyph
|
||||
Me.txtEnvelopeIdLabel.Tag = "Envelope-ID: {0}"
|
||||
'
|
||||
'btnShowFile
|
||||
'
|
||||
resources.ApplyResources(Me.btnShowFile, "btnShowFile")
|
||||
Me.btnShowFile.Id = 17
|
||||
Me.btnShowFile.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||
Me.btnShowFile.Name = "btnShowFile"
|
||||
'
|
||||
'frmEnvelopeEditor
|
||||
'
|
||||
Me.AllowDrop = True
|
||||
resources.ApplyResources(Me, "$this")
|
||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||
Me.Controls.Add(Me.SplitContainerControl1)
|
||||
@@ -781,8 +814,12 @@ Partial Public Class frmEnvelopeEditor
|
||||
Friend WithEvents txtEnvelopeIdLabel2 As DevExpress.XtraBars.BarStaticItem
|
||||
Friend WithEvents colPageCount As DevExpress.XtraGrid.Columns.TileViewColumn
|
||||
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 BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents bbtnitm_ConcatFiles As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents colPhoneNumber As DevExpress.XtraGrid.Columns.GridColumn
|
||||
Friend WithEvents btnShowFile As DevExpress.XtraBars.BarButtonItem
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnNewFile.Caption" xml:space="preserve">
|
||||
<value>Neues Dokument</value>
|
||||
<value>Ein PDF-Dokument hinzufügen</value>
|
||||
</data>
|
||||
<data name="btnNewFile.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
@@ -322,35 +322,30 @@
|
||||
</value>
|
||||
</data>
|
||||
<data name="btnEditData.Caption" xml:space="preserve">
|
||||
<value>Titel und Typ</value>
|
||||
<value>Eigenschaften</value>
|
||||
</data>
|
||||
<data name="btnEditData.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAABwFAAAC77u/
|
||||
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAOYDAAAC77u/
|
||||
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
|
||||
LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3
|
||||
RDc7fQoJLldoaXRle2ZpbGw6I0ZGRkZGRjt9CgkuR3JlZW57ZmlsbDojMDM5QzIzO30KCS5zdDB7b3Bh
|
||||
Y2l0eTowLjc1O30KCS5zdDF7b3BhY2l0eTowLjU7fQoJLnN0MntvcGFjaXR5OjAuMjU7fQoJLnN0M3tm
|
||||
aWxsOiNGRkIxMTU7fQo8L3N0eWxlPg0KICA8ZyAvPg0KICA8ZyBpZD0iUmVuYW1lXzFfIj4NCiAgICA8
|
||||
cGF0aCBkPSJNMi4xLDE2aDIuMmwwLjYtMi4zaDMuMkw4LjgsMTZIMTFMNy44LDZINS40TDIuMSwxNnog
|
||||
TTYuNCw4LjdjMC4xLTAuMywwLjEtMC42LDAuMS0wLjloMC4xICAgYzAsMC4zLDAuMSwwLjYsMC4xLDAu
|
||||
OWwxLDMuM0g1LjRMNi40LDguN3ogTTE3LjUsMTAuNmMwLjYtMC4yLDEuMS0wLjUsMS41LTAuOWMwLjQt
|
||||
MC40LDAuNi0wLjksMC42LTEuNGMwLTAuNy0wLjMtMS4zLTAuOS0xLjcgICBDMTguMSw2LjIsMTcuMSw2
|
||||
LDE1LjksNkgxMnY5LjlWMTZoNGMxLjIsMCwyLjItMC4yLDIuOS0wLjhDMTkuNywxNC42LDIwLDE0LDIw
|
||||
LDEzYzAtMC42LTAuMi0xLjItMC43LTEuNiAgIEMxOC45LDExLDE4LjMsMTAuNywxNy41LDEwLjZ6IE0x
|
||||
NC40LDcuN2gwLjljMS4xLDAsMS43LDAuNCwxLjcsMS4xYzAsMC40LTAuMSwwLjctMC40LDAuOUMxNi40
|
||||
LDkuOSwxNiwxMCwxNS41LDEwaC0xLjFWNy43eiAgICBNMTcsMTMuOGMtMC4zLDAuMi0wLjgsMC40LTEu
|
||||
MywwLjRoLTEuM3YtMi42aDEuM2MwLjUsMCwwLjksMC4xLDEuMywwLjNjMC4zLDAuMiwwLjUsMC42LDAu
|
||||
NSwwLjlDMTcuNSwxMy4zLDE3LjQsMTMuNiwxNywxMy44eiIgY2xhc3M9IkJsYWNrIiAvPg0KICAgIDxw
|
||||
YXRoIGQ9Ik0yNywxOWwtOCw4bC00LTRsOC04TDI3LDE5eiBNMjgsMThsMS43LTEuN2MwLjQtMC40LDAu
|
||||
NC0xLDAtMS4zTDI3LDEyLjNjLTAuNC0wLjQtMS0wLjQtMS4zLDBMMjQsMTRMMjgsMTh6ICAgIE0xNCwy
|
||||
NHY0aDRMMTQsMjR6IiBjbGFzcz0iQmx1ZSIgLz4NCiAgPC9nPg0KPC9zdmc+Cw==
|
||||
Y2U9InByZXNlcnZlIiBpZD0iRG9jdW1lbnRfUHJvcGVydGllcyIgc3R5bGU9ImVuYWJsZS1iYWNrZ3Jv
|
||||
dW5kOm5ldyAwIDAgMzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6
|
||||
IzcyNzI3Mjt9CgkuQmx1ZXtmaWxsOiMxMTc3RDc7fQo8L3N0eWxlPg0KICA8cGF0aCBkPSJNMzAsMjV2
|
||||
LTJsLTIuMi0wLjRjLTAuMi0wLjYtMC40LTEuMy0wLjctMS44bDEuMy0xLjhsLTEuNC0xLjRsLTEuOCwx
|
||||
LjNjLTAuNS0wLjMtMS4yLTAuNi0xLjgtMC43TDIzLDE2aC0yICBsLTAuNCwyLjJjLTAuNiwwLjItMS4z
|
||||
LDAuNC0xLjgsMC43bC0xLjgtMS4zbC0xLjQsMS40bDEuMywxLjhjLTAuMywwLjUtMC42LDEuMi0wLjcs
|
||||
MS44TDE0LDIzdjJsMi4yLDAuNGMwLjIsMC42LDAuNCwxLjMsMC43LDEuOCAgbC0xLjMsMS44bDEuNCwx
|
||||
LjRsMS44LTEuM2MwLjUsMC4zLDEuMiwwLjYsMS44LDAuN0wyMSwzMmgybDAuNC0yLjJjMC42LTAuMiwx
|
||||
LjMtMC40LDEuOC0wLjdsMS44LDEuM2wxLjQtMS40bC0xLjMtMS44ICBjMC4zLTAuNSwwLjYtMS4yLDAu
|
||||
Ny0xLjhMMzAsMjV6IE0yMiwyNmMtMS4xLDAtMi0wLjktMi0yczAuOS0yLDItMnMyLDAuOSwyLDJTMjMu
|
||||
MSwyNiwyMiwyNnoiIGNsYXNzPSJCbHVlIiAvPg0KICA8cGF0aCBkPSJNMTQuMywyNkg2VjRoNmg2djVj
|
||||
MCwwLjYsMC40LDEsMSwxaDV2NS45bDAsMC40YzAuNywwLjIsMS40LDAuNSwyLDAuOFY5bC03LTdINUM0
|
||||
LjQsMiw0LDIuNCw0LDN2MjQgIGMwLDAuNiwwLjQsMSwxLDFoMTAuMUMxNC43LDI3LjQsMTQuNCwyNi43
|
||||
LDE0LjMsMjZ6IiBjbGFzcz0iQmxhY2siIC8+DQo8L3N2Zz4L
|
||||
</value>
|
||||
</data>
|
||||
<data name="txtCreatorEmailLabel.Caption" xml:space="preserve">
|
||||
@@ -414,6 +409,60 @@
|
||||
<data name="BarButtonItem2.Caption" xml:space="preserve">
|
||||
<value>Öffnen</value>
|
||||
</data>
|
||||
<data name="BarButtonItem3.Caption" xml:space="preserve">
|
||||
<value>BarButtonItem3</value>
|
||||
</data>
|
||||
<data name="bbtnitm_ConcatFiles.Caption" xml:space="preserve">
|
||||
<value>Mehrere PDF-Dokumente verketten</value>
|
||||
</data>
|
||||
<data name="bbtnitm_ConcatFiles.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAHECAAAC77u/
|
||||
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||
Y2U9InByZXNlcnZlIiBpZD0iTXVsdGlwbGVfRG9jdW1lbnRzIiBzdHlsZT0iZW5hYmxlLWJhY2tncm91
|
||||
bmQ6bmV3IDAgMCAzMiAzMiI+DQogIDxzdHlsZSB0eXBlPSJ0ZXh0L2NzcyI+CgkuQmxhY2t7ZmlsbDoj
|
||||
NzI3MjcyO30KPC9zdHlsZT4NCiAgPHBhdGggZD0iTTMxLDhoLTVWNWMwLTAuNS0wLjUtMS0xLTFoLTVW
|
||||
MWMwLTAuNS0wLjUtMS0xLTFIMUMwLjUsMCwwLDAuNSwwLDF2MjJjMCwwLjUsMC41LDEsMSwxaDV2M2Mw
|
||||
LDAuNSwwLjUsMSwxLDEgIGg1djNjMCwwLjUsMC41LDEsMSwxaDE4YzAuNSwwLDEtMC41LDEtMVY5QzMy
|
||||
LDguNSwzMS41LDgsMzEsOHogTTYsNXYxN0gyVjJoMTZ2Mkg3QzYuNSw0LDYsNC41LDYsNXogTTEyLDl2
|
||||
MTdIOFY2aDE2djJIMTMgIEMxMi41LDgsMTIsOC41LDEyLDl6IE0zMCwzMEgxNFYxMGgxNlYzMHoiIGNs
|
||||
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/
|
||||
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLlllbGxvd3tmaWxsOiNGRkIxMTU7fQoJ
|
||||
LlJlZHtmaWxsOiNEMTFDMUM7fQoJLkJsdWV7ZmlsbDojMTE3N0Q3O30KCS5HcmVlbntmaWxsOiMwMzlD
|
||||
MjM7fQoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
|
||||
Y2l0eTowLjc1O30KPC9zdHlsZT4NCiAgPGcgaWQ9IkRvY3VtZW50UERGIj4NCiAgICA8cGF0aCBkPSJN
|
||||
MjIsMjR2NEgyVjJoMTR2NWMwLDAuNiwwLjQsMSwxLDFoNXY0aDJWN2wtNy03SDFDMC40LDAsMCwwLjQs
|
||||
MCwxdjI4YzAsMC42LDAuNCwxLDEsMWgyMmMwLjYsMCwxLTAuNCwxLTEgICB2LTVIMjJ6IiBjbGFzcz0i
|
||||
QmxhY2siIC8+DQogICAgPHBhdGggZD0iTTE5LjIsMTZjMC4zLDAuNSwwLjQsMS4xLDAuNCwxLjljMCww
|
||||
LjktMC4yLDEuNS0wLjUsMmMtMC4zLDAuNS0wLjcsMC43LTEuMywwLjdoLTAuNnYtNS4zaDAuNiAgIEMx
|
||||
OC40LDE1LjMsMTguOSwxNS42LDE5LjIsMTZ6IE0xMi4xLDE1LjNoLTAuNXYyLjZoMC41YzAuNywwLDEu
|
||||
MS0wLjQsMS4xLTEuM2MwLTAuNC0wLjEtMC44LTAuMy0xQzEyLjYsMTUuNCwxMi40LDE1LjMsMTIuMSwx
|
||||
NS4zeiAgICBNMzAsMTJ2MTJINlYxMkgzMHogTTE0LjgsMTYuNWMwLTAuOC0wLjItMS41LTAuNi0xLjlj
|
||||
LTAuNC0wLjQtMS0wLjctMS44LTAuN0gxMHY4aDEuNnYtMi43aDAuNmMwLjgsMCwxLjQtMC4zLDEuOS0w
|
||||
LjggICBDMTQuNSwxOCwxNC44LDE3LjMsMTQuOCwxNi41eiBNMjEuMiwxNy45YzAtMi42LTEuMS0zLjkt
|
||||
My40LTMuOWgtMi4xdjhoMi4yYzEuMSwwLDEuOS0wLjQsMi41LTEuMUMyMC45LDIwLjIsMjEuMiwxOS4y
|
||||
LDIxLjIsMTcuOXogICAgTTI2LDE0aC0zLjd2OGgxLjZ2LTMuMWgydi0xLjNoLTJ2LTIuMkgyNlYxNHoi
|
||||
IGNsYXNzPSJSZWQiIC8+DQogIDwvZz4NCjwvc3ZnPgs=
|
||||
</value>
|
||||
</data>
|
||||
<data name="RibbonControl1.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>0, 0</value>
|
||||
</data>
|
||||
@@ -421,7 +470,7 @@
|
||||
<value>Umschlag</value>
|
||||
</data>
|
||||
<data name="RibbonPageGroupDocuments.Text" xml:space="preserve">
|
||||
<value>Dateien</value>
|
||||
<value>Dokument-Funktionen</value>
|
||||
</data>
|
||||
<data name="RibbonPageGroupInvitation.Text" xml:space="preserve">
|
||||
<value>Prozess</value>
|
||||
@@ -578,7 +627,7 @@
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="colColor.Width" type="System.Int32, mscorlib">
|
||||
<value>37</value>
|
||||
<value>32</value>
|
||||
</data>
|
||||
<data name="RepositoryItemComboBox1.AutoHeight" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -593,7 +642,7 @@
|
||||
<value>1</value>
|
||||
</data>
|
||||
<data name="colEmail.Width" type="System.Int32, mscorlib">
|
||||
<value>341</value>
|
||||
<value>275</value>
|
||||
</data>
|
||||
<data name="colName.Caption" xml:space="preserve">
|
||||
<value>Anrede Email</value>
|
||||
@@ -605,7 +654,7 @@
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name="colName.Width" type="System.Int32, mscorlib">
|
||||
<value>344</value>
|
||||
<value>227</value>
|
||||
</data>
|
||||
<data name="colAccessCode.Caption" xml:space="preserve">
|
||||
<value>Zugriffscode</value>
|
||||
@@ -617,7 +666,19 @@
|
||||
<value>3</value>
|
||||
</data>
|
||||
<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 name="RepositoryItemEmailEdit.AutoHeight" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
@@ -1046,10 +1107,10 @@
|
||||
<data name=">>BarButtonItem1.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=">>BarStaticItem1.Name" xml:space="preserve">
|
||||
<value>BarStaticItem1</value>
|
||||
<data name=">>bsitm_info.Name" xml:space="preserve">
|
||||
<value>bsitm_info</value>
|
||||
</data>
|
||||
<data name=">>BarStaticItem1.Type" xml:space="preserve">
|
||||
<data name=">>bsitm_info.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>BarButtonItem2.Name" xml:space="preserve">
|
||||
@@ -1058,6 +1119,18 @@
|
||||
<data name=">>BarButtonItem2.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=">>BarButtonItem3.Name" xml:space="preserve">
|
||||
<value>BarButtonItem3</value>
|
||||
</data>
|
||||
<data name=">>BarButtonItem3.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=">>bbtnitm_ConcatFiles.Name" xml:space="preserve">
|
||||
<value>bbtnitm_ConcatFiles</value>
|
||||
</data>
|
||||
<data name=">>bbtnitm_ConcatFiles.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=">>RibbonPage1.Name" xml:space="preserve">
|
||||
<value>RibbonPage1</value>
|
||||
</data>
|
||||
@@ -1160,6 +1233,12 @@
|
||||
<data name=">>colAccessCode.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=">>colPhoneNumber.Name" xml:space="preserve">
|
||||
<value>colPhoneNumber</value>
|
||||
</data>
|
||||
<data name=">>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=">>RepositoryItemEmailEdit.Name" xml:space="preserve">
|
||||
<value>RepositoryItemEmailEdit</value>
|
||||
</data>
|
||||
@@ -1250,6 +1329,12 @@
|
||||
<data name=">>txtEnvelopeIdLabel.Type" xml:space="preserve">
|
||||
<value>DevExpress.XtraBars.BarStaticItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||
</data>
|
||||
<data name=">>btnShowFile.Name" xml:space="preserve">
|
||||
<value>btnShowFile</value>
|
||||
</data>
|
||||
<data name=">>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=">>$this.Name" xml:space="preserve">
|
||||
<value>frmEnvelopeEditor</value>
|
||||
</data>
|
||||
|
||||
@@ -1,12 +1,16 @@
|
||||
Imports System.ComponentModel
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.IO
|
||||
Imports System.Text.RegularExpressions
|
||||
Imports DevExpress.Export.Xl
|
||||
Imports DevExpress.Utils.CommonDialogs
|
||||
Imports DevExpress.Utils.Drawing
|
||||
Imports DevExpress.Utils.Svg.CommonSvgImages
|
||||
Imports DevExpress.XtraEditors
|
||||
Imports DevExpress.XtraExport.Helpers
|
||||
Imports DevExpress.XtraGrid
|
||||
Imports DevExpress.XtraGrid.Columns
|
||||
Imports DevExpress.XtraGrid.Views.Base
|
||||
Imports DevExpress.XtraGrid.Views.Grid
|
||||
Imports DevExpress.XtraSplashScreen
|
||||
Imports DigitalData.Modules.Base
|
||||
@@ -14,6 +18,7 @@ Imports DigitalData.Modules.Logging
|
||||
Imports EnvelopeGenerator.Common
|
||||
Imports EnvelopeGenerator.Common.Constants
|
||||
Imports EnvelopeGenerator.Common.My
|
||||
Imports GdPicture14
|
||||
|
||||
Partial Public Class frmEnvelopeEditor
|
||||
Public Property Envelope As Envelope
|
||||
@@ -28,8 +33,9 @@ Partial Public Class frmEnvelopeEditor
|
||||
Private Const COL_NAME = "Name"
|
||||
Private Const COL_EMAIL = "Email"
|
||||
Private Const COL_CODE = "AccessCode"
|
||||
|
||||
Private Const COL_PHONE = "PhoneNumber"
|
||||
Public Property State As State
|
||||
Private TempFiles As TempFiles
|
||||
|
||||
Public Sub New()
|
||||
InitializeComponent()
|
||||
@@ -40,42 +46,53 @@ Partial Public Class frmEnvelopeEditor
|
||||
'SaveEnvelopeWithValidation()
|
||||
' If Not IsNothing(Envelope) Then
|
||||
Try
|
||||
' prüfen ob es schon eine Datei gibt
|
||||
If Documents.Count > 0 Then
|
||||
MsgBox(Resources.Envelope.Only_one_file_is_allowed, MsgBoxStyle.Information, Text)
|
||||
Return
|
||||
End If
|
||||
' prüfen ob es schon eine Datei gibt
|
||||
If Documents.Count > 0 Then
|
||||
MsgBox(Resources.Envelope.Only_one_file_is_allowed, MsgBoxStyle.Information, Text)
|
||||
Return
|
||||
End If
|
||||
|
||||
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||
Dim oDocument = Await Controller.CreateDocument(OpenFileDialog1.FileName)
|
||||
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
|
||||
Await AddDocument(OpenFileDialog1.FileName)
|
||||
End If
|
||||
|
||||
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
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Finally
|
||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
|
||||
RibbonPageGroupAddSignature_Enabled()
|
||||
End Try
|
||||
RibbonPageGroupAddSignature_Enabled()
|
||||
End Try
|
||||
' Else
|
||||
' SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
' End If
|
||||
|
||||
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
|
||||
Logger = State.LogConfig.GetLogger()
|
||||
Logger.Debug("Loading Configuration..")
|
||||
TempFiles = New TempFiles(State.LogConfig)
|
||||
TempFiles.Create()
|
||||
If Envelope Is Nothing Then
|
||||
Logger.Debug("Loading Controller..")
|
||||
Controller = New EnvelopeEditorController(State)
|
||||
|
||||
' Get additional data
|
||||
Logger.Debug("Loading oDataForm..")
|
||||
Dim oDataForm As New frmEnvelopeMainData() With {
|
||||
.State = State,
|
||||
.Envelope = Controller.Envelope,
|
||||
@@ -93,6 +110,25 @@ Partial Public Class frmEnvelopeEditor
|
||||
Receivers = New BindingList(Of EnvelopeReceiver)(Controller.Envelope.Receivers)
|
||||
|
||||
For Each docItem As EnvelopeDocument In Documents
|
||||
If Not File.Exists(docItem.Filepath) Then
|
||||
Dim oTempFolder = TempFiles.TempPath
|
||||
Dim oTempFilename = String.Concat(oTempFolder, "\", $"ViewEnvDoc_{Envelope.Id}.pdf")
|
||||
If File.Exists(oTempFilename) Then
|
||||
Try
|
||||
File.OpenWrite(oTempFilename)
|
||||
Catch ex As Exception
|
||||
MsgBox("File might already be open?", MsgBoxStyle.Exclamation)
|
||||
Me.Cursor = Cursors.Default
|
||||
Exit Sub
|
||||
End Try
|
||||
|
||||
|
||||
File.Delete(oTempFilename)
|
||||
End If
|
||||
WriteBytetoPath(oTempFilename, docItem.Byte_Data)
|
||||
docItem.Filepath = oTempFilename
|
||||
GridDocuments.Tag = docItem.Filepath
|
||||
End If
|
||||
If docItem.Thumbnail Is Nothing Then
|
||||
docItem.Thumbnail = Controller.CreateThumbnail(docItem.Filepath)
|
||||
docItem.PageCount = Controller.GetPageCount(docItem.Filepath)
|
||||
@@ -115,7 +151,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
RepositoryItemComboBox1.Items.AddRange(AllReceiverEmails)
|
||||
|
||||
SetAccessCodeColumnVisible()
|
||||
|
||||
SetPhoneNumberColumnVisible()
|
||||
txtEnvelopeIdLabel2.Caption = String.Format(txtEnvelopeIdLabel2.Tag.ToString, Controller.Envelope.Id)
|
||||
txtCreatorEmailLabel.Caption = String.Format(txtCreatorEmailLabel.Tag.ToString, Controller.Envelope.User.Email)
|
||||
|
||||
@@ -129,6 +165,13 @@ Partial Public Class frmEnvelopeEditor
|
||||
colAccessCode.Visible = False
|
||||
End If
|
||||
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
|
||||
If ViewDocuments.GetSelectedRows().Count > 0 Then
|
||||
@@ -141,13 +184,19 @@ Partial Public Class frmEnvelopeEditor
|
||||
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
||||
If Controller.DeleteDocument(oDocument) Then
|
||||
Documents.Remove(oDocument)
|
||||
GridDocuments.DataSource = Nothing
|
||||
ClearBsiItem()
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
|
||||
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
|
||||
Logger.Error(ex)
|
||||
End Try
|
||||
@@ -163,6 +212,19 @@ Partial Public Class frmEnvelopeEditor
|
||||
|
||||
If ViewDocuments.GetSelectedRows().Count > 0 Then
|
||||
Dim oDocument As EnvelopeDocument = DirectCast(ViewDocuments.GetFocusedRow(), EnvelopeDocument)
|
||||
Dim oEnvelope = Controller.Envelope
|
||||
If Not IsNothing(oDocument.Byte_Data) Then
|
||||
Dim oTempFolder = TempFiles.TempPath
|
||||
Dim oTempFilename = String.Concat(oTempFolder, "\", $"ViewEnvDoc_{oEnvelope.Id}.pdf")
|
||||
If Not File.Exists(oTempFilename) Then
|
||||
WriteBytetoPath(oTempFilename, oDocument.Byte_Data)
|
||||
oDocument.Filepath = oTempFilename
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
Dim oGDPictureKey As String = MS_GDPICTUREKEY
|
||||
|
||||
Dim oForm As New frmFieldEditor(State) With {
|
||||
@@ -180,7 +242,23 @@ Partial Public Class frmEnvelopeEditor
|
||||
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub WriteBytetoPath(ByVal sFileName As String, pByte As Byte())
|
||||
|
||||
'For Document
|
||||
Try
|
||||
If Not pByte Is Nothing Then
|
||||
'Read image data into a file stream
|
||||
Using fs As New FileStream(sFileName, FileMode.OpenOrCreate, FileAccess.Write)
|
||||
fs.Write(pByte, 0, pByte.Length)
|
||||
'Set image variable value using memory stream.
|
||||
fs.Flush()
|
||||
fs.Close()
|
||||
End Using
|
||||
End If
|
||||
Catch ex As Exception
|
||||
MsgBox(ex.Message, MsgBoxStyle.Exclamation, "Error in downloadFile")
|
||||
End Try
|
||||
End Sub
|
||||
Private Function SaveEnvelopeWithValidation() As Boolean
|
||||
Return SaveEnvelope(True)
|
||||
End Function
|
||||
@@ -384,7 +462,7 @@ Partial Public Class frmEnvelopeEditor
|
||||
oForm.ShowDialog()
|
||||
|
||||
SetAccessCodeColumnVisible()
|
||||
|
||||
SetPhoneNumberColumnVisible()
|
||||
SetFormTitle(Controller.Envelope.Title)
|
||||
End Sub
|
||||
|
||||
@@ -436,10 +514,14 @@ Partial Public Class frmEnvelopeEditor
|
||||
Private Sub DocumentButtons_Enable()
|
||||
If ViewDocuments.RowCount = 0 Then
|
||||
btnNewFile.Enabled = True
|
||||
bbtnitm_ConcatFiles.Enabled = True
|
||||
btnDeleteFile.Enabled = False
|
||||
btnShowFile.Enabled = False
|
||||
Else
|
||||
btnNewFile.Enabled = False
|
||||
bbtnitm_ConcatFiles.Enabled = False
|
||||
btnDeleteFile.Enabled = True
|
||||
btnShowFile.Enabled = True
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -479,7 +561,12 @@ Partial Public Class frmEnvelopeEditor
|
||||
RibbonPageGroupAddSignature_Enabled()
|
||||
End Sub
|
||||
Dim CellValueChanged As Boolean = False
|
||||
Private Sub ViewReceivers_ColumnPositionChanged(sender As Object, e As EventArgs) Handles ViewReceivers.ColumnPositionChanged
|
||||
|
||||
|
||||
End Sub
|
||||
Private Sub ViewReceivers_CellValueChanged(sender As Object, e As Views.Base.CellValueChangedEventArgs) Handles ViewReceivers.CellValueChanged
|
||||
|
||||
If e.Column.FieldName = COL_EMAIL And CellValueChanged = False Then
|
||||
If e.Value Is Nothing Then
|
||||
' Keine E-Mail-Adresse, also weg damit
|
||||
@@ -491,21 +578,196 @@ Partial Public Class frmEnvelopeEditor
|
||||
Dim oNameCellValue = ViewReceivers.GetRowCellValue(e.RowHandle, COL_NAME)
|
||||
If oNameCellValue Is Nothing Then
|
||||
Dim oEmailAdress As String = DirectCast(e.Value.ToString.ToLower, String)
|
||||
|
||||
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||
Dim oAccessCode As String = Helpers.GetAccessCode()
|
||||
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_CODE), oAccessCode)
|
||||
oEmailAdress = Trim(oEmailAdress)
|
||||
If IsValidEmailAddress(oEmailAdress) = True Then
|
||||
Dim oLastName As String = Controller.GetLastNameByEmailAdress(oEmailAdress)
|
||||
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_NAME), oLastName)
|
||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
|
||||
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
|
||||
Else
|
||||
Dim oMsg = Resources.Envelope.Error_email_Validation
|
||||
oMsg = oMsg.Replace("@Mail", oEmailAdress)
|
||||
MsgBox(oMsg, MsgBoxStyle.Exclamation, Text)
|
||||
ViewReceivers.DeleteRow(ViewReceivers.FocusedRowHandle)
|
||||
End If
|
||||
CellValueChanged = False
|
||||
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 Sub
|
||||
Private Function IsValidEmailAddress(pEmailAddress As String) As Boolean
|
||||
Try
|
||||
If pEmailAddress.Contains("@") Then
|
||||
Dim oAddress = New System.Net.Mail.MailAddress(pEmailAddress)
|
||||
Return oAddress.Address = pEmailAddress
|
||||
Else
|
||||
Return False
|
||||
End If
|
||||
Catch ex As Exception
|
||||
Logger.Error(ex)
|
||||
Return False
|
||||
End Try
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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 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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
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
|
||||
|
||||
@@ -25,6 +25,7 @@ Partial Class frmEnvelopeMainData
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmEnvelopeMainData))
|
||||
Me.LayoutControl1 = New DevExpress.XtraLayout.LayoutControl()
|
||||
Me.chked_2Faktor = New DevExpress.XtraEditors.CheckEdit()
|
||||
Me.txtTitle = New DevExpress.XtraEditors.TextEdit()
|
||||
Me.cmbEnvelopeType = New DevExpress.XtraEditors.ComboBoxEdit()
|
||||
Me.btOK = New DevExpress.XtraEditors.SimpleButton()
|
||||
@@ -62,9 +63,11 @@ Partial Class frmEnvelopeMainData
|
||||
Me.LayoutControlItem8 = New DevExpress.XtraLayout.LayoutControlItem()
|
||||
Me.LayoutControlItem12 = 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)
|
||||
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.LayoutControl1.SuspendLayout()
|
||||
CType(Me.chked_2Faktor.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.txtTitle.Properties, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.cmbEnvelopeType.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.LayoutControlItem12, 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()
|
||||
Me.SuspendLayout()
|
||||
'
|
||||
'LayoutControl1
|
||||
'
|
||||
Me.LayoutControl1.Controls.Add(Me.chked_2Faktor)
|
||||
Me.LayoutControl1.Controls.Add(Me.txtTitle)
|
||||
Me.LayoutControl1.Controls.Add(Me.cmbEnvelopeType)
|
||||
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.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
|
||||
'
|
||||
resources.ApplyResources(Me.txtTitle, "txtTitle")
|
||||
@@ -311,16 +325,16 @@ Partial Class frmEnvelopeMainData
|
||||
'EmptySpaceItem2
|
||||
'
|
||||
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.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)
|
||||
'
|
||||
'groupFinalEmail
|
||||
'
|
||||
Me.groupFinalEmail.GroupStyle = DevExpress.Utils.GroupStyle.Light
|
||||
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.Size = New System.Drawing.Size(565, 93)
|
||||
resources.ApplyResources(Me.groupFinalEmail, "groupFinalEmail")
|
||||
@@ -348,7 +362,7 @@ Partial Class frmEnvelopeMainData
|
||||
Me.groupExpiration.Enabled = False
|
||||
Me.groupExpiration.GroupStyle = DevExpress.Utils.GroupStyle.Light
|
||||
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.Size = New System.Drawing.Size(565, 93)
|
||||
resources.ApplyResources(Me.groupExpiration, "groupExpiration")
|
||||
@@ -376,7 +390,7 @@ Partial Class frmEnvelopeMainData
|
||||
Me.groupReminders.Enabled = False
|
||||
Me.groupReminders.GroupStyle = DevExpress.Utils.GroupStyle.Light
|
||||
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.Size = New System.Drawing.Size(565, 115)
|
||||
resources.ApplyResources(Me.groupReminders, "groupReminders")
|
||||
@@ -411,10 +425,10 @@ Partial Class frmEnvelopeMainData
|
||||
'groupOptions
|
||||
'
|
||||
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.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")
|
||||
'
|
||||
'LayoutControlItem8
|
||||
@@ -438,12 +452,21 @@ Partial Class frmEnvelopeMainData
|
||||
'LayoutControlItem13
|
||||
'
|
||||
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.Size = New System.Drawing.Size(541, 22)
|
||||
Me.LayoutControlItem13.TextSize = New System.Drawing.Size(0, 0)
|
||||
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
|
||||
'
|
||||
Me.AdornerUIManager1.Owner = Me
|
||||
@@ -461,6 +484,7 @@ Partial Class frmEnvelopeMainData
|
||||
Me.ShowInTaskbar = False
|
||||
CType(Me.LayoutControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
Me.LayoutControl1.ResumeLayout(False)
|
||||
CType(Me.chked_2Faktor.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.txtTitle.Properties, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.cmbEnvelopeType.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.LayoutControlItem12, 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()
|
||||
Me.ResumeLayout(False)
|
||||
|
||||
@@ -540,4 +565,6 @@ Partial Class frmEnvelopeMainData
|
||||
Friend WithEvents LayoutControlItem14 As DevExpress.XtraLayout.LayoutControlItem
|
||||
Friend WithEvents EmptySpaceItem2 As DevExpress.XtraLayout.EmptySpaceItem
|
||||
Friend WithEvents groupAllOptions As DevExpress.XtraLayout.LayoutControlGroup
|
||||
Friend WithEvents chked_2Faktor As DevExpress.XtraEditors.CheckEdit
|
||||
Friend WithEvents LayoutControlItem16 As DevExpress.XtraLayout.LayoutControlItem
|
||||
End Class
|
||||
|
||||
@@ -118,13 +118,40 @@
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<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=">>chked_2Faktor.Name" xml:space="preserve">
|
||||
<value>chked_2Faktor</value>
|
||||
</data>
|
||||
<data name=">>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=">>chked_2Faktor.Parent" xml:space="preserve">
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>chked_2Faktor.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
</data>
|
||||
<data name="txtTitle.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>204, 45</value>
|
||||
</data>
|
||||
<data name="txtTitle.Size" type="System.Drawing.Size, System.Drawing">
|
||||
<value>363, 20</value>
|
||||
</data>
|
||||
<assembly alias="mscorlib" name="mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" />
|
||||
<data name="txtTitle.TabIndex" type="System.Int32, mscorlib">
|
||||
<value>4</value>
|
||||
</data>
|
||||
@@ -138,7 +165,7 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>txtTitle.ZOrder" xml:space="preserve">
|
||||
<value>4</value>
|
||||
<value>5</value>
|
||||
</data>
|
||||
<data name="cmbEnvelopeType.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>204, 69</value>
|
||||
@@ -163,7 +190,7 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>cmbEnvelopeType.ZOrder" xml:space="preserve">
|
||||
<value>5</value>
|
||||
<value>6</value>
|
||||
</data>
|
||||
<data name="btOK.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>22, 636</value>
|
||||
@@ -191,7 +218,7 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>btOK.ZOrder" xml:space="preserve">
|
||||
<value>6</value>
|
||||
<value>7</value>
|
||||
</data>
|
||||
<data name="btCancel.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>92, 636</value>
|
||||
@@ -218,7 +245,10 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>btCancel.ZOrder" xml:space="preserve">
|
||||
<value>7</value>
|
||||
<value>8</value>
|
||||
</data>
|
||||
<data name="cmbCertificationType.Enabled" type="System.Boolean, mscorlib">
|
||||
<value>False</value>
|
||||
</data>
|
||||
<data name="cmbCertificationType.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 162</value>
|
||||
@@ -242,10 +272,10 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>cmbCertificationType.ZOrder" xml:space="preserve">
|
||||
<value>8</value>
|
||||
<value>9</value>
|
||||
</data>
|
||||
<data name="chkSendReminderEmails.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>27, 277</value>
|
||||
<value>27, 302</value>
|
||||
</data>
|
||||
<data name="chkSendReminderEmails.Properties.Caption" xml:space="preserve">
|
||||
<value>Erinnerungen senden</value>
|
||||
@@ -266,13 +296,13 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>chkSendReminderEmails.ZOrder" xml:space="preserve">
|
||||
<value>9</value>
|
||||
<value>10</value>
|
||||
</data>
|
||||
<data name="spnFirstReminderDays.EditValue" type="System.Decimal, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="spnFirstReminderDays.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 299</value>
|
||||
<value>207, 324</value>
|
||||
</data>
|
||||
<data name="spnFirstReminderDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||
<value>Combo</value>
|
||||
@@ -293,13 +323,13 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>spnFirstReminderDays.ZOrder" xml:space="preserve">
|
||||
<value>10</value>
|
||||
<value>11</value>
|
||||
</data>
|
||||
<data name="spnReminderIntervalDays.EditValue" type="System.Decimal, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="spnReminderIntervalDays.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 323</value>
|
||||
<value>207, 348</value>
|
||||
</data>
|
||||
<data name="spnReminderIntervalDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||
<value>Combo</value>
|
||||
@@ -320,13 +350,13 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>spnReminderIntervalDays.ZOrder" xml:space="preserve">
|
||||
<value>11</value>
|
||||
<value>12</value>
|
||||
</data>
|
||||
<data name="spnExpiresDays.EditValue" type="System.Decimal, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="spnExpiresDays.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 392</value>
|
||||
<value>207, 417</value>
|
||||
</data>
|
||||
<data name="spnExpiresDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||
<value>Combo</value>
|
||||
@@ -347,13 +377,13 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>spnExpiresDays.ZOrder" xml:space="preserve">
|
||||
<value>12</value>
|
||||
<value>13</value>
|
||||
</data>
|
||||
<data name="spnExpiresWarningDays.EditValue" type="System.Decimal, mscorlib">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="spnExpiresWarningDays.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 416</value>
|
||||
<value>207, 441</value>
|
||||
</data>
|
||||
<data name="spnExpiresWarningDays.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||
<value>Combo</value>
|
||||
@@ -374,7 +404,7 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>spnExpiresWarningDays.ZOrder" xml:space="preserve">
|
||||
<value>13</value>
|
||||
<value>14</value>
|
||||
</data>
|
||||
<data name="cmbLanguage.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 186</value>
|
||||
@@ -398,10 +428,10 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>cmbLanguage.ZOrder" xml:space="preserve">
|
||||
<value>14</value>
|
||||
<value>15</value>
|
||||
</data>
|
||||
<data name="chkUseAccessCode.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>27, 210</value>
|
||||
<value>27, 235</value>
|
||||
</data>
|
||||
<data name="chkUseAccessCode.Properties.Caption" xml:space="preserve">
|
||||
<value>Verwende Zugriffscode</value>
|
||||
@@ -422,10 +452,10 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>chkUseAccessCode.ZOrder" xml:space="preserve">
|
||||
<value>15</value>
|
||||
<value>16</value>
|
||||
</data>
|
||||
<data name="cmbEmailToCreator.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 485</value>
|
||||
<value>207, 510</value>
|
||||
</data>
|
||||
<data name="cmbEmailToCreator.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||
<value>Combo</value>
|
||||
@@ -446,10 +476,10 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>cmbEmailToCreator.ZOrder" xml:space="preserve">
|
||||
<value>16</value>
|
||||
<value>17</value>
|
||||
</data>
|
||||
<data name="cmbEmailToReceivers.Location" type="System.Drawing.Point, System.Drawing">
|
||||
<value>207, 509</value>
|
||||
<value>207, 534</value>
|
||||
</data>
|
||||
<data name="cmbEmailToReceivers.Properties.Buttons" type="DevExpress.XtraEditors.Controls.ButtonPredefines, DevExpress.Utils.v21.2">
|
||||
<value>Combo</value>
|
||||
@@ -470,7 +500,7 @@
|
||||
<value>LayoutControl1</value>
|
||||
</data>
|
||||
<data name=">>cmbEmailToReceivers.ZOrder" xml:space="preserve">
|
||||
<value>17</value>
|
||||
<value>18</value>
|
||||
</data>
|
||||
<data name="LayoutControl1.Dock" type="System.Windows.Forms.DockStyle, System.Windows.Forms">
|
||||
<value>Fill</value>
|
||||
@@ -724,6 +754,12 @@
|
||||
<data name=">>LayoutControlItem13.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=">>LayoutControlItem16.Name" xml:space="preserve">
|
||||
<value>LayoutControlItem16</value>
|
||||
</data>
|
||||
<data name=">>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=">>AdornerUIManager1.Name" xml:space="preserve">
|
||||
<value>AdornerUIManager1</value>
|
||||
</data>
|
||||
|
||||
@@ -4,7 +4,7 @@ Imports EnvelopeGenerator.Common.Constants
|
||||
Imports System.ComponentModel
|
||||
|
||||
Public Class frmEnvelopeMainData
|
||||
|
||||
Private FormLoaded As Boolean = False
|
||||
Public Property Envelope As Envelope = New Envelope()
|
||||
Public Property NewEnvelopeMode As Boolean = True
|
||||
|
||||
@@ -20,70 +20,87 @@ Public Class frmEnvelopeMainData
|
||||
End Sub
|
||||
|
||||
Private Sub frmEnvelopeMainData_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||
If NewEnvelopeMode = True Then
|
||||
Me.Text = Resources.Envelope.New_Envelope
|
||||
Else
|
||||
Me.Text = Resources.Envelope.Edit_Envelope
|
||||
cmbEnvelopeType.ReadOnly = True
|
||||
End If
|
||||
Try
|
||||
If NewEnvelopeMode = True Then
|
||||
Me.Text = Resources.Envelope.New_Envelope
|
||||
Else
|
||||
Me.Text = Resources.Envelope.Edit_Envelope
|
||||
cmbEnvelopeType.ReadOnly = True
|
||||
End If
|
||||
|
||||
EnvelopeTypeModel = New EnvelopeTypeModel(State)
|
||||
Dim oTypes = EnvelopeTypeModel.List()
|
||||
EnvelopeTypeModel = New EnvelopeTypeModel(State)
|
||||
Dim oTypes = EnvelopeTypeModel.List()
|
||||
|
||||
If oTypes.Count = 0 Then
|
||||
MsgBox("No templates in Database!", MsgBoxStyle.Exclamation, Text)
|
||||
Close()
|
||||
Exit Sub
|
||||
End If
|
||||
If oTypes.Count = 0 Then
|
||||
MsgBox("No templates in Database!", MsgBoxStyle.Exclamation, Text)
|
||||
Close()
|
||||
Exit Sub
|
||||
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 oTranslatedFinalEmailTypeList = FinalEmailTypeList.Select(AddressOf TranslateFinalEmailType).ToList()
|
||||
Dim certificationTypeList = [Enum].GetValues(GetType(CertificationType)).Cast(Of CertificationType)()
|
||||
Dim oTranslatedCertificationTypeList = certificationTypeList.Select(AddressOf TranslateCertificationType).ToList()
|
||||
|
||||
cmbEmailToCreator.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
|
||||
cmbEmailToReceivers.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
|
||||
cmbCertificationType.Properties.Items.AddRange(oTranslatedCertificationTypeList)
|
||||
|
||||
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
|
||||
Dim oType = oTypes.FirstOrDefault()
|
||||
cmbEmailToCreator.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
|
||||
cmbEmailToReceivers.Properties.Items.AddRange(oTranslatedFinalEmailTypeList)
|
||||
|
||||
' This will trigger loading values from the type
|
||||
cmbEnvelopeType.EditValue = oType
|
||||
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()
|
||||
cmbEnvelopeType.Properties.Items.AddRange(oTypes.ToList)
|
||||
cmbLanguage.Properties.Items.AddRange(New List(Of String) From {"de", "en"})
|
||||
|
||||
groupAllOptions.Expanded = False
|
||||
|
||||
If NewEnvelopeMode = True Then
|
||||
Dim oType = oTypes.FirstOrDefault()
|
||||
|
||||
' 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
|
||||
|
||||
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
|
||||
Return Resources.Model.ResourceManager.GetString(pType.ToString())
|
||||
End Function
|
||||
|
||||
Private Function TranslateFinalEmailType(pType As FinalEmailType) As String
|
||||
Return Resources.Model.ResourceManager.GetString(pType.ToString())
|
||||
End Function
|
||||
|
||||
Private Sub btOK_Click(sender As Object, e As EventArgs) Handles btOK.Click
|
||||
|
||||
Dim Validator As Validator = New Validator(State.LogConfig, AdornerUIManager1)
|
||||
Dim oMissingParams = Validator.Validate(txtTitle)
|
||||
|
||||
@@ -110,13 +127,16 @@ Public Class frmEnvelopeMainData
|
||||
Envelope.ExpiresWarningWhenDays = spnExpiresWarningDays.EditValue
|
||||
Envelope.FinalEmailToCreator = cmbEmailToCreator.SelectedIndex
|
||||
Envelope.FinalEmailToReceivers = cmbEmailToReceivers.SelectedIndex
|
||||
|
||||
Envelope.TFA_Enabled = chked_2Faktor.EditValue
|
||||
' ContractType kann zzt nicht über die Oberfläche gesetzt werden
|
||||
Envelope.ContractType = ContractType.Contract
|
||||
End Sub
|
||||
|
||||
Private Sub frmEnvelopeMainData_Shown(sender As Object, e As EventArgs) Handles Me.Shown
|
||||
SetFormHeight()
|
||||
CheckAccessCode()
|
||||
FormLoaded = True
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub SetFormHeight()
|
||||
@@ -152,4 +172,15 @@ Public Class frmEnvelopeMainData
|
||||
cmbEmailToReceivers.SelectedIndex = oSelectedType.FinalEmailToReceivers
|
||||
|
||||
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
|
||||
169
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
169
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
@@ -65,7 +65,7 @@ Partial Class frmMain
|
||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||
Me.RibbonPageEnvelopeActions = 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.RibbonPageGroup3 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||
Me.RibbonStatusBar = New DevExpress.XtraBars.Ribbon.RibbonStatusBar()
|
||||
@@ -85,8 +85,20 @@ Partial Class frmMain
|
||||
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||
Me.GridColumn5 = 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.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.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
||||
@@ -105,6 +117,21 @@ Partial Class frmMain
|
||||
CType(Me.ViewReceiversCompleted, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.ViewHistoryCompleted, 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()
|
||||
'
|
||||
'SplashScreenManager1
|
||||
@@ -134,7 +161,7 @@ Partial Class frmMain
|
||||
resources.ApplyResources(Me.XtraTabControlMain, "XtraTabControlMain")
|
||||
Me.XtraTabControlMain.Name = "XtraTabControlMain"
|
||||
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
|
||||
'
|
||||
@@ -426,7 +453,7 @@ Partial Class frmMain
|
||||
'
|
||||
'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"
|
||||
resources.ApplyResources(Me.RibbonPage1, "RibbonPage1")
|
||||
'
|
||||
@@ -445,15 +472,15 @@ Partial Class frmMain
|
||||
Me.RibbonPageGroup1.Name = "RibbonPageGroup1"
|
||||
resources.ApplyResources(Me.RibbonPageGroup1, "RibbonPageGroup1")
|
||||
'
|
||||
'RibbonPageGroup2
|
||||
'RibbonPageFunctions
|
||||
'
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnShowDocument)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.btnContactReceiver)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.bbtnitmInfoMail)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.bbtnitmEB)
|
||||
Me.RibbonPageGroup2.ItemLinks.Add(Me.BarButtonItem2)
|
||||
Me.RibbonPageGroup2.Name = "RibbonPageGroup2"
|
||||
resources.ApplyResources(Me.RibbonPageGroup2, "RibbonPageGroup2")
|
||||
Me.RibbonPageFunctions.ItemLinks.Add(Me.btnShowDocument)
|
||||
Me.RibbonPageFunctions.ItemLinks.Add(Me.btnContactReceiver)
|
||||
Me.RibbonPageFunctions.ItemLinks.Add(Me.bbtnitmInfoMail)
|
||||
Me.RibbonPageFunctions.ItemLinks.Add(Me.bbtnitmEB)
|
||||
Me.RibbonPageFunctions.ItemLinks.Add(Me.BarButtonItem2)
|
||||
Me.RibbonPageFunctions.Name = "RibbonPageFunctions"
|
||||
resources.ApplyResources(Me.RibbonPageFunctions, "RibbonPageFunctions")
|
||||
'
|
||||
'RibbonPage2
|
||||
'
|
||||
@@ -606,6 +633,70 @@ Partial Class frmMain
|
||||
Me.GridColumn7.FieldName = "AddedWhen"
|
||||
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
|
||||
'
|
||||
Me.RefreshTimer.Interval = 120000
|
||||
@@ -614,6 +705,33 @@ Partial Class frmMain
|
||||
'
|
||||
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
|
||||
'
|
||||
resources.ApplyResources(Me, "$this")
|
||||
@@ -643,6 +761,21 @@ Partial Class frmMain
|
||||
CType(Me.ViewReceiversCompleted, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.ViewHistoryCompleted, 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.PerformLayout()
|
||||
|
||||
@@ -692,7 +825,7 @@ Partial Class frmMain
|
||||
Friend WithEvents txtRefreshLabel As DevExpress.XtraBars.BarStaticItem
|
||||
Friend WithEvents btnShowDocument 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 ViewHistoryCompleted As DevExpress.XtraGrid.Views.Grid.GridView
|
||||
Friend WithEvents ColHistoryStatusCompleted As DevExpress.XtraGrid.Columns.GridColumn
|
||||
@@ -709,4 +842,16 @@ Partial Class frmMain
|
||||
Friend WithEvents bbtnitmEB As DevExpress.XtraBars.BarButtonItem
|
||||
Friend WithEvents bbtnitmInfoMail 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
|
||||
|
||||
@@ -764,7 +764,7 @@
|
||||
<data name="RibbonPageGroup1.Text" xml:space="preserve">
|
||||
<value>Daten</value>
|
||||
</data>
|
||||
<data name="RibbonPageGroup2.Text" xml:space="preserve">
|
||||
<data name="RibbonPageFunctions.Text" xml:space="preserve">
|
||||
<value>Funktionen</value>
|
||||
</data>
|
||||
<data name="RibbonPage1.Text" xml:space="preserve">
|
||||
@@ -1025,6 +1025,291 @@
|
||||
<data name=">>XtraTabPage2.ZOrder" xml:space="preserve">
|
||||
<value>1</value>
|
||||
</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=">>GridControlData.Name" xml:space="preserve">
|
||||
<value>GridControlData</value>
|
||||
</data>
|
||||
<data name=">>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=">>GridControlData.Parent" xml:space="preserve">
|
||||
<value>SplitContainerControl2.Panel1</value>
|
||||
</data>
|
||||
<data name=">>GridControlData.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="SplitContainerControl2.Panel1.Text" xml:space="preserve">
|
||||
<value>Panel1</value>
|
||||
</data>
|
||||
<data name=">>SplitContainerControl2.Panel1.Name" xml:space="preserve">
|
||||
<value>SplitContainerControl2.Panel1</value>
|
||||
</data>
|
||||
<data name=">>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=">>SplitContainerControl2.Panel1.Parent" xml:space="preserve">
|
||||
<value>SplitContainerControl2</value>
|
||||
</data>
|
||||
<data name=">>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=">>ChartControl1.Name" xml:space="preserve">
|
||||
<value>ChartControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>ChartControl1.Parent" xml:space="preserve">
|
||||
<value>SplitContainerControl2.Panel2</value>
|
||||
</data>
|
||||
<data name=">>ChartControl1.ZOrder" xml:space="preserve">
|
||||
<value>0</value>
|
||||
</data>
|
||||
<data name="SplitContainerControl2.Panel2.Text" xml:space="preserve">
|
||||
<value>Panel2</value>
|
||||
</data>
|
||||
<data name=">>SplitContainerControl2.Panel2.Name" xml:space="preserve">
|
||||
<value>SplitContainerControl2.Panel2</value>
|
||||
</data>
|
||||
<data name=">>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=">>SplitContainerControl2.Panel2.Parent" xml:space="preserve">
|
||||
<value>SplitContainerControl2</value>
|
||||
</data>
|
||||
<data name=">>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=">>SplitContainerControl2.Name" xml:space="preserve">
|
||||
<value>SplitContainerControl2</value>
|
||||
</data>
|
||||
<data name=">>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=">>SplitContainerControl2.Parent" xml:space="preserve">
|
||||
<value>XtraTabPageAdmin</value>
|
||||
</data>
|
||||
<data name=">>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=">>GroupControl2.Name" xml:space="preserve">
|
||||
<value>GroupControl2</value>
|
||||
</data>
|
||||
<data name=">>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=">>GroupControl2.Parent" xml:space="preserve">
|
||||
<value>PanelControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_All.Name" xml:space="preserve">
|
||||
<value>btnEnvelopes_All</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_All.Parent" xml:space="preserve">
|
||||
<value>GroupControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_thisYear.Name" xml:space="preserve">
|
||||
<value>btnEnvelopes_thisYear</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_thisYear.Parent" xml:space="preserve">
|
||||
<value>GroupControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_lastmonth.Name" xml:space="preserve">
|
||||
<value>btnEnvelopes_lastmonth</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_lastmonth.Parent" xml:space="preserve">
|
||||
<value>GroupControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_thismonth.Name" xml:space="preserve">
|
||||
<value>btnEnvelopes_thismonth</value>
|
||||
</data>
|
||||
<data name=">>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=">>btnEnvelopes_thismonth.Parent" xml:space="preserve">
|
||||
<value>GroupControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>GroupControl1.Name" xml:space="preserve">
|
||||
<value>GroupControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>GroupControl1.Parent" xml:space="preserve">
|
||||
<value>PanelControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>PanelControl1.Name" xml:space="preserve">
|
||||
<value>PanelControl1</value>
|
||||
</data>
|
||||
<data name=">>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=">>PanelControl1.Parent" xml:space="preserve">
|
||||
<value>XtraTabPageAdmin</value>
|
||||
</data>
|
||||
<data name=">>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=">>XtraTabPageAdmin.Name" xml:space="preserve">
|
||||
<value>XtraTabPageAdmin</value>
|
||||
</data>
|
||||
<data name=">>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=">>XtraTabPageAdmin.Parent" xml:space="preserve">
|
||||
<value>XtraTabControlMain</value>
|
||||
</data>
|
||||
<data name=">>XtraTabPageAdmin.ZOrder" xml:space="preserve">
|
||||
<value>2</value>
|
||||
</data>
|
||||
<data name=">>XtraTabControlMain.Name" xml:space="preserve">
|
||||
<value>XtraTabControlMain</value>
|
||||
</data>
|
||||
@@ -1098,7 +1383,7 @@
|
||||
<value>True</value>
|
||||
</metadata>
|
||||
<metadata name="$this.TrayHeight" type="System.Int32, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089">
|
||||
<value>263</value>
|
||||
<value>108</value>
|
||||
</metadata>
|
||||
<data name="$this.AutoScaleDimensions" type="System.Drawing.SizeF, System.Drawing">
|
||||
<value>6, 13</value>
|
||||
@@ -1108,83 +1393,83 @@
|
||||
</data>
|
||||
<data name="frmMain.IconOptions.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>
|
||||
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
|
||||
Bv/c01f/A4y2+8cc2/IPAAAAAElFTkSuQmCC
|
||||
iVBORw0KGgoAAAANSUhEUgAAAQAAAAEACAYAAABccqhmAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||
DQAACw0B7QfALAAAEYBJREFUeF7t3b+uHEkVx/F9BD8ED7DmBfAD8ACEDsjZnMQJuXMSJxsRICJEgGRB
|
||||
QgJaCQmJCAdEJGxCQnKpnz1t+rbPzPR016k6p+obfKR1773Tf6brdNU5VX2/enp6CunbH7x8Ubwq3hTv
|
||||
ivfFh+IJCEz3qO5V3bO6d3UPv7Du8QjMjT3oIhWvC104GjpGo3ta97bu8TABwdzYii5E8U3xXWFdNGBU
|
||||
uue7BwNzo7dy0uoWKRpaFwaYjdrCK6uteDM3eiknqYhH9x6wqW28ttqOF3NjbTqpy8lZJw3guWaBwNxY
|
||||
SzmJrwtlRK2TBHCb2s7XVtuqxdx4VjloJffeXk4CwDlqSy7JQnPjGeVAleCjuw/UpTZVPVFobjyqHKAm
|
||||
PlgHD6CON1bbO8rc+KhyUOryM9YH2lBbqzIkMDc+ohyIEn10+YG21OZOJwjNjXvpAIrvLwcEoC21vVNB
|
||||
wNy4h3Z8OQDrwAC0cSoImBvv0Q4vO7YOCEBbh4OAufEW7eiyQ+tAAPRxKAiYG6/RDi47sg4AQF8PBwFz
|
||||
o6V8sEp9ZPuB2NRGd5cIzY2W8qHU+YEc3ltt2GJu3CofyAw/IJddMwbNjWvlgzS339oBgNjurh0wNy7K
|
||||
BzDuB/K6mw8wNy7KL7OkF8jtrdW2F+ZGKb+okp/1gQByuVoaNDdK+SWy/sAYrlYFzI3lF/QOP+uDAORk
|
||||
vmPwiw1SfpjEHzCWD1Zb/2JD+UGe/sCYvugFPPuHlB/i6Q+M6YtewLN/lB9g0g8wtmeTg7YBgD/XBYzt
|
||||
3brNrxu/Zv1ZvwBgLJ9nB64DAMk/YA6fk4HrAMCf6Abm8N2zAFA20P0H5vJxGLAEALr/wFw+DgOWAED2
|
||||
H5jLx2rAEgCY/APM5eOkIMb/wLxeKAAw+w+Y0ysFAF74CczpDQlAYF7vFAB48w8wp/cKAFQAgvjNj14+
|
||||
/f4nY9M5WueOLj4oAFj/Aw396ocvn/76i5dPT3+bg85V52xdC7RFAOhMT8X//NFuKCPTOevcrWuCdggA
|
||||
negJ+I9f2o1jJroG9Ab6IQB08Iefvnz675/tBjEjXQtdE+tawRcBoCElwP71a7sR4NO1IUnYFgGgkb/8
|
||||
nKf+HrpGulbWNUR9BABnv/3xy6d//86+2XGdrpmunXVNUQ8BwMlspT0vlAx9EQAczFra80LJ0A8BoCJK
|
||||
e74oGdZHAKiE0l4blAzrIgCcRGmvD0qGdRAATqC01xclw/MIAAdQ2ouFkuFxBIAHUdqLS9+N9Z3hOgLA
|
||||
TpT2cqBk+BgCwB0qO/39rX2zIS59Z5QM7yMA3EBpLzdKhvcRAAwqL/3zW/umQj76LikZ2ggAG5T2xkTJ
|
||||
0EYAuFAZKfKEHh1bJtY5RKBjo2T4fwSAInJpL2uNO/pcCUqGn0wdACKX9kbpskYeUlEynDQARC/tqZs6
|
||||
UtIq+nqJmUuG0wWAyKU9HdfIZSuufTzTBIDopb1Z1rrrHCO/M2G2kuEUAYBxaDzkX2IYOgBEL+3N/r47
|
||||
nXvkCswMJcNhA0DkG0t0c1nHPaPIQVpGLhkOFwAidy23qEXHD9SLUYdqwwQAdSczrtqbeVaazt26JpGN
|
||||
VjIcIgBELi/doyfLjHkAnXOWntrWSCXD1AEgemlvL52DdX4jG+V7y14yTBsAIpf2jvjTz+zzHJHO1boG
|
||||
GWUvGaYLANGnlR6lG2mGCSg6x5EC90L3ZMbvL1UAyJIxPkqr56zzHsnob1POVtlJEQCiLy2taeTS4OgB
|
||||
fJFpCXeKAKCulXWhRzVivVnnZJ3rqLIMB9IMAUbIGu81Wmkwc8nviExVnTQBQHVX62KPaqTS4EzBWzLN
|
||||
EUiVBOyZPV6mgracvTZCabBlyU/fTe+p4LpHresQVaoA0Guq73b6Z6tkVvbSYMuS3zp5qu+q572yvgbR
|
||||
pQoArZOBt7K5reYiZC4NtqrcXFtZ2aN6lC1gpwoA0uIL1VPrXjmu19Mti0i9JB1Li+8qY7BOFwC8x5SP
|
||||
zOhqmZjMVBpsWfLbm3DTd+rda8uYs0kXADS+84rmRyJ4q/fbZSkNtiz56dpbx3CLVw9S92SG72crXQAQ
|
||||
z0b36JfY8obPUBpsVfI7EhD189Zn1XAkGEWQMgB4djGPrOyiNPhJ65KfdQy36Lu1PquGTEO0tZQBQLye
|
||||
uvpca3/3eN5ca+pqHrn5vemYWiTa5Ojy22j3TARpA4BnlvloA5u5NNiiOiPXSn73ePbSMlZpFmkDgLK6
|
||||
1pdRw9HxnMaYrZ6CkSactJp0cybR5pk32ls1iihtABCvhNOZG2220mDEkt+WZ2DOvmYjdQDwTDqdSbZl
|
||||
eCLWkKXHE/U+iSB1ABCvG/DoWFPUMFqNiXs+gVqV/HQtzwQ6r9yM7j1rf5mkDwCeT9szYzvPpNNWj5dS
|
||||
tqp6yJmqh2euKFIe5qj0AcCzoZ39gkctDWpfrbr+Z4Ob5wOi5TX3kj4AiFd3u0Z9d8TSYPSS35pX7b/l
|
||||
9fY0RADwTPKcfbtLlkTZXp5P1DVds7MJTs+KTPbk32KIAKAbxfqSaqiRZBulNJih5LfmmaQ8G5yiGCIA
|
||||
SKQFQpZMT06LPjNTT8bzoZB14Y9lmADg+XSqkWXXDdlq7OxRGsxS8lt4JmAjTMCqZZgAINEXe3hWLLZq
|
||||
BK1Fq2qG1MqsR78XohgqAERcILTVqjGpu17jmPUZrbr+tYKWZ6DNvPDHMlQAiLhAyJKpNJip5Ldg4c9+
|
||||
QwUA8Rqr1kyuZUmoZUxcel5bj9xKb8MFgCwLP1qWBvV0PcL6LA81Sn6LLN9/FMMFAPF6AqhRWPs7qtUT
|
||||
NrIaJb81r8Cle8raX3ZDBgDPhlV7DNhqjB1RjRzFGgt/HjdkAMiUBW6ZZY9E51yjSrGWoQoUzZABQLye
|
||||
rB514JZ19ihqzlNYeNX+a/dUIhk2AHgmg2omrRatZtpF4JFN90yqjpj8WwwbAFQOsr7MGjzmgrcsDfak
|
||||
c6xV8luLvhYkqmEDgGS7KVqutuvFYx59tmAfydABwLNb6DGGlZFLg16ZdM8cisdwL5KhA4BkTAyNWBrM
|
||||
eL1GW/hjGT4AZCwNjVYa9Cj5LfS51j5rGG3hj2X4AJBlgdCaxrRePZcedC5eiTTPPM9oC38swwcAyTY9
|
||||
dMSSoNdCGq+eUu1p31FNEQAyLRDxHLL0VrtLnel7jWqKACAZnhSeN3QUNRsWC3/OmyYARB8rjpb4u0bn
|
||||
WCMhmDG3E9E0ASBytni0pN89NZKCGas7EU0TACRqvXjEuv89Z+cFeAVMz/kKEU0VACLOGPMcmkR3tKud
|
||||
cYZnVFMFgGhzxmdI+t1zJCnoGTS95itENVUAkCg3zwwLf/Z6ZIFQtCCe3XQBIEL3URnsGTL+e+la7K2k
|
||||
sPCnrukCgPRMIOkJ1irpp/0oW35Gy2Pd04PyOp6zidyspgwAurGtm6CGeyUkzyHI2t4GdU/LgHWvCx65
|
||||
lJvVlAGg1yQSz8CzVmuyzUKf1WrIcqshegbPGpO5MpoyAEjraaSeuYctj7FshOP3CkKzLPyxTBsAPEtw
|
||||
29JWyyeoZx3bMwG3ZvVgWn5fM5k2AIhXo1wvfdUY2ivpuNWijNUqh6Frts5heC2RvtZjm8XUAaDFmNJr
|
||||
qLFVK+l3T8uk4NI175WzmcHUAcA7q9zqaamnWIvGv9C+Wg1pdA17Vm1GN3UAEK+nWasGIj1uYs/gueV1
|
||||
LfXdW+c2k+kDQKvElpeeCSzPxFwLngnTLKYPAOrOWjdHBhHGr62GOR5aDpuimj4ASMaXcEaqXbdKdNbk
|
||||
9ZLSbAgARctJLjVsS2S96VhalTpr8ZgslREB4CLLDayEWMTMtY6pZeLzDH3X1jnMiABwkeVv8kV+cmXp
|
||||
SXn9jcKMCAAXnpNNasmwYq3VgqczZl34YyEArEROZmWasRa5MhApeRoBAWAlal271TTfWnSsraYLP2rm
|
||||
hT8WAsCKbtxoiSwdT8Yuq4454rXMFEhbIABsROu+PvLCzGiivfg00zCqFQLARss57veM0F2NNKyKWD7t
|
||||
jQBgiDAnYKSnVYReFbV/GwHA0HuB0Iir1HonBVn4YyMAGJQosm6iFvSkGjFRpXPq2bMi+WcjAFzRY4GQ
|
||||
stQjj1N7TRdm4c91BIArekxrnaFG3SMpyMKf6wgAN7TssmaY5ltLy+nCJP9uIwDc0GqB0Ixd1FZDLBb+
|
||||
3EYAuKHFAqFRk373tEoKsvDnNgLAHS0WCM04Q63F3AAW/txHALijVdIq24Kfo3SOreYEzJBUPYsAcIdu
|
||||
2FalK8qA9Wg/Mw6tHkUA2KHlVFbduCM+uXROrRq/zDisOoIAsIOeXNZN5mmk7HWP162N3JOqiQCwU49p
|
||||
rEpiZe7G6th7vGWJ2v9+BICdei0Q0s2c8WmmY+4RNIWFP/sRAHbS08y62VrQ2DnTdFYda8vx/hbJv/0I
|
||||
AA/osUBojbcC38fCn8cQAB4Q4b33usEjPuF0TL0DpLDw5zEEgAf17NouNJEmUl5Ax9L7hR+i78Y6PlxH
|
||||
AHiQbvYIQUDHEOGFoTqGKNcjY7K0NwLAAeruRnjiSc+Md+9Xpy1mmUbtgQBwQoSXXYqOo2UD0L4inbt1
|
||||
jNiHAHBSjzfcWPQUbLH0VfuI0vthsc95BIAKIuUFPMfBs5znTAgAlUTKC3g8GSP1dBjv10MAqGzEsTHj
|
||||
/XERAByM8rQcvVcDAoCb7ONlxvtzIAA4ivIEVSN65Amqn43Q+Bnv+yMANBBlDL3nJSM9Xt5hYbzfBgGg
|
||||
kSh5gWsvGdG2Hi/vsDDeb4cA0FCUcfX2JSP6714v71hjvN8eAaCxSHkBLZ3t/fKOBeP9PggAnUTJC0TA
|
||||
eL8fAkBHUfICPTHe74sA0FmUvEBrjPdjIAAEECUv0Arj/TgIAIHMkBdgvB8LASCYkfMCjPfjIQAENFpe
|
||||
gPF+XASAoEbJCzDej40AEFzmvADj/fgIAAlkzAsw3s+BAJBElrwA4/1cCACJRM8LMN7PhwCQUMS8AOP9
|
||||
nAgASUXKCzDez4sAkFjvvADj/fwIAMn1ygsw3h8DAWAQLfMCjPfHQQAYSIu8AOP9sRAABuOVF2C8PyYC
|
||||
wIBq5wUY74+LADCwGnkBxvtjIwAM7kxegPH++AgAE3g0L8B4fx4EgEnszQsw3p8LAWAyt/ICjPfnQwCY
|
||||
kJUXYLw/JwLApJa8AOP9uSkAfNhuxBw01me8P7UPCgDvNxsBzOG9AsC7zUYAc3inAPBmsxHAHN4oALza
|
||||
bAQwh1cKAC82GwHM4cVXT09UAoAJfVDbXwIAiUBgLu/WAeD15n8CGNvrdQAgDwDM5cXnAHAJAt9tfgDA
|
||||
mL5b2v06AHyz+SEAY/rY/d8GAIYBwBw+dv+fBYBLEKAaAIztY/Z/sQ0AzAoExvZq3eafBQApP8CkIGBM
|
||||
Hyf/rD37h5QfYk4AMKbPyb/Fs38syg/SCwDG8sXTX77YIOWH6QUAY/ni6S9fbFiUX+BNQcAY3lttXMyN
|
||||
Un7p682HAMjpa6uNi7lxUX7x7eaDAOTy1mrbC3PjovyyZgeSEARyUtv9POvPYm5cKx/A5CAgp2eTfizm
|
||||
xq3yQbw4FMjljdWWt8yNlvKBVAWAHK5m/bfMjZbyoeQDgPjujvvXzI3XlA9WafD7y44AxKK2ebXkZzE3
|
||||
3qIdXHZkHQCAPh5u/GJuvEc7uuzQOhAAbR1q/GJu3EM7vOzYOiAAbRxu/GJu3Es7vhyAdWAAfJ1q/GJu
|
||||
fIQOoKA6ALSlNneq8Yu58VHlQFQiZJ4A0Iba2u5S3y3mxqPKQTFjEPC1a4bfXubGM8oBau0AQwKgLrWp
|
||||
u3P7H2VuPKscqIYELCUG6lBbqtLl3zI31lIOWglCcgPAMWo7pxN9t5gbaysnoXcMMiwA9lFbMd/hV5u5
|
||||
0YtO6nJy1kkDs2vW8BfmRm/lJJUo5M+QAZ+oLVRP8O1hbmylnLSSheoV8KfJMRvd87r3XZJ7e5kbe9CF
|
||||
uFwQRUOGCRiN7mnd290b/Zq5MQJdpEJDBU0u0oVTRpTAgOh0j+pe1T2re1f3cJgG/9zTV/8DjLb7xxzb
|
||||
8g8AAAAASUVORK5CYII=
|
||||
</value>
|
||||
</data>
|
||||
<data name="$this.StartPosition" type="System.Windows.Forms.FormStartPosition, System.Windows.Forms">
|
||||
@@ -1403,10 +1688,10 @@
|
||||
<data name=">>RibbonPageGroup1.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=">>RibbonPageGroup2.Name" xml:space="preserve">
|
||||
<value>RibbonPageGroup2</value>
|
||||
<data name=">>RibbonPageFunctions.Name" xml:space="preserve">
|
||||
<value>RibbonPageFunctions</value>
|
||||
</data>
|
||||
<data name=">>RibbonPageGroup2.Type" xml:space="preserve">
|
||||
<data name=">>RibbonPageFunctions.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=">>RibbonPage2.Name" xml:space="preserve">
|
||||
@@ -1505,6 +1790,12 @@
|
||||
<data name=">>GridColumn7.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=">>GridViewData.Name" xml:space="preserve">
|
||||
<value>GridViewData</value>
|
||||
</data>
|
||||
<data name=">>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=">>RefreshTimer.Name" xml:space="preserve">
|
||||
<value>RefreshTimer</value>
|
||||
</data>
|
||||
|
||||
@@ -40,17 +40,22 @@ Public Class frmMain
|
||||
|
||||
TempFiles = New TempFiles(LogConfig)
|
||||
TempFiles.Create()
|
||||
|
||||
MyTempFiles = TempFiles
|
||||
RefreshHelper = New RefreshHelper(ViewEnvelopes, "Id")
|
||||
|
||||
Controller = New EnvelopeListController(State)
|
||||
|
||||
Try
|
||||
Me.LookAndFeel.UseDefaultLookAndFeel = False
|
||||
LookAndFeel.SetSkinStyle(SkinStyle.Office2019White, SkinSvgPalette.DefaultSkin)
|
||||
Catch ex As Exception
|
||||
|
||||
End Try
|
||||
|
||||
If MYUSER.IsAdmin Then
|
||||
XtraTabControlMain.TabPages(2).PageVisible = True
|
||||
Else
|
||||
XtraTabControlMain.TabPages(2).PageVisible = False
|
||||
End If
|
||||
LoadEnvelopeData()
|
||||
End Sub
|
||||
|
||||
@@ -190,6 +195,8 @@ Public Class frmMain
|
||||
End Sub
|
||||
|
||||
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
|
||||
Case 1
|
||||
btnEditEnvelope.Enabled = False
|
||||
@@ -206,6 +213,10 @@ Public Class frmMain
|
||||
bbtnitmEB.Enabled = False
|
||||
LoadEnvelopeData()
|
||||
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
||||
|
||||
Case 2
|
||||
RibbonPageFunctions.Enabled = False
|
||||
RibbonPageEnvelopeActions.Enabled = False
|
||||
End Select
|
||||
End Sub
|
||||
|
||||
@@ -565,7 +576,9 @@ Public Class frmMain
|
||||
For Each oReceiver As EnvelopeReceiver In Receivers
|
||||
If oReceiver.Email = selReceiver.Email 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
|
||||
Next
|
||||
@@ -582,4 +595,49 @@ Public Class frmMain
|
||||
txtEnvelopeIdLabel.Caption = String.Format(txtEnvelopeIdLabel.Tag, oEnvelope.Id)
|
||||
|
||||
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
|
||||
@@ -62,7 +62,7 @@ Public Class frmSplashScreen
|
||||
Private Sub Worker_DoWork(sender As Object, e As DoWorkEventArgs) Handles Worker.DoWork
|
||||
Dim oState As State = DirectCast(e.Argument, State)
|
||||
|
||||
Worker.ReportProgress(20, "Initialize Database")
|
||||
Worker.ReportProgress(20, "Initializing Database")
|
||||
Thread.Sleep(300)
|
||||
|
||||
Dim oConnectionString = MSSQLServer.DecryptConnectionString(oState.Config.ConnectionString)
|
||||
@@ -74,15 +74,33 @@ Public Class frmSplashScreen
|
||||
DB_DD_ECM = oState.Database
|
||||
End If
|
||||
|
||||
Worker.ReportProgress(40, "Initialize Confguration")
|
||||
Worker.ReportProgress(40, "Initializing Configuration")
|
||||
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)
|
||||
oState.DbConfig = ConfigModel.LoadConfiguration()
|
||||
DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND
|
||||
Worker.ReportProgress(60, "Initialize User")
|
||||
DEF_TF_ENABLED = oState.DbConfig.Default_TFA_Enabled
|
||||
' DOCUMENT_PATH_MOVE_AFTSEND = oState.DbConfig.DOCUMENT_PATH_MOVE_AFTSEND
|
||||
Worker.ReportProgress(60, "Initializing User")
|
||||
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
|
||||
MS_GDPICTUREKEY = oKey
|
||||
End If
|
||||
@@ -91,13 +109,14 @@ Public Class frmSplashScreen
|
||||
|
||||
Dim oUser = oUserModel.SelectUser()
|
||||
|
||||
Worker.ReportProgress(80, "Initialize Rights")
|
||||
Worker.ReportProgress(80, "Initializing Rights")
|
||||
Thread.Sleep(300)
|
||||
|
||||
' This checks for module access and admin rights
|
||||
If oUser IsNot Nothing Then
|
||||
oUserModel.CheckUserLogin(oUser)
|
||||
End If
|
||||
MYUSER = oUser
|
||||
|
||||
Worker.ReportProgress(100, "Starting Application")
|
||||
Thread.Sleep(300)
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.API" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="7.0.15" />
|
||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.API;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.UserManager.Application;
|
||||
using EnvelopeGenerator.Application;
|
||||
using EnvelopeGenerator.Application.Extensions;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||
using Microsoft.AspNetCore.Localization;
|
||||
|
||||
@@ -5,19 +5,19 @@ namespace EnvelopeGenerator.Infrastructure.Contracts
|
||||
{
|
||||
public interface IEnvelopeReceiverRepository : ICRUDRepository<EnvelopeReceiver, (int Envelope, int Receiver)>
|
||||
{
|
||||
Task<IEnumerable<EnvelopeReceiver>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false);
|
||||
Task<IEnumerable<EnvelopeReceiver>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true);
|
||||
|
||||
Task<IEnumerable<EnvelopeReceiver>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true);
|
||||
Task<IEnumerable<EnvelopeReceiver>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true);
|
||||
|
||||
Task<EnvelopeReceiver?> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true);
|
||||
Task<EnvelopeReceiver?> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true);
|
||||
|
||||
Task<string?> ReadAccessCodeAsync(string uuid, string signature);
|
||||
Task<string?> ReadAccessCodeAsync(string uuid, string signature, bool readOnly = true);
|
||||
|
||||
Task<int> CountAsync(string uuid, string signature);
|
||||
|
||||
Task<EnvelopeReceiver?> ReadByIdAsync(int envelopeId, int receiverId);
|
||||
Task<EnvelopeReceiver?> ReadByIdAsync(int envelopeId, int receiverId, bool readOnly = true);
|
||||
|
||||
Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId);
|
||||
Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId, bool readOnly = true);
|
||||
|
||||
Task<IEnumerable<EnvelopeReceiver>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="2.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.Infrastructure" Version="2.0.0" />
|
||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="2.0.0" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="7.0.16" />
|
||||
|
||||
@@ -11,9 +11,9 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||
{
|
||||
}
|
||||
|
||||
private IQueryable<EnvelopeReceiver> ReadWhere(string? uuid = null, string? signature = null, bool withEnvelope = false, bool withReceiver = false)
|
||||
private IQueryable<EnvelopeReceiver> ReadWhere(string? uuid = null, string? signature = null, bool withEnvelope = false, bool withReceiver = false, bool readOnly = true)
|
||||
{
|
||||
var query = _dbSet.AsNoTracking();
|
||||
var query = readOnly ? _dbSet.AsNoTracking() : _dbSet;
|
||||
|
||||
if (uuid is not null)
|
||||
query = query.Where(er => er.Envelope != null && er.Envelope.Uuid == uuid);
|
||||
@@ -32,31 +32,34 @@ namespace EnvelopeGenerator.Infrastructure.Repositories
|
||||
return query;
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<EnvelopeReceiver>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false)
|
||||
=> await ReadWhere(uuid: uuid, withEnvelope: withEnvelope, withReceiver: withReceiver).ToListAsync();
|
||||
public async Task<IEnumerable<EnvelopeReceiver>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false, bool readOnly = true)
|
||||
=> await ReadWhere(uuid: uuid, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly).ToListAsync();
|
||||
|
||||
public async Task<IEnumerable<EnvelopeReceiver>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true)
|
||||
=> await ReadWhere(signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver).ToListAsync();
|
||||
public async Task<IEnumerable<EnvelopeReceiver>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true, bool readOnly = true)
|
||||
=> await ReadWhere(signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly).ToListAsync();
|
||||
|
||||
public async Task<EnvelopeReceiver?> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true)
|
||||
=> await ReadWhere(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver).FirstOrDefaultAsync();
|
||||
public async Task<EnvelopeReceiver?> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true, bool readOnly = true)
|
||||
=> await ReadWhere(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver, readOnly: readOnly).FirstOrDefaultAsync();
|
||||
|
||||
public async Task<string?> ReadAccessCodeAsync(string uuid, string signature)
|
||||
=> await ReadWhere(uuid: uuid, signature: signature)
|
||||
public async Task<string?> ReadAccessCodeAsync(string uuid, string signature, bool readOnly = true)
|
||||
=> await ReadWhere(uuid: uuid, signature: signature, readOnly: readOnly)
|
||||
.Select(er => er.AccessCode)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
public async Task<int> CountAsync(string uuid, string signature) => await ReadWhere(uuid: uuid, signature: signature).CountAsync();
|
||||
|
||||
public IQueryable<EnvelopeReceiver> ReadById(int envelopeId, int receiverId) => _dbSet.AsNoTracking()
|
||||
.Where(er => er.EnvelopeId == envelopeId && er.ReceiverId == receiverId);
|
||||
private IQueryable<EnvelopeReceiver> ReadById(int envelopeId, int receiverId, bool readOnly = true)
|
||||
{
|
||||
var query = readOnly ? _dbSet.AsNoTracking() : _dbSet;
|
||||
return query.Where(er => er.EnvelopeId == envelopeId && er.ReceiverId == receiverId);
|
||||
}
|
||||
|
||||
public async Task<EnvelopeReceiver?> ReadByIdAsync(int envelopeId, int receiverId)
|
||||
=> await ReadById(envelopeId: envelopeId, receiverId: receiverId)
|
||||
public async Task<EnvelopeReceiver?> ReadByIdAsync(int envelopeId, int receiverId, bool readOnly = true)
|
||||
=> await ReadById(envelopeId: envelopeId, receiverId: receiverId, readOnly: readOnly)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
public async Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId)
|
||||
=> await ReadById(envelopeId: envelopeId, receiverId: receiverId)
|
||||
public async Task<string?> ReadAccessCodeByIdAsync(int envelopeId, int receiverId, bool readOnly = true)
|
||||
=> await ReadById(envelopeId: envelopeId, receiverId: receiverId, readOnly: readOnly)
|
||||
.Select(er => er.AccessCode)
|
||||
.FirstOrDefaultAsync();
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<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>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/>
|
||||
@@ -16,11 +13,4 @@
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
<applicationSettings>
|
||||
<EnvelopeGenerator.Service.My.MySettings>
|
||||
<setting name="RunInDMZ" serializeAs="String">
|
||||
<value>False</value>
|
||||
</setting>
|
||||
</EnvelopeGenerator.Service.My.MySettings>
|
||||
</applicationSettings>
|
||||
</configuration>
|
||||
|
||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
||||
' übernehmen, indem Sie "*" eingeben:
|
||||
' <Assembly: AssemblyVersion("1.0.*")>
|
||||
|
||||
<Assembly: AssemblyVersion("1.7.1.0")>
|
||||
<Assembly: AssemblyFileVersion("1.7.1.0")>
|
||||
<Assembly: AssemblyVersion("1.8.0.0")>
|
||||
<Assembly: AssemblyFileVersion("1.8.0.0")>
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
'------------------------------------------------------------------------------
|
||||
' <auto-generated>
|
||||
' This code was generated by a tool.
|
||||
' Runtime Version:4.0.30319.42000
|
||||
' Dieser Code wurde von einem Tool generiert.
|
||||
' Laufzeitversion:4.0.30319.42000
|
||||
'
|
||||
' Changes to this file may cause incorrect behavior and will be lost if
|
||||
' the code is regenerated.
|
||||
' Änderungen an dieser Datei können falsches Verhalten verursachen und gehen verloren, wenn
|
||||
' der Code erneut generiert wird.
|
||||
' </auto-generated>
|
||||
'------------------------------------------------------------------------------
|
||||
|
||||
@@ -22,7 +22,7 @@ Namespace My
|
||||
|
||||
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
|
||||
Private Shared addedHandler As Boolean
|
||||
|
||||
@@ -53,15 +53,6 @@ Namespace My
|
||||
Return defaultInstance
|
||||
End Get
|
||||
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 Namespace
|
||||
|
||||
|
||||
@@ -1,9 +1,5 @@
|
||||
<?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 />
|
||||
<Settings>
|
||||
<Setting Name="RunInDMZ" Type="System.Boolean" Scope="Application">
|
||||
<Value Profile="(Default)">False</Value>
|
||||
</Setting>
|
||||
</Settings>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
@@ -1,5 +1,4 @@
|
||||
using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
|
||||
@@ -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 System.Security.Claims;
|
||||
|
||||
@@ -6,6 +9,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
public static class ControllerBaseExtensions
|
||||
{
|
||||
#region Auth
|
||||
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);
|
||||
@@ -23,7 +27,35 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
var env_id_str = controller.User.FindFirstValue(EnvelopeClaimTypes.Id);
|
||||
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
|
||||
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",
|
||||
Body = "Bitte kontaktieren Sie das IT-Team."
|
||||
});
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
@@ -3,12 +3,13 @@ using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using EnvelopeGenerator.Application;
|
||||
using EnvelopeGenerator.Extensions;
|
||||
using static EnvelopeGenerator.Common.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[Route("api/[controller]")]
|
||||
public class DocumentController : BaseController
|
||||
{
|
||||
private readonly EnvelopeOldService envelopeService;
|
||||
@@ -47,8 +48,8 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpPost("api/document/{envelopeKey}")]
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[HttpPost("{envelopeKey}")]
|
||||
public async Task<IActionResult> Open(string envelopeKey)
|
||||
{
|
||||
try
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Common;
|
||||
using EnvelopeGenerator.Web.Services;
|
||||
@@ -11,7 +10,7 @@ using EnvelopeGenerator.Extensions;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
[Authorize]
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class EnvelopeController : BaseController
|
||||
@@ -23,7 +22,6 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
private readonly IReceiverService _receiverService;
|
||||
private readonly IEnvelopeReceiverService _envRcvService;
|
||||
|
||||
|
||||
public EnvelopeController(DatabaseService database,
|
||||
EnvelopeOldService envelope,
|
||||
ILogger<EnvelopeController> logger, UrlEncoder urlEncoder,
|
||||
@@ -66,7 +64,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[HttpPost("{envelopeKey}")]
|
||||
public async Task<IActionResult> Update(string envelopeKey, int index)
|
||||
{
|
||||
@@ -112,7 +110,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[HttpPost("reject")]
|
||||
public async Task<IActionResult> Reject([FromBody] string? reason = null)
|
||||
{
|
||||
|
||||
@@ -18,433 +18,551 @@ using static EnvelopeGenerator.Common.Constants;
|
||||
using Ganss.Xss;
|
||||
using Newtonsoft.Json;
|
||||
using EnvelopeGenerator.Application.DTOs;
|
||||
using DigitalData.Core.Client;
|
||||
using OtpNet;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
namespace EnvelopeGenerator.Web.Controllers;
|
||||
|
||||
public class HomeController : ViewControllerBase
|
||||
{
|
||||
public class HomeController : Controller
|
||||
{
|
||||
private readonly ILogger<HomeController> _logger;
|
||||
private readonly EnvelopeOldService envelopeOldService;
|
||||
private readonly IEnvelopeReceiverService _envRcvService;
|
||||
private readonly IEnvelopeHistoryService _historyService;
|
||||
private readonly IStringLocalizer<Resource> _localizer;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly HtmlSanitizer _sanitizer;
|
||||
private readonly Cultures _cultures;
|
||||
private readonly IEnvelopeMailService _mailService;
|
||||
private readonly IEnvelopeReceiverReadOnlyService _readOnlyService;
|
||||
private readonly EnvelopeOldService envelopeOldService;
|
||||
private readonly IEnvelopeReceiverService _envRcvService;
|
||||
private readonly IEnvelopeHistoryService _historyService;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly IEnvelopeMailService _mailService;
|
||||
private readonly IEnvelopeReceiverReadOnlyService _readOnlyService;
|
||||
private readonly IAuthenticator _authenticator;
|
||||
private readonly IReceiverService _rcvService;
|
||||
private readonly IEnvelopeSmsHandler _envSmsHandler;
|
||||
|
||||
public HomeController(EnvelopeOldService envelopeOldService, ILogger<HomeController> logger, IEnvelopeReceiverService envelopeReceiverService, IEnvelopeHistoryService historyService, IStringLocalizer<Resource> localizer, IConfiguration configuration, HtmlSanitizer sanitizer, Cultures cultures, IEnvelopeMailService envelopeMailService, IEnvelopeReceiverReadOnlyService readOnlyService)
|
||||
public HomeController(EnvelopeOldService envelopeOldService, ILogger<HomeController> logger, IEnvelopeReceiverService envelopeReceiverService, IEnvelopeHistoryService historyService, IStringLocalizer<Resource> localizer, IConfiguration configuration, HtmlSanitizer sanitizer, Cultures cultures, IEnvelopeMailService envelopeMailService, IEnvelopeReceiverReadOnlyService readOnlyService, IAuthenticator authenticator, IReceiverService receiverService, IEnvelopeSmsHandler envelopeSmsService) : base(logger, sanitizer, cultures, localizer)
|
||||
{
|
||||
this.envelopeOldService = envelopeOldService;
|
||||
_envRcvService = envelopeReceiverService;
|
||||
_historyService = historyService;
|
||||
_configuration = configuration;
|
||||
_mailService = envelopeMailService;
|
||||
_readOnlyService = readOnlyService;
|
||||
_authenticator = authenticator;
|
||||
_rcvService = receiverService;
|
||||
_envSmsHandler = envelopeSmsService;
|
||||
}
|
||||
|
||||
[HttpGet("/")]
|
||||
public IActionResult Main([FromQuery] string? culture = null)
|
||||
{
|
||||
//TODO: add a middelware or use an asp.net functionality insead of this code-smell
|
||||
culture = culture is not null ? _sanitizer.Sanitize(culture) : null;
|
||||
|
||||
if (UserLanguage is null && culture is null)
|
||||
{
|
||||
this.envelopeOldService = envelopeOldService;
|
||||
_envRcvService = envelopeReceiverService;
|
||||
_historyService = historyService;
|
||||
_localizer = localizer;
|
||||
_configuration = configuration;
|
||||
_sanitizer = sanitizer;
|
||||
_cultures = cultures;
|
||||
_mailService = envelopeMailService;
|
||||
_logger = logger;
|
||||
_readOnlyService = readOnlyService;
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}")]
|
||||
public async Task<IActionResult> MainAsync([FromRoute] string envelopeReceiverId, [FromQuery] string? culture = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
//TODO: add a middelware or use an asp.net functionality insead of this code-smell
|
||||
culture = culture is not null ? _sanitizer.Sanitize(culture) : null;
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
|
||||
if (UserLanguage is null && culture is null)
|
||||
{
|
||||
UserLanguage = _cultures.Default.Language;
|
||||
return Redirect($"{Request.Headers["Referer"]}?culture={_cultures.Default.Language}");
|
||||
}
|
||||
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
|
||||
if (!envelopeReceiverId.TryDecode(out var decoded))
|
||||
{
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
|
||||
if(decoded.GetEncodeType() == EncodeType.EnvelopeReceiverReadOnly)
|
||||
return Redirect($"{envelopeReceiverId}/ReadOnly");
|
||||
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
|
||||
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync<EnvelopeReceiverDto, IActionResult>(
|
||||
SuccessAsync: async er =>
|
||||
{
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||
|
||||
bool accessCodeAlreadyRequested = await _historyService.AccessCodeAlreadyRequested(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress);
|
||||
if (!accessCodeAlreadyRequested)
|
||||
{
|
||||
await _historyService.RecordAsync(er.EnvelopeId, er.Receiver.EmailAddress, Constants.EnvelopeStatus.AccessCodeRequested);
|
||||
|
||||
var mailRes = await _mailService.SendAccessCodeAsync(envelopeReceiverDto: er);
|
||||
if (mailRes.IsFailed)
|
||||
{
|
||||
_logger.LogNotice(mailRes);
|
||||
return this.ViewAccessCodeNotSent();
|
||||
}
|
||||
}
|
||||
|
||||
return Redirect($"{envelopeReceiverId}/Locked");
|
||||
},
|
||||
Fail: (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception:ex, message: _localizer[WebKey.UnexpectedError]);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
UserLanguage = _cultures.Default.Language;
|
||||
return Redirect($"{Request.Headers["Referer"]}?culture={_cultures.Default.Language}");
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}/Locked")]
|
||||
public async Task<IActionResult> EnvelopeLocked([FromRoute] string envelopeReceiverId)
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}")]
|
||||
public async Task<IActionResult> MainAsync([FromRoute] string envelopeReceiverId, [FromQuery] string? culture = null)
|
||||
{
|
||||
try
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
//TODO: add a middelware or use an asp.net functionality insead of this code-smell
|
||||
culture = culture is not null ? _sanitizer.Sanitize(culture) : null;
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
|
||||
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||
Success: isExisting => isExisting ? View().WithData("EnvelopeKey", envelopeReceiverId) : this.ViewEnvelopeNotFound(),
|
||||
Fail: IActionResult (messages,notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
if (UserLanguage is null && culture is null)
|
||||
{
|
||||
UserLanguage = _cultures.Default.Language;
|
||||
return Redirect($"{Request.Headers["Referer"]}?culture={_cultures.Default.Language}");
|
||||
}
|
||||
catch(Exception ex)
|
||||
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
|
||||
if (!envelopeReceiverId.TryDecode(out var decoded))
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
}
|
||||
|
||||
[HttpPost("EnvelopeKey/{envelopeReceiverId}/Locked")]
|
||||
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] string access_code)
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
if(decoded.GetEncodeType() == EncodeType.EnvelopeReceiverReadOnly)
|
||||
return Redirect($"{envelopeReceiverId}/ReadOnly");
|
||||
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
|
||||
if (uuid is null || signature is null)
|
||||
{
|
||||
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[WebKey.WrongEnvelopeReceiverId]);
|
||||
return Unauthorized();
|
||||
}
|
||||
|
||||
_logger.LogInformation($"Envelope UUID: [{uuid}]\nReceiver Signature: [{signature}]");
|
||||
|
||||
//check access code
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||
var verification = await _envRcvService.VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: access_code);
|
||||
if (verification.IsFailed)
|
||||
{
|
||||
_logger.LogNotice(verification.Notices);
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return View("EnvelopeLocked")
|
||||
.WithData("ErrorMessage", _localizer[WebKey.WrongAccessCode].Value);
|
||||
}
|
||||
|
||||
return await _envRcvService.ReadByUuidSignatureAsync(uuid: uuid, signature: signature).ThenAsync<EnvelopeReceiverDto, IActionResult>(
|
||||
SuccessAsync: async er =>
|
||||
{
|
||||
//check the access code verification
|
||||
if (verification.IsWrong())
|
||||
{
|
||||
//Constants.EnvelopeStatus.AccessCodeIncorrect
|
||||
await _historyService.RecordAsync(er.EnvelopeId, er.Receiver!.EmailAddress, Constants.EnvelopeStatus.AccessCodeIncorrect);
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return View("EnvelopeLocked")
|
||||
.WithData("ErrorMessage", _localizer[WebKey.WrongAccessCode].Value);
|
||||
}
|
||||
|
||||
await _historyService.RecordAsync(er.EnvelopeId, er.Receiver!.EmailAddress, Constants.EnvelopeStatus.AccessCodeCorrect);
|
||||
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
//check rejection
|
||||
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
||||
if(rejRcvrs.Any())
|
||||
{
|
||||
ViewBag.IsExt = !rejRcvrs.Contains(er.Receiver); //external if the current user is not rejected
|
||||
return View("EnvelopeRejected", er);
|
||||
}
|
||||
|
||||
//check if it has already signed
|
||||
if (await _historyService.IsSigned(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress))
|
||||
return View("EnvelopeSigned");
|
||||
|
||||
if (er.Envelope.Documents?.FirstOrDefault() is EnvelopeDocumentDto doc && doc.ByteData is not null)
|
||||
{
|
||||
ViewData["DocumentBytes"] = doc.ByteData;
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, message: "No document byte-data was found in ENVELOPE_DOCUMENT table.");
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
|
||||
var claims = new List<Claim> {
|
||||
new(ClaimTypes.NameIdentifier, uuid),
|
||||
new(ClaimTypes.Hash, 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())
|
||||
};
|
||||
|
||||
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
var authProperties = new AuthenticationProperties
|
||||
{
|
||||
AllowRefresh = false,
|
||||
IsPersistent = false
|
||||
};
|
||||
|
||||
await HttpContext.SignInAsync(
|
||||
CookieAuthenticationDefaults.AuthenticationScheme,
|
||||
new ClaimsPrincipal(claimsIdentity),
|
||||
authProperties);
|
||||
|
||||
//add PSPDFKit licence key
|
||||
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
|
||||
|
||||
return View("ShowEnvelope", er);
|
||||
},
|
||||
Fail: (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
}
|
||||
);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}/Success")]
|
||||
public async Task<IActionResult> EnvelopeSigned(string envelopeReceiverId)
|
||||
{
|
||||
try
|
||||
{
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||
SuccessAsync: async isExisting =>
|
||||
{
|
||||
if(!isExisting)
|
||||
return this.ViewEnvelopeNotFound();
|
||||
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||
if (!envelopeOldService.ReceiverAlreadySigned(response.Envelope, response.Receiver.Id))
|
||||
return Redirect($"/EnvelopeKey/{envelopeReceiverId}/Locked");
|
||||
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
return View();
|
||||
},
|
||||
Fail: IActionResult (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}/Rejected")]
|
||||
public async Task<IActionResult> EnvelopeRejected(string envelopeReceiverId)
|
||||
{
|
||||
try
|
||||
{
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId).ThenAsync(
|
||||
SuccessAsync: async (er) =>
|
||||
{ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
return await _historyService.IsRejected(envelopeId: er.EnvelopeId)
|
||||
? View(er)
|
||||
: Redirect($"/EnvelopeKey/{envelopeReceiverId}/Locked");
|
||||
|
||||
},
|
||||
Fail: IActionResult (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{readOnlyKey}/ReadOnly")]
|
||||
public async Task<IActionResult> EnvelopeReceiverReadOnly([FromRoute] string readOnlyKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
|
||||
readOnlyKey = _sanitizer.Sanitize(readOnlyKey);
|
||||
|
||||
// check if the readOnlyId is valid
|
||||
if (!readOnlyKey.TryDecode(out var decodedKeys) || decodedKeys.GetEncodeType() != EncodeType.EnvelopeReceiverReadOnly)
|
||||
{
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
|
||||
var readOnlyId = decodedKeys.ParseReadOnlyId();
|
||||
var erro_res = await _readOnlyService.ReadByIdAsync(readOnlyId);
|
||||
if (erro_res.IsFailed)
|
||||
{
|
||||
_logger.LogNotice(erro_res.Notices);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
|
||||
var erro = erro_res.Data;
|
||||
|
||||
if (DateTime.Now > erro.DateValid)
|
||||
return View("EnvelopeExpired");
|
||||
|
||||
return await _envRcvService.ReadByUuidSignatureAsync(uuid: erro.Envelope!.Uuid, erro.Receiver!.Signature).ThenAsync(
|
||||
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync<EnvelopeReceiverDto, IActionResult>(
|
||||
SuccessAsync: async er =>
|
||||
{
|
||||
var envelopeKey = (er.Envelope!.Uuid, er.Receiver!.Signature).EncodeEnvelopeReceiverId();
|
||||
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeKey);
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||
|
||||
//TODO: implement multi-threading to history process (Task)
|
||||
var hist_res = await _historyService.RecordAsync((int)erro.EnvelopeId, erro.AddedWho, EnvelopeStatus.EnvelopeViewed);
|
||||
if (hist_res.IsFailed)
|
||||
bool accessCodeAlreadyRequested = await _historyService.AccessCodeAlreadyRequested(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress);
|
||||
if (!accessCodeAlreadyRequested)
|
||||
{
|
||||
_logger.LogError(
|
||||
"Although the envelope was sent as read-only, the EnvelopeShared hisotry could not be saved. ReadOnly-key: {readOnlyKey}\nEnvelope Receiver:\n{envelopeReceiver}",
|
||||
readOnlyKey, JsonConvert.SerializeObject(er));
|
||||
_logger.LogNotice(hist_res.Notices);
|
||||
await _historyService.RecordAsync(er.EnvelopeId, er.Receiver.EmailAddress, EnvelopeStatus.AccessCodeRequested);
|
||||
|
||||
var mailRes = await _mailService.SendAccessCodeAsync(envelopeReceiverDto: er);
|
||||
if (mailRes.IsFailed)
|
||||
{
|
||||
_logger.LogNotice(mailRes);
|
||||
return this.ViewAccessCodeNotSent();
|
||||
}
|
||||
}
|
||||
|
||||
if (er.Envelope.Documents?.FirstOrDefault() is EnvelopeDocumentDto doc && doc.ByteData is not null)
|
||||
{
|
||||
ViewData["DocumentBytes"] = doc.ByteData;
|
||||
ViewData["EnvelopeKey"] = envelopeKey;
|
||||
ViewData["IsReadOnly"] = true;
|
||||
ViewData["ReadOnly"] = erro;
|
||||
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
|
||||
return View("ShowEnvelope", er);
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeKey, message: "No document byte-data was found in ENVELOPE_DOCUMENT table.");
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
return Redirect($"{envelopeReceiverId}/Locked");
|
||||
},
|
||||
Fail: (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception:ex, message: _localizer[WebKey.UnexpectedError]);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}/Locked")]
|
||||
public async Task<IActionResult> EnvelopeLocked([FromRoute] string envelopeReceiverId)
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
|
||||
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||
Success: er => View()
|
||||
.WithData("EnvelopeKey", envelopeReceiverId)
|
||||
.WithData("TFAEnabled", er.Envelope!.TFAEnabled)
|
||||
.WithData("HasPhoneNumber", er.HasPhoneNumber)
|
||||
.WithData("SenderEmail", er.Envelope.User!.Email)
|
||||
.WithData("EnvelopeTitle", er.Envelope.Title),
|
||||
Fail: IActionResult (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
#region TFA Views
|
||||
[NonAction]
|
||||
private async Task<IActionResult> TFAViewAsync(bool viaSms, EnvelopeReceiverSecretDto er_secret, string envelopeReceiverId)
|
||||
{
|
||||
if (viaSms)
|
||||
{
|
||||
var (smsRes, expiration) = await _envSmsHandler.SendTotpAsync(er_secret);
|
||||
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
ViewData["TFAEnabled"] = er_secret.Envelope!.TFAEnabled;
|
||||
ViewData["HasPhoneNumber"] = er_secret.HasPhoneNumber;
|
||||
ViewData["SenderEmail"] = er_secret.Envelope.User!.Email;
|
||||
ViewData["EnvelopeTitle"] = er_secret.Envelope.Title;
|
||||
|
||||
if (smsRes?.Failed ?? false)
|
||||
{
|
||||
_logger.LogError(ex, "An unexpected error occurred while displaying a read-only envelope. Read-only key is {readOnlyKey}. {message}", readOnlyKey, ex.Message);
|
||||
var res_json = JsonConvert.SerializeObject(smsRes);
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, message: $"An unexpected error occurred while sending an SMS code. Response: ${res_json}");
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
|
||||
return View("EnvelopeLocked").WithData("CodeType", "smsCode").WithData("SmsExpiration", expiration);
|
||||
}
|
||||
else
|
||||
{
|
||||
return View("EnvelopeLocked")
|
||||
.WithData("CodeType", "authenticatorCode")
|
||||
.WithData("TfaRegDeadline", er_secret.Receiver?.TfaRegDeadline);
|
||||
}
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
private async Task<IActionResult?> HandleAccessCodeAsync(Auth auth, EnvelopeReceiverSecretDto er_secret, string envelopeReceiverId)
|
||||
{
|
||||
//check the access code verification
|
||||
if (er_secret.AccessCode != auth.AccessCode)
|
||||
{
|
||||
//Constants.EnvelopeStatus.AccessCodeIncorrect
|
||||
await _historyService.RecordAsync(er_secret.EnvelopeId, er_secret.Receiver!.EmailAddress, EnvelopeStatus.AccessCodeIncorrect);
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return View("EnvelopeLocked")
|
||||
.WithData("EnvelopeKey", envelopeReceiverId)
|
||||
.WithData("TFAEnabled", er_secret.Envelope!.TFAEnabled)
|
||||
.WithData("HasPhoneNumber", er_secret.HasPhoneNumber)
|
||||
.WithData("SenderEmail", er_secret.Envelope.User!.Email)
|
||||
.WithData("EnvelopeTitle", er_secret.Envelope.Title)
|
||||
.WithData("ErrorMessage", _localizer[WebKey.WrongAccessCode].Value);
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpGet("IsAuthenticated")]
|
||||
public IActionResult IsAuthenticated()
|
||||
await _historyService.RecordAsync(er_secret.EnvelopeId, er_secret.Receiver!.EmailAddress, EnvelopeStatus.AccessCodeCorrect);
|
||||
|
||||
//check if the user has phone is added
|
||||
if (er_secret.Envelope!.TFAEnabled)
|
||||
{
|
||||
var envelopeUuid = User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
|
||||
var receiverSignature = User.FindFirst(ClaimTypes.Hash)?.Value;
|
||||
return Ok(new { EnvelopeUuid = envelopeUuid, ReceiverSignature = receiverSignature });
|
||||
var rcv = er_secret.Receiver;
|
||||
if (rcv.TotpSecretkey is null)
|
||||
{
|
||||
rcv.TotpSecretkey = _authenticator.GenerateTotpSecretKey();
|
||||
await _rcvService.UpdateAsync(rcv);
|
||||
}
|
||||
|
||||
await HttpContext.SignInEnvelopeAsync(er_secret, ReceiverRole.PreAuth);
|
||||
|
||||
return await TFAViewAsync(auth.UserSelectSMS, er_secret, envelopeReceiverId);
|
||||
}
|
||||
|
||||
[HttpPost("lang/{language}")]
|
||||
public IActionResult SetLanguage([FromRoute] string language)
|
||||
return null;
|
||||
}
|
||||
|
||||
[NonAction]
|
||||
private async Task<IActionResult?> HandleSmsAsync(Auth auth, EnvelopeReceiverSecretDto er_secret, string envelopeReceiverId)
|
||||
{
|
||||
if (er_secret.Receiver!.TotpSecretkey is null)
|
||||
throw new InvalidOperationException($"TotpSecretkey of DTO cannot validate without TotpSecretkey. Dto: {JsonConvert.SerializeObject(er_secret)}");
|
||||
|
||||
if (!User.IsInRole(ReceiverRole.PreAuth) || !_envSmsHandler.VerifyTotp(auth.SmsCode!, er_secret.Receiver.TotpSecretkey))
|
||||
{
|
||||
try
|
||||
{
|
||||
language = _sanitizer.Sanitize(language);
|
||||
if (!_cultures.Languages.Contains(language))
|
||||
return BadRequest();
|
||||
|
||||
UserLanguage = language;
|
||||
|
||||
return Redirect(Request.Headers["Referer"].ToString());
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "{Message}", ex.Message);
|
||||
return StatusCode(statusCode: StatusCodes.Status500InternalServerError);
|
||||
}
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
ViewData["ErrorMessage"] = _localizer[WebKey.WrongAccessCode].Value;
|
||||
return await TFAViewAsync(viaSms: true, er_secret, envelopeReceiverId);
|
||||
}
|
||||
|
||||
[HttpGet("lang")]
|
||||
public IActionResult GetLanguages() => Ok(_cultures.Languages);
|
||||
return null;
|
||||
}
|
||||
|
||||
private string? UserLanguage
|
||||
[NonAction]
|
||||
private async Task<IActionResult?> HandleAuthenticatorAsync(Auth auth, EnvelopeReceiverSecretDto er_secret, string envelopeReceiverId)
|
||||
{
|
||||
if (er_secret.Receiver!.TotpSecretkey is null)
|
||||
throw new InvalidOperationException($"TotpSecretkey of DTO cannot validate without TotpSecretkey. Dto: {JsonConvert.SerializeObject(er_secret)}");
|
||||
|
||||
if (!User.IsInRole(ReceiverRole.PreAuth) || !_authenticator.VerifyTotp(auth.AuthenticatorCode!, er_secret.Receiver.TotpSecretkey, window: VerificationWindow.RfcSpecifiedNetworkDelay))
|
||||
{
|
||||
get
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
ViewData["ErrorMessage"] = _localizer[WebKey.WrongAccessCode].Value;
|
||||
return await TFAViewAsync(viaSms: false, er_secret, envelopeReceiverId);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
#endregion
|
||||
|
||||
[HttpPost("EnvelopeKey/{envelopeReceiverId}/Locked")]
|
||||
public async Task<IActionResult> LogInEnvelope([FromRoute] string envelopeReceiverId, [FromForm] Auth auth)
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
|
||||
|
||||
if (uuid is null || signature is null)
|
||||
{
|
||||
var cookieValue = Request.Cookies[CookieRequestCultureProvider.DefaultCookieName];
|
||||
|
||||
if (string.IsNullOrEmpty(cookieValue))
|
||||
return null;
|
||||
|
||||
var culture = CookieRequestCultureProvider.ParseCookieValue(cookieValue)?.Cultures[0];
|
||||
return culture?.Value ?? null;
|
||||
_logger.LogEnvelopeError(uuid: uuid, signature: signature, message: _localizer[WebKey.WrongEnvelopeReceiverId]);
|
||||
return Unauthorized();
|
||||
}
|
||||
set
|
||||
|
||||
_logger.LogInformation("Envelope UUID: [{uuid}]\nReceiver Signature: [{signature}]", uuid, signature);
|
||||
|
||||
//check access code
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||
|
||||
var er_secret_res = await _envRcvService.ReadWithSecretByUuidSignatureAsync(uuid: uuid, signature: signature);
|
||||
|
||||
if (er_secret_res.IsFailed)
|
||||
{
|
||||
if(value is null)
|
||||
Response.Cookies.Delete(CookieRequestCultureProvider.DefaultCookieName);
|
||||
_logger.LogNotice(er_secret_res.Notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
}
|
||||
var er_secret = er_secret_res.Data;
|
||||
|
||||
if (auth.HasMulti)
|
||||
{
|
||||
return Unauthorized();
|
||||
}
|
||||
else if (auth.HasAccessCode)
|
||||
{
|
||||
if (await HandleAccessCodeAsync(auth, er_secret, envelopeReceiverId) is IActionResult acView)
|
||||
return acView;
|
||||
}
|
||||
else if (auth.HasSmsCode)
|
||||
{
|
||||
if (await HandleSmsAsync(auth, er_secret, envelopeReceiverId) is IActionResult smsView)
|
||||
return smsView;
|
||||
}
|
||||
else if (auth.HasAuthenticatorCode)
|
||||
{
|
||||
if(await HandleAuthenticatorAsync(auth, er_secret, envelopeReceiverId) is IActionResult aView)
|
||||
return aView;
|
||||
}
|
||||
else
|
||||
{
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return View("EnvelopeLocked")
|
||||
.WithData("EnvelopeKey", envelopeReceiverId)
|
||||
.WithData("TFAEnabled", er_secret.Envelope!.TFAEnabled)
|
||||
.WithData("HasPhoneNumber", er_secret.HasPhoneNumber)
|
||||
.WithData("SenderEmail", er_secret.Envelope.User!.Email)
|
||||
.WithData("EnvelopeTitle", er_secret.Envelope.Title)
|
||||
.WithData("ErrorMessage", _localizer[WebKey.WrongAccessCode].Value);
|
||||
}
|
||||
|
||||
//continue the process without important data to minimize security errors.
|
||||
EnvelopeReceiverDto er = er_secret;
|
||||
|
||||
//check rejection
|
||||
var rejRcvrs = await _historyService.ReadRejectingReceivers(er.Envelope!.Id);
|
||||
if(rejRcvrs.Any())
|
||||
{
|
||||
ViewBag.IsExt = !rejRcvrs.Contains(er.Receiver); //external if the current user is not rejected
|
||||
return View("EnvelopeRejected", er);
|
||||
}
|
||||
|
||||
//check if it has already signed
|
||||
if (await _historyService.IsSigned(envelopeId: er.Envelope!.Id, userReference: er.Receiver!.EmailAddress))
|
||||
return View("EnvelopeSigned");
|
||||
|
||||
if (er.Envelope.Documents?.FirstOrDefault() is EnvelopeDocumentDto doc && doc.ByteData is not null)
|
||||
{
|
||||
ViewData["DocumentBytes"] = doc.ByteData;
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, message: "No document byte-data was found in ENVELOPE_DOCUMENT table.");
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
|
||||
await HttpContext.SignInEnvelopeAsync(er, ReceiverRole.FullyAuth);
|
||||
|
||||
//add PSPDFKit licence key
|
||||
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
|
||||
|
||||
return View("ShowEnvelope", er);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}/Success")]
|
||||
public async Task<IActionResult> EnvelopeSigned(string envelopeReceiverId)
|
||||
{
|
||||
try
|
||||
{
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
return await _envRcvService.IsExisting(envelopeReceiverId: envelopeReceiverId).ThenAsync(
|
||||
SuccessAsync: async isExisting =>
|
||||
{
|
||||
if(!isExisting)
|
||||
return this.ViewEnvelopeNotFound();
|
||||
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeReceiverId);
|
||||
if (!envelopeOldService.ReceiverAlreadySigned(response.Envelope, response.Receiver.Id))
|
||||
return Redirect($"/EnvelopeKey/{envelopeReceiverId}/Locked");
|
||||
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
ViewData["EnvelopeKey"] = envelopeReceiverId;
|
||||
return View();
|
||||
},
|
||||
Fail: IActionResult (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[HttpGet("EnvelopeKey/{envelopeReceiverId}/Rejected")]
|
||||
public async Task<IActionResult> EnvelopeRejected(string envelopeReceiverId)
|
||||
{
|
||||
try
|
||||
{
|
||||
envelopeReceiverId = _sanitizer.Sanitize(envelopeReceiverId);
|
||||
|
||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||
return await _envRcvService.ReadByEnvelopeReceiverIdAsync(envelopeReceiverId).ThenAsync(
|
||||
SuccessAsync: async (er) =>
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
return await _historyService.IsRejected(envelopeId: er.EnvelopeId)
|
||||
? View(er)
|
||||
: Redirect($"/EnvelopeKey/{envelopeReceiverId}/Locked");
|
||||
|
||||
},
|
||||
Fail: IActionResult (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeReceiverId, exception: ex);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("EnvelopeKey/{readOnlyKey}/ReadOnly")]
|
||||
public async Task<IActionResult> EnvelopeReceiverReadOnly([FromRoute] string readOnlyKey)
|
||||
{
|
||||
try
|
||||
{
|
||||
ViewData["UserCulture"] = _cultures[UserLanguage];
|
||||
|
||||
readOnlyKey = _sanitizer.Sanitize(readOnlyKey);
|
||||
|
||||
// check if the readOnlyId is valid
|
||||
if (!readOnlyKey.TryDecode(out var decodedKeys) || decodedKeys.GetEncodeType() != EncodeType.EnvelopeReceiverReadOnly)
|
||||
{
|
||||
Response.StatusCode = StatusCodes.Status401Unauthorized;
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
|
||||
var readOnlyId = decodedKeys.ParseReadOnlyId();
|
||||
var erro_res = await _readOnlyService.ReadByIdAsync(readOnlyId);
|
||||
if (erro_res.IsFailed)
|
||||
{
|
||||
_logger.LogNotice(erro_res.Notices);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
|
||||
var erro = erro_res.Data;
|
||||
|
||||
if (DateTime.Now > erro.DateValid)
|
||||
return View("EnvelopeExpired");
|
||||
|
||||
return await _envRcvService.ReadByUuidSignatureAsync(uuid: erro.Envelope!.Uuid, erro.Receiver!.Signature).ThenAsync(
|
||||
SuccessAsync: async er =>
|
||||
{
|
||||
var envelopeKey = (er.Envelope!.Uuid, er.Receiver!.Signature).EncodeEnvelopeReceiverId();
|
||||
|
||||
EnvelopeResponse response = await envelopeOldService.LoadEnvelope(envelopeKey);
|
||||
|
||||
//TODO: implement multi-threading to history process (Task)
|
||||
var hist_res = await _historyService.RecordAsync((int)erro.EnvelopeId, erro.AddedWho, EnvelopeStatus.EnvelopeViewed);
|
||||
if (hist_res.IsFailed)
|
||||
{
|
||||
_logger.LogError(
|
||||
"Although the envelope was sent as read-only, the EnvelopeShared hisotry could not be saved. ReadOnly-key: {readOnlyKey}\nEnvelope Receiver:\n{envelopeReceiver}",
|
||||
readOnlyKey, JsonConvert.SerializeObject(er));
|
||||
_logger.LogNotice(hist_res.Notices);
|
||||
}
|
||||
|
||||
if (er.Envelope.Documents?.FirstOrDefault() is EnvelopeDocumentDto doc && doc.ByteData is not null)
|
||||
{
|
||||
ViewData["DocumentBytes"] = doc.ByteData;
|
||||
ViewData["EnvelopeKey"] = envelopeKey;
|
||||
ViewData["IsReadOnly"] = true;
|
||||
ViewData["ReadOnly"] = erro;
|
||||
ViewData["PSPDFKitLicenseKey"] = _configuration["PSPDFKitLicenseKey"];
|
||||
return View("ShowEnvelope", er);
|
||||
}
|
||||
else
|
||||
{
|
||||
var cookieOptions = new CookieOptions()
|
||||
{
|
||||
Expires = DateTimeOffset.UtcNow.AddYears(1),
|
||||
Secure = false,
|
||||
SameSite = SameSiteMode.Strict,
|
||||
HttpOnly = true
|
||||
};
|
||||
|
||||
Response.Cookies.Append(
|
||||
CookieRequestCultureProvider.DefaultCookieName,
|
||||
CookieRequestCultureProvider.MakeCookieValue(new RequestCulture(value)),
|
||||
cookieOptions);
|
||||
_logger.LogEnvelopeError(envelopeReceiverId: envelopeKey, message: "No document byte-data was found in ENVELOPE_DOCUMENT table.");
|
||||
return this.ViewDocumentNotFound();
|
||||
}
|
||||
},
|
||||
Fail: (messages, notices) =>
|
||||
{
|
||||
_logger.LogNotice(notices);
|
||||
return this.ViewEnvelopeNotFound();
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "An unexpected error occurred while displaying a read-only envelope. Read-only key is {readOnlyKey}. {message}", readOnlyKey, ex.Message);
|
||||
return this.ViewInnerServiceError();
|
||||
}
|
||||
}
|
||||
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
[HttpGet("IsAuthenticated")]
|
||||
public IActionResult IsAuthenticated()
|
||||
{
|
||||
var envelopeUuid = User.FindFirst(ClaimTypes.NameIdentifier)?.Value;
|
||||
var receiverSignature = User.FindFirst(ClaimTypes.Hash)?.Value;
|
||||
return Ok(new { EnvelopeUuid = envelopeUuid, ReceiverSignature = receiverSignature });
|
||||
}
|
||||
|
||||
[HttpPost("lang/{language}")]
|
||||
public IActionResult SetLanguage([FromRoute] string language)
|
||||
{
|
||||
try
|
||||
{
|
||||
language = _sanitizer.Sanitize(language);
|
||||
if (!_cultures.Languages.Contains(language))
|
||||
return BadRequest();
|
||||
|
||||
UserLanguage = language;
|
||||
|
||||
return Redirect(Request.Headers["Referer"].ToString());
|
||||
}
|
||||
catch(Exception ex)
|
||||
{
|
||||
_logger.LogError(ex, "{Message}", ex.Message);
|
||||
return StatusCode(statusCode: StatusCodes.Status500InternalServerError);
|
||||
}
|
||||
}
|
||||
|
||||
[HttpGet("lang")]
|
||||
public IActionResult GetLanguages() => Ok(_cultures.Languages);
|
||||
|
||||
private string? UserLanguage
|
||||
{
|
||||
get
|
||||
{
|
||||
var cookieValue = Request.Cookies[CookieRequestCultureProvider.DefaultCookieName];
|
||||
|
||||
if (string.IsNullOrEmpty(cookieValue))
|
||||
return null;
|
||||
|
||||
var culture = CookieRequestCultureProvider.ParseCookieValue(cookieValue)?.Cultures[0];
|
||||
return culture?.Value ?? null;
|
||||
}
|
||||
set
|
||||
{
|
||||
if(value is null)
|
||||
Response.Cookies.Delete(CookieRequestCultureProvider.DefaultCookieName);
|
||||
else
|
||||
{
|
||||
var cookieOptions = new CookieOptions()
|
||||
{
|
||||
Expires = DateTimeOffset.UtcNow.AddYears(1),
|
||||
Secure = false,
|
||||
SameSite = SameSiteMode.Strict,
|
||||
HttpOnly = true
|
||||
};
|
||||
|
||||
Response.Cookies.Append(
|
||||
CookieRequestCultureProvider.DefaultCookieName,
|
||||
CookieRequestCultureProvider.MakeCookieValue(new RequestCulture(value)),
|
||||
cookieOptions);
|
||||
}
|
||||
}
|
||||
|
||||
public IActionResult Error404() => this.ViewError404();
|
||||
}
|
||||
|
||||
public IActionResult Error404() => this.ViewError404();
|
||||
}
|
||||
@@ -1,6 +1,5 @@
|
||||
using EnvelopeGenerator.Application.Resources;
|
||||
using Ganss.Xss;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Localization;
|
||||
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using DigitalData.Core.DTO;
|
||||
using EnvelopeGenerator.Application.Contracts;
|
||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Extensions;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Newtonsoft.Json;
|
||||
using static EnvelopeGenerator.Common.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Web.Controllers
|
||||
{
|
||||
@@ -29,7 +29,7 @@ namespace EnvelopeGenerator.Web.Controllers
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
[Authorize(Roles = ReceiverRole.FullyAuth)]
|
||||
public async Task<IActionResult> CreateAsync([FromBody] EnvelopeReceiverReadOnlyCreateDto createDto)
|
||||
{
|
||||
try
|
||||
|
||||
87
EnvelopeGenerator.Web/Controllers/TFARegController.cs
Normal file
87
EnvelopeGenerator.Web/Controllers/TFARegController.cs
Normal 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();
|
||||
}
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user