Compare commits
173 Commits
4040741e6f
...
feat/signF
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
456c591fae | ||
|
|
41b2841c25 | ||
|
|
6a6da4a876 | ||
|
|
af280ee64e | ||
|
|
9b945ce232 | ||
|
|
8b1199bc71 | ||
|
|
1d74b7ca06 | ||
|
|
c1bce7c639 | ||
|
|
4401a70217 | ||
|
|
fd53f5bfd6 | ||
|
|
6126fce24d | ||
|
|
ce41090979 | ||
|
|
3fa113003c | ||
|
|
5504093591 | ||
|
|
040cf8641d | ||
|
|
09df86000b | ||
|
|
406ddfb226 | ||
|
|
b01f13fb5f | ||
|
|
00fedc7c4c | ||
|
|
171de98552 | ||
|
|
ea6d80918c | ||
|
|
3b82467133 | ||
|
|
686b1a3a59 | ||
|
|
93019362b7 | ||
|
|
7f97fd3113 | ||
|
|
5ce6c25393 | ||
|
|
972b258706 | ||
|
|
4ee5250b01 | ||
|
|
3fce092486 | ||
|
|
89d6abbb6c | ||
|
|
8b4ad5e28d | ||
|
|
773b43b1ad | ||
|
|
83fa5a29e8 | ||
|
|
09a231d01f | ||
|
|
2007ae91fb | ||
|
|
8d118308cd | ||
|
|
5a8f2d298f | ||
|
|
1a978c0ab7 | ||
|
|
ce0b1f1785 | ||
|
|
0698b44b68 | ||
|
|
7fefc68061 | ||
|
|
3035ec7e9c | ||
|
|
3a1fe45524 | ||
|
|
2db0748e60 | ||
|
|
d873d6dcf1 | ||
|
|
41e0c51055 | ||
|
|
126370ebdb | ||
|
|
629c0d51b2 | ||
|
|
dc4b5bade0 | ||
|
|
6fc0c32c46 | ||
|
|
b15616cf53 | ||
|
|
519df50404 | ||
|
|
9a71d2b805 | ||
|
|
5f8e8deb5b | ||
|
|
645153113c | ||
|
|
2ba7f41a21 | ||
|
|
c8f21be905 | ||
|
|
1875acb7b5 | ||
|
|
6bdf0d5220 | ||
|
|
ad855b77cd | ||
|
|
a781440252 | ||
|
|
5fc689ee4d | ||
|
|
38d05850e3 | ||
|
|
06d25b6f5b | ||
|
|
55b01cf396 | ||
|
|
49ccd9fef2 | ||
|
|
f877910a73 | ||
|
|
f6f4137332 | ||
|
|
486b717801 | ||
|
|
f2a09ea10e | ||
|
|
cc86e5fadd | ||
|
|
bce29aa31a | ||
|
|
95a1fd1355 | ||
|
|
613b2130a5 | ||
|
|
e4eb3e1192 | ||
|
|
1c4f7f2386 | ||
|
|
a7e4d6e58f | ||
|
|
b9c4f7da1c | ||
|
|
cec79e5b6d | ||
|
|
2f08991eeb | ||
|
|
21859ca6e6 | ||
|
|
27d9a149bc | ||
|
|
a76a079736 | ||
|
|
10341fd3cc | ||
|
|
05de44bc13 | ||
|
|
d2c45f71a0 | ||
|
|
42451a767b | ||
|
|
2692fee6d2 | ||
|
|
cae00d9177 | ||
|
|
eaa1232490 | ||
|
|
8c2550ff1d | ||
|
|
b5b9155bc0 | ||
|
|
3cc8e2b5db | ||
|
|
37032a48c9 | ||
|
|
82fc7fa762 | ||
|
|
749366fff5 | ||
|
|
40dc0ecda3 | ||
|
|
7b7a4b4f65 | ||
|
|
b609253893 | ||
|
|
b0eb1b6389 | ||
|
|
1b515ea904 | ||
|
|
4cabaf3191 | ||
|
|
8cfa28a863 | ||
|
|
3955a3232d | ||
|
|
b93ba6be17 | ||
|
|
39ff4b8867 | ||
|
|
7b7aba6efd | ||
|
|
a42e4287ff | ||
|
|
a757749767 | ||
|
|
5166f41941 | ||
|
|
928f2a7780 | ||
|
|
d46aa6e2b8 | ||
|
|
7cffc3f7bc | ||
|
|
841da3c261 | ||
|
|
adbfd69418 | ||
|
|
1e54b775a2 | ||
|
|
6e82b24578 | ||
|
|
5331efe3c1 | ||
|
|
3b4ad2960a | ||
|
|
33048e185b | ||
|
|
3ae1b94eb7 | ||
|
|
14e6a661d3 | ||
|
|
3d1966a715 | ||
|
|
c173814b8d | ||
|
|
a85397a363 | ||
|
|
2d3987b81e | ||
|
|
875ff95278 | ||
|
|
dcdf0844cb | ||
|
|
27e9de4709 | ||
|
|
e2bdc73b76 | ||
|
|
4f95a1eed4 | ||
|
|
6874e7e92c | ||
|
|
7abb3a6c8a | ||
|
|
9183ba4da5 | ||
|
|
08e2e91e9a | ||
|
|
2966d64455 | ||
|
|
41cb2c2d93 | ||
|
|
edd54ab302 | ||
|
|
51920089af | ||
|
|
5714c54385 | ||
|
|
09d2640345 | ||
|
|
82cb50b7e1 | ||
|
|
ff36dc47c1 | ||
|
|
186f3c3319 | ||
|
|
276adda516 | ||
|
|
ac0ae10fab | ||
|
|
3713669ec5 | ||
|
|
7f0131fc2d | ||
|
|
d9deb589d1 | ||
|
|
c961e9fffd | ||
|
|
ae31b1da0f | ||
|
|
bf5faf53bd | ||
|
|
9a74b448f2 | ||
|
|
784a834214 | ||
|
|
3c5f5cb5f5 | ||
|
|
7c57b7e332 | ||
|
|
4bf91df85f | ||
|
|
50796b22d9 | ||
|
|
2974ddb985 | ||
|
|
54f39103e1 | ||
|
|
8b505ae39a | ||
|
|
d75da655d2 | ||
|
|
e72ea534e5 | ||
|
|
e95d1d782e | ||
|
|
32be5077f9 | ||
|
|
d80fa0b023 | ||
|
|
ea6ee11a4e | ||
|
|
13a87f29d9 | ||
|
|
4e2682a75d | ||
|
|
278d56c58d | ||
|
|
9f71579c78 | ||
|
|
5f8df74b9d | ||
|
|
ebb248969c |
@@ -21,5 +21,5 @@ public interface IEnvelopeReceiverRepository : ICRUDRepository<EnvelopeReceiver,
|
|||||||
|
|
||||||
Task<IEnumerable<EnvelopeReceiver>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
Task<IEnumerable<EnvelopeReceiver>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
||||||
|
|
||||||
Task<EnvelopeReceiver?> ReadLastByReceiver(string email);
|
Task<EnvelopeReceiver?> ReadLastByReceiverAsync(string? email = null, int? id = null, string? signature = null);
|
||||||
}
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public interface IDocumentExecutor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="base64"></param>
|
||||||
|
/// <param name="envelope_uuid"></param>
|
||||||
|
/// <param name="cancellation"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EnvelopeDocument> CreateDocumentAsync(string base64, string envelope_uuid, CancellationToken cancellation = default);
|
||||||
|
}
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using Dapper;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public interface IEnvelopeExecutor : ISQLExecutor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId"></param>
|
||||||
|
/// <param name="title"></param>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
/// <param name="tfaEnabled"></param>
|
||||||
|
/// <param name="cancellation"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<Envelope> CreateEnvelopeAsync(int userId, string title = "", string message = "", bool tfaEnabled = false, CancellationToken cancellation = default);
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public interface IEnvelopeReceiverExecutor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="envelope_uuid"></param>
|
||||||
|
/// <param name="emailAddress"></param>
|
||||||
|
/// <param name="salutation"></param>
|
||||||
|
/// <param name="phone"></param>
|
||||||
|
/// <param name="cancellation"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
Task<EnvelopeReceiver?> AddEnvelopeReceiverAsync(string envelope_uuid, string emailAddress, string? salutation = null, string? phone = null, CancellationToken cancellation = default);
|
||||||
|
}
|
||||||
@@ -0,0 +1,70 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Provides methods for executing common queries on a given entity type.
|
||||||
|
/// This interface abstracts away the direct usage of ORM libraries (such as Entity Framework) for querying data
|
||||||
|
/// and provides asynchronous and synchronous operations for querying a collection or single entity.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TEntity">The type of the entity being queried.</typeparam>
|
||||||
|
public interface IQuery<TEntity>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Asynchronously retrieves the first entity or a default value if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation. The task result contains the entity or a default value.</returns>
|
||||||
|
public Task<TEntity?> FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Asynchronously retrieves a single entity or a default value if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation. The task result contains the entity or a default value.</returns>
|
||||||
|
public Task<TEntity?> SingleOrDefaultAsync();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Asynchronously retrieves a list of entities.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation. The task result contains the list of entities.</returns>
|
||||||
|
public Task<IEnumerable<TEntity>> ToListAsync();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Asynchronously retrieves the first entity. Throws an exception if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation. The task result contains the first entity.</returns>
|
||||||
|
public Task<TEntity> FirstAsync();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Asynchronously retrieves a single entity. Throws an exception if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>A task that represents the asynchronous operation. The task result contains the single entity.</returns>
|
||||||
|
public Task<TEntity> SingleAsync();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronously retrieves the first entity or a default value if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The first entity or a default value.</returns>
|
||||||
|
public TEntity? FirstOrDefault();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronously retrieves a single entity or a default value if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The single entity or a default value.</returns>
|
||||||
|
public TEntity? SingleOrDefault();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronously retrieves a list of entities.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The list of entities.</returns>
|
||||||
|
public IEnumerable<TEntity> ToList();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronously retrieves the first entity. Throws an exception if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The first entity.</returns>
|
||||||
|
public TEntity First();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Synchronously retrieves a single entity. Throws an exception if no entity is found.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>The single entity.</returns>
|
||||||
|
public TEntity Single();
|
||||||
|
}
|
||||||
20
EnvelopeGenerator.Application/Contracts/SQLExecutor/ISQL.cs
Normal file
20
EnvelopeGenerator.Application/Contracts/SQLExecutor/ISQL.cs
Normal file
@@ -0,0 +1,20 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a raw SQL query contract.
|
||||||
|
/// </summary>
|
||||||
|
public interface ISQL
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets the raw SQL query string.
|
||||||
|
/// </summary>
|
||||||
|
string Raw { get; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents a typed SQL query contract for a specific entity.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TEntity">The type of the entity associated with the SQL query.</typeparam>
|
||||||
|
public interface ISQL<TEntity> : ISQL
|
||||||
|
{
|
||||||
|
}
|
||||||
@@ -0,0 +1,27 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Defines methods for executing raw SQL queries or custom SQL query classes and returning query executors for further operations.
|
||||||
|
/// Provides abstraction for raw SQL execution as well as mapping the results to <typeparamref name="TEntity"/> objects.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TEntity">The entity type to which the SQL query results will be mapped.</typeparam>
|
||||||
|
public interface ISQLExecutor<TEntity>: ISQLExecutor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Executes a raw SQL query and returns an <see cref="IQuery{TEntity}"/> for further querying operations on the result.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="sql">The raw SQL query to execute.</param>
|
||||||
|
/// <param name="cancellation">Optional cancellation token for the operation.</param>
|
||||||
|
/// <param name="parameters">Optional parameters for the SQL query.</param>
|
||||||
|
/// <returns>An <see cref="IQuery{TEntity}"/> instance for further query operations on the result.</returns>
|
||||||
|
IQuery<TEntity> Execute(string sql, CancellationToken cancellation = default, params object[] parameters);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Executes a custom SQL query defined by a class that implements <see cref="ISQL{TEntity}"/> and returns an <see cref="IQuery{TEntity}"/> for further querying operations on the result.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TSQL">The type of the custom SQL query class implementing <see cref="ISQL{TEntity}"/>.</typeparam>
|
||||||
|
/// <param name="cancellation">Optional cancellation token for the operation.</param>
|
||||||
|
/// <param name="parameters">Optional parameters for the SQL query.</param>
|
||||||
|
/// <returns>An <see cref="IQuery{TEntity}"/> instance for further query operations on the result.</returns>
|
||||||
|
IQuery<TEntity> Execute<TSQL>(CancellationToken cancellation = default, params object[] parameters) where TSQL : ISQL<TEntity>;
|
||||||
|
}
|
||||||
@@ -0,0 +1,29 @@
|
|||||||
|
using Dapper;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public interface ISQLExecutor
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Executes a raw SQL query and returns an <see cref="IQuery{TEntity}"/> for further querying operations on the result.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TEntity">The entity type to which the SQL query results will be mapped.</typeparam>
|
||||||
|
/// <param name="sql">The raw SQL query to execute.</param>
|
||||||
|
/// <param name="parameters">Parameters for the SQL query.</param>
|
||||||
|
/// <param name="cancellation">Optional cancellation token for the operation.</param>
|
||||||
|
/// <returns>An <see cref="IQuery{TEntity}"/> instance for further query operations on the result.</returns>
|
||||||
|
Task<IEnumerable<TEntity>> Execute<TEntity>(string sql, DynamicParameters parameters, CancellationToken cancellation = default);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Executes a custom SQL query defined by a class that implements <see cref="ISQL{TEntity}"/> and returns an <see cref="IQuery{TEntity}"/> for further querying operations on the result.
|
||||||
|
/// </summary>
|
||||||
|
/// <typeparam name="TEntity">The entity type to which the SQL query results will be mapped.</typeparam>
|
||||||
|
/// <typeparam name="TSQL">The type of the custom SQL query class implementing <see cref="ISQL{TEntity}"/>.</typeparam>
|
||||||
|
/// <param name="parameters">Parameters for the SQL query.</param>
|
||||||
|
/// <param name="cancellation">Optional cancellation token for the operation.</param>
|
||||||
|
/// <returns>An <see cref="IQuery{TEntity}"/> instance for further query operations on the result.</returns>
|
||||||
|
Task<IEnumerable<TEntity>> Execute<TEntity, TSQL>(DynamicParameters parameters, CancellationToken cancellation = default) where TSQL : ISQL;
|
||||||
|
}
|
||||||
@@ -3,6 +3,8 @@ using DigitalData.Core.Abstractions.Application;
|
|||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
|
using EnvelopeGenerator.Application.Envelopes;
|
||||||
|
using EnvelopeGenerator.Application.Receivers.Queries.Read;
|
||||||
using EnvelopeGenerator.Domain.Entities;
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Contracts.Services;
|
namespace EnvelopeGenerator.Application.Contracts.Services;
|
||||||
@@ -31,9 +33,9 @@ public interface IEnvelopeReceiverService : IBasicCRUDService<EnvelopeReceiverDt
|
|||||||
|
|
||||||
Task<DataResult<bool>> IsExisting(string envelopeReceiverId);
|
Task<DataResult<bool>> IsExisting(string envelopeReceiverId);
|
||||||
|
|
||||||
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses);
|
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, EnvelopeQuery? envelopeQuery = null, ReadReceiverQuery? receiverQuery = null, params int[] ignore_statuses);
|
||||||
|
|
||||||
Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail);
|
Task<DataResult<string?>> ReadLastUsedReceiverNameByMailAsync(string? mail = null, int? id = null, string? signature = null);
|
||||||
|
|
||||||
Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message);
|
Task<DataResult<SmsResponse>> SendSmsAsync(string envelopeReceiverId, string message);
|
||||||
Task<DataResult<IEnumerable<EnvelopeReceiverSecretDto>>> ReadWithSecretByUuidAsync(string uuid);
|
Task<DataResult<IEnumerable<EnvelopeReceiverSecretDto>>> ReadWithSecretByUuidAsync(string uuid);
|
||||||
|
|||||||
@@ -3,10 +3,30 @@ using Microsoft.AspNetCore.Mvc;
|
|||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs
|
namespace EnvelopeGenerator.Application.DTOs
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
[ApiExplorerSettings(IgnoreApi = true)]
|
||||||
public record EmailTemplateDto(
|
public record EmailTemplateDto : IUnique<int>
|
||||||
int Id,
|
{
|
||||||
string Name,
|
/// <summary>
|
||||||
string Body,
|
///
|
||||||
string Subject) : IUnique<int>;
|
/// </summary>
|
||||||
|
public int Id{ get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public required string Name { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public required string Body { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public required string Subject { get; set; }
|
||||||
|
};
|
||||||
}
|
}
|
||||||
@@ -21,9 +21,9 @@ namespace EnvelopeGenerator.Application.DTOs
|
|||||||
|
|
||||||
[TemplatePlaceholder("[MESSAGE]")]
|
[TemplatePlaceholder("[MESSAGE]")]
|
||||||
public string Message { get; set; }
|
public string Message { get; set; }
|
||||||
public DateTime? ExpiresWhen { get; set; }
|
|
||||||
public DateTime? ExpiresWarningWhen { get; set; }
|
|
||||||
public DateTime AddedWhen { get; set; }
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
public DateTime? ChangedWhen { get; set; }
|
public DateTime? ChangedWhen { get; set; }
|
||||||
|
|
||||||
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
|
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
|
||||||
@@ -33,39 +33,24 @@ namespace EnvelopeGenerator.Application.DTOs
|
|||||||
|
|
||||||
public string Language { get; set; }
|
public string Language { get; set; }
|
||||||
|
|
||||||
public bool? SendReminderEmails { get; set; }
|
|
||||||
|
|
||||||
public int? FirstReminderDays { get; set; }
|
|
||||||
|
|
||||||
public int? ReminderIntervalDays { get; set; }
|
|
||||||
|
|
||||||
public int? EnvelopeTypeId { get; set; }
|
public int? EnvelopeTypeId { get; set; }
|
||||||
|
|
||||||
public int? CertificationType { get; set; }
|
public int? CertificationType { get; set; }
|
||||||
|
|
||||||
public bool? UseAccessCode { get; set; }
|
public bool? UseAccessCode { get; set; }
|
||||||
|
|
||||||
public int? FinalEmailToCreator { get; set; }
|
|
||||||
|
|
||||||
public int? FinalEmailToReceivers { get; set; }
|
|
||||||
|
|
||||||
public int? ExpiresWhenDays { get; set; }
|
|
||||||
|
|
||||||
public int? ExpiresWarningWhenDays { get; set; }
|
|
||||||
|
|
||||||
public bool TFAEnabled { get; init; }
|
public bool TFAEnabled { get; init; }
|
||||||
|
|
||||||
public bool DmzMoved { get; set; }
|
|
||||||
public UserReadDto? User { get; set; }
|
public UserReadDto? User { get; set; }
|
||||||
|
|
||||||
public EnvelopeType? EnvelopeType { get; set; }
|
public EnvelopeType? EnvelopeType { get; set; }
|
||||||
|
|
||||||
public string? EnvelopeTypeTitle { get; set; }
|
public string? EnvelopeTypeTitle { get; set; }
|
||||||
|
|
||||||
public bool IsAlreadySent { get; set; }
|
public bool IsAlreadySent { get; set; }
|
||||||
|
|
||||||
public string? StatusTranslated { get; set; }
|
public byte[]? DocResult { get; init; }
|
||||||
|
|
||||||
public string? ContractTypeTranslated { get; set; }
|
public IEnumerable<EnvelopeDocumentDto>? Documents { get; set; }
|
||||||
public IEnumerable<EnvelopeDocumentDto>? Documents { get; set; }
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -5,19 +5,32 @@ using EnvelopeGenerator.Application.DTOs.Receiver;
|
|||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using static EnvelopeGenerator.Common.Constants;
|
using static EnvelopeGenerator.Common.Constants;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
|
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
|
||||||
{
|
|
||||||
[ApiExplorerSettings(IgnoreApi = true)]
|
/// <summary>
|
||||||
public record EnvelopeHistoryDto(
|
///
|
||||||
long Id,
|
/// </summary>
|
||||||
int EnvelopeId,
|
/// <param name="Id"></param>
|
||||||
string UserReference,
|
/// <param name="EnvelopeId"></param>
|
||||||
int Status,
|
/// <param name="UserReference"></param>
|
||||||
string? StatusName,
|
/// <param name="Status"></param>
|
||||||
DateTime AddedWhen,
|
/// <param name="StatusName"></param>
|
||||||
DateTime? ActionDate,
|
/// <param name="AddedWhen"></param>
|
||||||
UserCreateDto? Sender,
|
/// <param name="ActionDate"></param>
|
||||||
ReceiverReadDto? Receiver,
|
/// <param name="Sender"></param>
|
||||||
ReferenceType ReferenceType,
|
/// <param name="Receiver"></param>
|
||||||
string? Comment = null) : BaseDTO<long>(Id), IUnique<long>;
|
/// <param name="ReferenceType"></param>
|
||||||
}
|
/// <param name="Comment"></param>
|
||||||
|
[ApiExplorerSettings(IgnoreApi = true)]
|
||||||
|
public record EnvelopeHistoryDto(
|
||||||
|
long Id,
|
||||||
|
int EnvelopeId,
|
||||||
|
string UserReference,
|
||||||
|
int Status,
|
||||||
|
string? StatusName,
|
||||||
|
DateTime AddedWhen,
|
||||||
|
DateTime? ActionDate,
|
||||||
|
UserCreateDto? Sender,
|
||||||
|
ReceiverReadDto? Receiver,
|
||||||
|
ReferenceType ReferenceType,
|
||||||
|
string? Comment = null) : BaseDTO<long>(Id), IUnique<long>;
|
||||||
70
EnvelopeGenerator.Application/DTOs/MappingProfile.cs
Normal file
70
EnvelopeGenerator.Application/DTOs/MappingProfile.cs
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
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.DTOs;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the AutoMapper profile configuration for mapping between
|
||||||
|
/// domain entities and data transfer objects (DTOs) used within the EnvelopeGenerator application.
|
||||||
|
/// </summary>
|
||||||
|
public class MappingProfile : Profile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="MappingProfile"/> class.
|
||||||
|
/// Configures the mappings between entities and DTOs used throughout the application.
|
||||||
|
/// </summary>
|
||||||
|
public MappingProfile()
|
||||||
|
{
|
||||||
|
// Entity to DTO mappings
|
||||||
|
CreateMap<Config, ConfigDto>();
|
||||||
|
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
|
||||||
|
CreateMap<DocumentStatus, DocumentStatusDto>();
|
||||||
|
CreateMap<EmailTemplate, EmailTemplateDto>();
|
||||||
|
CreateMap<Envelope, EnvelopeDto>();
|
||||||
|
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
||||||
|
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
||||||
|
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryDto>();
|
||||||
|
CreateMap<Domain.Entities.EnvelopeHistory, EnvelopeHistoryCreateDto>();
|
||||||
|
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverDto>();
|
||||||
|
CreateMap<Domain.Entities.EnvelopeReceiver, EnvelopeReceiverSecretDto>();
|
||||||
|
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||||
|
CreateMap<Domain.Entities.Receiver, ReceiverReadDto>();
|
||||||
|
CreateMap<Domain.Entities.Receiver, ReceiverCreateDto>();
|
||||||
|
CreateMap<Domain.Entities.Receiver, ReceiverUpdateDto>();
|
||||||
|
CreateMap<UserReceiver, UserReceiverDto>();
|
||||||
|
CreateMap<Domain.Entities.EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
|
||||||
|
|
||||||
|
// DTO to Entity mappings
|
||||||
|
CreateMap<ConfigDto, Config>();
|
||||||
|
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
|
||||||
|
CreateMap<DocumentStatusDto, DocumentStatus>();
|
||||||
|
CreateMap<EmailTemplateDto, EmailTemplate>();
|
||||||
|
CreateMap<EnvelopeDto, Envelope>();
|
||||||
|
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
||||||
|
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
||||||
|
CreateMap<EnvelopeHistoryDto, Domain.Entities.EnvelopeHistory>();
|
||||||
|
CreateMap<EnvelopeHistoryCreateDto, Domain.Entities.EnvelopeHistory>();
|
||||||
|
CreateMap<EnvelopeReceiverDto, Domain.Entities.EnvelopeReceiver>();
|
||||||
|
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
||||||
|
CreateMap<ReceiverReadDto, Domain.Entities.Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
|
||||||
|
CreateMap<ReceiverCreateDto, Domain.Entities.Receiver>();
|
||||||
|
CreateMap<ReceiverUpdateDto, Domain.Entities.Receiver>();
|
||||||
|
CreateMap<UserReceiverDto, UserReceiver>();
|
||||||
|
CreateMap<EnvelopeReceiverBase, EnvelopeReceiverBasicDto>();
|
||||||
|
CreateMap<EnvelopeReceiverReadOnlyCreateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||||
|
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||||
|
|
||||||
|
// Messaging mappings
|
||||||
|
// for GTX messaging
|
||||||
|
CreateMap<GtxMessagingResponse, SmsResponse>()
|
||||||
|
.ConstructUsing(gtxRes => gtxRes.Ok()
|
||||||
|
? new SmsResponse() { Ok = true }
|
||||||
|
: new SmsResponse() { Ok = false, Errors = gtxRes });
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using DigitalData.Core.Abstractions;
|
||||||
using DigitalData.Core.DTO;
|
using DigitalData.Core.DTO;
|
||||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
|
|
||||||
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
using EnvelopeGenerator.Application.DTOs.EnvelopeReceiver;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Text.Json.Serialization;
|
using System.Text.Json.Serialization;
|
||||||
|
|||||||
@@ -1,6 +1,4 @@
|
|||||||
using DigitalData.UserManager.Application.MappingProfiles;
|
using EnvelopeGenerator.Application.Configurations;
|
||||||
using EnvelopeGenerator.Application.MappingProfiles;
|
|
||||||
using EnvelopeGenerator.Application.Configurations;
|
|
||||||
using EnvelopeGenerator.Application.Services;
|
using EnvelopeGenerator.Application.Services;
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
@@ -9,13 +7,14 @@ using DigitalData.Core.Client;
|
|||||||
using QRCoder;
|
using QRCoder;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
using System.Reflection;
|
using System.Reflection;
|
||||||
|
using EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Extensions;
|
namespace EnvelopeGenerator.Application;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Extensions method for dependency injection
|
/// Extensions method for dependency injection
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public static class DIExtensions
|
public static class DependencyInjection
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Adds all required services for envelope generator application
|
/// Adds all required services for envelope generator application
|
||||||
@@ -43,6 +42,7 @@ public static class DIExtensions
|
|||||||
|
|
||||||
//Auto mapping profiles
|
//Auto mapping profiles
|
||||||
services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
services.AddAutoMapper(Assembly.GetExecutingAssembly());
|
||||||
|
services.AddAutoMapper(typeof(DigitalData.UserManager.Application.DIExtensions));
|
||||||
|
|
||||||
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
services.Configure<DispatcherParams>(config.GetSection(nameof(DispatcherParams)));
|
||||||
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||||
@@ -59,6 +59,7 @@ public static class DIExtensions
|
|||||||
services.AddMediatR(cfg =>
|
services.AddMediatR(cfg =>
|
||||||
{
|
{
|
||||||
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly());
|
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly());
|
||||||
|
cfg.RegisterServicesFromAssembly(typeof(CreateEnvelopeReceiverCommandHandler).Assembly);
|
||||||
});
|
});
|
||||||
|
|
||||||
return services;
|
return services;
|
||||||
@@ -3,23 +3,8 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the response for reading a document.
|
/// Represents the response for reading a document.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ReadDocumentResponse
|
public class ReadDocumentResponse : ReadDocumentResponseBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The unique identifier of the document.
|
|
||||||
/// </summary>
|
|
||||||
public int Guid { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The identifier of the associated envelope.
|
|
||||||
/// </summary>
|
|
||||||
public int EnvelopeId { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The date and time when the document was added.
|
|
||||||
/// </summary>
|
|
||||||
public DateTime AddedWhen { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The binary data of the document, if available.
|
/// The binary data of the document, if available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the response for reading a document.
|
||||||
|
/// </summary>
|
||||||
|
public class ReadDocumentResponseBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier of the document.
|
||||||
|
/// </summary>
|
||||||
|
public int Guid { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The identifier of the associated envelope.
|
||||||
|
/// </summary>
|
||||||
|
public int EnvelopeId { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The date and time when the document was added.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime AddedWhen { get; init; }
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using EnvelopeGenerator.Common;
|
using EnvelopeGenerator.Common;
|
||||||
|
using MediatR;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
|
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
|
||||||
|
|
||||||
@@ -6,8 +7,7 @@ namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
|
|||||||
/// Ein Befehl zum Zurücksetzen einer E-Mail-Vorlage auf die Standardwerte.
|
/// Ein Befehl zum Zurücksetzen einer E-Mail-Vorlage auf die Standardwerte.
|
||||||
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.
|
/// Erbt von <see cref="EmailTemplateQuery"/> und ermöglicht die Angabe einer optionalen ID und eines Typs der E-Mail-Vorlage.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Id">Die optionale ID der E-Mail-Vorlage, die zurückgesetzt werden soll.</param>
|
/// Beispiele:
|
||||||
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional). Beispiele:
|
|
||||||
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
|
/// 0 - DocumentReceived: Benachrichtigung über den Empfang eines Dokuments.
|
||||||
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
|
/// 1 - DocumentSigned: Benachrichtigung über die Unterzeichnung eines Dokuments.
|
||||||
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
|
/// 2 - DocumentDeleted: Benachrichtigung über das Löschen eines Dokuments.
|
||||||
@@ -19,4 +19,23 @@ namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
|
|||||||
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
|
/// 8 - DocumentRejected_REC (Für den ablehnenden Empfänger): Mail an den ablehnenden Empfänger, wenn das Dokument abgelehnt wird.
|
||||||
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
|
/// 9 - DocumentRejected_REC_2 (Für sonstige Empfänger): Mail an andere Empfänger (Brief), wenn das Dokument abgelehnt wird.
|
||||||
/// </param>
|
/// </param>
|
||||||
public record ResetEnvelopeTemplateCommand(int? Id, Constants.EmailTemplateType? Type) : EmailTemplateQuery(Id, Type);
|
public record ResetEmailTemplateCommand : EmailTemplateQuery, IRequest
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="orginal"></param>
|
||||||
|
public ResetEmailTemplateCommand(EmailTemplateQuery? orginal = null) : base(orginal ?? new())
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id">Die optionale ID der E-Mail-Vorlage, die zurückgesetzt werden soll.</param>
|
||||||
|
/// <param name="Type">Der Typ der E-Mail-Vorlage, z. B. <see cref="Constants.EmailTemplateType"/> (optional).
|
||||||
|
public ResetEmailTemplateCommand(int? Id = null, Constants.EmailTemplateType? Type = null) : base(Id, Type)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
};
|
||||||
@@ -0,0 +1,114 @@
|
|||||||
|
using DigitalData.Core.Abstractions.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using MediatR;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Reset;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class ResetEmailTemplateCommandHandler : IRequestHandler<ResetEmailTemplateCommand>
|
||||||
|
{
|
||||||
|
private readonly IRepository<EmailTemplate> _repository;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repository"></param>
|
||||||
|
public ResetEmailTemplateCommandHandler(IRepository<EmailTemplate> repository)
|
||||||
|
{
|
||||||
|
_repository = repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task Handle(ResetEmailTemplateCommand request, CancellationToken cancel)
|
||||||
|
{
|
||||||
|
var temps = request.Id is not null
|
||||||
|
? await _repository.ReadAllAsync<EmailTemplateDto>(t => t.Id == request.Id, cancel)
|
||||||
|
: request.Type is not null
|
||||||
|
? await _repository.ReadAllAsync<EmailTemplateDto>(t => t.Name == request.Type.ToString(), cancel)
|
||||||
|
: await _repository.ReadAllAsync<EmailTemplateDto>(ct: cancel);
|
||||||
|
|
||||||
|
foreach (var temp in temps)
|
||||||
|
{
|
||||||
|
var def = Defaults.Where(t => t.Name == temp.Name).FirstOrDefault();
|
||||||
|
if(def is not null)
|
||||||
|
await _repository.UpdateAsync(def, t => t.Id == temp.Id, cancel);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public static readonly IEnumerable<EmailTemplateDto> Defaults = new List<EmailTemplateDto>()
|
||||||
|
{
|
||||||
|
new(){
|
||||||
|
Id = 1,
|
||||||
|
Name = "DocumentReceived",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br /><B><I>\r\n[NAME_SENDER]</I></B> hat Ihnen ein Dokument zum [SIGNATURE_TYPE] gesendet.<br />\r\n<br />\r\nÜber den folgenden Link können Sie das Dokument einsehen und elektronisch unterschreiben: <a href=\"[LINK_TO_DOCUMENT]\">[LINK_TO_DOCUMENT_TEXT]</a><br />\r\n<br />\r\n[MESSAGE]<br />\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "Dokument erhalten: '[DOCUMENT_TITLE]'"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 2,
|
||||||
|
Name = "DocumentDeleted",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br /><B><I>\r\n[NAME_SENDER]</I></B> hat den Umschlag <B><I>'[DOCUMENT_TITLE]'</I></B> gelöscht/zurückgezogen.<br /><p>\rBegründung: <br /> <I>[REASON]</I> <p>\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "Umschlag zurückgezogen: '[DOCUMENT_TITLE]'"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 3,
|
||||||
|
Name = "DocumentSigned",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br />\r\nhiermit bestätigen wir Ihnen die erfolgreiche Signatur für den Vorgang <B><I>'[DOCUMENT_TITLE]'</I></B>.<br />\r\nWenn alle Vertragspartner unterzeichnet haben, erhalten Sie ebenfalls per email ein unterschriebenes Exemplar mit dem Signierungszertifikat!\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "Dokument unterschrieben: '[DOCUMENT_TITLE]'"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 4,
|
||||||
|
Name = "DocumentCompleted",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br />\r\nDer Signaturvorgang <B><I>'[DOCUMENT_TITLE]'</I></B> wurde erfolgreich abgeschlossen.<br />\r\n<br />\r\nSie erhalten das Dokument mit einem detaillierten Ergebnisbericht als Anhang zu dieser Email.<br />\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "Umschlag abgeschlossen: '[DOCUMENT_TITLE]'"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 5,
|
||||||
|
Name = "DocumentAccessCodeReceived",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],<br />\r\n<br /><B><I>\r\n[NAME_SENDER]</I></B> hat Ihnen ein Dokument zum [SIGNATURE_TYPE] gesendet. <br />\r\n<br />\r\nVerwenden Sie den folgenden Zugriffscode, um das Dokument einzusehen:<br />\r\n<br />\r\n[DOCUMENT_ACCESS_CODE]<br />\r\n<br />\r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "Zugriffscode für Dokument erhalten: '[DOCUMENT_TITLE]'"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 6,
|
||||||
|
Name = "DocumentRejected_ADM",
|
||||||
|
Body = "Guten Tag [NAME_SENDER],<p><B><I>[NAME_RECEIVER]</I></B> hat den Umschlag <B><I>'[DOCUMENT_TITLE]'</I></B> mit folgendem Grund abgelehnt: <p>\r\n[REASON] \r\n<p>Der Umschlag wurde auf den Status Rejected gesetzt. <p> \r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "'[DOCUMENT_TITLE]' - Unterzeichnungsvorgang zurückgezogen"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 9,
|
||||||
|
Name = "DocumentRejected_REC",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],\r\n<p>Hiermit bestätigen wir Ihnen die Ablehnung des Unterzeichnungsvorganges <B><I>'[DOCUMENT_TITLE]'</I></B>!<p>Der Vertragsinhaber <B><I>[NAME_SENDER]</I></B> wurde über die Ablehnung informiert. <p> \r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "'[DOCUMENT_TITLE]' - Bestätigung Ablehnung"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 10,
|
||||||
|
Name = "DocumentRejected_REC_2",
|
||||||
|
Body = "Guten Tag [NAME_RECEIVER],\r\n<p>Der Unterzeichnungsvorganges <B><I>'[DOCUMENT_TITLE]'</I></B> wurde durch einen anderen Vertragspartner abgelehnt! Ihre notwendige Unterzeichnung wurde verworfen.<p> Der Vertragsinhaber <B><I>[NAME_SENDER]</I></B> wird sich bei Bedarf mit Ihnen in Verbindung setzen. <p> \r\nMit freundlichen Grüßen<br />\r\n<br />\r\n[NAME_PORTAL]",
|
||||||
|
Subject = "'[DOCUMENT_TITLE]' - Unterzeichnungsvorgang abgelehnt."
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 11,
|
||||||
|
Name = "DocumentShared",
|
||||||
|
Body = "Guten Tag,<br /> <br /><B><I> [NAME_RECEIVER]</I></B> hat Ihnen ein Dokument zum Ansehen gesendet.<br /> <br /> Über den folgenden Link können Sie das Dokument einsehen: <a href=\"[LINK_TO_DOCUMENT]\">[LINK_TO_DOCUMENT_TEXT]</a><br /> <br /> <br /> Mit freundlichen Grüßen<br /> <br /> [NAME_PORTAL]",
|
||||||
|
Subject = "Dokument geteilt: '[DOCUMENT_TITLE]'"
|
||||||
|
},
|
||||||
|
new(){
|
||||||
|
Id = 12,
|
||||||
|
Name = "TotpSecret",
|
||||||
|
Body = "Guten Tag,<br /> <br />Sie können auf Ihren Zwei-Faktor-Authentifizierungscode zugreifen, indem Sie den unten stehenden QR-Code mit einer beliebigen Authentifizierungs-App auf Ihrem Telefon scannen (Google Authenticator, Microsoft Authenticator usw.). Dieser Code ist bis zum [TFA_EXPIRATION] gültig.<br /> <br /> <img src=\"data:image/png;base64,[TFA_QR_CODE]\" style=\"width: 13rem; height: 13rem;\"><br /> <br />\r\n<br /> Mit freundlichen Grüßen<br /> <br /> [NAME_PORTAL]",
|
||||||
|
Subject = "2-Faktor-Verifizierung QR-Code"
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,4 +1,5 @@
|
|||||||
using System.Text.Json.Serialization;
|
using MediatR;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Update;
|
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Update;
|
||||||
|
|
||||||
@@ -12,11 +13,17 @@ namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Update;
|
|||||||
/// <param name="Subject">
|
/// <param name="Subject">
|
||||||
/// (Optional) Der neue Betreff der E-Mail. Wenn null, bleibt der vorhandene Betreff unverändert.
|
/// (Optional) Der neue Betreff der E-Mail. Wenn null, bleibt der vorhandene Betreff unverändert.
|
||||||
/// </param>
|
/// </param>
|
||||||
public record UpdateEmailTemplateCommand(string? Body = null, string? Subject = null)
|
public record UpdateEmailTemplateCommand(string? Body = null, string? Subject = null) : IRequest
|
||||||
{
|
{
|
||||||
/// <param>
|
/// <param>
|
||||||
/// Die Abfrage, die die E-Mail-Vorlage darstellt, die aktualisiert werden soll.
|
/// Die Abfrage, die die E-Mail-Vorlage darstellt, die aktualisiert werden soll.
|
||||||
/// </param>
|
/// </param>
|
||||||
[JsonIgnore]
|
[JsonIgnore]
|
||||||
public EmailTemplateQuery? EmailTemplateQuery { get; set; }
|
public EmailTemplateQuery? EmailTemplateQuery { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
public DateTime ChangedWhen { get; init; } = DateTime.Now;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,63 @@
|
|||||||
|
using DigitalData.Core.Abstractions.Infrastructure;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Application.Exceptions;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using MediatR;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EmailTemplates.Commands.Update;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class UpdateEmailTemplateCommandHandler : IRequestHandler<UpdateEmailTemplateCommand>
|
||||||
|
{
|
||||||
|
private readonly IRepository<EmailTemplate> _repository;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repository"></param>
|
||||||
|
public UpdateEmailTemplateCommandHandler(IRepository<EmailTemplate> repository)
|
||||||
|
{
|
||||||
|
_repository = repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancel"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="InvalidOperationException"></exception>
|
||||||
|
/// <exception cref="NotFoundException"></exception>
|
||||||
|
public async Task Handle(UpdateEmailTemplateCommand request, CancellationToken cancel)
|
||||||
|
{
|
||||||
|
EmailTemplateDto? temp;
|
||||||
|
|
||||||
|
if (request.EmailTemplateQuery?.Id is int id)
|
||||||
|
{
|
||||||
|
temp = await _repository.ReadOrDefaultAsync<EmailTemplateDto>(t => t.Id == id, single: false, cancel);
|
||||||
|
}
|
||||||
|
else if (request!.EmailTemplateQuery!.Type is Common.Constants.EmailTemplateType type)
|
||||||
|
{
|
||||||
|
temp = await _repository.ReadOrDefaultAsync<EmailTemplateDto>(t => t.Name == type.ToString(), single: false, cancel);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
throw new InvalidOperationException("Both id and type is null. Id: " + request.EmailTemplateQuery.Id +". Type: " + request.EmailTemplateQuery.Type.ToString());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (temp == null)
|
||||||
|
{
|
||||||
|
throw new NotFoundException();
|
||||||
|
}
|
||||||
|
|
||||||
|
if (request.Body is not null)
|
||||||
|
temp.Body = request.Body;
|
||||||
|
|
||||||
|
if (request.Subject is not null)
|
||||||
|
temp.Subject = request.Subject;
|
||||||
|
|
||||||
|
await _repository.UpdateAsync(temp, t => t.Id == temp.Id, cancel);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class ReadEmailTemplateMappingProfile : Profile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public ReadEmailTemplateMappingProfile()
|
||||||
|
{
|
||||||
|
CreateMap<EmailTemplate, ReadEmailTemplateResponse>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,10 +1,12 @@
|
|||||||
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
using MediatR;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
||||||
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stellt eine Abfrage dar, um eine E-Mail-Vorlage zu lesen.
|
/// Stellt eine Abfrage dar, um eine E-Mail-Vorlage zu lesen.
|
||||||
/// Diese Klasse erbt von <see cref="EmailTemplateQuery"/>.
|
/// Diese Klasse erbt von <see cref="EmailTemplateQuery"/>.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public record ReadEmailTemplateQuery : EmailTemplateQuery
|
public record ReadEmailTemplateQuery : EmailTemplateQuery, IRequest<ReadEmailTemplateResponse?>
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||||
|
using EnvelopeGenerator.Application.DTOs;
|
||||||
|
using EnvelopeGenerator.Common;
|
||||||
|
using MediatR;
|
||||||
|
using Microsoft.AspNetCore.Http;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EmailTemplates.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class ReadEmailTemplateQueryHandler : IRequestHandler<ReadEmailTemplateQuery, ReadEmailTemplateResponse?>
|
||||||
|
{
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
|
||||||
|
private readonly IEmailTemplateRepository _repository;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initialisiert eine neue Instanz der <see cref="EmailTemplateController"/>-Klasse.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mapper">
|
||||||
|
/// <param name="repository">
|
||||||
|
/// Die AutoMapper-Instanz, die zum Zuordnen von Objekten verwendet wird.
|
||||||
|
/// </param>
|
||||||
|
public ReadEmailTemplateQueryHandler(IMapper mapper, IEmailTemplateRepository repository)
|
||||||
|
{
|
||||||
|
_mapper = mapper;
|
||||||
|
_repository = repository;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="InvalidOperationException"></exception>
|
||||||
|
public async Task<ReadEmailTemplateResponse?> Handle(ReadEmailTemplateQuery request, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var temp = request.Id is int id
|
||||||
|
? await _repository.ReadByIdAsync(id)
|
||||||
|
: request.Type is Constants.EmailTemplateType type
|
||||||
|
? await _repository.ReadByNameAsync(type)
|
||||||
|
: throw new InvalidOperationException("Either a valid integer ID or a valid EmailTemplateType must be provided in the request.");
|
||||||
|
|
||||||
|
var res = _mapper.Map<ReadEmailTemplateResponse>(temp);
|
||||||
|
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -3,18 +3,35 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Stellt die Antwort für eine Abfrage von E-Mail-Vorlagen bereit.
|
/// Stellt die Antwort für eine Abfrage von E-Mail-Vorlagen bereit.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Id">Die eindeutige Kennung der E-Mail-Vorlage.</param>
|
public class ReadEmailTemplateResponse
|
||||||
/// <param name="Type">Der Typ der E-Mail-Vorlage.</param>
|
|
||||||
/// <param name="AddedWhen">Das Datum und die Uhrzeit, wann die Vorlage hinzugefügt wurde.</param>
|
|
||||||
/// <param name="Body">Der Inhalt (Body) der E-Mail-Vorlage. Kann null sein.</param>
|
|
||||||
/// <param name="Subject">Der Betreff der E-Mail-Vorlage. Kann null sein.</param>
|
|
||||||
/// <param name="ChangedWhen">Das Datum und die Uhrzeit, wann die Vorlage zuletzt geändert wurde. Kann null sein.</param>
|
|
||||||
public record ReadEmailTemplateResponse(
|
|
||||||
int Id,
|
|
||||||
int Type,
|
|
||||||
DateTime AddedWhen,
|
|
||||||
string? Body = null,
|
|
||||||
string? Subject = null,
|
|
||||||
DateTime? ChangedWhen = null)
|
|
||||||
{
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Die eindeutige Kennung der E-Mail-Vorlage.
|
||||||
|
/// </summary>
|
||||||
|
public int Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Name des Typs
|
||||||
|
/// </summary>
|
||||||
|
public required string Name { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Das Datum und die Uhrzeit, wann die Vorlage hinzugefügt wurde.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Der Inhalt (Body) der E-Mail-Vorlage. Kann null sein.
|
||||||
|
/// </summary>
|
||||||
|
public string? Body { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Der Betreff der E-Mail-Vorlage. Kann null sein.
|
||||||
|
/// </summary>
|
||||||
|
public string? Subject { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Das Datum und die Uhrzeit, wann die Vorlage zuletzt geändert wurde. Kann null sein.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ChangedWhen { get; set; }
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,13 +13,16 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.4.3" />
|
<PackageReference Include="Dapper" Version="2.1.66" />
|
||||||
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.6.0" />
|
||||||
<PackageReference Include="DigitalData.Core.Application" Version="3.2.1" />
|
<PackageReference Include="DigitalData.Core.Application" Version="3.2.1" />
|
||||||
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
|
<PackageReference Include="DigitalData.Core.Client" Version="2.0.3" />
|
||||||
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.1" />
|
<PackageReference Include="DigitalData.Core.DTO" Version="2.0.1" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher" Version="3.0.0" />
|
||||||
<PackageReference Include="MediatR" Version="12.5.0" />
|
<PackageReference Include="MediatR" Version="12.5.0" />
|
||||||
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="7.0.18" />
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="5.1.1" />
|
||||||
|
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
|
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.4" />
|
||||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||||
@@ -28,6 +31,7 @@
|
|||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
|
<ProjectReference Include="..\EnvelopeGenerator.Common\EnvelopeGenerator.Common.vbproj" />
|
||||||
<ProjectReference Include="..\EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj" />
|
<ProjectReference Include="..\EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj" />
|
||||||
<ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" />
|
<ProjectReference Include="..\EnvelopeGenerator.Extensions\EnvelopeGenerator.Extensions.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using MediatR;
|
using EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
using MediatR;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
@@ -17,43 +18,4 @@ public record CreateEnvelopeReceiverCommand(
|
|||||||
[Required] DocumentCreateCommand Document,
|
[Required] DocumentCreateCommand Document,
|
||||||
[Required] IEnumerable<ReceiverGetOrCreateCommand> Receivers,
|
[Required] IEnumerable<ReceiverGetOrCreateCommand> Receivers,
|
||||||
bool TFAEnabled = false
|
bool TFAEnabled = false
|
||||||
) : IRequest;
|
) : CreateEnvelopeCommand(Title, Message, TFAEnabled), IRequest<CreateEnvelopeReceiverResponse?>;
|
||||||
|
|
||||||
#region DTOs
|
|
||||||
/// <summary>
|
|
||||||
/// Signaturposition auf einem Dokument.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="X">X-Position</param>
|
|
||||||
/// <param name="Y">Y-Position</param>
|
|
||||||
/// <param name="Page">Seite, auf der sie sich befindet</param>
|
|
||||||
public record Signature([Required] int X, [Required] int Y, [Required] int Page);
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// DTO für Empfänger, die erstellt oder abgerufen werden sollen.
|
|
||||||
/// Wenn nicht, wird sie erstellt und mit einer Signatur versehen.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="Signatures">Unterschriften auf Dokumenten.</param>
|
|
||||||
/// <param name="Salution">Der Name, mit dem der Empfänger angesprochen werden soll. Bei Null oder keinem Wert wird der zuletzt verwendete Name verwendet.</param>
|
|
||||||
/// <param name="PhoneNumber">Sollte mit Vorwahl geschrieben werden</param>
|
|
||||||
public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signatures, string? Salution = null, string? PhoneNumber = null)
|
|
||||||
{
|
|
||||||
private string _emailAddress = string.Empty;
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// E-Mail-Adresse des Empfängers.
|
|
||||||
/// </summary>
|
|
||||||
[Required]
|
|
||||||
public required string EmailAddress { get => _emailAddress.ToLower(); init => _emailAddress = _emailAddress.ToLower(); }
|
|
||||||
};
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// DTO zum Erstellen eines Dokuments.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="DataAsByte">
|
|
||||||
/// Die Dokumentdaten im Byte-Array-Format. Wird verwendet, wenn das Dokument als Roh-Binärdaten bereitgestellt wird.
|
|
||||||
/// </param>
|
|
||||||
/// <param name="DataAsBase64">
|
|
||||||
/// Die Dokumentdaten im Base64-String-Format. Wird verwendet, wenn das Dokument als Base64-codierter String bereitgestellt wird.
|
|
||||||
/// </param>
|
|
||||||
public record DocumentCreateCommand(byte[]? DataAsByte = null, string? DataAsBase64 = null);
|
|
||||||
#endregion
|
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using MediatR;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the creation of an envelope along with its associated document and recipients.
|
||||||
|
/// This command processes the envelope data, including title, message, document content,
|
||||||
|
/// recipient list, and optional two-factor authentication settings.
|
||||||
|
/// </summary>
|
||||||
|
public class CreateEnvelopeReceiverCommandHandler : IRequestHandler<CreateEnvelopeReceiverCommand, CreateEnvelopeReceiverResponse>
|
||||||
|
{
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
|
||||||
|
private readonly IEnvelopeExecutor _envelopeExecutor;
|
||||||
|
|
||||||
|
private readonly IEnvelopeReceiverExecutor _erExecutor;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="mapper"></param>
|
||||||
|
/// <param name="envelopeExecutor"></param>
|
||||||
|
/// <param name="erExecutor"></param>
|
||||||
|
public CreateEnvelopeReceiverCommandHandler(IMapper mapper, IEnvelopeExecutor envelopeExecutor, IEnvelopeReceiverExecutor erExecutor)
|
||||||
|
{
|
||||||
|
_mapper = mapper;
|
||||||
|
_envelopeExecutor = envelopeExecutor;
|
||||||
|
_erExecutor = erExecutor;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Handles the execution of the <see cref="CreateEnvelopeReceiverCommand"/>.
|
||||||
|
/// Responsible for validating input data, creating or retrieving recipients, associating signatures,
|
||||||
|
/// and storing the envelope and document details.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request">The command containing all necessary information to create an envelope.</param>
|
||||||
|
/// <param name="cancel">Token to observe while waiting for the task to complete.</param>
|
||||||
|
/// <returns>A task representing the asynchronous operation.</returns>
|
||||||
|
public async Task<CreateEnvelopeReceiverResponse> Handle(CreateEnvelopeReceiverCommand request, CancellationToken cancel)
|
||||||
|
{
|
||||||
|
int userId = request.UserId ?? throw new InvalidOperationException("UserId cannot be null when creating an envelope.");
|
||||||
|
|
||||||
|
var envelope = await _envelopeExecutor.CreateEnvelopeAsync(userId, request.Title, request.Message, request.TFAEnabled, cancel);
|
||||||
|
|
||||||
|
List<EnvelopeReceiver> sentRecipients = new();
|
||||||
|
List<ReceiverGetOrCreateCommand> unsentRecipients = new();
|
||||||
|
|
||||||
|
foreach (var receiver in request.Receivers)
|
||||||
|
{
|
||||||
|
var envelopeReceiver = await _erExecutor.AddEnvelopeReceiverAsync(envelope.Uuid, receiver.EmailAddress, receiver.Salution, receiver.PhoneNumber, cancel);
|
||||||
|
|
||||||
|
if (envelopeReceiver is null)
|
||||||
|
unsentRecipients.Add(receiver);
|
||||||
|
else
|
||||||
|
sentRecipients.Add(envelopeReceiver);
|
||||||
|
}
|
||||||
|
|
||||||
|
var res = _mapper.Map<CreateEnvelopeReceiverResponse>(envelope);
|
||||||
|
res.UnsentReceivers = unsentRecipients;
|
||||||
|
res.SentReceiver = _mapper.Map<IEnumerable<ReceiverReadDto>>(sentRecipients);
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,48 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Text;
|
||||||
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
|
|
||||||
|
#region DTOs
|
||||||
|
/// <summary>
|
||||||
|
/// Signaturposition auf einem Dokument.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="X">X-Position</param>
|
||||||
|
/// <param name="Y">Y-Position</param>
|
||||||
|
/// <param name="Page">Seite, auf der sie sich befindet</param>
|
||||||
|
public record Signature([Required] double X, [Required] double Y, [Required] int Page);
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DTO für Empfänger, die erstellt oder abgerufen werden sollen.
|
||||||
|
/// Wenn nicht, wird sie erstellt und mit einer Signatur versehen.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Signatures">Unterschriften auf Dokumenten.</param>
|
||||||
|
/// <param name="Salution">Der Name, mit dem der Empfänger angesprochen werden soll. Bei Null oder keinem Wert wird der zuletzt verwendete Name verwendet.</param>
|
||||||
|
/// <param name="PhoneNumber">Sollte mit Vorwahl geschrieben werden</param>
|
||||||
|
public record ReceiverGetOrCreateCommand([Required] IEnumerable<Signature> Signatures, string? Salution = null, string? PhoneNumber = null)
|
||||||
|
{
|
||||||
|
private string _emailAddress = string.Empty;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// E-Mail-Adresse des Empfängers.
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public string EmailAddress { get => _emailAddress.ToLower(); init => _emailAddress = value.ToLower(); }
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// DTO zum Erstellen eines Dokuments.
|
||||||
|
/// </summary>
|
||||||
|
public record DocumentCreateCommand()
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Die Dokumentdaten im Base64-String-Format. Wird verwendet, wenn das Dokument als Base64-codierter String bereitgestellt wird.
|
||||||
|
/// </summary>
|
||||||
|
[Required]
|
||||||
|
public required string DataAsBase64 { get; init; }
|
||||||
|
};
|
||||||
|
#endregion
|
||||||
@@ -0,0 +1,21 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
|
using EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class CreateEnvelopeReceiverMappingProfile : Profile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public CreateEnvelopeReceiverMappingProfile()
|
||||||
|
{
|
||||||
|
CreateMap<Envelope, CreateEnvelopeResponse>();
|
||||||
|
CreateMap<Receiver, ReceiverReadDto>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,39 @@
|
|||||||
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
|
using EnvelopeGenerator.Application.DTOs.Receiver;
|
||||||
|
using EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public record CreateEnvelopeReceiverResponse : CreateEnvelopeResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"></param>
|
||||||
|
/// <param name="UserId"></param>
|
||||||
|
/// <param name="Status"></param>
|
||||||
|
/// <param name="Uuid"></param>
|
||||||
|
/// <param name="Message"></param>
|
||||||
|
/// <param name="AddedWhen"></param>
|
||||||
|
/// <param name="ChangedWhen"></param>
|
||||||
|
/// <param name="Title"></param>
|
||||||
|
/// <param name="Language"></param>
|
||||||
|
/// <param name="TFAEnabled"></param>
|
||||||
|
/// <param name="User"></param>
|
||||||
|
public CreateEnvelopeReceiverResponse(int Id, int UserId, int Status, string Uuid, string? Message, DateTime AddedWhen, DateTime? ChangedWhen, string? Title, string Language, bool TFAEnabled, User User) : base(Id, UserId, Status, Uuid, Message, AddedWhen, ChangedWhen, Title, Language, TFAEnabled, User)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerable<ReceiverReadDto> SentReceiver { get; set; } = new List<ReceiverReadDto>();
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public IEnumerable<ReceiverGetOrCreateCommand> UnsentReceivers { get; set; } = new List<ReceiverGetOrCreateCommand>();
|
||||||
|
}
|
||||||
@@ -0,0 +1,26 @@
|
|||||||
|
using MediatR;
|
||||||
|
using Microsoft.AspNetCore.Mvc.ModelBinding;
|
||||||
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
using System.Text.Json.Serialization;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Befehl zur Erstellung eines Umschlags.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Title">Der Titel des Umschlags. Dies ist ein Pflichtfeld.</param>
|
||||||
|
/// <param name="Message">Die Nachricht, die im Umschlag enthalten sein soll. Dies ist ein Pflichtfeld.</param>
|
||||||
|
/// <param name="TFAEnabled">Gibt an, ob die Zwei-Faktor-Authentifizierung für den Umschlag aktiviert ist. Standardmäßig false.</param>
|
||||||
|
public record CreateEnvelopeCommand(
|
||||||
|
[Required] string Title,
|
||||||
|
[Required] string Message,
|
||||||
|
bool TFAEnabled = false
|
||||||
|
) : IRequest<CreateEnvelopeResponse?>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Id of receiver
|
||||||
|
/// </summary>
|
||||||
|
[JsonIgnore]
|
||||||
|
[BindNever]
|
||||||
|
public int? UserId { get; set; }
|
||||||
|
};
|
||||||
@@ -0,0 +1,41 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
using MediatR;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class CreateEnvelopeCommandHandler : IRequestHandler<CreateEnvelopeCommand, CreateEnvelopeResponse?>
|
||||||
|
{
|
||||||
|
private readonly IEnvelopeExecutor _envelopeExecutor;
|
||||||
|
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="envelopeExecutor"></param>
|
||||||
|
/// <param name="mapper"></param>
|
||||||
|
public CreateEnvelopeCommandHandler(IEnvelopeExecutor envelopeExecutor, IMapper mapper)
|
||||||
|
{
|
||||||
|
_envelopeExecutor = envelopeExecutor;
|
||||||
|
_mapper = mapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public async Task<CreateEnvelopeResponse?> Handle(CreateEnvelopeCommand request, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
int userId = request.UserId ?? throw new InvalidOperationException("UserId cannot be null when creating an envelope.");
|
||||||
|
|
||||||
|
var envelope = await _envelopeExecutor.CreateEnvelopeAsync(userId, request.Title, request.Message, request.TFAEnabled, cancellationToken);
|
||||||
|
|
||||||
|
return _mapper.Map<CreateEnvelopeResponse>(envelope);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,19 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Application.EnvelopeReceivers.Commands.Create;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class CreateEnvelopeMappingProfile : Profile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public CreateEnvelopeMappingProfile()
|
||||||
|
{
|
||||||
|
CreateMap<Envelope, CreateEnvelopeReceiverResponse>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="Id"><inheritdoc/></param>
|
||||||
|
/// <param name="UserId"><inheritdoc/></param>
|
||||||
|
/// <param name="Status"><inheritdoc/></param>
|
||||||
|
/// <param name="Uuid"><inheritdoc/></param>
|
||||||
|
/// <param name="Message"><inheritdoc/></param>
|
||||||
|
/// <param name="AddedWhen"><inheritdoc/></param>
|
||||||
|
/// <param name="ChangedWhen"><inheritdoc/></param>
|
||||||
|
/// <param name="Title"><inheritdoc/></param>
|
||||||
|
/// <param name="Language"><inheritdoc/></param>
|
||||||
|
/// <param name="TFAEnabled"><inheritdoc/></param>
|
||||||
|
/// <param name="User"><inheritdoc/></param>
|
||||||
|
public record CreateEnvelopeResponse(int Id, int UserId, int Status, string Uuid, string? Message, DateTime AddedWhen, DateTime? ChangedWhen, string? Title, string Language, bool TFAEnabled, DigitalData.UserManager.Domain.Entities.User User)
|
||||||
|
: ReadEnvelopeResponse(Id, UserId, Status, Uuid, Message, AddedWhen, ChangedWhen, Title, Language, TFAEnabled, User);
|
||||||
@@ -6,8 +6,6 @@ namespace EnvelopeGenerator.Application.Envelopes.Queries.ReceiverName;
|
|||||||
/// Eine Abfrage, um die zuletzt verwendete Anrede eines Empfängers zu ermitteln,
|
/// Eine Abfrage, um die zuletzt verwendete Anrede eines Empfängers zu ermitteln,
|
||||||
/// damit diese für zukünftige Umschläge wiederverwendet werden kann.
|
/// damit diese für zukünftige Umschläge wiederverwendet werden kann.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="Envelope">Der Umschlag, für den die Anrede des Empfängers ermittelt werden soll.</param>
|
public record ReadReceiverNameQuery() : ReadReceiverQuery
|
||||||
/// <param name="OnlyLast">Gibt an, ob nur die zuletzt verwendete Anrede zurückgegeben werden soll.</param>
|
|
||||||
public record ReadReceiverNameQuery(EnvelopeQuery? Envelope = null, bool OnlyLast = true) : ReadReceiverQuery
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Exceptions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an exception that is thrown when a bad request is encountered.
|
||||||
|
/// </summary>
|
||||||
|
public class BadRequestException : Exception
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class.
|
||||||
|
/// </summary>
|
||||||
|
public BadRequestException()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="BadRequestException"/> class with a specified error message.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message">The message that describes the error.</param>
|
||||||
|
public BadRequestException(string? message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Exceptions;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents an exception that is thrown when a requested resource is not found.
|
||||||
|
/// </summary>
|
||||||
|
public class NotFoundException : Exception
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="NotFoundException"/> class.
|
||||||
|
/// </summary>
|
||||||
|
public NotFoundException()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Initializes a new instance of the <see cref="NotFoundException"/> class with a specified error message.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="message">The message that describes the error.</param>
|
||||||
|
public NotFoundException(string? message) : base(message)
|
||||||
|
{
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,18 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Histories.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class ReadHistoryMappingProfile: Profile
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public ReadHistoryMappingProfile()
|
||||||
|
{
|
||||||
|
CreateMap<EnvelopeHistory, ReadHistoryResponse>();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,20 +1,20 @@
|
|||||||
using EnvelopeGenerator.Application.Envelopes.Queries.Read;
|
using EnvelopeGenerator.Common;
|
||||||
using EnvelopeGenerator.Application.Receivers.Queries.Read;
|
using MediatR;
|
||||||
using EnvelopeGenerator.Common;
|
using System.ComponentModel.DataAnnotations;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Histories.Queries.Read;
|
namespace EnvelopeGenerator.Application.Histories.Queries.Read;
|
||||||
|
|
||||||
|
//TODO: Add sender query
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Repräsentiert eine Abfrage für die Verlaufshistorie eines Umschlags.
|
/// Repräsentiert eine Abfrage für die Verlaufshistorie eines Umschlags.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="EnvelopeId">Die eindeutige Kennung des Umschlags.</param>
|
/// <param name="EnvelopeId">Die eindeutige Kennung des Umschlags.</param>
|
||||||
/// <param name="Envelope">Die Abfrage, die den Umschlag beschreibt.</param>
|
/// <param name="Status">Der Status des Umschlags, der abgefragt werden soll. Kann optional angegeben werden, um die Ergebnisse zu filtern.</param>
|
||||||
/// <param name="Receiver">Die Abfrage, die den Empfänger beschreibt.</param>
|
|
||||||
/// <param name="Related">Abfrage, die angibt, worauf sich der Datensatz bezieht. Ob er sich auf den Empfänger, den Sender oder das System bezieht, wird durch 0, 1 bzw. 2 dargestellt.</param>
|
|
||||||
/// <param name="OnlyLast">Abfrage zur Steuerung, ob nur der aktuelle Status oder der gesamte Datensatz zurückgegeben wird.</param>
|
/// <param name="OnlyLast">Abfrage zur Steuerung, ob nur der aktuelle Status oder der gesamte Datensatz zurückgegeben wird.</param>
|
||||||
public record ReadHistoryQuery(
|
public record ReadHistoryQuery(
|
||||||
|
[Required]
|
||||||
int EnvelopeId,
|
int EnvelopeId,
|
||||||
ReadEnvelopeQuery? Envelope = null,
|
Constants.EnvelopeStatus? Status = null,
|
||||||
ReadReceiverQuery? Receiver = null,
|
bool? OnlyLast = true) : IRequest<IEnumerable<ReadHistoryResponse>>
|
||||||
Constants.ReferenceType? Related = null,
|
{
|
||||||
bool? OnlyLast = true);
|
};
|
||||||
@@ -0,0 +1,44 @@
|
|||||||
|
using AutoMapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.Repositories;
|
||||||
|
using EnvelopeGenerator.Application.Exceptions;
|
||||||
|
using MediatR;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Histories.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class ReadHistoryQueryHandler : IRequestHandler<ReadHistoryQuery, IEnumerable<ReadHistoryResponse>>
|
||||||
|
{
|
||||||
|
private readonly IEnvelopeHistoryRepository _repository;
|
||||||
|
|
||||||
|
private readonly IMapper _mapper;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="repository"></param>
|
||||||
|
/// <param name="mapper"></param>
|
||||||
|
public ReadHistoryQueryHandler(IEnvelopeHistoryRepository repository, IMapper mapper)
|
||||||
|
{
|
||||||
|
_repository = repository;
|
||||||
|
_mapper = mapper;
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <param name="cancellationToken"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
/// <exception cref="NotFoundException"></exception>
|
||||||
|
public async Task<IEnumerable<ReadHistoryResponse>> Handle(ReadHistoryQuery request, CancellationToken cancellationToken)
|
||||||
|
{
|
||||||
|
var hists = await _repository.ReadAsync(request.EnvelopeId, status: request.Status is null ? null : (int) request.Status);
|
||||||
|
|
||||||
|
if (!hists.Any())
|
||||||
|
throw new NotFoundException();
|
||||||
|
|
||||||
|
return _mapper.Map<IEnumerable<ReadHistoryResponse>>(hists);
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,60 @@
|
|||||||
|
using EnvelopeGenerator.Common;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.Histories.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the history of an envelope, including its status, user actions, and references.
|
||||||
|
/// </summary>
|
||||||
|
public class ReadHistoryResponse
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the unique identifier of the envelope history record.
|
||||||
|
/// </summary>
|
||||||
|
public long Id { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the identifier of the associated envelope.
|
||||||
|
/// </summary>
|
||||||
|
public int EnvelopeId { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the reference identifier of the user who performed the action.
|
||||||
|
/// </summary>
|
||||||
|
public string UserReference { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the status code of the envelope.
|
||||||
|
/// </summary>
|
||||||
|
public int Status { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public Common.Constants.ReferenceType ReferenceType => Status.ToString().FirstOrDefault() switch
|
||||||
|
{
|
||||||
|
'1' => Constants.ReferenceType.Sender,
|
||||||
|
'2' => Constants.ReferenceType.Receiver,
|
||||||
|
_ => Constants.ReferenceType.System,
|
||||||
|
};
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the date and time when the record was added.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the date and time when the action occurred.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime? ActionDate { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Gets or sets the optional comment about the envelope history record.
|
||||||
|
/// </summary>
|
||||||
|
public string? Comment { get; set; }
|
||||||
|
|
||||||
|
/// <inheritdoc/>
|
||||||
|
public override int GetHashCode()
|
||||||
|
{
|
||||||
|
return Id.GetHashCode();
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -1,64 +0,0 @@
|
|||||||
using AutoMapper;
|
|
||||||
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
|
|
||||||
{
|
|
||||||
public class BasicDtoMappingProfile : Profile
|
|
||||||
{
|
|
||||||
public BasicDtoMappingProfile()
|
|
||||||
{
|
|
||||||
// Entity to DTO mappings
|
|
||||||
CreateMap<Config, ConfigDto>();
|
|
||||||
CreateMap<DocumentReceiverElement, DocumentReceiverElementDto>();
|
|
||||||
CreateMap<DocumentStatus, DocumentStatusDto>();
|
|
||||||
CreateMap<EmailTemplate, EmailTemplateDto>();
|
|
||||||
CreateMap<Envelope, EnvelopeDto>();
|
|
||||||
CreateMap<EnvelopeCertificate, EnvelopeCertificateDto>();
|
|
||||||
CreateMap<EnvelopeDocument, EnvelopeDocumentDto>();
|
|
||||||
CreateMap<EnvelopeHistory, EnvelopeHistoryDto>();
|
|
||||||
CreateMap<EnvelopeHistory, EnvelopeHistoryCreateDto>();
|
|
||||||
CreateMap<EnvelopeReceiver, EnvelopeReceiverDto>();
|
|
||||||
CreateMap<EnvelopeReceiver, EnvelopeReceiverSecretDto>();
|
|
||||||
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
|
||||||
CreateMap<Receiver, ReceiverReadDto>();
|
|
||||||
CreateMap<Receiver, ReceiverCreateDto>();
|
|
||||||
CreateMap<Receiver, ReceiverUpdateDto>();
|
|
||||||
CreateMap<UserReceiver, UserReceiverDto>();
|
|
||||||
CreateMap<EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
|
|
||||||
|
|
||||||
// DTO to Entity mappings
|
|
||||||
CreateMap<ConfigDto, Config>();
|
|
||||||
CreateMap<DocumentReceiverElementDto, DocumentReceiverElement>();
|
|
||||||
CreateMap<DocumentStatusDto, DocumentStatus>();
|
|
||||||
CreateMap<EmailTemplateDto, EmailTemplate>();
|
|
||||||
CreateMap<EnvelopeDto, Envelope>();
|
|
||||||
CreateMap<EnvelopeCertificateDto, EnvelopeCertificate>();
|
|
||||||
CreateMap<EnvelopeDocumentDto, EnvelopeDocument>();
|
|
||||||
CreateMap<EnvelopeHistoryDto, EnvelopeHistory>();
|
|
||||||
CreateMap<EnvelopeHistoryCreateDto, EnvelopeHistory>();
|
|
||||||
CreateMap<EnvelopeReceiverDto, EnvelopeReceiver>();
|
|
||||||
CreateMap<EnvelopeTypeDto, EnvelopeType>();
|
|
||||||
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 });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
50
EnvelopeGenerator.Application/SQL/DocumentCreateReadSQL.cs
Normal file
50
EnvelopeGenerator.Application/SQL/DocumentCreateReadSQL.cs
Normal file
@@ -0,0 +1,50 @@
|
|||||||
|
using Dapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
using EnvelopeGenerator.Application.Exceptions;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.SQL;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class DocumentCreateReadSQL : ISQL<EnvelopeDocument>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Base64, OUT_UID
|
||||||
|
/// </summary>
|
||||||
|
public string Raw => @"
|
||||||
|
DECLARE @BYTE_DATA1 as VARBINARY(MAX)
|
||||||
|
SET @BYTE_DATA1 = @ByteData
|
||||||
|
DECLARE @OUT_DOCID int
|
||||||
|
|
||||||
|
EXEC [dbo].[PRSIG_API_ADD_DOC]
|
||||||
|
{0},
|
||||||
|
@BYTE_DATA1,
|
||||||
|
@OUT_DOCID OUTPUT
|
||||||
|
|
||||||
|
SELECT TOP(1) *
|
||||||
|
FROM [dbo].[TBSIG_ENVELOPE_DOCUMENT]
|
||||||
|
WHERE [GUID] = @OUT_DOCID
|
||||||
|
";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="base64"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DynamicParameters CreateParmas(string base64)
|
||||||
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
byte[] byteData = Convert.FromBase64String(base64);
|
||||||
|
parameters.Add("ByteData", byteData, System.Data.DbType.Binary);
|
||||||
|
return parameters;
|
||||||
|
}
|
||||||
|
catch(FormatException ex)
|
||||||
|
{
|
||||||
|
throw new BadRequestException(ex.Message.Replace("input", "dataAsBase64"));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
49
EnvelopeGenerator.Application/SQL/EnvelopeCreateReadSQL.cs
Normal file
49
EnvelopeGenerator.Application/SQL/EnvelopeCreateReadSQL.cs
Normal file
@@ -0,0 +1,49 @@
|
|||||||
|
using Dapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
using System.Data;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.SQL;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class EnvelopeCreateReadSQL : ISQL<Envelope>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// USER_ID, TITLE, TFAEnabled, MESSAGE
|
||||||
|
/// </summary>
|
||||||
|
public string Raw => @"
|
||||||
|
DECLARE @OUT_UID varchar(36);
|
||||||
|
|
||||||
|
EXEC [dbo].[PRSIG_API_CREATE_ENVELOPE]
|
||||||
|
{0},
|
||||||
|
{1},
|
||||||
|
{2},
|
||||||
|
{3},
|
||||||
|
@OUT_UID OUTPUT;
|
||||||
|
|
||||||
|
SELECT TOP(1) *
|
||||||
|
FROM [dbo].[TBSIG_ENVELOPE]
|
||||||
|
WHERE [ENVELOPE_UUID] = @OUT_UID;
|
||||||
|
";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="userId"></param>
|
||||||
|
/// <param name="title"></param>
|
||||||
|
/// <param name="message"></param>
|
||||||
|
/// <param name="tfaEnabled"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DynamicParameters CreateParams(int userId, string title = "", string message = "", bool tfaEnabled = false)
|
||||||
|
{
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
parameters.Add("@UserId", userId);
|
||||||
|
parameters.Add("@Title", title);
|
||||||
|
parameters.Add("@TfaEnabled", tfaEnabled ? 1 : 0);
|
||||||
|
parameters.Add("@Message", message);
|
||||||
|
parameters.Add("@OutUid", dbType: DbType.String, size: 36, direction: ParameterDirection.Output);
|
||||||
|
return parameters;
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -0,0 +1,47 @@
|
|||||||
|
using Dapper;
|
||||||
|
using EnvelopeGenerator.Application.Contracts.SQLExecutor;
|
||||||
|
using EnvelopeGenerator.Domain.Entities;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.SQL;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
public class EnvelopeReceiverAddReadSQL : ISQL<Envelope>
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// ENV_UID, EMAIL_ADRESS, SALUTATION, PHONE,
|
||||||
|
/// </summary>
|
||||||
|
public string Raw => @"
|
||||||
|
DECLARE @OUT_RECEIVER_ID int
|
||||||
|
|
||||||
|
EXEC [dbo].[PRSIG_API_CREATE_RECEIVER]
|
||||||
|
{0},
|
||||||
|
{1},
|
||||||
|
{2},
|
||||||
|
{3},
|
||||||
|
@OUT_RECEIVER_ID OUTPUT
|
||||||
|
|
||||||
|
SELECT TOP(1) [ENVELOPE_ID] As EnvelopeId, [RECEIVER_ID] As ReceiverId
|
||||||
|
FROM [dbo].[TBSIG_ENVELOPE_RECEIVER]
|
||||||
|
WHERE [GUID] = @OUT_RECEIVER_ID;
|
||||||
|
";
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
///
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="envelope_uuid"></param>
|
||||||
|
/// <param name="emailAddress"></param>
|
||||||
|
/// <param name="salutation"></param>
|
||||||
|
/// <param name="phone"></param>
|
||||||
|
/// <returns></returns>
|
||||||
|
public static DynamicParameters CreateParameters(string envelope_uuid, string emailAddress, string? salutation = null, string? phone = null)
|
||||||
|
{
|
||||||
|
var parameters = new DynamicParameters();
|
||||||
|
parameters.Add("@ENV_UID", envelope_uuid);
|
||||||
|
parameters.Add("@EMAIL_ADRESS", emailAddress);
|
||||||
|
parameters.Add("@SALUTATION", salutation);
|
||||||
|
parameters.Add("@PHONE", phone);
|
||||||
|
return parameters;
|
||||||
|
}
|
||||||
|
}
|
||||||
30
EnvelopeGenerator.Application/SQL/ParamsExtensions.cs
Normal file
30
EnvelopeGenerator.Application/SQL/ParamsExtensions.cs
Normal file
@@ -0,0 +1,30 @@
|
|||||||
|
using System.Globalization;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Application.SQL;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Extension method for converting objects to SQL parameter strings.
|
||||||
|
/// </summary>
|
||||||
|
public static class ParamsExtensions
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// Converts a .NET object to its corresponding SQL-safe parameter string.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="obj">The object to convert.</param>
|
||||||
|
/// <returns>A string representing the SQL parameter.</returns>
|
||||||
|
public static string ToSqlParam(this object? obj)
|
||||||
|
{
|
||||||
|
if (obj is null)
|
||||||
|
return "NULL";
|
||||||
|
else if (obj is string strVal)
|
||||||
|
return $"'{strVal}'";
|
||||||
|
else if (obj is bool boolVal)
|
||||||
|
return boolVal ? "1" : "0";
|
||||||
|
else if (obj is double doubleVal)
|
||||||
|
return $"'{doubleVal.ToString(CultureInfo.InvariantCulture)}'";
|
||||||
|
else if (obj is int intVal)
|
||||||
|
return intVal.ToString();
|
||||||
|
else
|
||||||
|
throw new NotSupportedException($"Type '{obj.GetType().FullName}' is not supported for SQL parameter conversion.");
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -57,7 +57,7 @@ namespace EnvelopeGenerator.Application.Services
|
|||||||
{
|
{
|
||||||
if (readOnlyDto?.Envelope is not null && readOnlyDto.Receiver is not null)
|
if (readOnlyDto?.Envelope is not null && readOnlyDto.Receiver is not null)
|
||||||
{
|
{
|
||||||
_placeholders["[NAME_RECEIVER]"] = await _envRcvService.ReadLastUsedReceiverNameByMail(readOnlyDto.AddedWho).ThenAsync(res => res, (msg, ntc) => string.Empty) ?? string.Empty;
|
_placeholders["[NAME_RECEIVER]"] = await _envRcvService.ReadLastUsedReceiverNameByMailAsync(readOnlyDto.AddedWho).ThenAsync(res => res, (msg, ntc) => string.Empty) ?? string.Empty;
|
||||||
var erReadOnlyId = (readOnlyDto.Id).EncodeEnvelopeReceiverId();
|
var erReadOnlyId = (readOnlyDto.Id).EncodeEnvelopeReceiverId();
|
||||||
var sigHost = await _configService.ReadDefaultSignatureHost();
|
var sigHost = await _configService.ReadDefaultSignatureHost();
|
||||||
var linkToDoc = $"{sigHost}/EnvelopeKey/{erReadOnlyId}";
|
var linkToDoc = $"{sigHost}/EnvelopeKey/{erReadOnlyId}";
|
||||||
|
|||||||
@@ -10,6 +10,8 @@ using Microsoft.Extensions.Logging;
|
|||||||
using EnvelopeGenerator.Extensions;
|
using EnvelopeGenerator.Extensions;
|
||||||
using EnvelopeGenerator.Application.DTOs.Messaging;
|
using EnvelopeGenerator.Application.DTOs.Messaging;
|
||||||
using EnvelopeGenerator.Application.Contracts.Services;
|
using EnvelopeGenerator.Application.Contracts.Services;
|
||||||
|
using EnvelopeGenerator.Application.Envelopes;
|
||||||
|
using EnvelopeGenerator.Application.Receivers.Queries.Read;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Application.Services;
|
namespace EnvelopeGenerator.Application.Services;
|
||||||
|
|
||||||
@@ -137,16 +139,32 @@ public class EnvelopeReceiverService : BasicCRUDService<IEnvelopeReceiverReposit
|
|||||||
: Result.Success(code);
|
: Result.Success(code);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, params int[] ignore_statuses)
|
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = null, EnvelopeQuery? envelopeQuery = null, ReadReceiverQuery? receiverQuery = null, params int[] ignore_statuses)
|
||||||
{
|
{
|
||||||
var er_list = await _repository.ReadByUsernameAsync(username: username, min_status: min_status, max_status: max_status, ignore_statuses: ignore_statuses);
|
var er_list = await _repository.ReadByUsernameAsync(username: username, min_status: min_status, max_status: max_status, ignore_statuses: ignore_statuses);
|
||||||
|
|
||||||
|
if(envelopeQuery?.Id is int eId)
|
||||||
|
er_list = er_list.Where(er => er.EnvelopeId == eId);
|
||||||
|
|
||||||
|
if (envelopeQuery?.Uuid is string uuid)
|
||||||
|
er_list = er_list.Where(er => er.Envelope?.Uuid == uuid);
|
||||||
|
|
||||||
|
if (envelopeQuery?.Status is int status)
|
||||||
|
er_list = er_list.Where(er => er.Envelope?.Status == status);
|
||||||
|
|
||||||
|
if(receiverQuery?.Id is int id)
|
||||||
|
er_list = er_list.Where(er => er.Receiver?.Id == id);
|
||||||
|
|
||||||
|
if (receiverQuery?.Signature is string signature)
|
||||||
|
er_list = er_list.Where(er => er.Receiver?.Signature == signature);
|
||||||
|
|
||||||
var dto_list = _mapper.Map<IEnumerable<EnvelopeReceiverDto>>(er_list);
|
var dto_list = _mapper.Map<IEnumerable<EnvelopeReceiverDto>>(er_list);
|
||||||
return Result.Success(dto_list);
|
return Result.Success(dto_list);
|
||||||
}
|
}
|
||||||
|
|
||||||
public async Task<DataResult<string?>> ReadLastUsedReceiverNameByMail(string mail)
|
public async Task<DataResult<string?>> ReadLastUsedReceiverNameByMailAsync(string? mail = null, int? id = null, string? signature = null)
|
||||||
{
|
{
|
||||||
var er = await _repository.ReadLastByReceiver(mail);
|
var er = await _repository.ReadLastByReceiverAsync(mail, id, signature);
|
||||||
return er is null ? Result.Fail<string?>().Notice(LogLevel.None, Flag.NotFound) : Result.Success(er.Name);
|
return er is null ? Result.Fail<string?>().Notice(LogLevel.None, Flag.NotFound) : Result.Success(er.Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ Imports GdPicture14
|
|||||||
Imports Newtonsoft.Json.Linq
|
Imports Newtonsoft.Json.Linq
|
||||||
Imports EnvelopeGenerator.Common.Jobs
|
Imports EnvelopeGenerator.Common.Jobs
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
||||||
|
|
||||||
Public Class frmFinalizePDF
|
Public Class frmFinalizePDF
|
||||||
Private Const CONNECTIONSTRING = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=+bk8oAbbQP1AzoHtvZUbd+Mbok2f8Fl4miEx1qssJ5yEaEWoQJ9prg4L14fURpPnqi1WMNs9fE4=;"
|
Private Const CONNECTIONSTRING = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=+bk8oAbbQP1AzoHtvZUbd+Mbok2f8Fl4miEx1qssJ5yEaEWoQJ9prg4L14fURpPnqi1WMNs9fE4=;"
|
||||||
@@ -15,14 +16,14 @@ Public Class frmFinalizePDF
|
|||||||
Private Manager As AnnotationManager
|
Private Manager As AnnotationManager
|
||||||
Private PDFBurner As FinalizeDocument.PDFBurner
|
Private PDFBurner As FinalizeDocument.PDFBurner
|
||||||
Private pGDPictureLicenseKey As String = "kG1Qf9PwmqgR8aDmIW2zI_ebj48RzqAJegRxcystEmkbTGQqfkNBdFOXIb6C_A00Ra8zZkrHdfjqzOPXK7kgkF2YDhvrqKfqh4WDug2vOt0qO31IommzkANSuLjZ4zmraoubyEVd25rE3veQ2h_j7tGIoH_LyIHmy24GaXsxdG0yCzIBMdiLbMMMDwcPY-809KeZ83Grv76OVhFvcbBWyYc251vou1N-kGg5_ZlHDgfWoY85gTLRxafjD3KS_i9ARW4BMiy36y8n7UP2jN8kGRnW_04ubpFtfjJqvtsrP_J9D0x7bqV8xtVtT5JI6dpKsVTiMgDCrIcoFSo5gCC1fw9oUopX4TDCkBQttO4-WHBlOeq9dG5Yb0otonVmJKaQA2tP6sMR-lZDs3ql_WI9t91yPWgpssrJUxSHDd27_LMTH_owJIqkF3NOJd9mYQuAv22oNKFYbH8e41pVKb8cT33Y9CgcQ_sy6YDA5PTuIRi67mjKge_nD9rd0IN213Ir9M_EFWqg9e4haWzIdHXQUo0md70kVhPX4UIH_BKJnxEEnFfoFRNMh77bB0N4jkcBEHPl-ghOERv8dOztf4vCnNpzzWvcLD2cqWIm6THy8XGGq9h4hp8aEreRleSMwv9QQAC7mjLwhQ1rBYkpUHlpTjhTLnMwHknl6HH0Z6zzmsgkRKVyfquv94Pd7QbQfZrRka0ss_48pf9p8hAywEn81Q=="
|
Private pGDPictureLicenseKey As String = "kG1Qf9PwmqgR8aDmIW2zI_ebj48RzqAJegRxcystEmkbTGQqfkNBdFOXIb6C_A00Ra8zZkrHdfjqzOPXK7kgkF2YDhvrqKfqh4WDug2vOt0qO31IommzkANSuLjZ4zmraoubyEVd25rE3veQ2h_j7tGIoH_LyIHmy24GaXsxdG0yCzIBMdiLbMMMDwcPY-809KeZ83Grv76OVhFvcbBWyYc251vou1N-kGg5_ZlHDgfWoY85gTLRxafjD3KS_i9ARW4BMiy36y8n7UP2jN8kGRnW_04ubpFtfjJqvtsrP_J9D0x7bqV8xtVtT5JI6dpKsVTiMgDCrIcoFSo5gCC1fw9oUopX4TDCkBQttO4-WHBlOeq9dG5Yb0otonVmJKaQA2tP6sMR-lZDs3ql_WI9t91yPWgpssrJUxSHDd27_LMTH_owJIqkF3NOJd9mYQuAv22oNKFYbH8e41pVKb8cT33Y9CgcQ_sy6YDA5PTuIRi67mjKge_nD9rd0IN213Ir9M_EFWqg9e4haWzIdHXQUo0md70kVhPX4UIH_BKJnxEEnFfoFRNMh77bB0N4jkcBEHPl-ghOERv8dOztf4vCnNpzzWvcLD2cqWIm6THy8XGGq9h4hp8aEreRleSMwv9QQAC7mjLwhQ1rBYkpUHlpTjhTLnMwHknl6HH0Z6zzmsgkRKVyfquv94Pd7QbQfZrRka0ss_48pf9p8hAywEn81Q=="
|
||||||
Private ReadOnly _ignoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"}
|
Private ReadOnly _pdfBurnerParams As New PDFBurnerParams()
|
||||||
|
|
||||||
Private Sub frmFinalizePDF_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
Private Sub frmFinalizePDF_Load(sender As Object, e As EventArgs) Handles MyBase.Load
|
||||||
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
|
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
|
||||||
Database = New MSSQLServer(LogConfig, MSSQLServer.DecryptConnectionString(CONNECTIONSTRING))
|
Database = New MSSQLServer(LogConfig, MSSQLServer.DecryptConnectionString(CONNECTIONSTRING))
|
||||||
|
|
||||||
|
|
||||||
PDFBurner = New FinalizeDocument.PDFBurner(LogConfig, pGDPictureLicenseKey, _ignoredLabels)
|
PDFBurner = New FinalizeDocument.PDFBurner(LogConfig, pGDPictureLicenseKey, _pdfBurnerParams)
|
||||||
|
|
||||||
Viewer = New GdViewer()
|
Viewer = New GdViewer()
|
||||||
Manager = New AnnotationManager()
|
Manager = New AnnotationManager()
|
||||||
@@ -77,6 +78,8 @@ Public Class frmFinalizePDF
|
|||||||
Dim oNewPath = Path.Combine(desktopPath, $"E{txtEnvelope.Text}R{txtReceiver.Text}.burned.pdf")
|
Dim oNewPath = Path.Combine(desktopPath, $"E{txtEnvelope.Text}R{txtReceiver.Text}.burned.pdf")
|
||||||
|
|
||||||
File.WriteAllBytes(oNewPath, oNewBuffer)
|
File.WriteAllBytes(oNewPath, oNewBuffer)
|
||||||
|
|
||||||
|
Process.Start(oNewPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -13,13 +13,14 @@
|
|||||||
EnvelopeReportCreated = 1007
|
EnvelopeReportCreated = 1007
|
||||||
EnvelopeArchived = 1008
|
EnvelopeArchived = 1008
|
||||||
EnvelopeDeleted = 1009
|
EnvelopeDeleted = 1009
|
||||||
|
EnvelopeRejected = 10007
|
||||||
|
EnvelopeWithdrawn = 10009
|
||||||
AccessCodeRequested = 2001
|
AccessCodeRequested = 2001
|
||||||
AccessCodeCorrect = 2002
|
AccessCodeCorrect = 2002
|
||||||
AccessCodeIncorrect = 2003
|
AccessCodeIncorrect = 2003
|
||||||
DocumentOpened = 2004
|
DocumentOpened = 2004
|
||||||
DocumentSigned = 2005
|
DocumentSigned = 2005
|
||||||
DocumentForwarded = 4001
|
DocumentForwarded = 2006
|
||||||
SignatureConfirmed = 2006
|
|
||||||
DocumentRejected = 2007
|
DocumentRejected = 2007
|
||||||
EnvelopeShared = 2008
|
EnvelopeShared = 2008
|
||||||
EnvelopeViewed = 2009
|
EnvelopeViewed = 2009
|
||||||
@@ -28,12 +29,27 @@
|
|||||||
MessageConfirmationSent = 3003
|
MessageConfirmationSent = 3003
|
||||||
MessageDeletionSent = 3004
|
MessageDeletionSent = 3004
|
||||||
MessageCompletionSent = 3005
|
MessageCompletionSent = 3005
|
||||||
|
DocumentMod_Rotation = 4001
|
||||||
End Enum
|
End Enum
|
||||||
|
|
||||||
|
Public Class Status
|
||||||
|
Public Shared ReadOnly NonHist As IReadOnlyList(Of EnvelopeStatus) = New List(Of EnvelopeStatus) From {
|
||||||
|
EnvelopeStatus.Invalid,
|
||||||
|
EnvelopeStatus.EnvelopeSaved,
|
||||||
|
EnvelopeStatus.EnvelopeSent,
|
||||||
|
EnvelopeStatus.EnvelopePartlySigned
|
||||||
|
}
|
||||||
|
|
||||||
|
Public Shared ReadOnly RelatedToFormApp As IReadOnlyList(Of EnvelopeStatus) = New List(Of EnvelopeStatus) From {
|
||||||
|
EnvelopeStatus.EnvelopeCreated,
|
||||||
|
EnvelopeStatus.DocumentMod_Rotation
|
||||||
|
}
|
||||||
|
End Class
|
||||||
|
|
||||||
'TODO: standardize in xwiki
|
'TODO: standardize in xwiki
|
||||||
Public Enum ReferenceType
|
Public Enum ReferenceType
|
||||||
Receiver = 0
|
Sender = 1
|
||||||
Sender
|
Receiver
|
||||||
System
|
System
|
||||||
Unknown
|
Unknown
|
||||||
End Enum
|
End Enum
|
||||||
@@ -127,7 +143,7 @@
|
|||||||
Public Const DATABASE = "DATABASE"
|
Public Const DATABASE = "DATABASE"
|
||||||
Public Const LOGCONFIG = "LOGCONFIG"
|
Public Const LOGCONFIG = "LOGCONFIG"
|
||||||
Public Const GDPICTURE = "GDPICTURE"
|
Public Const GDPICTURE = "GDPICTURE"
|
||||||
Public Const IGNORED_LABELS = "IgnoredLabels"
|
Public Const PDF_BURNER_PARAMS = "PDFBurnerParams"
|
||||||
|
|
||||||
Public Const GREEN_300 = "#bbf7d0"
|
Public Const GREEN_300 = "#bbf7d0"
|
||||||
Public Const RED_300 = "#fecaca"
|
Public Const RED_300 = "#fecaca"
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ Public Class EmailData
|
|||||||
Public Property EmailAttachment As String = ""
|
Public Property EmailAttachment As String = ""
|
||||||
Public Property ATT1_RELATED_ID As Long
|
Public Property ATT1_RELATED_ID As Long
|
||||||
Public Property ATT1_REL_TYPE As String = ""
|
Public Property ATT1_REL_TYPE As String = ""
|
||||||
|
Public Property ADDED_WHO_PROCESS As String = "DDEnvelopGenerator"
|
||||||
|
|
||||||
''' <summary>
|
''' <summary>
|
||||||
''' Constructor for sending email to receiver
|
''' Constructor for sending email to receiver
|
||||||
|
|||||||
@@ -25,6 +25,7 @@
|
|||||||
Public Property Message As String = My.Resources.Envelope.Please_read_and_sign_this_document
|
Public Property Message As String = My.Resources.Envelope.Please_read_and_sign_this_document
|
||||||
|
|
||||||
Public Property AddedWhen As Date
|
Public Property AddedWhen As Date
|
||||||
|
Public Property ChangedWhen As Date
|
||||||
Public Property User As New User()
|
Public Property User As New User()
|
||||||
|
|
||||||
Public Property Documents As New List(Of EnvelopeDocument)
|
Public Property Documents As New List(Of EnvelopeDocument)
|
||||||
@@ -32,6 +33,7 @@
|
|||||||
Public Property History As New List(Of EnvelopeHistoryEntry)
|
Public Property History As New List(Of EnvelopeHistoryEntry)
|
||||||
Public Property EnvelopeType As EnvelopeType
|
Public Property EnvelopeType As EnvelopeType
|
||||||
Public Property DOC_RESULT As Byte()
|
Public Property DOC_RESULT As Byte()
|
||||||
|
Public Property CURRENT_WORK_APP As String = "signFLOW GUI"
|
||||||
Public ReadOnly Property EnvelopeTypeTitle As String
|
Public ReadOnly Property EnvelopeTypeTitle As String
|
||||||
Get
|
Get
|
||||||
Return EnvelopeType?.Title
|
Return EnvelopeType?.Title
|
||||||
|
|||||||
@@ -8,6 +8,7 @@
|
|||||||
|
|
||||||
Public Property HasAccess As Boolean
|
Public Property HasAccess As Boolean
|
||||||
Public Property IsAdmin As Boolean
|
Public Property IsAdmin As Boolean
|
||||||
|
Public Property GhostModeActive As Boolean
|
||||||
|
|
||||||
Public ReadOnly Property FullName() As String
|
Public ReadOnly Property FullName() As String
|
||||||
Get
|
Get
|
||||||
|
|||||||
@@ -281,6 +281,8 @@
|
|||||||
<Compile Include="Entities\ElementStatus.vb" />
|
<Compile Include="Entities\ElementStatus.vb" />
|
||||||
<Compile Include="Entities\EmailData.vb" />
|
<Compile Include="Entities\EmailData.vb" />
|
||||||
<Compile Include="Entities\EmailTemplate.vb" />
|
<Compile Include="Entities\EmailTemplate.vb" />
|
||||||
|
<Compile Include="Jobs\APIBackendJobs\APIEnvelopeJob.vb" />
|
||||||
|
<Compile Include="Jobs\FinalizeDocument\PDFBurnerParams.vb" />
|
||||||
<Compile Include="Services\TemplateService.vb" />
|
<Compile Include="Services\TemplateService.vb" />
|
||||||
<Compile Include="Entities\Envelope.vb" />
|
<Compile Include="Entities\Envelope.vb" />
|
||||||
<Compile Include="Entities\EnvelopeDocument.vb" />
|
<Compile Include="Entities\EnvelopeDocument.vb" />
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ Public Class Helpers
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Shared Function GetEnvelopeURL(pHost As String, pEnvelopeUuid As String, pReceiverSignature As String) As String
|
Public Shared Function GetEnvelopeURL(pHost As String, pEnvelopeUuid As String, pReceiverSignature As String) As String
|
||||||
|
|
||||||
Dim oEnvelopeUserReference As String = EncodeEnvelopeReceiverId(pEnvelopeUuid, pReceiverSignature)
|
Dim oEnvelopeUserReference As String = EncodeEnvelopeReceiverId(pEnvelopeUuid, pReceiverSignature)
|
||||||
Dim oURL As String = String.Format("{0}/EnvelopeKey/{1}", pHost.Trim(), oEnvelopeUserReference)
|
Dim oURL As String = String.Format("{0}/EnvelopeKey/{1}", pHost.Trim(), oEnvelopeUserReference)
|
||||||
Return oURL
|
Return oURL
|
||||||
|
|||||||
221
EnvelopeGenerator.Common/Jobs/APIBackendJobs/APIEnvelopeJob.vb
Normal file
221
EnvelopeGenerator.Common/Jobs/APIBackendJobs/APIEnvelopeJob.vb
Normal file
@@ -0,0 +1,221 @@
|
|||||||
|
Imports DigitalData.Modules.Database
|
||||||
|
Imports DigitalData.Modules.Logging
|
||||||
|
Imports DigitalData.Modules.Base
|
||||||
|
Imports GdPicture14
|
||||||
|
Imports Quartz
|
||||||
|
Imports System.Security.Cryptography
|
||||||
|
Imports System.IO
|
||||||
|
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
|
||||||
|
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
|
||||||
|
Imports EnvelopeGenerator.Common.Constants
|
||||||
|
Imports DevExpress.DataProcessing
|
||||||
|
Imports System.Data.SqlClient
|
||||||
|
Imports DevExpress.XtraRichEdit.Layout.Engine
|
||||||
|
|
||||||
|
Namespace Jobs
|
||||||
|
Public Class APIEnvelopeJob
|
||||||
|
Implements IJob
|
||||||
|
|
||||||
|
|
||||||
|
Private LogConfig As LogConfig
|
||||||
|
Private Logger As Logger
|
||||||
|
Private Database As MSSQLServer
|
||||||
|
Private Config As DbConfig
|
||||||
|
|
||||||
|
Private ConfigModel As ConfigModel
|
||||||
|
Private EnvelopeModel As EnvelopeModel
|
||||||
|
Private ReceiverModel As ReceiverModel
|
||||||
|
Private ActionService As ActionService
|
||||||
|
|
||||||
|
|
||||||
|
Private ReadOnly CompleteWaitTime As Integer = 1
|
||||||
|
|
||||||
|
Private myTempFiles As TempFiles
|
||||||
|
|
||||||
|
Private Class EnvelopeData
|
||||||
|
Public EnvelopeId As Integer
|
||||||
|
Public EnvelopeUUID As String
|
||||||
|
Public DocumentPath As String
|
||||||
|
End Class
|
||||||
|
|
||||||
|
Public Function Execute(pContext As IJobExecutionContext) As Task Implements IJob.Execute
|
||||||
|
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
|
||||||
|
Logger = LogConfig.GetLogger()
|
||||||
|
myTempFiles = New TempFiles(LogConfig)
|
||||||
|
myTempFiles.Create()
|
||||||
|
Dim JobId = pContext.JobDetail.Key
|
||||||
|
Logger.Debug("API Envelopes - Starting job {0}", JobId)
|
||||||
|
|
||||||
|
Try
|
||||||
|
Logger.Debug("API Envelopes - Loading Database..")
|
||||||
|
Database = GetDatabase(pContext, LogConfig)
|
||||||
|
|
||||||
|
Logger.Debug("API Envelopes - Loading Models & Services")
|
||||||
|
Dim oState = GetState()
|
||||||
|
InitializeModels(oState)
|
||||||
|
|
||||||
|
Logger.Debug("API Envelopes - Loading Configuration..")
|
||||||
|
Config = ConfigModel.LoadConfiguration()
|
||||||
|
oState.DbConfig = Config
|
||||||
|
|
||||||
|
InitializeServices(oState)
|
||||||
|
Config.DocumentPath = Config.DocumentPath
|
||||||
|
|
||||||
|
Logger.Debug("API Envelopes - ExportPath: [{0}]", Config.ExportPath)
|
||||||
|
|
||||||
|
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE where SOURCE = 'API' AND STATUS = 1003 order by guid"
|
||||||
|
Dim oDTEnv_invitations = Database.GetDatatable(oSql)
|
||||||
|
|
||||||
|
Dim oEnvelopeIds As List(Of Integer) = oDTEnv_invitations.Rows.Cast(Of DataRow).
|
||||||
|
Select(Function(r) r.Item("GUID")).
|
||||||
|
Cast(Of Integer).
|
||||||
|
ToList()
|
||||||
|
|
||||||
|
If oEnvelopeIds.Count > 0 Then
|
||||||
|
Logger.Info("SendInvMail - Found [{0}] envelopes.", oEnvelopeIds.Count)
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oTotal As Integer = oEnvelopeIds.Count
|
||||||
|
Dim oCurrent As Integer = 1
|
||||||
|
|
||||||
|
For Each oId In oEnvelopeIds
|
||||||
|
Logger.Info("SendInvMail - Gathering Info for Envelope [{0}] ({1}/{2})", oId, oCurrent, oTotal)
|
||||||
|
Try
|
||||||
|
Dim oEnvelope = EnvelopeModel.GetById(oId)
|
||||||
|
|
||||||
|
If oEnvelope Is Nothing Then
|
||||||
|
Logger.Warn("SendInvMail - Envelope could not be loaded for Id [{0}]!", oId)
|
||||||
|
Throw New ArgumentNullException("EnvelopeData")
|
||||||
|
End If
|
||||||
|
oEnvelope.CURRENT_WORK_APP = "signFLOW_API_EnvJob_InvMail"
|
||||||
|
Logger.Debug("SendInvMail - Loading Envelope Data..")
|
||||||
|
Dim oEnvelopeData = GetEnvelopeData(oId)
|
||||||
|
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id).ToList()
|
||||||
|
Logger.Debug("SendInvMail - Created Reveivers!")
|
||||||
|
If oEnvelopeData Is Nothing Then
|
||||||
|
Logger.Warn("SendInvMail - EnvelopeData could not be loaded for Id [{0}]!", oId)
|
||||||
|
Throw New ArgumentNullException("EnvelopeData")
|
||||||
|
End If
|
||||||
|
Logger.Info("SendInvMail - Sending InvitationMails for Envelope [{0}]", oId)
|
||||||
|
If ActionService.SendEnvelope(oEnvelope) = False Then
|
||||||
|
Logger.Warn("SendInvMail - Could not send the InvitationMails for Envelope [{0}]", oId)
|
||||||
|
Throw New ArgumentNullException("EnvelopeData")
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Warn(ex, $"SendInvMail - Unhandled exception while working envelope [{oId}]")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
oCurrent += 1
|
||||||
|
Logger.Info("SendInvMail - Envelope finalized!")
|
||||||
|
|
||||||
|
Next
|
||||||
|
'Hier nun der Teil um zurückgezogene Envelopes abzuarbeiten
|
||||||
|
oSql = $"SELECT ENV.GUID,REJ.COMMENT REJECTION_REASON FROM
|
||||||
|
(SELECT * FROM TBSIG_ENVELOPE where STATUS = 1009 AND SOURCE = 'API') ENV INNER JOIN
|
||||||
|
(SELECT MAX(GUID) GUID,ENVELOPE_ID,MAX(ADDED_WHEN) ADDED_WHEN,MAX(ACTION_DATE) ACTION_DATE, COMMENT FROM TBSIG_ENVELOPE_HISTORY where STATUS = 1009 GROUP BY ENVELOPE_ID,COMMENT ) REJ ON ENV.GUID = REJ.ENVELOPE_ID LEFT JOIN
|
||||||
|
(SELECT * FROM TBSIG_ENVELOPE_HISTORY where STATUS = 3004 ) M_Send ON ENV.GUID = M_Send.ENVELOPE_ID
|
||||||
|
where M_Send.GUID IS NULL"
|
||||||
|
Dim oDT_EnvWithdrawn = Database.GetDatatable(oSql)
|
||||||
|
|
||||||
|
oEnvelopeIds = oDTEnv_invitations.Rows.Cast(Of DataRow).
|
||||||
|
Select(Function(r) r.Item("GUID")).
|
||||||
|
Cast(Of Integer).
|
||||||
|
ToList()
|
||||||
|
|
||||||
|
If oEnvelopeIds.Count > 0 Then
|
||||||
|
Logger.Info("WithdrawnEnv - Found [{0}] envelopes.", oEnvelopeIds.Count)
|
||||||
|
End If
|
||||||
|
|
||||||
|
oTotal = oEnvelopeIds.Count
|
||||||
|
oCurrent = 1
|
||||||
|
Dim oEnvID As Integer
|
||||||
|
For Each oRow As DataRow In oDT_EnvWithdrawn.Rows
|
||||||
|
oEnvID = oRow.Item("GUID")
|
||||||
|
Dim oReason = oRow.Item("REJECTION_REASON")
|
||||||
|
Logger.Info("WithdrawnEnv - Gathering Info for Envelope [{0}] ({1}/{2})", oEnvID, oCurrent, oTotal)
|
||||||
|
Try
|
||||||
|
Dim oEnvelope = EnvelopeModel.GetById(oEnvID)
|
||||||
|
If oEnvelope Is Nothing Then
|
||||||
|
Logger.Warn("WithdrawnEnv - Envelope could not be loaded for Id [{0}]!", oEnvID)
|
||||||
|
Throw New ArgumentNullException("EnvelopeData")
|
||||||
|
End If
|
||||||
|
oEnvelope.CURRENT_WORK_APP = "signFLOW_API_EnvJob_Withdrawn"
|
||||||
|
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id).ToList()
|
||||||
|
|
||||||
|
Logger.Debug("WithdrawnEnv - Sending Withdrawn Mails..")
|
||||||
|
|
||||||
|
If ActionService.API_SendWithdrawn_Mails(oEnvelope, oReason) = False Then
|
||||||
|
Logger.Warn("Could not send the Mails for withdrawn Envelope")
|
||||||
|
Else
|
||||||
|
Dim oStatInsert = $"INSERT INTO TBSIG_ENVELOPE_HISTORY (ENVELOPE_ID,STATUS,USER_REFERENCE,ADDED_WHEN,ACTION_DATE) VALUES ('{oEnvelope.Id}',3004,'API',GETDATE(),GETDATE())"
|
||||||
|
Database.ExecuteNonQuery(oStatInsert)
|
||||||
|
End If
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Warn(ex, $"WithdrawnEnv - Unhandled exception while working envelope [{oEnvID}]")
|
||||||
|
End Try
|
||||||
|
|
||||||
|
oCurrent += 1
|
||||||
|
Logger.Info("WithdrawnEnv - Envelope finalized!")
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
|
||||||
|
Logger.Debug("API Envelopes - Completed job {0} successfully!", JobId)
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Warn("API Envelopes job failed!")
|
||||||
|
Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
Logger.Debug("API Envelopes execution for [{0}] ended", JobId)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Task.FromResult(True)
|
||||||
|
End Function
|
||||||
|
Private Sub InitializeModels(pState As State)
|
||||||
|
ConfigModel = New ConfigModel(pState)
|
||||||
|
EnvelopeModel = New EnvelopeModel(pState)
|
||||||
|
ReceiverModel = New ReceiverModel(pState)
|
||||||
|
End Sub
|
||||||
|
Private Sub InitializeServices(pState As State)
|
||||||
|
ActionService = New ActionService(pState, Database)
|
||||||
|
End Sub
|
||||||
|
Private Function GetDatabase(pContext As IJobExecutionContext, pLogConfig As LogConfig) As MSSQLServer
|
||||||
|
Dim oConnectionString As String = pContext.MergedJobDataMap.Item(Constants.DATABASE)
|
||||||
|
Dim Database = New MSSQLServer(pLogConfig, MSSQLServer.DecryptConnectionString(oConnectionString))
|
||||||
|
|
||||||
|
Return Database
|
||||||
|
End Function
|
||||||
|
Private Function GetEnvelopeData(pEnvelopeId As Integer) As EnvelopeData
|
||||||
|
Dim oSql = $"SELECT T.GUID, T.ENVELOPE_UUID,T2.FILEPATH, T2.BYTE_DATA FROM [dbo].[TBSIG_ENVELOPE] T
|
||||||
|
JOIN TBSIG_ENVELOPE_DOCUMENT T2 ON T.GUID = T2.ENVELOPE_ID
|
||||||
|
WHERE T.GUID = {pEnvelopeId}"
|
||||||
|
Dim oTable As DataTable = Database.GetDatatable(oSql)
|
||||||
|
Dim oRow As DataRow = oTable.Rows.Cast(Of DataRow).SingleOrDefault()
|
||||||
|
If oRow Is Nothing Then
|
||||||
|
Return Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oData As New EnvelopeData With {
|
||||||
|
.EnvelopeId = pEnvelopeId,
|
||||||
|
.DocumentPath = oRow.ItemEx("FILEPATH", ""),
|
||||||
|
.EnvelopeUUID = oRow.ItemEx("ENVELOPE_UUID", "")
|
||||||
|
}
|
||||||
|
|
||||||
|
Logger.Debug("Document path: [{0}]", oData.DocumentPath)
|
||||||
|
|
||||||
|
Return oData
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Function GetState() As State
|
||||||
|
Return New State With {
|
||||||
|
.LogConfig = LogConfig,
|
||||||
|
.Database = Database,
|
||||||
|
.UserId = 0,
|
||||||
|
.Config = Nothing,
|
||||||
|
.DbConfig = Nothing
|
||||||
|
}
|
||||||
|
End Function
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
@@ -53,7 +53,7 @@ Namespace Jobs
|
|||||||
myTempFiles = New TempFiles(LogConfig)
|
myTempFiles = New TempFiles(LogConfig)
|
||||||
myTempFiles.Create()
|
myTempFiles.Create()
|
||||||
Dim JobId = pContext.JobDetail.Key
|
Dim JobId = pContext.JobDetail.Key
|
||||||
Logger.Info("Starting job {0}", JobId)
|
Logger.Debug("Starting job {0}", JobId)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
Logger.Debug("Loading GdViewer..")
|
Logger.Debug("Loading GdViewer..")
|
||||||
@@ -74,8 +74,8 @@ Namespace Jobs
|
|||||||
InitializeServices(oState)
|
InitializeServices(oState)
|
||||||
|
|
||||||
Logger.Debug("Loading PDFBurner..")
|
Logger.Debug("Loading PDFBurner..")
|
||||||
Dim ignoredLabels As List(Of String) = pContext.MergedJobDataMap.Item(Constants.IGNORED_LABELS)
|
Dim pdfBurnerParams As PDFBurnerParams = pContext.MergedJobDataMap.Item(Constants.PDF_BURNER_PARAMS)
|
||||||
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, ignoredLabels)
|
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, pdfBurnerParams)
|
||||||
|
|
||||||
Logger.Debug("Loading PDFMerger..")
|
Logger.Debug("Loading PDFMerger..")
|
||||||
PDFMerger = New PDFMerger(LogConfig, oGdPictureKey)
|
PDFMerger = New PDFMerger(LogConfig, oGdPictureKey)
|
||||||
@@ -108,7 +108,6 @@ Namespace Jobs
|
|||||||
|
|
||||||
For Each oId In oEnvelopeIds
|
For Each oId In oEnvelopeIds
|
||||||
Logger.Info("Finalizing Envelope [{0}] ({1}/{2})", oId, oCurrent, oTotal)
|
Logger.Info("Finalizing Envelope [{0}] ({1}/{2})", oId, oCurrent, oTotal)
|
||||||
Logger.Debug("Loading Envelope..")
|
|
||||||
Try
|
Try
|
||||||
Dim oEnvelope = EnvelopeModel.GetById(oId)
|
Dim oEnvelope = EnvelopeModel.GetById(oId)
|
||||||
If oEnvelope Is Nothing Then
|
If oEnvelope Is Nothing Then
|
||||||
@@ -147,7 +146,7 @@ Namespace Jobs
|
|||||||
Directory.CreateDirectory(oOutputDirectoryPath)
|
Directory.CreateDirectory(oOutputDirectoryPath)
|
||||||
End If
|
End If
|
||||||
Dim oOutputFilePath = Path.Combine(oOutputDirectoryPath, $"{oEnvelope.Uuid}.pdf")
|
Dim oOutputFilePath = Path.Combine(oOutputDirectoryPath, $"{oEnvelope.Uuid}.pdf")
|
||||||
Logger.Info("Writing finalized Pdf to disk..")
|
Logger.Debug("Writing finalized Pdf to disk..")
|
||||||
Logger.Info("Output path is [{0}]", oOutputFilePath)
|
Logger.Info("Output path is [{0}]", oOutputFilePath)
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -157,12 +156,14 @@ Namespace Jobs
|
|||||||
Throw New ExportDocumentException("Could not export final document to disk!", ex)
|
Throw New ExportDocumentException("Could not export final document to disk!", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Logger.Info("Writing EB-bytes to database...")
|
Logger.Debug("Writing EB-bytes to database...")
|
||||||
Update_File_DB(oOutputFilePath, oEnvelope.Id)
|
Update_File_DB(oOutputFilePath, oEnvelope.Id)
|
||||||
|
|
||||||
Logger.Info("Sending finalized report-mails..")
|
|
||||||
If SendFinalEmails(oEnvelope) = False Then ', oOutputFilePath
|
If SendFinalEmails(oEnvelope) = False Then ', oOutputFilePath
|
||||||
Throw New ApplicationException("Final emails could not be sent!")
|
Throw New ApplicationException("Final emails could not be sent!")
|
||||||
|
Else
|
||||||
|
Logger.Info("Report-mails successfully sent!")
|
||||||
End If
|
End If
|
||||||
Logger.Debug("Setting envelope status..")
|
Logger.Debug("Setting envelope status..")
|
||||||
If ActionService.FinalizeEnvelope(oEnvelope) = False Then
|
If ActionService.FinalizeEnvelope(oEnvelope) = False Then
|
||||||
@@ -170,12 +171,12 @@ Namespace Jobs
|
|||||||
Throw New ApplicationException("Envelope could not be finalized")
|
Throw New ApplicationException("Envelope could not be finalized")
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Warn($"Unhandled exception while working envelope [{oId}] - [{ex.Message}]")
|
Logger.Warn(ex, $"Unhandled exception while working envelope [{oId}]")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
oCurrent += 1
|
oCurrent += 1
|
||||||
Logger.Info("Envelope finalized!")
|
Logger.Info($"Envelope [{oId}] finalized!")
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -192,7 +193,7 @@ Namespace Jobs
|
|||||||
Logger.Warn("Certificate Document job failed!")
|
Logger.Warn("Certificate Document job failed!")
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
Finally
|
Finally
|
||||||
Logger.Info("Job execution for [{0}] ended", JobId)
|
Logger.Debug("Job execution for [{0}] ended", JobId)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Task.FromResult(True)
|
Return Task.FromResult(True)
|
||||||
@@ -290,11 +291,15 @@ Namespace Jobs
|
|||||||
If oMailToCreator <> FinalEmailType.No Then
|
If oMailToCreator <> FinalEmailType.No Then
|
||||||
Logger.Debug("Sending email to creator ...")
|
Logger.Debug("Sending email to creator ...")
|
||||||
SendFinalEmailToCreator(pEnvelope) ', pAttachment
|
SendFinalEmailToCreator(pEnvelope) ', pAttachment
|
||||||
|
Else
|
||||||
|
Logger.Warn($"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{FinalEmailType.No}] ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oMailToReceivers <> FinalEmailType.No Then
|
If oMailToReceivers <> FinalEmailType.No Then
|
||||||
Logger.Debug("Sending emails to receivers..")
|
Logger.Debug("Sending emails to receivers..")
|
||||||
SendFinalEmailToReceivers(pEnvelope) ', pAttachment
|
SendFinalEmailToReceivers(pEnvelope) ', pAttachment
|
||||||
|
Else
|
||||||
|
Logger.Warn($"No SendFinalEmailToReceivers - oMailToCreator [{oMailToReceivers}] <> [{FinalEmailType.No}] ")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
@@ -355,9 +360,9 @@ Namespace Jobs
|
|||||||
oInputPath = pEnvelopeData.DocumentPath
|
oInputPath = pEnvelopeData.DocumentPath
|
||||||
Logger.Info($"Input path: [{oInputPath}]")
|
Logger.Info($"Input path: [{oInputPath}]")
|
||||||
Else
|
Else
|
||||||
Logger.Info($"we got bytes..")
|
Logger.Debug($"we got bytes..")
|
||||||
oInputPath = Config.DocumentPathOrigin
|
oInputPath = Config.DocumentPathOrigin
|
||||||
Logger.Info($"oInputPath: {Config.DocumentPathOrigin}")
|
Logger.Debug($"oInputPath: {Config.DocumentPathOrigin}")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -378,12 +383,10 @@ Namespace Jobs
|
|||||||
Try
|
Try
|
||||||
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
|
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
|
||||||
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
|
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return PDFBurner.BurnInstantJSONAnnotationsToPDF(oInputDocumentBuffer, oAnnotations)
|
Return PDFBurner.BurnInstantJSONAnnotationsToPDF(oInputDocumentBuffer, oAnnotations)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
@@ -423,7 +426,7 @@ Namespace Jobs
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Sub InitializeServices(pState As State)
|
Private Sub InitializeServices(pState As State)
|
||||||
ActionService = New ActionService(pState)
|
ActionService = New ActionService(pState, Database)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub InitializeModels(pState As State)
|
Private Sub InitializeModels(pState As State)
|
||||||
|
|||||||
@@ -16,9 +16,9 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Private Const ANNOTATION_TYPE_IMAGE = "pspdfkit/image"
|
Private Const ANNOTATION_TYPE_IMAGE = "pspdfkit/image"
|
||||||
Private Const ANNOTATION_TYPE_INK = "pspdfkit/ink"
|
Private Const ANNOTATION_TYPE_INK = "pspdfkit/ink"
|
||||||
Private Const ANNOTATION_TYPE_WIDGET = "pspdfkit/widget"
|
Private Const ANNOTATION_TYPE_WIDGET = "pspdfkit/widget"
|
||||||
Private Property _ignoredLabels As List(Of String)
|
Private Property _pdfBurnerParams As PDFBurnerParams
|
||||||
|
|
||||||
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, ignoredLabels As List(Of String))
|
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, pdfBurnerParams As PDFBurnerParams)
|
||||||
MyBase.New(pLogConfig)
|
MyBase.New(pLogConfig)
|
||||||
|
|
||||||
LicenseManager = New LicenseManager()
|
LicenseManager = New LicenseManager()
|
||||||
@@ -26,56 +26,50 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Manager = New AnnotationManager()
|
Manager = New AnnotationManager()
|
||||||
|
|
||||||
_ignoredLabels = ignoredLabels
|
_pdfBurnerParams = pdfBurnerParams
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
|
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
|
||||||
Dim oResult As GdPictureStatus
|
Dim oResult As GdPictureStatus
|
||||||
|
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||||
|
' Open PDF
|
||||||
|
oResult = Manager.InitFromStream(oSourceStream)
|
||||||
|
If oResult <> GdPictureStatus.OK Then
|
||||||
|
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
||||||
|
End If
|
||||||
|
|
||||||
Try
|
' Add annotation to PDF
|
||||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
For Each oJSON In pInstantJSONList
|
||||||
' Open PDF
|
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
||||||
oResult = Manager.InitFromStream(oSourceStream)
|
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
||||||
|
Logger.Warn(oJSON)
|
||||||
|
Throw New BurnAnnotationException($"Adding Annotation failed")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||||
|
If oResult <> GdPictureStatus.OK Then
|
||||||
|
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Save PDF
|
||||||
|
Using oNewStream As New MemoryStream()
|
||||||
|
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
||||||
If oResult <> GdPictureStatus.OK Then
|
If oResult <> GdPictureStatus.OK Then
|
||||||
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
Throw New BurnAnnotationException($"Could not save document to stream: [{oResult}]")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Add annotation to PDF
|
Manager.Close()
|
||||||
For Each oJSON In pInstantJSONList
|
|
||||||
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
|
||||||
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
|
||||||
Logger.Warn(oJSON)
|
|
||||||
Throw New BurnAnnotationException($"Adding Annotation failed")
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
|
||||||
If oResult <> GdPictureStatus.OK Then
|
|
||||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Save PDF
|
Return oNewStream.ToArray()
|
||||||
Using oNewStream As New MemoryStream()
|
|
||||||
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
|
||||||
If oResult <> GdPictureStatus.OK Then
|
|
||||||
Throw New BurnAnnotationException($"Could not save document to stream: [{oResult}]")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Manager.Close()
|
|
||||||
|
|
||||||
Return oNewStream.ToArray()
|
|
||||||
End Using
|
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
End Using
|
||||||
Logger.Error(ex)
|
|
||||||
|
|
||||||
Return Nothing
|
|
||||||
End Try
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function AddInstantJSONAnnotationToPDF(pInstantJSON As String) As Boolean
|
Private Function AddInstantJSONAnnotationToPDF(pInstantJSON As String) As Boolean
|
||||||
Try
|
Try
|
||||||
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
|
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
|
||||||
|
oAnnotationData.annotations.Reverse()
|
||||||
|
Dim formFieldIndex = 0
|
||||||
For Each oAnnotation In oAnnotationData.annotations
|
For Each oAnnotation In oAnnotationData.annotations
|
||||||
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
|
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
|
||||||
Select Case oAnnotation.type
|
Select Case oAnnotation.type
|
||||||
@@ -88,10 +82,12 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Case ANNOTATION_TYPE_WIDGET
|
Case ANNOTATION_TYPE_WIDGET
|
||||||
'Add form field values
|
'Add form field values
|
||||||
Dim formFieldValue = oAnnotationData.formFieldValues.FirstOrDefault(Function(fv) fv.name = oAnnotation.id)
|
Dim formFieldValue = oAnnotationData.formFieldValues.FirstOrDefault(Function(fv) fv.name = oAnnotation.id)
|
||||||
If formFieldValue IsNot Nothing AndAlso Not _ignoredLabels.Contains(formFieldValue.value) Then
|
If formFieldValue IsNot Nothing AndAlso Not _pdfBurnerParams.IgnoredLabels.Contains(formFieldValue.value) Then
|
||||||
AddFormFieldValue(oAnnotation, formFieldValue)
|
AddFormFieldValue(oAnnotation, formFieldValue, formFieldIndex)
|
||||||
|
formFieldIndex += 1
|
||||||
End If
|
End If
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
@@ -151,13 +147,13 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function AddFormFieldValue(pAnnotation As Annotation, formFieldValue As FormFieldValue) As Boolean
|
Private Function AddFormFieldValue(pAnnotation As Annotation, formFieldValue As FormFieldValue, index As Integer) As Boolean
|
||||||
Try
|
Try
|
||||||
' Convert pixels to Inches
|
' Convert pixels to Inches
|
||||||
Dim oBounds = pAnnotation.bbox.Select(AddressOf ToInches).ToList()
|
Dim oBounds = pAnnotation.bbox.Select(AddressOf ToInches).ToList()
|
||||||
|
|
||||||
Dim oX = oBounds.Item(0)
|
Dim oX = oBounds.Item(0)
|
||||||
Dim oY = oBounds.Item(1)
|
Dim oY = oBounds.Item(1) + _pdfBurnerParams.YOffset * index + _pdfBurnerParams.TopMargin
|
||||||
Dim oWidth = oBounds.Item(2)
|
Dim oWidth = oBounds.Item(2)
|
||||||
Dim oHeight = oBounds.Item(3)
|
Dim oHeight = oBounds.Item(3)
|
||||||
|
|
||||||
@@ -166,9 +162,9 @@ Namespace Jobs.FinalizeDocument
|
|||||||
Dim ant = Manager.AddTextAnnot(oX, oY, oWidth, oHeight, formFieldValue.value)
|
Dim ant = Manager.AddTextAnnot(oX, oY, oWidth, oHeight, formFieldValue.value)
|
||||||
|
|
||||||
' Set the font properties
|
' Set the font properties
|
||||||
ant.FontName = "Arial"
|
ant.FontName = _pdfBurnerParams.FontName
|
||||||
ant.FontSize = 8
|
ant.FontSize = _pdfBurnerParams.FontSize
|
||||||
ant.FontStyle = FontStyle.Italic
|
ant.FontStyle = _pdfBurnerParams.FontStyle
|
||||||
Manager.SaveAnnotationsToPage()
|
Manager.SaveAnnotationsToPage()
|
||||||
Return True
|
Return True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
Imports System.Drawing
|
||||||
|
Namespace Jobs.FinalizeDocument
|
||||||
|
Public Class PDFBurnerParams
|
||||||
|
Public Property IgnoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"}
|
||||||
|
|
||||||
|
Public Property TopMargin As Double = 0.1
|
||||||
|
|
||||||
|
Public Property YOffset As Double = -0.3
|
||||||
|
|
||||||
|
Public Property FontName As String = "Arial"
|
||||||
|
|
||||||
|
Public Property FontSize As Integer = 8
|
||||||
|
|
||||||
|
Public Property FontStyle As FontStyle = FontStyle.Italic
|
||||||
|
End Class
|
||||||
|
End Namespace
|
||||||
@@ -18,7 +18,7 @@ Public Class EmailModel
|
|||||||
oCommand.Parameters.Add("EMAIL_ADRESS", SqlDbType.NVarChar).Value = pEmail.EmailAdress
|
oCommand.Parameters.Add("EMAIL_ADRESS", SqlDbType.NVarChar).Value = pEmail.EmailAdress
|
||||||
oCommand.Parameters.Add("EMAIL_SUBJ", SqlDbType.NVarChar).Value = pEmail.EmailSubject
|
oCommand.Parameters.Add("EMAIL_SUBJ", SqlDbType.NVarChar).Value = pEmail.EmailSubject
|
||||||
oCommand.Parameters.Add("EMAIL_BODY", SqlDbType.NVarChar).Value = pEmail.EmailBody
|
oCommand.Parameters.Add("EMAIL_BODY", SqlDbType.NVarChar).Value = pEmail.EmailBody
|
||||||
oCommand.Parameters.Add("ADDED_WHO", SqlDbType.NVarChar).Value = "DDEnvelopGenerator"
|
oCommand.Parameters.Add("ADDED_WHO", SqlDbType.NVarChar).Value = pEmail.ADDED_WHO_PROCESS
|
||||||
oCommand.Parameters.Add("SENDING_PROFILE", SqlDbType.Int).Value = State.DbConfig.SendingProfile
|
oCommand.Parameters.Add("SENDING_PROFILE", SqlDbType.Int).Value = State.DbConfig.SendingProfile
|
||||||
oCommand.Parameters.Add("REFERENCE_ID", SqlDbType.Int).Value = pEmail.ReferenceID
|
oCommand.Parameters.Add("REFERENCE_ID", SqlDbType.Int).Value = pEmail.ReferenceID
|
||||||
oCommand.Parameters.Add("REFERENCE_STRING", SqlDbType.NVarChar).Value = pEmail.ReferenceString
|
oCommand.Parameters.Add("REFERENCE_STRING", SqlDbType.NVarChar).Value = pEmail.ReferenceString
|
||||||
|
|||||||
@@ -35,6 +35,7 @@ Public Class EnvelopeModel
|
|||||||
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
|
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
|
||||||
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
|
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
|
||||||
.AddedWhen = pRow.Item("ADDED_WHEN"),
|
.AddedWhen = pRow.Item("ADDED_WHEN"),
|
||||||
|
.ChangedWhen = pRow.ItemEx(Of Date)("CHANGED_WHEN", Nothing),
|
||||||
.CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.AdvancedElectronicSignature.ToString())),
|
.CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.AdvancedElectronicSignature.ToString())),
|
||||||
.User = New User(),
|
.User = New User(),
|
||||||
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
|
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),
|
||||||
|
|||||||
@@ -33,10 +33,10 @@ Public Class UserModel
|
|||||||
Dim oRow = oTable.Rows.Item(0)
|
Dim oRow = oTable.Rows.Item(0)
|
||||||
Dim oHasAccess = oRow.ItemEx("MODULE_ACCESS", False)
|
Dim oHasAccess = oRow.ItemEx("MODULE_ACCESS", False)
|
||||||
Dim oIsAdmin = oRow.ItemEx("IS_ADMIN", False)
|
Dim oIsAdmin = oRow.ItemEx("IS_ADMIN", False)
|
||||||
|
Dim oGhostmode = oRow.ItemEx("GHOST_MODE_OVERRIDE", False)
|
||||||
pUser.HasAccess = oHasAccess
|
pUser.HasAccess = oHasAccess
|
||||||
pUser.IsAdmin = oIsAdmin
|
pUser.IsAdmin = oIsAdmin
|
||||||
|
pUser.GhostModeActive = oGhostmode
|
||||||
Return pUser
|
Return pUser
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
|
|||||||
@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' indem Sie "*" wie unten gezeigt eingeben:
|
' indem Sie "*" wie unten gezeigt eingeben:
|
||||||
' <Assembly: AssemblyVersion("1.0.*")>
|
' <Assembly: AssemblyVersion("1.0.*")>
|
||||||
|
|
||||||
<Assembly: AssemblyVersion("2.4.3.0")>
|
<Assembly: AssemblyVersion("2.7.0.0")>
|
||||||
<Assembly: AssemblyFileVersion("2.4.3.0")>
|
<Assembly: AssemblyFileVersion("2.7.0.0")>
|
||||||
|
|||||||
@@ -1,19 +1,25 @@
|
|||||||
Imports DevExpress.DataAccess.Native.Web
|
Imports DevExpress.DataAccess.Native.Web
|
||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
|
Imports EnvelopeGenerator.Common.Constants
|
||||||
Imports EnvelopeGenerator.Common.My.Resources
|
Imports EnvelopeGenerator.Common.My.Resources
|
||||||
|
Imports DigitalData.Modules.Database
|
||||||
|
Imports System.ComponentModel
|
||||||
|
|
||||||
Public Class ActionService
|
Public Class ActionService
|
||||||
Inherits BaseService
|
Inherits BaseService
|
||||||
|
|
||||||
|
|
||||||
Private ReadOnly EmailService As EmailService
|
Private ReadOnly EmailService As EmailService
|
||||||
Private ReadOnly HistoryService As HistoryService
|
Private ReadOnly HistoryService As HistoryService
|
||||||
|
|
||||||
Private ReadOnly ReceiverModel As ReceiverModel
|
Private ReadOnly ReceiverModel As ReceiverModel
|
||||||
|
|
||||||
|
Private myDatabase As MSSQLServer
|
||||||
|
|
||||||
Public Sub New(pState As State)
|
|
||||||
|
Public Sub New(pState As State, pDD_ECM As MSSQLServer)
|
||||||
MyBase.New(pState)
|
MyBase.New(pState)
|
||||||
|
myDatabase = pDD_ECM
|
||||||
EmailService = New EmailService(pState)
|
EmailService = New EmailService(pState)
|
||||||
HistoryService = New HistoryService(pState)
|
HistoryService = New HistoryService(pState)
|
||||||
ReceiverModel = New ReceiverModel(pState)
|
ReceiverModel = New ReceiverModel(pState)
|
||||||
@@ -34,6 +40,12 @@ Public Class ActionService
|
|||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
Public Function SetStatusDocumentRotationChanged(pEnvelope As Envelope) As Boolean
|
||||||
|
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.DocumentMod_Rotation, pEnvelope.User.Email) = False Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
Public Function Resend_Receiver(pEnvelope As Envelope, pmail As String) As Boolean
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeQueued, pEnvelope.User.Email) = False Then
|
||||||
Return False
|
Return False
|
||||||
@@ -50,7 +62,15 @@ Public Class ActionService
|
|||||||
|
|
||||||
|
|
||||||
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
|
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
|
||||||
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.EnvelopeDeleted, pEnvelope.User.Email) = False Then
|
Dim oStatus As EnvelopeStatus
|
||||||
|
If pEnvelope.IsAlreadySent Then
|
||||||
|
oStatus = Constants.EnvelopeStatus.EnvelopeWithdrawn
|
||||||
|
Else
|
||||||
|
oStatus = Constants.EnvelopeStatus.EnvelopeDeleted
|
||||||
|
End If
|
||||||
|
Dim oUpd = $"UPDATE TBSIG_ENVELOPE SET REJECTION_REASON = '{pReason}' WHERE GUID = {pEnvelope.Id}"
|
||||||
|
myDatabase.ExecuteNonQuery(oUpd)
|
||||||
|
If HistoryService.SetEnvelopeStatus(pEnvelope, oStatus, pEnvelope.User.Email) = False Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -64,6 +84,15 @@ Public Class ActionService
|
|||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
|
Public Function API_SendWithdrawn_Mails(pEnvelope As Envelope, pReason As String) As Boolean
|
||||||
|
Dim oSendResult As Boolean = False
|
||||||
|
For Each oReceiver As EnvelopeReceiver In pEnvelope.Receivers
|
||||||
|
If EmailService.SendEnvelopeDeletedEmail(pEnvelope, oReceiver, pReason) = False Then
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
Return True
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function OpenEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function OpenEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||||
Dim oUserReference = pReceiver.Email
|
Dim oUserReference = pReceiver.Email
|
||||||
|
|||||||
@@ -1,13 +1,10 @@
|
|||||||
Imports DigitalData.Modules.Base
|
Imports DigitalData.Modules.Base
|
||||||
|
|
||||||
Public Class BaseService
|
Public Class BaseService
|
||||||
Inherits BaseClass
|
Inherits BaseClass
|
||||||
|
|
||||||
Friend Property State As State
|
Friend Property State As State
|
||||||
|
|
||||||
Public Sub New(pState As State)
|
Public Sub New(pState As State)
|
||||||
MyBase.New(pState.LogConfig)
|
MyBase.New(pState.LogConfig)
|
||||||
|
|
||||||
State = pState
|
State = pState
|
||||||
End Sub
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -17,10 +17,11 @@ Public Class EmailService
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pReason As String) As Boolean
|
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pReason As String) As Boolean
|
||||||
Logger.Debug("Creating email data object.")
|
Logger.Debug("SendEnvelopeDeletedEmail - Creating email data object...")
|
||||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageDeletionSent) With
|
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageDeletionSent) With
|
||||||
{
|
{
|
||||||
.SignatureLink = ""
|
.SignatureLink = "",
|
||||||
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
}
|
}
|
||||||
|
|
||||||
EmailTemplate.FillEnvelopeDeletedEmailBody(oEmailData, pReason)
|
EmailTemplate.FillEnvelopeDeletedEmailBody(oEmailData, pReason)
|
||||||
@@ -37,7 +38,8 @@ Public Class EmailService
|
|||||||
Logger.Debug("Creating email data object.")
|
Logger.Debug("Creating email data object.")
|
||||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||||
{
|
{
|
||||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
|
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||||
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
}
|
}
|
||||||
|
|
||||||
EmailTemplate.FillDocumentReceivedEmailBody(oEmailData)
|
EmailTemplate.FillDocumentReceivedEmailBody(oEmailData)
|
||||||
@@ -51,9 +53,13 @@ Public Class EmailService
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetReceiverUrl(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As String
|
Public Function GetReceiverUrl(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As String
|
||||||
|
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||||
|
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||||
|
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
||||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
|
||||||
{
|
{
|
||||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
|
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||||
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
}
|
}
|
||||||
Return oEmailData.SignatureLink
|
Return oEmailData.SignatureLink
|
||||||
End Function
|
End Function
|
||||||
@@ -61,9 +67,13 @@ Public Class EmailService
|
|||||||
|
|
||||||
Public Function SendDocumentAccessCodeReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function SendDocumentAccessCodeReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||||
Logger.Debug("Creating email data object.")
|
Logger.Debug("Creating email data object.")
|
||||||
|
Logger.Debug($"State.DbConfig.SignatureHost: {State.DbConfig.SignatureHost}")
|
||||||
|
Logger.Debug($" pEnvelope.Uuid: {pEnvelope.Uuid}")
|
||||||
|
Logger.Debug($" pReceiver.Signature: {pReceiver.Signature}")
|
||||||
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageAccessCodeSent) With
|
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageAccessCodeSent) With
|
||||||
{
|
{
|
||||||
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
|
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature),
|
||||||
|
.ADDED_WHO_PROCESS = pEnvelope.CURRENT_WORK_APP
|
||||||
}
|
}
|
||||||
|
|
||||||
EmailTemplate.FillDocumentAccessCodeReceivedEmailBody(oEmailData)
|
EmailTemplate.FillDocumentAccessCodeReceivedEmailBody(oEmailData)
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<value>Please select the PDF documents you would like to link/concat:</value>
|
<value>Please select the PDF documents you would like to link/concat:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Do you really want to delete this envelope" xml:space="preserve">
|
<data name="Do you really want to delete this envelope" xml:space="preserve">
|
||||||
<value>Do you really want to delete this envelope?</value>
|
<value>Do you really want to withdraw/delete this envelope?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Do you really want to remove this document" xml:space="preserve">
|
<data name="Do you really want to remove this document" xml:space="preserve">
|
||||||
<value>Do you really want to remove this document?</value>
|
<value>Do you really want to remove this document?</value>
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<value>Bitte wählen Sie die PDF-Dokumente die Sie verketten möchten:</value>
|
<value>Bitte wählen Sie die PDF-Dokumente die Sie verketten möchten:</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Do you really want to delete this envelope" xml:space="preserve">
|
<data name="Do you really want to delete this envelope" xml:space="preserve">
|
||||||
<value>Wollen Sie diesen Umschlag wirklich löschen?</value>
|
<value>Wollen Sie diesen Umschlag wirklich zurückrufen/löschen?</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="Do you really want to remove this document" xml:space="preserve">
|
<data name="Do you really want to remove this document" xml:space="preserve">
|
||||||
<value>Wollen Sie dieses Dokument wirklich entfernen?</value>
|
<value>Wollen Sie dieses Dokument wirklich entfernen?</value>
|
||||||
@@ -220,6 +220,9 @@ Pattern: +491234567890</value>
|
|||||||
<data name="Missing Receivers" xml:space="preserve">
|
<data name="Missing Receivers" xml:space="preserve">
|
||||||
<value>Fehlende Empfänger</value>
|
<value>Fehlende Empfänger</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ModificationOriginFile_FormFields" xml:space="preserve">
|
||||||
|
<value />
|
||||||
|
</data>
|
||||||
<data name="New Envelope" xml:space="preserve">
|
<data name="New Envelope" xml:space="preserve">
|
||||||
<value>Neuer Umschlag</value>
|
<value>Neuer Umschlag</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -74,7 +74,7 @@ Namespace My.Resources
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich löschen? ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie diesen Umschlag wirklich zurückrufen/löschen? ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
Public Shared ReadOnly Property Do_you_really_want_to_delete_this_envelope() As String
|
Public Shared ReadOnly Property Do_you_really_want_to_delete_this_envelope() As String
|
||||||
Get
|
Get
|
||||||
@@ -371,6 +371,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property ModificationOriginFile_FormFields() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("ModificationOriginFile_FormFields", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Neuer Umschlag ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Neuer Umschlag ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
54
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
54
EnvelopeGenerator.Common/Strings/Model.Designer.vb
generated
@@ -136,6 +136,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Dokument Rotation geändert ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property DocumentMod_Rotation() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("DocumentMod_Rotation", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Dokument geöffnet ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Dokument geöffnet ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -145,6 +154,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Unterzeichnung abgelehnt ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property DocumentRejected() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("DocumentRejected", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Dokument unterzeichnet ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Dokument unterzeichnet ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -217,6 +235,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Umschlag abgelehnt ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property EnvelopeRejected() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("EnvelopeRejected", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Signierungszertifikat erstellt ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Signierungszertifikat erstellt ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -244,6 +271,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Umschlag zurückgezogen ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property EnvelopeWithdrawn() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("EnvelopeWithdrawn", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Zugriffscode versendet ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Zugriffscode versendet ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -325,6 +361,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Wollen Sie die 2-Faktor Definition für diesen Empfänger zurücksetzen. Der Empfänger muss sich dann neu identifizieren! ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property ResetTOTPUser() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("ResetTOTPUser", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Gespeichert ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Gespeichert ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
@@ -370,6 +415,15 @@ Namespace My.Resources
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
'''<summary>
|
||||||
|
''' Sucht eine lokalisierte Zeichenfolge, die Erfolgreich! Dialog wird geschlossen. ähnelt.
|
||||||
|
'''</summary>
|
||||||
|
Public Shared ReadOnly Property Success_FormClose() As String
|
||||||
|
Get
|
||||||
|
Return ResourceManager.GetString("Success_FormClose", resourceCulture)
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
'''<summary>
|
'''<summary>
|
||||||
''' Sucht eine lokalisierte Zeichenfolge, die Unsigniert ähnelt.
|
''' Sucht eine lokalisierte Zeichenfolge, die Unsigniert ähnelt.
|
||||||
'''</summary>
|
'''</summary>
|
||||||
|
|||||||
@@ -138,9 +138,15 @@
|
|||||||
<data name="Created" xml:space="preserve">
|
<data name="Created" xml:space="preserve">
|
||||||
<value>Created</value>
|
<value>Created</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DocumentMod_Rotation" xml:space="preserve">
|
||||||
|
<value>Document rotation adapted</value>
|
||||||
|
</data>
|
||||||
<data name="DocumentOpened" xml:space="preserve">
|
<data name="DocumentOpened" xml:space="preserve">
|
||||||
<value>Document opened</value>
|
<value>Document opened</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DocumentRejected" xml:space="preserve">
|
||||||
|
<value>Signing rejected</value>
|
||||||
|
</data>
|
||||||
<data name="DocumentSigned" xml:space="preserve">
|
<data name="DocumentSigned" xml:space="preserve">
|
||||||
<value>Document signed</value>
|
<value>Document signed</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -154,16 +160,19 @@
|
|||||||
<value>Completely signed</value>
|
<value>Completely signed</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnvelopeCreated" xml:space="preserve">
|
<data name="EnvelopeCreated" xml:space="preserve">
|
||||||
<value>Created</value>
|
<value>Envelope Created</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnvelopeDeleted" xml:space="preserve">
|
<data name="EnvelopeDeleted" xml:space="preserve">
|
||||||
<value>Deleted</value>
|
<value>Envelope Deleted</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnvelopePartlySigned" xml:space="preserve">
|
<data name="EnvelopePartlySigned" xml:space="preserve">
|
||||||
<value>Partly signed</value>
|
<value>Partly signed</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnvelopeQueued" xml:space="preserve">
|
<data name="EnvelopeQueued" xml:space="preserve">
|
||||||
<value>Queued</value>
|
<value>Envelope Queued</value>
|
||||||
|
</data>
|
||||||
|
<data name="EnvelopeRejected" xml:space="preserve">
|
||||||
|
<value>Envelope Rejected</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="EnvelopeReportCreated" xml:space="preserve">
|
<data name="EnvelopeReportCreated" xml:space="preserve">
|
||||||
<value>Signature certificate created</value>
|
<value>Signature certificate created</value>
|
||||||
@@ -174,6 +183,9 @@
|
|||||||
<data name="EnvelopeSent" xml:space="preserve">
|
<data name="EnvelopeSent" xml:space="preserve">
|
||||||
<value>Sent</value>
|
<value>Sent</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EnvelopeWithdrawn" xml:space="preserve">
|
||||||
|
<value>Withdrawn</value>
|
||||||
|
</data>
|
||||||
<data name="MessageAccessCodeSent" xml:space="preserve">
|
<data name="MessageAccessCodeSent" xml:space="preserve">
|
||||||
<value>Accesscode sent</value>
|
<value>Accesscode sent</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -198,6 +210,9 @@
|
|||||||
<data name="ReadAndSign" xml:space="preserve">
|
<data name="ReadAndSign" xml:space="preserve">
|
||||||
<value>Read and Sign</value>
|
<value>Read and Sign</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ResetTOTPUser" xml:space="preserve">
|
||||||
|
<value>Do you want to reset the 2-factor definition for this receiver? The receiver must then identify itself again!</value>
|
||||||
|
</data>
|
||||||
<data name="Saved" xml:space="preserve">
|
<data name="Saved" xml:space="preserve">
|
||||||
<value>Saved</value>
|
<value>Saved</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -213,6 +228,9 @@
|
|||||||
<data name="Signed" xml:space="preserve">
|
<data name="Signed" xml:space="preserve">
|
||||||
<value>Signed</value>
|
<value>Signed</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Success_FormClose" xml:space="preserve">
|
||||||
|
<value>Successful! Dialog is closed.successful! Dialog is closed.</value>
|
||||||
|
</data>
|
||||||
<data name="Unsigned" xml:space="preserve">
|
<data name="Unsigned" xml:space="preserve">
|
||||||
<value>Unsigned</value>
|
<value>Unsigned</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -141,9 +141,15 @@
|
|||||||
<data name="Created" xml:space="preserve">
|
<data name="Created" xml:space="preserve">
|
||||||
<value>Erstellt</value>
|
<value>Erstellt</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DocumentMod_Rotation" xml:space="preserve">
|
||||||
|
<value>Dokument Rotation geändert</value>
|
||||||
|
</data>
|
||||||
<data name="DocumentOpened" xml:space="preserve">
|
<data name="DocumentOpened" xml:space="preserve">
|
||||||
<value>Dokument geöffnet</value>
|
<value>Dokument geöffnet</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="DocumentRejected" xml:space="preserve">
|
||||||
|
<value>Unterzeichnung abgelehnt</value>
|
||||||
|
</data>
|
||||||
<data name="DocumentSigned" xml:space="preserve">
|
<data name="DocumentSigned" xml:space="preserve">
|
||||||
<value>Dokument unterzeichnet</value>
|
<value>Dokument unterzeichnet</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -168,6 +174,9 @@
|
|||||||
<data name="EnvelopeQueued" xml:space="preserve">
|
<data name="EnvelopeQueued" xml:space="preserve">
|
||||||
<value>Umschlag in Queue</value>
|
<value>Umschlag in Queue</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EnvelopeRejected" xml:space="preserve">
|
||||||
|
<value>Umschlag abgelehnt</value>
|
||||||
|
</data>
|
||||||
<data name="EnvelopeReportCreated" xml:space="preserve">
|
<data name="EnvelopeReportCreated" xml:space="preserve">
|
||||||
<value>Signierungszertifikat erstellt</value>
|
<value>Signierungszertifikat erstellt</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -177,6 +186,9 @@
|
|||||||
<data name="EnvelopeSent" xml:space="preserve">
|
<data name="EnvelopeSent" xml:space="preserve">
|
||||||
<value>Gesendet</value>
|
<value>Gesendet</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="EnvelopeWithdrawn" xml:space="preserve">
|
||||||
|
<value>Umschlag zurückgezogen</value>
|
||||||
|
</data>
|
||||||
<data name="MessageAccessCodeSent" xml:space="preserve">
|
<data name="MessageAccessCodeSent" xml:space="preserve">
|
||||||
<value>Zugriffscode versendet</value>
|
<value>Zugriffscode versendet</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -204,6 +216,9 @@
|
|||||||
<data name="ReadAndSign" xml:space="preserve">
|
<data name="ReadAndSign" xml:space="preserve">
|
||||||
<value>Arbeitsanweisung</value>
|
<value>Arbeitsanweisung</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="ResetTOTPUser" xml:space="preserve">
|
||||||
|
<value>Wollen Sie die 2-Faktor Definition für diesen Empfänger zurücksetzen. Der Empfänger muss sich dann neu identifizieren!</value>
|
||||||
|
</data>
|
||||||
<data name="Saved" xml:space="preserve">
|
<data name="Saved" xml:space="preserve">
|
||||||
<value>Gespeichert</value>
|
<value>Gespeichert</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -219,6 +234,9 @@
|
|||||||
<data name="Signed" xml:space="preserve">
|
<data name="Signed" xml:space="preserve">
|
||||||
<value>Signiert</value>
|
<value>Signiert</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Success_FormClose" xml:space="preserve">
|
||||||
|
<value>Erfolgreich! Dialog wird geschlossen.</value>
|
||||||
|
</data>
|
||||||
<data name="Unsigned" xml:space="preserve">
|
<data name="Unsigned" xml:space="preserve">
|
||||||
<value>Unsigniert</value>
|
<value>Unsigniert</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions;
|
using DigitalData.Core.Abstractions;
|
||||||
|
using System.ComponentModel;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
|
|
||||||
@@ -20,5 +21,13 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[Column("SUBJECT", TypeName = "nvarchar(512)")]
|
[Column("SUBJECT", TypeName = "nvarchar(512)")]
|
||||||
public string? Subject { get; set; }
|
public string? Subject { get; set; }
|
||||||
|
|
||||||
|
[Required]
|
||||||
|
[Column("ADDED_WHEN", TypeName = "datetime")]
|
||||||
|
[DefaultValue("GETDATE()")]
|
||||||
|
public DateTime AddedWhen { get; set; }
|
||||||
|
|
||||||
|
[Column("CHANGED_WHEN", TypeName = "datetime")]
|
||||||
|
public DateTime? ChangedWhen { get; set; }
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -28,7 +28,6 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
|
||||||
public required string Uuid { get; init; }
|
public required string Uuid { get; init; }
|
||||||
|
|
||||||
[Required]
|
|
||||||
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
[Column("MESSAGE", TypeName = "nvarchar(max)")]
|
||||||
public string? Message { get; set; }
|
public string? Message { get; set; }
|
||||||
|
|
||||||
@@ -52,7 +51,7 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
public int? ContractType { get; set; }
|
public int? ContractType { get; set; }
|
||||||
|
|
||||||
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
|
||||||
public required string Language { get; set; }
|
public string? Language { get; set; }
|
||||||
|
|
||||||
[Column("SEND_REMINDER_EMAILS")]
|
[Column("SEND_REMINDER_EMAILS")]
|
||||||
public bool? SendReminderEmails { get; set; }
|
public bool? SendReminderEmails { get; set; }
|
||||||
@@ -87,6 +86,9 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
[Column("TFA_ENABLED", TypeName = "bit")]
|
[Column("TFA_ENABLED", TypeName = "bit")]
|
||||||
public bool TFAEnabled { get; set; }
|
public bool TFAEnabled { get; set; }
|
||||||
|
|
||||||
|
[Column("DOC_RESULT", TypeName = "varbinary(max)")]
|
||||||
|
public byte[]? DocResult { get; init; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The sender of envelope
|
/// The sender of envelope
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
using DigitalData.UserManager.Domain.Entities;
|
using DigitalData.UserManager.Domain.Entities;
|
||||||
using System.ComponentModel.DataAnnotations;
|
using System.ComponentModel.DataAnnotations;
|
||||||
using System.ComponentModel.DataAnnotations.Schema;
|
using System.ComponentModel.DataAnnotations.Schema;
|
||||||
using static EnvelopeGenerator.Common.Constants;
|
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Domain.Entities
|
namespace EnvelopeGenerator.Domain.Entities
|
||||||
{
|
{
|
||||||
@@ -42,19 +41,5 @@ namespace EnvelopeGenerator.Domain.Entities
|
|||||||
|
|
||||||
[ForeignKey("UserReference")]
|
[ForeignKey("UserReference")]
|
||||||
public virtual Receiver? Receiver { get; set; }
|
public virtual Receiver? Receiver { get; set; }
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public ReferenceType ReferenceType => (Status / 1000) switch
|
|
||||||
{
|
|
||||||
1 => ReferenceType.Sender,
|
|
||||||
2 or 3 => ReferenceType.Receiver,
|
|
||||||
_ => ReferenceType.Unknown,
|
|
||||||
};
|
|
||||||
|
|
||||||
[NotMapped]
|
|
||||||
public string? StatusName
|
|
||||||
=> (Enum.IsDefined(typeof(EnvelopeStatus), Status))
|
|
||||||
? Enum.GetName(typeof(EnvelopeStatus), Status)
|
|
||||||
: null;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -7,7 +7,7 @@
|
|||||||
</PropertyGroup>
|
</PropertyGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.4.3" />
|
<PackageReference Include="DigitalData.Core.Abstractions" Version="3.6.0" />
|
||||||
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.0.0" />
|
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="3.0.0" />
|
||||||
<PackageReference Include="UserManager.Domain" Version="3.0.2" />
|
<PackageReference Include="UserManager.Domain" Version="3.0.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
<ItemGroup>
|
<ItemGroup>
|
||||||
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
<PackageReference Include="HtmlSanitizer" Version="8.0.865" />
|
||||||
|
<PackageReference Include="Microsoft.Extensions.Caching.Memory" Version="9.0.4" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
|
<PackageReference Include="Microsoft.Extensions.Localization.Abstractions" Version="7.0.19" />
|
||||||
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
<PackageReference Include="Microsoft.Extensions.Logging" Version="8.0.0" />
|
||||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||||
|
|||||||
29
EnvelopeGenerator.Extensions/MemoryCacheExtensions.cs
Normal file
29
EnvelopeGenerator.Extensions/MemoryCacheExtensions.cs
Normal file
@@ -0,0 +1,29 @@
|
|||||||
|
using Microsoft.Extensions.Caching.Memory;
|
||||||
|
|
||||||
|
namespace EnvelopeGenerator.Extensions;
|
||||||
|
|
||||||
|
public static class MemoryCacheExtensions
|
||||||
|
{
|
||||||
|
private static readonly Guid BaseId = Guid.NewGuid();
|
||||||
|
|
||||||
|
public static IDictionary<string, int> GetEnumAsDictionary<TEnum>(this IMemoryCache memoryCache, string key = "", params object[] ignores)
|
||||||
|
where TEnum : Enum
|
||||||
|
=> memoryCache.GetOrCreate(BaseId + typeof(TEnum).FullName + key, _ =>
|
||||||
|
{
|
||||||
|
var mergedIgnores = new List<TEnum>();
|
||||||
|
|
||||||
|
foreach (var ignore in ignores)
|
||||||
|
{
|
||||||
|
if (ignore is IEnumerable<TEnum> ignoreList)
|
||||||
|
mergedIgnores.AddRange(ignoreList);
|
||||||
|
else if (ignore is TEnum ignoreVal)
|
||||||
|
mergedIgnores.Add(ignoreVal);
|
||||||
|
}
|
||||||
|
|
||||||
|
return Enum.GetValues(typeof(TEnum))
|
||||||
|
.Cast<TEnum>()
|
||||||
|
.Where(e => !mergedIgnores.Contains(e))
|
||||||
|
.ToDictionary(e => e.ToString(), e => Convert.ToInt32(e));
|
||||||
|
})
|
||||||
|
?? throw new InvalidOperationException($"Failed to cache or retrieve enum dictionary for type '{typeof(TEnum).FullName}'.");
|
||||||
|
}
|
||||||
@@ -28,7 +28,7 @@ Public MustInherit Class BaseController
|
|||||||
State = pState
|
State = pState
|
||||||
Database = pState.Database
|
Database = pState.Database
|
||||||
InitializeModels(pState)
|
InitializeModels(pState)
|
||||||
ActionService = New ActionService(pState)
|
ActionService = New ActionService(pState, Database)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub InitializeModels(pState As State)
|
Private Sub InitializeModels(pState As State)
|
||||||
|
|||||||
@@ -1,9 +1,11 @@
|
|||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
|
Imports DevExpress.XtraBars.Docking
|
||||||
Imports DigitalData.Modules.Logging
|
Imports DigitalData.Modules.Logging
|
||||||
Imports EnvelopeGenerator.Common
|
Imports EnvelopeGenerator.Common
|
||||||
Imports EnvelopeGenerator.Common.Constants
|
Imports EnvelopeGenerator.Common.Constants
|
||||||
Imports EnvelopeGenerator.Common.My
|
Imports EnvelopeGenerator.Common.My
|
||||||
|
Imports GdPicture14
|
||||||
|
|
||||||
Public Class EnvelopeEditorController
|
Public Class EnvelopeEditorController
|
||||||
Inherits BaseController
|
Inherits BaseController
|
||||||
@@ -20,7 +22,7 @@ Public Class EnvelopeEditorController
|
|||||||
Envelope = CreateEnvelope()
|
Envelope = CreateEnvelope()
|
||||||
Thumbnail = New Thumbnail(pState.LogConfig)
|
Thumbnail = New Thumbnail(pState.LogConfig)
|
||||||
EmailService = New EmailService(pState)
|
EmailService = New EmailService(pState)
|
||||||
ActionService = New ActionService(pState)
|
ActionService = New ActionService(pState, Nothing)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub New(pState As State, pEnvelope As Envelope)
|
Public Sub New(pState As State, pEnvelope As Envelope)
|
||||||
@@ -31,13 +33,16 @@ Public Class EnvelopeEditorController
|
|||||||
Envelope.Receivers = ReceiverModel.ListEnvelopeReceivers(pEnvelope.Id).ToList()
|
Envelope.Receivers = ReceiverModel.ListEnvelopeReceivers(pEnvelope.Id).ToList()
|
||||||
|
|
||||||
Thumbnail = New Thumbnail(pState.LogConfig)
|
Thumbnail = New Thumbnail(pState.LogConfig)
|
||||||
ActionService = New ActionService(pState)
|
ActionService = New ActionService(pState, Nothing)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "Public"
|
#Region "Public"
|
||||||
Public Function SendEnvelope() As Boolean
|
Public Function SendEnvelope() As Boolean
|
||||||
Return ActionService.SendEnvelope(Envelope)
|
Return ActionService.SendEnvelope(Envelope)
|
||||||
End Function
|
End Function
|
||||||
|
Public Function DocumentRotationChanged() As Boolean
|
||||||
|
Return ActionService.SetStatusDocumentRotationChanged(Envelope)
|
||||||
|
End Function
|
||||||
Public Function ResendReceiverInvitation(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
Public Function ResendReceiverInvitation(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
|
||||||
Return ActionService.ResendReceiver(pEnvelope, pReceiver)
|
Return ActionService.ResendReceiver(pEnvelope, pReceiver)
|
||||||
End Function
|
End Function
|
||||||
@@ -158,8 +163,10 @@ Public Class EnvelopeEditorController
|
|||||||
Try
|
Try
|
||||||
Dim oFixedPath = FixPageRotation.FixPageRotation(pDocumentFilePath)
|
Dim oFixedPath = FixPageRotation.FixPageRotation(pDocumentFilePath)
|
||||||
If oFixedPath <> pDocumentFilePath Then
|
If oFixedPath <> pDocumentFilePath Then
|
||||||
|
DocumentRotationChanged()
|
||||||
Logger.Info("PageRotation has been reseted to 0.")
|
Logger.Info("PageRotation has been reseted to 0.")
|
||||||
End If
|
End If
|
||||||
|
oFixedPath = FlattenFormFields.FlattenFormFields(oFixedPath)
|
||||||
Dim oFileInfo = New FileInfo(oFixedPath)
|
Dim oFileInfo = New FileInfo(oFixedPath)
|
||||||
Dim oTempFiles As New TempFiles(State.LogConfig)
|
Dim oTempFiles As New TempFiles(State.LogConfig)
|
||||||
Dim oTempFilePath = Path.Combine(oTempFiles._TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
Dim oTempFilePath = Path.Combine(oTempFiles._TempPath, Guid.NewGuid().ToString + oFileInfo.Extension)
|
||||||
|
|||||||
@@ -319,6 +319,12 @@
|
|||||||
<Compile Include="Controllers\EnvelopeListController.vb" />
|
<Compile Include="Controllers\EnvelopeListController.vb" />
|
||||||
<Compile Include="Controllers\FieldEditorController.vb" />
|
<Compile Include="Controllers\FieldEditorController.vb" />
|
||||||
<Compile Include="Controllers\BaseController.vb" />
|
<Compile Include="Controllers\BaseController.vb" />
|
||||||
|
<Compile Include="frm2Factor_Properties.Designer.vb">
|
||||||
|
<DependentUpon>frm2Factor_Properties.vb</DependentUpon>
|
||||||
|
</Compile>
|
||||||
|
<Compile Include="frm2Factor_Properties.vb">
|
||||||
|
<SubType>Form</SubType>
|
||||||
|
</Compile>
|
||||||
<Compile Include="frmEnvelopeEditor.vb">
|
<Compile Include="frmEnvelopeEditor.vb">
|
||||||
<SubType>Form</SubType>
|
<SubType>Form</SubType>
|
||||||
</Compile>
|
</Compile>
|
||||||
@@ -369,6 +375,7 @@
|
|||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Helper\Encryption.vb" />
|
<Compile Include="Helper\Encryption.vb" />
|
||||||
<Compile Include="Helper\FixPageRotation.vb" />
|
<Compile Include="Helper\FixPageRotation.vb" />
|
||||||
|
<Compile Include="Helper\FlattenFormFields.vb" />
|
||||||
<Compile Include="Helper\RefreshHelper.vb" />
|
<Compile Include="Helper\RefreshHelper.vb" />
|
||||||
<Compile Include="Helper\TempFiles.vb" />
|
<Compile Include="Helper\TempFiles.vb" />
|
||||||
<Compile Include="Helper\Thumbnail.vb" />
|
<Compile Include="Helper\Thumbnail.vb" />
|
||||||
@@ -380,6 +387,9 @@
|
|||||||
<DesignTime>True</DesignTime>
|
<DesignTime>True</DesignTime>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="My Project\AssemblyInfo.vb" />
|
<Compile Include="My Project\AssemblyInfo.vb" />
|
||||||
|
<EmbeddedResource Include="frm2Factor_Properties.resx">
|
||||||
|
<DependentUpon>frm2Factor_Properties.vb</DependentUpon>
|
||||||
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmEnvelopeEditor.en.resx">
|
<EmbeddedResource Include="frmEnvelopeEditor.en.resx">
|
||||||
<DependentUpon>frmEnvelopeEditor.vb</DependentUpon>
|
<DependentUpon>frmEnvelopeEditor.vb</DependentUpon>
|
||||||
<SubType>Designer</SubType>
|
<SubType>Designer</SubType>
|
||||||
@@ -415,6 +425,7 @@
|
|||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmGhostMode.resx">
|
<EmbeddedResource Include="frmGhostMode.resx">
|
||||||
<DependentUpon>frmGhostMode.vb</DependentUpon>
|
<DependentUpon>frmGhostMode.vb</DependentUpon>
|
||||||
|
<SubType>Designer</SubType>
|
||||||
</EmbeddedResource>
|
</EmbeddedResource>
|
||||||
<EmbeddedResource Include="frmMain.en.resx">
|
<EmbeddedResource Include="frmMain.en.resx">
|
||||||
<DependentUpon>frmMain.vb</DependentUpon>
|
<DependentUpon>frmMain.vb</DependentUpon>
|
||||||
|
|||||||
35
EnvelopeGenerator.Form/Helper/FlattenFormFields.vb
Normal file
35
EnvelopeGenerator.Form/Helper/FlattenFormFields.vb
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
Imports System.IO
|
||||||
|
Imports GdPicture14
|
||||||
|
|
||||||
|
Public Class FlattenFormFields
|
||||||
|
|
||||||
|
Public Shared Function FlattenFormFields(pFilePath As String) As String
|
||||||
|
|
||||||
|
Dim oFolder As String = Path.GetDirectoryName(pFilePath)
|
||||||
|
|
||||||
|
Dim gdpicturePdf As GdPicturePDF = New GdPicturePDF()
|
||||||
|
|
||||||
|
Dim status As GdPictureStatus = gdpicturePdf.LoadFromFile(pFilePath, True)
|
||||||
|
If status = GdPictureStatus.OK Then
|
||||||
|
|
||||||
|
Dim oFormFieldsCount = gdpicturePdf.GetFormFieldsCount()
|
||||||
|
If oFormFieldsCount > 0 Then
|
||||||
|
gdpicturePdf.FlattenFormFields()
|
||||||
|
|
||||||
|
Dim newFilesPath As String = Path.Combine(oFolder, "InputFieldsFlattend_" & Path.GetFileName(pFilePath))
|
||||||
|
If gdpicturePdf.SaveToFile(newFilesPath) = GdPictureStatus.OK Then
|
||||||
|
Dim oNameofFile = Path.GetFileName(newFilesPath)
|
||||||
|
MsgBox("Your PDF-file contained form-fields!" & vbNewLine & "We needed to adapt the file and created an new version!" & vbNewLine &
|
||||||
|
$"New filename: {oNameofFile}", MsgBoxStyle.Exclamation, "Information")
|
||||||
|
Return newFilesPath
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Return pFilePath
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
|
End Class
|
||||||
@@ -16,10 +16,14 @@ Module ModuleSettings
|
|||||||
Public SQL_REP_ENV_USER_TM As String = ""
|
Public SQL_REP_ENV_USER_TM As String = ""
|
||||||
Public SQL_REP_ENV_USER_Y As String = ""
|
Public SQL_REP_ENV_USER_Y As String = ""
|
||||||
Public SQL_REP_ENV_USER_ALL As String = ""
|
Public SQL_REP_ENV_USER_ALL As String = ""
|
||||||
|
Public SQL_REP_ENV_ALL_USER_MONTH As String = ""
|
||||||
|
Public SQL_REP_ENV_ALL_USER_LAST_MONTH As String = ""
|
||||||
Public DT_CHARTS As DataTable
|
Public DT_CHARTS As DataTable
|
||||||
Public MyLogger As Logger
|
Public MyLogger As Logger
|
||||||
Public USER_GHOST_MODE_USRNAME As String = ""
|
Public USER_GHOST_MODE_USRNAME As String = ""
|
||||||
Public USER_GHOST_MODE_ACTIVE As Boolean = False
|
Public USER_GHOST_MODE_ACTIVE As Boolean = False
|
||||||
Public MyUserModel As UserModel
|
Public MyUserModel As UserModel
|
||||||
Public MyState As State
|
Public MyState As State
|
||||||
|
Public CurrentEnvelopID As Integer = 0
|
||||||
|
Public CurrentEnvelopetitle As String = ""
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
@@ -32,5 +32,5 @@ Imports System.Runtime.InteropServices
|
|||||||
' You can specify all the values or you can default the Build and Revision Numbers
|
' You can specify all the values or you can default the Build and Revision Numbers
|
||||||
' by using the '*' as shown below:
|
' by using the '*' as shown below:
|
||||||
' [assembly: AssemblyVersion("1.0.*")]
|
' [assembly: AssemblyVersion("1.0.*")]
|
||||||
<Assembly: AssemblyVersion("2.9.0.0")>
|
<Assembly: AssemblyVersion("2.9.1.0")>
|
||||||
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
<Assembly: AssemblyFileVersion("1.0.0.0")>
|
||||||
|
|||||||
121
EnvelopeGenerator.Form/frm2Factor_Properties.Designer.vb
generated
Normal file
121
EnvelopeGenerator.Form/frm2Factor_Properties.Designer.vb
generated
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||||
|
Partial Class frm2Factor_Properties
|
||||||
|
Inherits System.Windows.Forms.Form
|
||||||
|
|
||||||
|
'Das Formular überschreibt den Löschvorgang, um die Komponentenliste zu bereinigen.
|
||||||
|
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||||
|
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||||
|
Try
|
||||||
|
If disposing AndAlso components IsNot Nothing Then
|
||||||
|
components.Dispose()
|
||||||
|
End If
|
||||||
|
Finally
|
||||||
|
MyBase.Dispose(disposing)
|
||||||
|
End Try
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
'Wird vom Windows Form-Designer benötigt.
|
||||||
|
Private components As System.ComponentModel.IContainer
|
||||||
|
|
||||||
|
'Hinweis: Die folgende Prozedur ist für den Windows Form-Designer erforderlich.
|
||||||
|
'Das Bearbeiten ist mit dem Windows Form-Designer möglich.
|
||||||
|
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
|
||||||
|
<System.Diagnostics.DebuggerStepThrough()> _
|
||||||
|
Private Sub InitializeComponent()
|
||||||
|
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frm2Factor_Properties))
|
||||||
|
Me.txtMail = New System.Windows.Forms.TextBox()
|
||||||
|
Me.txtValid = New System.Windows.Forms.TextBox()
|
||||||
|
Me.chkTOTP = New System.Windows.Forms.CheckBox()
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.Label3 = New System.Windows.Forms.Label()
|
||||||
|
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.SuspendLayout()
|
||||||
|
'
|
||||||
|
'txtMail
|
||||||
|
'
|
||||||
|
Me.txtMail.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.txtMail.Location = New System.Drawing.Point(85, 24)
|
||||||
|
Me.txtMail.Name = "txtMail"
|
||||||
|
Me.txtMail.ReadOnly = True
|
||||||
|
Me.txtMail.Size = New System.Drawing.Size(342, 23)
|
||||||
|
Me.txtMail.TabIndex = 0
|
||||||
|
'
|
||||||
|
'txtValid
|
||||||
|
'
|
||||||
|
Me.txtValid.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.txtValid.Location = New System.Drawing.Point(85, 79)
|
||||||
|
Me.txtValid.Name = "txtValid"
|
||||||
|
Me.txtValid.ReadOnly = True
|
||||||
|
Me.txtValid.Size = New System.Drawing.Size(202, 23)
|
||||||
|
Me.txtValid.TabIndex = 1
|
||||||
|
'
|
||||||
|
'chkTOTP
|
||||||
|
'
|
||||||
|
Me.chkTOTP.AutoSize = True
|
||||||
|
Me.chkTOTP.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.chkTOTP.Location = New System.Drawing.Point(85, 53)
|
||||||
|
Me.chkTOTP.Name = "chkTOTP"
|
||||||
|
Me.chkTOTP.Size = New System.Drawing.Size(151, 20)
|
||||||
|
Me.chkTOTP.TabIndex = 2
|
||||||
|
Me.chkTOTP.Text = "Secret Key vorhanden"
|
||||||
|
Me.chkTOTP.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
Me.Label1.AutoSize = True
|
||||||
|
Me.Label1.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.Label1.Location = New System.Drawing.Point(12, 27)
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
Me.Label1.Size = New System.Drawing.Size(47, 16)
|
||||||
|
Me.Label1.TabIndex = 3
|
||||||
|
Me.Label1.Text = "E-Mail:"
|
||||||
|
'
|
||||||
|
'Label3
|
||||||
|
'
|
||||||
|
Me.Label3.AutoSize = True
|
||||||
|
Me.Label3.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.Label3.Location = New System.Drawing.Point(15, 82)
|
||||||
|
Me.Label3.Name = "Label3"
|
||||||
|
Me.Label3.Size = New System.Drawing.Size(64, 16)
|
||||||
|
Me.Label3.TabIndex = 5
|
||||||
|
Me.Label3.Text = "Gültig bis:"
|
||||||
|
'
|
||||||
|
'SimpleButton1
|
||||||
|
'
|
||||||
|
Me.SimpleButton1.Appearance.Font = New System.Drawing.Font("Tahoma", 9.75!)
|
||||||
|
Me.SimpleButton1.Appearance.Options.UseFont = True
|
||||||
|
Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
|
Me.SimpleButton1.Location = New System.Drawing.Point(18, 121)
|
||||||
|
Me.SimpleButton1.Name = "SimpleButton1"
|
||||||
|
Me.SimpleButton1.Size = New System.Drawing.Size(116, 40)
|
||||||
|
Me.SimpleButton1.TabIndex = 6
|
||||||
|
Me.SimpleButton1.Text = "Zurücksetzen"
|
||||||
|
'
|
||||||
|
'frm2Factor_Properties
|
||||||
|
'
|
||||||
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
|
||||||
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
|
Me.ClientSize = New System.Drawing.Size(443, 170)
|
||||||
|
Me.Controls.Add(Me.SimpleButton1)
|
||||||
|
Me.Controls.Add(Me.Label3)
|
||||||
|
Me.Controls.Add(Me.Label1)
|
||||||
|
Me.Controls.Add(Me.chkTOTP)
|
||||||
|
Me.Controls.Add(Me.txtValid)
|
||||||
|
Me.Controls.Add(Me.txtMail)
|
||||||
|
Me.MaximizeBox = False
|
||||||
|
Me.MinimizeBox = False
|
||||||
|
Me.Name = "frm2Factor_Properties"
|
||||||
|
Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterScreen
|
||||||
|
Me.Text = "Zwei-Faktor Eigenschaften Empfänger:"
|
||||||
|
Me.ResumeLayout(False)
|
||||||
|
Me.PerformLayout()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Friend WithEvents txtMail As TextBox
|
||||||
|
Friend WithEvents txtValid As TextBox
|
||||||
|
Friend WithEvents chkTOTP As CheckBox
|
||||||
|
Friend WithEvents Label1 As Label
|
||||||
|
Friend WithEvents Label3 As Label
|
||||||
|
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
||||||
|
End Class
|
||||||
141
EnvelopeGenerator.Form/frm2Factor_Properties.resx
Normal file
141
EnvelopeGenerator.Form/frm2Factor_Properties.resx
Normal file
@@ -0,0 +1,141 @@
|
|||||||
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
|
<root>
|
||||||
|
<!--
|
||||||
|
Microsoft ResX Schema
|
||||||
|
|
||||||
|
Version 2.0
|
||||||
|
|
||||||
|
The primary goals of this format is to allow a simple XML format
|
||||||
|
that is mostly human readable. The generation and parsing of the
|
||||||
|
various data types are done through the TypeConverter classes
|
||||||
|
associated with the data types.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
|
||||||
|
... ado.net/XML headers & schema ...
|
||||||
|
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||||
|
<resheader name="version">2.0</resheader>
|
||||||
|
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||||
|
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||||
|
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||||
|
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||||
|
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||||
|
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||||
|
</data>
|
||||||
|
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||||
|
<comment>This is a comment</comment>
|
||||||
|
</data>
|
||||||
|
|
||||||
|
There are any number of "resheader" rows that contain simple
|
||||||
|
name/value pairs.
|
||||||
|
|
||||||
|
Each data row contains a name, and value. The row also contains a
|
||||||
|
type or mimetype. Type corresponds to a .NET class that support
|
||||||
|
text/value conversion through the TypeConverter architecture.
|
||||||
|
Classes that don't support this are serialized and stored with the
|
||||||
|
mimetype set.
|
||||||
|
|
||||||
|
The mimetype is used for serialized objects, and tells the
|
||||||
|
ResXResourceReader how to depersist the object. This is currently not
|
||||||
|
extensible. For a given mimetype the value must be set accordingly:
|
||||||
|
|
||||||
|
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||||
|
that the ResXResourceWriter will generate, however the reader can
|
||||||
|
read any of the formats listed below.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.binary.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.soap.base64
|
||||||
|
value : The object must be serialized with
|
||||||
|
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
|
||||||
|
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||||
|
value : The object must be serialized into a byte array
|
||||||
|
: using a System.ComponentModel.TypeConverter
|
||||||
|
: and then encoded with base64 encoding.
|
||||||
|
-->
|
||||||
|
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||||
|
<xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
|
||||||
|
<xsd:element name="root" msdata:IsDataSet="true">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:choice maxOccurs="unbounded">
|
||||||
|
<xsd:element name="metadata">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" use="required" type="xsd:string" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="assembly">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:attribute name="alias" type="xsd:string" />
|
||||||
|
<xsd:attribute name="name" type="xsd:string" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="data">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
|
||||||
|
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||||
|
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||||
|
<xsd:attribute ref="xml:space" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
<xsd:element name="resheader">
|
||||||
|
<xsd:complexType>
|
||||||
|
<xsd:sequence>
|
||||||
|
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||||
|
</xsd:sequence>
|
||||||
|
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:choice>
|
||||||
|
</xsd:complexType>
|
||||||
|
</xsd:element>
|
||||||
|
</xsd:schema>
|
||||||
|
<resheader name="resmimetype">
|
||||||
|
<value>text/microsoft-resx</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="version">
|
||||||
|
<value>2.0</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="reader">
|
||||||
|
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<resheader name="writer">
|
||||||
|
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</resheader>
|
||||||
|
<assembly alias="DevExpress.Data.v21.2" name="DevExpress.Data.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a" />
|
||||||
|
<data name="SimpleButton1.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
|
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAANcCAAAC77u/
|
||||||
|
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||||
|
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||||
|
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||||
|
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||||
|
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkdyZWVue2ZpbGw6IzAzOUMyMzt9Cgku
|
||||||
|
QmxhY2t7ZmlsbDojNzI3MjcyO30KCS5SZWR7ZmlsbDojRDExQzFDO30KCS5ZZWxsb3d7ZmlsbDojRkZC
|
||||||
|
MTE1O30KCS5CbHVle2ZpbGw6IzExNzdENzt9CgkuV2hpdGV7ZmlsbDojRkZGRkZGO30KCS5zdDB7b3Bh
|
||||||
|
Y2l0eTowLjU7fQoJLnN0MXtvcGFjaXR5OjAuNzU7fQo8L3N0eWxlPg0KICA8ZyBpZD0iUmVzZXRMYXlv
|
||||||
|
dXRPcHRpb25zIj4NCiAgICA8cGF0aCBkPSJNMTYsNGMtMy4zLDAtNi4zLDEuMy04LjUsMy41TDQsNHYx
|
||||||
|
MGgwLjJoNC4xSDE0bC0zLjYtMy42QzExLjgsOC45LDEzLjgsOCwxNiw4YzQuNCwwLDgsMy42LDgsOHMt
|
||||||
|
My42LDgtOCw4ICAgYy0zLjcsMC02LjgtMi42LTcuNy02SDQuMmMxLDUuNyw1LjksMTAsMTEuOCwxMGM2
|
||||||
|
LjYsMCwxMi01LjQsMTItMTJTMjIuNiw0LDE2LDR6IiBjbGFzcz0iR3JlZW4iIC8+DQogIDwvZz4NCjwv
|
||||||
|
c3ZnPgs=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
|
</root>
|
||||||
43
EnvelopeGenerator.Form/frm2Factor_Properties.vb
Normal file
43
EnvelopeGenerator.Form/frm2Factor_Properties.vb
Normal file
@@ -0,0 +1,43 @@
|
|||||||
|
Imports DigitalData.Modules.Database
|
||||||
|
Imports EnvelopeGenerator.Common.My
|
||||||
|
Public Class frm2Factor_Properties
|
||||||
|
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||||
|
If MsgBox(Resources.Model.ResetTOTPUser, MsgBoxStyle.Question Or MsgBoxStyle.YesNo, Text) = MsgBoxResult.Yes Then
|
||||||
|
Dim oupdSQL = $"UPDATE TBSIG_RECEIVER SET TOTP_SECRET_KEY = NULL, TFA_REG_DEADLINE = NULL WHERE EMAIL_ADDRESS = '{txtMail.Text}'"
|
||||||
|
If DD_ECM.ExecuteNonQuery(oupdSQL) = True Then
|
||||||
|
MsgBox(Resources.Model.Success_FormClose, MsgBoxStyle.Information)
|
||||||
|
Me.Close()
|
||||||
|
Else
|
||||||
|
MsgBox("Something went wrong. Check the log", MsgBoxStyle.Exclamation)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Dim TOTP As String
|
||||||
|
Dim mail As String
|
||||||
|
Dim Deadline As DateTime
|
||||||
|
Dim DD_ECM As MSSQLServer
|
||||||
|
Public Sub New(pmail As String, pTOTP As String, pDeadline As DateTime, pDD_ECM As MSSQLServer)
|
||||||
|
|
||||||
|
' Dieser Aufruf ist für den Designer erforderlich.
|
||||||
|
InitializeComponent()
|
||||||
|
|
||||||
|
' Fügen Sie Initialisierungen nach dem InitializeComponent()-Aufruf hinzu.
|
||||||
|
mail = pmail
|
||||||
|
TOTP = pTOTP
|
||||||
|
Deadline = pDeadline
|
||||||
|
DD_ECM = pDD_ECM
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub frm2Faktor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
chkTOTP.Checked = False
|
||||||
|
If Not IsNothing(TOTP) Then
|
||||||
|
If TOTP.Length > 1 Then
|
||||||
|
chkTOTP.Checked = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
txtMail.Text = mail
|
||||||
|
txtValid.Text = Deadline.ToString
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -632,6 +632,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
resources.ApplyResources(Me.txtMessage, "txtMessage")
|
resources.ApplyResources(Me.txtMessage, "txtMessage")
|
||||||
Me.txtMessage.MenuManager = Me.RibbonControl1
|
Me.txtMessage.MenuManager = Me.RibbonControl1
|
||||||
Me.txtMessage.Name = "txtMessage"
|
Me.txtMessage.Name = "txtMessage"
|
||||||
|
Me.txtMessage.Properties.AcceptsTab = True
|
||||||
Me.txtMessage.Properties.Appearance.Font = CType(resources.GetObject("txtMessage.Properties.Appearance.Font"), System.Drawing.Font)
|
Me.txtMessage.Properties.Appearance.Font = CType(resources.GetObject("txtMessage.Properties.Appearance.Font"), System.Drawing.Font)
|
||||||
Me.txtMessage.Properties.Appearance.Options.UseFont = True
|
Me.txtMessage.Properties.Appearance.Options.UseFont = True
|
||||||
Me.txtMessage.StyleController = Me.LayoutControl1
|
Me.txtMessage.StyleController = Me.LayoutControl1
|
||||||
@@ -664,7 +665,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Me.LayoutControlItem3.Size = New System.Drawing.Size(873, 216)
|
Me.LayoutControlItem3.Size = New System.Drawing.Size(873, 216)
|
||||||
resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3")
|
resources.ApplyResources(Me.LayoutControlItem3, "LayoutControlItem3")
|
||||||
Me.LayoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
|
Me.LayoutControlItem3.TextLocation = DevExpress.Utils.Locations.Top
|
||||||
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(49, 13)
|
Me.LayoutControlItem3.TextSize = New System.Drawing.Size(46, 13)
|
||||||
'
|
'
|
||||||
'FrmEditorBindingSource
|
'FrmEditorBindingSource
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -200,7 +200,7 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
|
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
|
||||||
Try
|
Try
|
||||||
If SaveEnvelopeWithOutValidation() = True Then
|
If SaveEnvelopeWithOutValidation() = True Then
|
||||||
bsitm_info.Caption = "Data saved succeddfully " + Now.ToString
|
bsitm_info.Caption = "Data saved successfully " + Now.ToString
|
||||||
Else
|
Else
|
||||||
bsitm_info.Caption = "Exceprion - Error saving Data. Check LOG"
|
bsitm_info.Caption = "Exceprion - Error saving Data. Check LOG"
|
||||||
End If
|
End If
|
||||||
@@ -763,4 +763,6 @@ Partial Public Class frmEnvelopeEditor
|
|||||||
Process.Start(Documents.Item(0).Filepath)
|
Process.Start(Documents.Item(0).Filepath)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -65,6 +65,9 @@ Public Class frmEnvelopeMainData
|
|||||||
chked_2Faktor.EditValue = DEF_TF_ENABLED
|
chked_2Faktor.EditValue = DEF_TF_ENABLED
|
||||||
|
|
||||||
Else
|
Else
|
||||||
|
If IsNothing(Envelope.EnvelopeType) Then
|
||||||
|
Envelope.EnvelopeType = EnvelopeType
|
||||||
|
End If
|
||||||
If Envelope.EnvelopeType.ContractType = 0 Then
|
If Envelope.EnvelopeType.ContractType = 0 Then
|
||||||
cmbEnvelopeType.EditValue = EnvelopeType
|
cmbEnvelopeType.EditValue = EnvelopeType
|
||||||
Else
|
Else
|
||||||
|
|||||||
152
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
152
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
@@ -47,6 +47,7 @@ Partial Class frmMain
|
|||||||
Me.colStatus = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.colStatus = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.colTitle = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.colTitle = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.colAddedWhen = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.colAddedWhen = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
|
Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
|
||||||
Me.btnCreateEnvelope = New DevExpress.XtraBars.BarButtonItem()
|
Me.btnCreateEnvelope = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.btnEditEnvelope = New DevExpress.XtraBars.BarButtonItem()
|
Me.btnEditEnvelope = New DevExpress.XtraBars.BarButtonItem()
|
||||||
@@ -61,9 +62,11 @@ Partial Class frmMain
|
|||||||
Me.bsitmInfo = New DevExpress.XtraBars.BarStaticItem()
|
Me.bsitmInfo = New DevExpress.XtraBars.BarStaticItem()
|
||||||
Me.bbtnitmEB = New DevExpress.XtraBars.BarButtonItem()
|
Me.bbtnitmEB = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.bbtnitmInfoMail = New DevExpress.XtraBars.BarButtonItem()
|
Me.bbtnitmInfoMail = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.BarButtonItem2 = New DevExpress.XtraBars.BarButtonItem()
|
Me.bbtnitm_ResendInvitation = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem3 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
|
Me.BarButtonItem4 = New DevExpress.XtraBars.BarButtonItem()
|
||||||
|
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
|
||||||
|
Me.bbtnitm2Faktor = New DevExpress.XtraBars.BarButtonItem()
|
||||||
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
Me.RibbonPage1 = New DevExpress.XtraBars.Ribbon.RibbonPage()
|
||||||
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageEnvelopeActions = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
Me.RibbonPageGroup1 = New DevExpress.XtraBars.Ribbon.RibbonPageGroup()
|
||||||
@@ -87,22 +90,27 @@ Partial Class frmMain
|
|||||||
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.GridColumn7 = New DevExpress.XtraGrid.Columns.GridColumn()
|
Me.GridColumn7 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
|
Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn()
|
||||||
Me.XtraTabPageAdmin = New DevExpress.XtraTab.XtraTabPage()
|
Me.XtraTabPageAdmin = New DevExpress.XtraTab.XtraTabPage()
|
||||||
Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl()
|
Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl()
|
||||||
Me.GridControlData = New DevExpress.XtraGrid.GridControl()
|
Me.GridControlData = New DevExpress.XtraGrid.GridControl()
|
||||||
Me.GridViewData = New DevExpress.XtraGrid.Views.Grid.GridView()
|
Me.GridViewData = New DevExpress.XtraGrid.Views.Grid.GridView()
|
||||||
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
|
||||||
Me.GroupControl2 = New DevExpress.XtraEditors.GroupControl()
|
Me.GroupControl2 = New DevExpress.XtraEditors.GroupControl()
|
||||||
Me.LabelControl1 = New DevExpress.XtraEditors.LabelControl()
|
Me.btnEvvallUs_lastmonth = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.btnEvvallUs_thismonth = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.GroupControl1 = New DevExpress.XtraEditors.GroupControl()
|
Me.GroupControl1 = New DevExpress.XtraEditors.GroupControl()
|
||||||
Me.btnEnvelopes_All = New DevExpress.XtraEditors.SimpleButton()
|
Me.btnEnvelopes_All = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.btnEnvelopes_thisYear = New DevExpress.XtraEditors.SimpleButton()
|
Me.btnEnvelopes_thisYear = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.btnEnvelopes_lastmonth = New DevExpress.XtraEditors.SimpleButton()
|
Me.btnEnvelopes_lastmonth = New DevExpress.XtraEditors.SimpleButton()
|
||||||
Me.btnEnvelopes_thismonth = New DevExpress.XtraEditors.SimpleButton()
|
Me.btnEnvelopes_thismonth = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.XtraTabPage3 = New DevExpress.XtraTab.XtraTabPage()
|
||||||
|
Me.Label1 = New System.Windows.Forms.Label()
|
||||||
|
Me.Button1 = New System.Windows.Forms.Button()
|
||||||
|
Me.txtEnvID = New System.Windows.Forms.TextBox()
|
||||||
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
|
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
|
||||||
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
|
||||||
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
|
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
|
||||||
Me.BarStaticItemGhost = New DevExpress.XtraBars.BarStaticItem()
|
|
||||||
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
Me.SplitContainerControl1.Panel1.SuspendLayout()
|
||||||
@@ -135,6 +143,7 @@ Partial Class frmMain
|
|||||||
Me.GroupControl2.SuspendLayout()
|
Me.GroupControl2.SuspendLayout()
|
||||||
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||||
Me.GroupControl1.SuspendLayout()
|
Me.GroupControl1.SuspendLayout()
|
||||||
|
Me.XtraTabPage3.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'SplashScreenManager1
|
'SplashScreenManager1
|
||||||
@@ -164,7 +173,7 @@ Partial Class frmMain
|
|||||||
resources.ApplyResources(Me.XtraTabControlMain, "XtraTabControlMain")
|
resources.ApplyResources(Me.XtraTabControlMain, "XtraTabControlMain")
|
||||||
Me.XtraTabControlMain.Name = "XtraTabControlMain"
|
Me.XtraTabControlMain.Name = "XtraTabControlMain"
|
||||||
Me.XtraTabControlMain.SelectedTabPage = Me.XtraTabPage1
|
Me.XtraTabControlMain.SelectedTabPage = Me.XtraTabPage1
|
||||||
Me.XtraTabControlMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPageAdmin})
|
Me.XtraTabControlMain.TabPages.AddRange(New DevExpress.XtraTab.XtraTabPage() {Me.XtraTabPage1, Me.XtraTabPage2, Me.XtraTabPageAdmin, Me.XtraTabPage3})
|
||||||
'
|
'
|
||||||
'XtraTabPage1
|
'XtraTabPage1
|
||||||
'
|
'
|
||||||
@@ -278,11 +287,12 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'ViewEnvelopes
|
'ViewEnvelopes
|
||||||
'
|
'
|
||||||
Me.ViewEnvelopes.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colEnvelopeId, Me.colContractType, Me.colStatus, Me.colTitle, Me.colAddedWhen})
|
Me.ViewEnvelopes.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colEnvelopeId, Me.colContractType, Me.colStatus, Me.colTitle, Me.colAddedWhen, Me.GridColumn2})
|
||||||
Me.ViewEnvelopes.GridControl = Me.GridEnvelopes
|
Me.ViewEnvelopes.GridControl = Me.GridEnvelopes
|
||||||
Me.ViewEnvelopes.Name = "ViewEnvelopes"
|
Me.ViewEnvelopes.Name = "ViewEnvelopes"
|
||||||
Me.ViewEnvelopes.OptionsBehavior.Editable = False
|
Me.ViewEnvelopes.OptionsBehavior.Editable = False
|
||||||
Me.ViewEnvelopes.OptionsBehavior.ReadOnly = True
|
Me.ViewEnvelopes.OptionsBehavior.ReadOnly = True
|
||||||
|
Me.ViewEnvelopes.OptionsView.ShowAutoFilterRow = True
|
||||||
Me.ViewEnvelopes.OptionsView.ShowIndicator = False
|
Me.ViewEnvelopes.OptionsView.ShowIndicator = False
|
||||||
'
|
'
|
||||||
'colEnvelopeId
|
'colEnvelopeId
|
||||||
@@ -317,14 +327,22 @@ Partial Class frmMain
|
|||||||
Me.colAddedWhen.FieldName = "AddedWhen"
|
Me.colAddedWhen.FieldName = "AddedWhen"
|
||||||
Me.colAddedWhen.Name = "colAddedWhen"
|
Me.colAddedWhen.Name = "colAddedWhen"
|
||||||
'
|
'
|
||||||
|
'GridColumn2
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.GridColumn2, "GridColumn2")
|
||||||
|
Me.GridColumn2.DisplayFormat.FormatString = "G"
|
||||||
|
Me.GridColumn2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
|
||||||
|
Me.GridColumn2.FieldName = "ChangedWhen"
|
||||||
|
Me.GridColumn2.Name = "GridColumn2"
|
||||||
|
'
|
||||||
'RibbonControl
|
'RibbonControl
|
||||||
'
|
'
|
||||||
Me.RibbonControl.ExpandCollapseItem.Id = 0
|
Me.RibbonControl.ExpandCollapseItem.Id = 0
|
||||||
Me.RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex"), Integer)
|
Me.RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex"), Integer)
|
||||||
Me.RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex"), Integer)
|
Me.RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex = CType(resources.GetObject("RibbonControl.ExpandCollapseItem.ImageOptions.LargeImageIndex"), Integer)
|
||||||
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnCreateEnvelope, Me.btnEditEnvelope, Me.btnDeleteEnvelope, Me.BarButtonItem1, Me.txtRefreshLabel, Me.btnShowDocument, Me.btnContactReceiver, Me.txtEnvelopeIdLabel, Me.btnOpenLogDirectory, Me.BarCheckItem1, Me.bsitmInfo, Me.bbtnitmEB, Me.bbtnitmInfoMail, Me.BarButtonItem2, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarStaticItemGhost})
|
Me.RibbonControl.Items.AddRange(New DevExpress.XtraBars.BarItem() {Me.RibbonControl.ExpandCollapseItem, Me.RibbonControl.SearchEditItem, Me.btnCreateEnvelope, Me.btnEditEnvelope, Me.btnDeleteEnvelope, Me.BarButtonItem1, Me.txtRefreshLabel, Me.btnShowDocument, Me.btnContactReceiver, Me.txtEnvelopeIdLabel, Me.btnOpenLogDirectory, Me.BarCheckItem1, Me.bsitmInfo, Me.bbtnitmEB, Me.bbtnitmInfoMail, Me.bbtnitm_ResendInvitation, Me.BarButtonItem3, Me.BarButtonItem4, Me.BarStaticItemGhost, Me.bbtnitm2Faktor})
|
||||||
resources.ApplyResources(Me.RibbonControl, "RibbonControl")
|
resources.ApplyResources(Me.RibbonControl, "RibbonControl")
|
||||||
Me.RibbonControl.MaxItemId = 20
|
Me.RibbonControl.MaxItemId = 21
|
||||||
Me.RibbonControl.Name = "RibbonControl"
|
Me.RibbonControl.Name = "RibbonControl"
|
||||||
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2})
|
Me.RibbonControl.Pages.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPage() {Me.RibbonPage1, Me.RibbonPage2})
|
||||||
Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
Me.RibbonControl.ShowApplicationButton = DevExpress.Utils.DefaultBoolean.[False]
|
||||||
@@ -446,13 +464,14 @@ Partial Class frmMain
|
|||||||
Me.bbtnitmInfoMail.Id = 15
|
Me.bbtnitmInfoMail.Id = 15
|
||||||
Me.bbtnitmInfoMail.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitmInfoMail.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.bbtnitmInfoMail.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitmInfoMail.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.bbtnitmInfoMail.Name = "bbtnitmInfoMail"
|
Me.bbtnitmInfoMail.Name = "bbtnitmInfoMail"
|
||||||
|
Me.bbtnitmInfoMail.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||||
'
|
'
|
||||||
'BarButtonItem2
|
'bbtnitm_ResendInvitation
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.BarButtonItem2, "BarButtonItem2")
|
resources.ApplyResources(Me.bbtnitm_ResendInvitation, "bbtnitm_ResendInvitation")
|
||||||
Me.BarButtonItem2.Id = 16
|
Me.bbtnitm_ResendInvitation.Id = 16
|
||||||
Me.BarButtonItem2.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem2.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.bbtnitm_ResendInvitation.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitm_ResendInvitation.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.BarButtonItem2.Name = "BarButtonItem2"
|
Me.bbtnitm_ResendInvitation.Name = "bbtnitm_ResendInvitation"
|
||||||
'
|
'
|
||||||
'BarButtonItem3
|
'BarButtonItem3
|
||||||
'
|
'
|
||||||
@@ -468,6 +487,26 @@ Partial Class frmMain
|
|||||||
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.BarButtonItem4.ImageOptions.SvgImage = CType(resources.GetObject("BarButtonItem4.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.BarButtonItem4.Name = "BarButtonItem4"
|
Me.BarButtonItem4.Name = "BarButtonItem4"
|
||||||
'
|
'
|
||||||
|
'BarStaticItemGhost
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.BarStaticItemGhost, "BarStaticItemGhost")
|
||||||
|
Me.BarStaticItemGhost.Id = 19
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.BackColor = System.Drawing.Color.Yellow
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Font = CType(resources.GetObject("BarStaticItemGhost.ItemAppearance.Normal.Font"), System.Drawing.Font)
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.ForeColor = System.Drawing.Color.Black
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseBackColor = True
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseFont = True
|
||||||
|
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseForeColor = True
|
||||||
|
Me.BarStaticItemGhost.Name = "BarStaticItemGhost"
|
||||||
|
Me.BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||||
|
'
|
||||||
|
'bbtnitm2Faktor
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.bbtnitm2Faktor, "bbtnitm2Faktor")
|
||||||
|
Me.bbtnitm2Faktor.Id = 20
|
||||||
|
Me.bbtnitm2Faktor.ImageOptions.SvgImage = CType(resources.GetObject("bbtnitm2Faktor.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
|
Me.bbtnitm2Faktor.Name = "bbtnitm2Faktor"
|
||||||
|
'
|
||||||
'RibbonPage1
|
'RibbonPage1
|
||||||
'
|
'
|
||||||
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions})
|
Me.RibbonPage1.Groups.AddRange(New DevExpress.XtraBars.Ribbon.RibbonPageGroup() {Me.RibbonPageEnvelopeActions, Me.RibbonPageGroup1, Me.RibbonPageGroupFunctions})
|
||||||
@@ -493,8 +532,9 @@ Partial Class frmMain
|
|||||||
'RibbonPageGroupFunctions
|
'RibbonPageGroupFunctions
|
||||||
'
|
'
|
||||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnShowDocument)
|
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnShowDocument)
|
||||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.BarButtonItem2)
|
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitm_ResendInvitation)
|
||||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnContactReceiver)
|
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.btnContactReceiver)
|
||||||
|
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitm2Faktor)
|
||||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmEB)
|
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmEB)
|
||||||
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmInfoMail)
|
Me.RibbonPageGroupFunctions.ItemLinks.Add(Me.bbtnitmInfoMail)
|
||||||
Me.RibbonPageGroupFunctions.Name = "RibbonPageGroupFunctions"
|
Me.RibbonPageGroupFunctions.Name = "RibbonPageGroupFunctions"
|
||||||
@@ -622,11 +662,12 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'ViewCompleted
|
'ViewCompleted
|
||||||
'
|
'
|
||||||
Me.ViewCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn3, Me.GridColumn4, Me.GridColumn5, Me.GridColumn7})
|
Me.ViewCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn3, Me.GridColumn4, Me.GridColumn5, Me.GridColumn7, Me.GridColumn1})
|
||||||
Me.ViewCompleted.GridControl = Me.GridCompleted
|
Me.ViewCompleted.GridControl = Me.GridCompleted
|
||||||
Me.ViewCompleted.Name = "ViewCompleted"
|
Me.ViewCompleted.Name = "ViewCompleted"
|
||||||
Me.ViewCompleted.OptionsBehavior.Editable = False
|
Me.ViewCompleted.OptionsBehavior.Editable = False
|
||||||
Me.ViewCompleted.OptionsBehavior.ReadOnly = True
|
Me.ViewCompleted.OptionsBehavior.ReadOnly = True
|
||||||
|
Me.ViewCompleted.OptionsView.ShowAutoFilterRow = True
|
||||||
Me.ViewCompleted.OptionsView.ShowIndicator = False
|
Me.ViewCompleted.OptionsView.ShowIndicator = False
|
||||||
'
|
'
|
||||||
'GridColumn3
|
'GridColumn3
|
||||||
@@ -650,9 +691,19 @@ Partial Class frmMain
|
|||||||
'GridColumn7
|
'GridColumn7
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.GridColumn7, "GridColumn7")
|
resources.ApplyResources(Me.GridColumn7, "GridColumn7")
|
||||||
|
Me.GridColumn7.DisplayFormat.FormatString = "G"
|
||||||
|
Me.GridColumn7.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
|
||||||
Me.GridColumn7.FieldName = "AddedWhen"
|
Me.GridColumn7.FieldName = "AddedWhen"
|
||||||
Me.GridColumn7.Name = "GridColumn7"
|
Me.GridColumn7.Name = "GridColumn7"
|
||||||
'
|
'
|
||||||
|
'GridColumn1
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.GridColumn1, "GridColumn1")
|
||||||
|
Me.GridColumn1.DisplayFormat.FormatString = "G"
|
||||||
|
Me.GridColumn1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
|
||||||
|
Me.GridColumn1.FieldName = "ChangedWhen"
|
||||||
|
Me.GridColumn1.Name = "GridColumn1"
|
||||||
|
'
|
||||||
'XtraTabPageAdmin
|
'XtraTabPageAdmin
|
||||||
'
|
'
|
||||||
Me.XtraTabPageAdmin.Controls.Add(Me.SplitContainerControl2)
|
Me.XtraTabPageAdmin.Controls.Add(Me.SplitContainerControl2)
|
||||||
@@ -673,7 +724,7 @@ Partial Class frmMain
|
|||||||
'SplitContainerControl2.Panel2
|
'SplitContainerControl2.Panel2
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
|
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
|
||||||
Me.SplitContainerControl2.SplitterPosition = 584
|
Me.SplitContainerControl2.SplitterPosition = 907
|
||||||
'
|
'
|
||||||
'GridControlData
|
'GridControlData
|
||||||
'
|
'
|
||||||
@@ -687,6 +738,7 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.GridViewData.GridControl = Me.GridControlData
|
Me.GridViewData.GridControl = Me.GridControlData
|
||||||
Me.GridViewData.Name = "GridViewData"
|
Me.GridViewData.Name = "GridViewData"
|
||||||
|
Me.GridViewData.OptionsView.ShowAutoFilterRow = True
|
||||||
'
|
'
|
||||||
'PanelControl1
|
'PanelControl1
|
||||||
'
|
'
|
||||||
@@ -697,14 +749,24 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
'GroupControl2
|
'GroupControl2
|
||||||
'
|
'
|
||||||
Me.GroupControl2.Controls.Add(Me.LabelControl1)
|
Me.GroupControl2.Controls.Add(Me.btnEvvallUs_lastmonth)
|
||||||
|
Me.GroupControl2.Controls.Add(Me.btnEvvallUs_thismonth)
|
||||||
resources.ApplyResources(Me.GroupControl2, "GroupControl2")
|
resources.ApplyResources(Me.GroupControl2, "GroupControl2")
|
||||||
Me.GroupControl2.Name = "GroupControl2"
|
Me.GroupControl2.Name = "GroupControl2"
|
||||||
'
|
'
|
||||||
'LabelControl1
|
'btnEvvallUs_lastmonth
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.LabelControl1, "LabelControl1")
|
Me.btnEvvallUs_lastmonth.Appearance.BackColor = System.Drawing.Color.MediumPurple
|
||||||
Me.LabelControl1.Name = "LabelControl1"
|
Me.btnEvvallUs_lastmonth.Appearance.Options.UseBackColor = True
|
||||||
|
resources.ApplyResources(Me.btnEvvallUs_lastmonth, "btnEvvallUs_lastmonth")
|
||||||
|
Me.btnEvvallUs_lastmonth.Name = "btnEvvallUs_lastmonth"
|
||||||
|
'
|
||||||
|
'btnEvvallUs_thismonth
|
||||||
|
'
|
||||||
|
Me.btnEvvallUs_thismonth.Appearance.BackColor = System.Drawing.Color.MediumSlateBlue
|
||||||
|
Me.btnEvvallUs_thismonth.Appearance.Options.UseBackColor = True
|
||||||
|
resources.ApplyResources(Me.btnEvvallUs_thismonth, "btnEvvallUs_thismonth")
|
||||||
|
Me.btnEvvallUs_thismonth.Name = "btnEvvallUs_thismonth"
|
||||||
'
|
'
|
||||||
'GroupControl1
|
'GroupControl1
|
||||||
'
|
'
|
||||||
@@ -743,6 +805,30 @@ Partial Class frmMain
|
|||||||
resources.ApplyResources(Me.btnEnvelopes_thismonth, "btnEnvelopes_thismonth")
|
resources.ApplyResources(Me.btnEnvelopes_thismonth, "btnEnvelopes_thismonth")
|
||||||
Me.btnEnvelopes_thismonth.Name = "btnEnvelopes_thismonth"
|
Me.btnEnvelopes_thismonth.Name = "btnEnvelopes_thismonth"
|
||||||
'
|
'
|
||||||
|
'XtraTabPage3
|
||||||
|
'
|
||||||
|
Me.XtraTabPage3.Controls.Add(Me.Label1)
|
||||||
|
Me.XtraTabPage3.Controls.Add(Me.Button1)
|
||||||
|
Me.XtraTabPage3.Controls.Add(Me.txtEnvID)
|
||||||
|
Me.XtraTabPage3.Name = "XtraTabPage3"
|
||||||
|
resources.ApplyResources(Me.XtraTabPage3, "XtraTabPage3")
|
||||||
|
'
|
||||||
|
'Label1
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.Label1, "Label1")
|
||||||
|
Me.Label1.Name = "Label1"
|
||||||
|
'
|
||||||
|
'Button1
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.Button1, "Button1")
|
||||||
|
Me.Button1.Name = "Button1"
|
||||||
|
Me.Button1.UseVisualStyleBackColor = True
|
||||||
|
'
|
||||||
|
'txtEnvID
|
||||||
|
'
|
||||||
|
resources.ApplyResources(Me.txtEnvID, "txtEnvID")
|
||||||
|
Me.txtEnvID.Name = "txtEnvID"
|
||||||
|
'
|
||||||
'RefreshTimer
|
'RefreshTimer
|
||||||
'
|
'
|
||||||
Me.RefreshTimer.Interval = 120000
|
Me.RefreshTimer.Interval = 120000
|
||||||
@@ -755,19 +841,6 @@ Partial Class frmMain
|
|||||||
'
|
'
|
||||||
Me.XtraSaveFileDialog1.FileName = "XtraSaveFileDialog1"
|
Me.XtraSaveFileDialog1.FileName = "XtraSaveFileDialog1"
|
||||||
'
|
'
|
||||||
'BarStaticItemGhost
|
|
||||||
'
|
|
||||||
resources.ApplyResources(Me.BarStaticItemGhost, "BarStaticItemGhost")
|
|
||||||
Me.BarStaticItemGhost.Id = 19
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.BackColor = System.Drawing.Color.Yellow
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Font = CType(resources.GetObject("BarStaticItemGhost.ItemAppearance.Normal.Font"), System.Drawing.Font)
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.ForeColor = System.Drawing.Color.Black
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseBackColor = True
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseFont = True
|
|
||||||
Me.BarStaticItemGhost.ItemAppearance.Normal.Options.UseForeColor = True
|
|
||||||
Me.BarStaticItemGhost.Name = "BarStaticItemGhost"
|
|
||||||
Me.BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
|
||||||
'
|
|
||||||
'frmMain
|
'frmMain
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me, "$this")
|
resources.ApplyResources(Me, "$this")
|
||||||
@@ -809,9 +882,10 @@ Partial Class frmMain
|
|||||||
Me.PanelControl1.ResumeLayout(False)
|
Me.PanelControl1.ResumeLayout(False)
|
||||||
CType(Me.GroupControl2, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.GroupControl2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.GroupControl2.ResumeLayout(False)
|
Me.GroupControl2.ResumeLayout(False)
|
||||||
Me.GroupControl2.PerformLayout()
|
|
||||||
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
CType(Me.GroupControl1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||||
Me.GroupControl1.ResumeLayout(False)
|
Me.GroupControl1.ResumeLayout(False)
|
||||||
|
Me.XtraTabPage3.ResumeLayout(False)
|
||||||
|
Me.XtraTabPage3.PerformLayout()
|
||||||
Me.ResumeLayout(False)
|
Me.ResumeLayout(False)
|
||||||
Me.PerformLayout()
|
Me.PerformLayout()
|
||||||
|
|
||||||
@@ -876,7 +950,7 @@ Partial Class frmMain
|
|||||||
Friend WithEvents SaveFileDialog1 As SaveFileDialog
|
Friend WithEvents SaveFileDialog1 As SaveFileDialog
|
||||||
Friend WithEvents bbtnitmEB As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents bbtnitmEB As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents bbtnitmInfoMail As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents bbtnitmInfoMail As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents BarButtonItem2 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents bbtnitm_ResendInvitation As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents XtraTabPageAdmin As DevExpress.XtraTab.XtraTabPage
|
Friend WithEvents XtraTabPageAdmin As DevExpress.XtraTab.XtraTabPage
|
||||||
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
Friend WithEvents PanelControl1 As DevExpress.XtraEditors.PanelControl
|
||||||
Friend WithEvents GroupControl1 As DevExpress.XtraEditors.GroupControl
|
Friend WithEvents GroupControl1 As DevExpress.XtraEditors.GroupControl
|
||||||
@@ -888,10 +962,18 @@ Partial Class frmMain
|
|||||||
Friend WithEvents GridViewData As DevExpress.XtraGrid.Views.Grid.GridView
|
Friend WithEvents GridViewData As DevExpress.XtraGrid.Views.Grid.GridView
|
||||||
Friend WithEvents GroupControl2 As DevExpress.XtraEditors.GroupControl
|
Friend WithEvents GroupControl2 As DevExpress.XtraEditors.GroupControl
|
||||||
Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl
|
Friend WithEvents SplitContainerControl2 As DevExpress.XtraEditors.SplitContainerControl
|
||||||
Friend WithEvents LabelControl1 As DevExpress.XtraEditors.LabelControl
|
|
||||||
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItem3 As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents XtraSaveFileDialog1 As DevExpress.XtraEditors.XtraSaveFileDialog
|
Friend WithEvents XtraSaveFileDialog1 As DevExpress.XtraEditors.XtraSaveFileDialog
|
||||||
Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
Friend WithEvents RibbonPageGroupFunctions As DevExpress.XtraBars.Ribbon.RibbonPageGroup
|
||||||
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
|
Friend WithEvents BarButtonItem4 As DevExpress.XtraBars.BarButtonItem
|
||||||
Friend WithEvents BarStaticItemGhost As DevExpress.XtraBars.BarStaticItem
|
Friend WithEvents BarStaticItemGhost As DevExpress.XtraBars.BarStaticItem
|
||||||
|
Friend WithEvents btnEvvallUs_thismonth As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents btnEvvallUs_lastmonth As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn
|
||||||
|
Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn
|
||||||
|
Friend WithEvents bbtnitm2Faktor As DevExpress.XtraBars.BarButtonItem
|
||||||
|
Friend WithEvents XtraTabPage3 As DevExpress.XtraTab.XtraTabPage
|
||||||
|
Friend WithEvents Label1 As Label
|
||||||
|
Friend WithEvents Button1 As Button
|
||||||
|
Friend WithEvents txtEnvID As TextBox
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -265,7 +265,7 @@
|
|||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colContractType.Width" type="System.Int32, mscorlib">
|
<data name="colContractType.Width" type="System.Int32, mscorlib">
|
||||||
<value>120</value>
|
<value>112</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colStatus.Caption" xml:space="preserve">
|
<data name="colStatus.Caption" xml:space="preserve">
|
||||||
<value>Status</value>
|
<value>Status</value>
|
||||||
@@ -277,7 +277,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colStatus.Width" type="System.Int32, mscorlib">
|
<data name="colStatus.Width" type="System.Int32, mscorlib">
|
||||||
<value>193</value>
|
<value>180</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colTitle.Caption" xml:space="preserve">
|
<data name="colTitle.Caption" xml:space="preserve">
|
||||||
<value>Titel</value>
|
<value>Titel</value>
|
||||||
@@ -289,7 +289,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colTitle.Width" type="System.Int32, mscorlib">
|
<data name="colTitle.Width" type="System.Int32, mscorlib">
|
||||||
<value>575</value>
|
<value>538</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colAddedWhen.Caption" xml:space="preserve">
|
<data name="colAddedWhen.Caption" xml:space="preserve">
|
||||||
<value>Erstellt am</value>
|
<value>Erstellt am</value>
|
||||||
@@ -301,7 +301,19 @@
|
|||||||
<value>3</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="colAddedWhen.Width" type="System.Int32, mscorlib">
|
<data name="colAddedWhen.Width" type="System.Int32, mscorlib">
|
||||||
<value>196</value>
|
<value>130</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn2.Caption" xml:space="preserve">
|
||||||
|
<value>Zuletzt geändert am</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn2.Visible" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn2.VisibleIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn2.Width" type="System.Int32, mscorlib">
|
||||||
|
<value>130</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
<data name="RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@@ -365,7 +377,7 @@
|
|||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnDeleteEnvelope.Caption" xml:space="preserve">
|
<data name="btnDeleteEnvelope.Caption" xml:space="preserve">
|
||||||
<value>Umschlag zurückrufen</value>
|
<value>Umschlag zurückrufen/löschen</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="btnDeleteEnvelope.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
<data name="btnDeleteEnvelope.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
@@ -733,10 +745,10 @@
|
|||||||
IDwvZz4NCjwvc3ZnPgs=
|
IDwvZz4NCjwvc3ZnPgs=
|
||||||
</value>
|
</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BarButtonItem2.Caption" xml:space="preserve">
|
<data name="bbtnitm_ResendInvitation.Caption" xml:space="preserve">
|
||||||
<value>Einladung erneut versenden</value>
|
<value>Einladung erneut versenden</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="BarButtonItem2.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="bbtnitm_ResendInvitation.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
@@ -856,6 +868,43 @@
|
|||||||
<data name="BarStaticItemGhost.ItemAppearance.Normal.Font" type="System.Drawing.Font, System.Drawing">
|
<data name="BarStaticItemGhost.ItemAppearance.Normal.Font" type="System.Drawing.Font, System.Drawing">
|
||||||
<value>Tahoma, 8.25pt, style=Bold</value>
|
<value>Tahoma, 8.25pt, style=Bold</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="bbtnitm2Faktor.Caption" xml:space="preserve">
|
||||||
|
<value>2Faktor Eigenschaften</value>
|
||||||
|
</data>
|
||||||
|
<data name="bbtnitm2Faktor.ImageOptions.SvgImage" type="DevExpress.Utils.Svg.SvgImage, DevExpress.Data.v21.2" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
|
<value>
|
||||||
|
AAEAAAD/////AQAAAAAAAAAMAgAAAFlEZXZFeHByZXNzLkRhdGEudjIxLjIsIFZlcnNpb249MjEuMi40
|
||||||
|
LjAsIEN1bHR1cmU9bmV1dHJhbCwgUHVibGljS2V5VG9rZW49Yjg4ZDE3NTRkNzAwZTQ5YQUBAAAAHURl
|
||||||
|
dkV4cHJlc3MuVXRpbHMuU3ZnLlN2Z0ltYWdlAQAAAAREYXRhBwICAAAACQMAAAAPAwAAAC4GAAAC77u/
|
||||||
|
PD94bWwgdmVyc2lvbj0nMS4wJyBlbmNvZGluZz0nVVRGLTgnPz4NCjxzdmcgeD0iMHB4IiB5PSIwcHgi
|
||||||
|
IHZpZXdCb3g9IjAgMCAzMiAzMiIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcv
|
||||||
|
MjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3Bh
|
||||||
|
Y2U9InByZXNlcnZlIiBpZD0iTGF5ZXJfMSIgc3R5bGU9ImVuYWJsZS1iYWNrZ3JvdW5kOm5ldyAwIDAg
|
||||||
|
MzIgMzIiPg0KICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPgoJLkJsYWNre2ZpbGw6IzcyNzI3Mjt9Cgku
|
||||||
|
UmVke2ZpbGw6I0QxMUMxQzt9CgkuWWVsbG93e2ZpbGw6I0ZGQjExNTt9CgkuR3JlZW57ZmlsbDojMDM5
|
||||||
|
QzIzO30KPC9zdHlsZT4NCiAgPGcgaWQ9IkZpbmdlcnByaW50Ij4NCiAgICA8cGF0aCBkPSJNMjMsNmMt
|
||||||
|
MC4yLDAtMC40LTAuMS0wLjUtMC4yYy0wLjMtMC4yLTYuNi00LjEtMTUsMEM3LDYuMSw2LjQsNS45LDYu
|
||||||
|
MSw1LjRjLTAuMi0wLjUsMC0xLjEsMC41LTEuMyAgIEMxNi0wLjYsMjMuMiw0LDIzLjUsNC4yYzAuNSww
|
||||||
|
LjMsMC42LDAuOSwwLjMsMS40QzIzLjYsNS44LDIzLjMsNiwyMyw2eiBNMy43LDEzLjdjMTAuOS0xMS40
|
||||||
|
LDIyLjItMi4zLDIyLjYtMS45ICAgYzAuNCwwLjQsMS4xLDAuMywxLjQtMC4xYzAuNC0wLjQsMC4zLTEu
|
||||||
|
MS0wLjEtMS40Yy0wLjEtMC4xLTEzLjEtMTAuNy0yNS40LDIuMWMtMC40LDAuNC0wLjQsMSwwLDEuNEMy
|
||||||
|
LjUsMTMuOSwyLjgsMTQsMywxNCAgIEMzLjMsMTQsMy41LDEzLjksMy43LDEzLjd6IE0yNCwyN2MwLTAu
|
||||||
|
Ni0wLjQtMS0xLTFjLTUuMywwLTctMy4zLTcuMS0zLjRjLTAuMi0wLjUtMC44LTAuNy0xLjMtMC40Yy0w
|
||||||
|
LjUsMC4yLTAuNywwLjgtMC40LDEuMyAgIGMwLjEsMC4yLDIuNCw0LjYsOC45LDQuNkMyMy42LDI4LDI0
|
||||||
|
LDI3LjYsMjQsMjd6IE0xNS45LDI5LjRjMC4yLTAuNSwwLTEuMS0wLjQtMS4zYzAsMC0zLjUtMS44LTMu
|
||||||
|
NS01LjFjMC0xLjcsMS4zLTMsMy0zICAgYzEuNiwwLDIuMywwLjgsMy4zLDEuN2MxLDEsMi4zLDIuMyw0
|
||||||
|
LjcsMi4zYzIuOCwwLDUtMi4yLDUtNWMwLTMuMi00LTktMTItOUM3LjYsMTAsMiwxNiwyLDI1YzAsMC42
|
||||||
|
LDAuNCwxLDEsMXMxLTAuNCwxLTEgICBjMC03LjksNC43LTEzLDEyLTEzYzYuNiwwLDEwLDQuNiwxMCw3
|
||||||
|
YzAsMS43LTEuMywzLTMsM2MtMS42LDAtMi4zLTAuOC0zLjMtMS43Yy0xLTEtMi4zLTIuMy00LjctMi4z
|
||||||
|
Yy0yLjgsMC01LDIuMi01LDUgICBjMCw0LjYsNC40LDYuOCw0LjYsNi45QzE0LjcsMzAsMTQuOCwzMCwx
|
||||||
|
NSwzMEMxNS40LDMwLDE1LjcsMjkuOCwxNS45LDI5LjR6IE05LjcsMjkuOGMwLjQtMC40LDAuNS0xLDAu
|
||||||
|
MS0xLjRjMCwwLTEuOC0yLjEtMS44LTUuMyAgIGMwLTIuNCwyLjMtNyw4LTdjNC4zLDAsNiwzLjMsNi4x
|
||||||
|
LDMuNWMwLjIsMC41LDAuOCwwLjcsMS4zLDAuNGMwLjUtMC4yLDAuNy0wLjgsMC40LTEuM0MyMy44LDE4
|
||||||
|
LjQsMjEuNiwxNCwxNiwxNCAgIGMtNi41LDAtMTAsNS4yLTEwLDljMCw0LDIuMSw2LjUsMi4yLDYuN0M4
|
||||||
|
LjQsMjkuOSw4LjcsMzAsOSwzMEM5LjIsMzAsOS41LDI5LjksOS43LDI5Ljh6IiBjbGFzcz0iQmxhY2si
|
||||||
|
IC8+DQogIDwvZz4NCjwvc3ZnPgs=
|
||||||
|
</value>
|
||||||
|
</data>
|
||||||
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="RibbonControl.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1052,7 +1101,7 @@
|
|||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn3.Width" type="System.Int32, mscorlib">
|
<data name="GridColumn3.Width" type="System.Int32, mscorlib">
|
||||||
<value>120</value>
|
<value>100</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn4.Caption" xml:space="preserve">
|
<data name="GridColumn4.Caption" xml:space="preserve">
|
||||||
<value>Status</value>
|
<value>Status</value>
|
||||||
@@ -1064,7 +1113,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn4.Width" type="System.Int32, mscorlib">
|
<data name="GridColumn4.Width" type="System.Int32, mscorlib">
|
||||||
<value>195</value>
|
<value>163</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn5.Caption" xml:space="preserve">
|
<data name="GridColumn5.Caption" xml:space="preserve">
|
||||||
<value>Titel</value>
|
<value>Titel</value>
|
||||||
@@ -1076,7 +1125,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn5.Width" type="System.Int32, mscorlib">
|
<data name="GridColumn5.Width" type="System.Int32, mscorlib">
|
||||||
<value>574</value>
|
<value>482</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn7.Caption" xml:space="preserve">
|
<data name="GridColumn7.Caption" xml:space="preserve">
|
||||||
<value>Erstellt am</value>
|
<value>Erstellt am</value>
|
||||||
@@ -1088,10 +1137,22 @@
|
|||||||
<value>3</value>
|
<value>3</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridColumn7.Width" type="System.Int32, mscorlib">
|
<data name="GridColumn7.Width" type="System.Int32, mscorlib">
|
||||||
<value>195</value>
|
<value>120</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn1.Caption" xml:space="preserve">
|
||||||
|
<value>Zuletzt geändert am</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn1.Visible" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn1.VisibleIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="GridColumn1.Width" type="System.Int32, mscorlib">
|
||||||
|
<value>120</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridCompleted.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridCompleted.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 467</value>
|
<value>1088, 469</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridCompleted.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridCompleted.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>3</value>
|
<value>3</value>
|
||||||
@@ -1109,7 +1170,7 @@
|
|||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPage2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="XtraTabPage2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 467</value>
|
<value>1088, 469</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPage2.Text" xml:space="preserve">
|
<data name="XtraTabPage2.Text" xml:space="preserve">
|
||||||
<value>Abgeschlossene Umschläge</value>
|
<value>Abgeschlossene Umschläge</value>
|
||||||
@@ -1139,7 +1200,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>584, 388</value>
|
<value>907, 390</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@@ -1187,7 +1248,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="SplitContainerControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 388</value>
|
<value>1088, 390</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="SplitContainerControl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
@@ -1204,41 +1265,65 @@
|
|||||||
<data name=">>SplitContainerControl2.ZOrder" xml:space="preserve">
|
<data name=">>SplitContainerControl2.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="btnEvvallUs_lastmonth.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>17, 37</value>
|
<value>109, 26</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="btnEvvallUs_lastmonth.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>120, 13</value>
|
<value>98, 35</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="btnEvvallUs_lastmonth.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>0</value>
|
<value>5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="LabelControl1.Text" xml:space="preserve">
|
<data name="btnEvvallUs_lastmonth.Text" xml:space="preserve">
|
||||||
<value>Function not active so far</value>
|
<value>Letzter Monat</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.Name" xml:space="preserve">
|
<data name=">>btnEvvallUs_lastmonth.Name" xml:space="preserve">
|
||||||
<value>LabelControl1</value>
|
<value>btnEvvallUs_lastmonth</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.Type" xml:space="preserve">
|
<data name=">>btnEvvallUs_lastmonth.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraEditors.LabelControl, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraEditors.SimpleButton, DevExpress.XtraEditors.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.Parent" xml:space="preserve">
|
<data name=">>btnEvvallUs_lastmonth.Parent" xml:space="preserve">
|
||||||
<value>GroupControl2</value>
|
<value>GroupControl2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>LabelControl1.ZOrder" xml:space="preserve">
|
<data name=">>btnEvvallUs_lastmonth.ZOrder" xml:space="preserve">
|
||||||
<value>0</value>
|
<value>0</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="btnEvvallUs_thismonth.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>5, 26</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEvvallUs_thismonth.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>98, 35</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEvvallUs_thismonth.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>4</value>
|
||||||
|
</data>
|
||||||
|
<data name="btnEvvallUs_thismonth.Text" xml:space="preserve">
|
||||||
|
<value>Dieser Monat</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEvvallUs_thismonth.Name" xml:space="preserve">
|
||||||
|
<value>btnEvvallUs_thismonth</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEvvallUs_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=">>btnEvvallUs_thismonth.Parent" xml:space="preserve">
|
||||||
|
<value>GroupControl2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>btnEvvallUs_thismonth.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
<data name="GroupControl2.Location" type="System.Drawing.Point, System.Drawing">
|
<data name="GroupControl2.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
<value>496, 5</value>
|
<value>474, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl2.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GroupControl2.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>427, 68</value>
|
<value>318, 68</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl2.TabIndex" type="System.Int32, mscorlib">
|
<data name="GroupControl2.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl2.Text" xml:space="preserve">
|
<data name="GroupControl2.Text" xml:space="preserve">
|
||||||
<value>Diagramme</value>
|
<value>Umschläge alle User (abrechnungsrelevant)</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>GroupControl2.Name" xml:space="preserve">
|
<data name=">>GroupControl2.Name" xml:space="preserve">
|
||||||
<value>GroupControl2</value>
|
<value>GroupControl2</value>
|
||||||
@@ -1352,7 +1437,7 @@
|
|||||||
<value>11, 5</value>
|
<value>11, 5</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl1.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GroupControl1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>453, 68</value>
|
<value>457, 68</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GroupControl1.TabIndex" type="System.Int32, mscorlib">
|
<data name="GroupControl1.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
@@ -1397,7 +1482,7 @@
|
|||||||
<value>1</value>
|
<value>1</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPageAdmin.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="XtraTabPageAdmin.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>1088, 467</value>
|
<value>1088, 469</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="XtraTabPageAdmin.Text" xml:space="preserve">
|
<data name="XtraTabPageAdmin.Text" xml:space="preserve">
|
||||||
<value>Auswertungen (Admin) - BETA</value>
|
<value>Auswertungen (Admin) - BETA</value>
|
||||||
@@ -1414,6 +1499,96 @@
|
|||||||
<data name=">>XtraTabPageAdmin.ZOrder" xml:space="preserve">
|
<data name=">>XtraTabPageAdmin.ZOrder" xml:space="preserve">
|
||||||
<value>2</value>
|
<value>2</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name="Label1.AutoSize" type="System.Boolean, mscorlib">
|
||||||
|
<value>True</value>
|
||||||
|
</data>
|
||||||
|
<data name="Label1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>21, 18</value>
|
||||||
|
</data>
|
||||||
|
<data name="Label1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>66, 13</value>
|
||||||
|
</data>
|
||||||
|
<data name="Label1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="Label1.Text" xml:space="preserve">
|
||||||
|
<value>EnvelopeID:</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Label1.Name" xml:space="preserve">
|
||||||
|
<value>Label1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Label1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Label, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Label1.Parent" xml:space="preserve">
|
||||||
|
<value>XtraTabPage3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Label1.ZOrder" xml:space="preserve">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name="Button1.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>24, 85</value>
|
||||||
|
</data>
|
||||||
|
<data name="Button1.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>199, 23</value>
|
||||||
|
</data>
|
||||||
|
<data name="Button1.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="Button1.Text" xml:space="preserve">
|
||||||
|
<value>Finalisierung emails prüfen</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Button1.Name" xml:space="preserve">
|
||||||
|
<value>Button1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Button1.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.Button, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Button1.Parent" xml:space="preserve">
|
||||||
|
<value>XtraTabPage3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>Button1.ZOrder" xml:space="preserve">
|
||||||
|
<value>1</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtEnvID.Location" type="System.Drawing.Point, System.Drawing">
|
||||||
|
<value>24, 34</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtEnvID.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>100, 20</value>
|
||||||
|
</data>
|
||||||
|
<data name="txtEnvID.TabIndex" type="System.Int32, mscorlib">
|
||||||
|
<value>0</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtEnvID.Name" xml:space="preserve">
|
||||||
|
<value>txtEnvID</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtEnvID.Type" xml:space="preserve">
|
||||||
|
<value>System.Windows.Forms.TextBox, System.Windows.Forms, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtEnvID.Parent" xml:space="preserve">
|
||||||
|
<value>XtraTabPage3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>txtEnvID.ZOrder" xml:space="preserve">
|
||||||
|
<value>2</value>
|
||||||
|
</data>
|
||||||
|
<data name="XtraTabPage3.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
|
<value>1088, 469</value>
|
||||||
|
</data>
|
||||||
|
<data name="XtraTabPage3.Text" xml:space="preserve">
|
||||||
|
<value>Admin Test</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>XtraTabPage3.Name" xml:space="preserve">
|
||||||
|
<value>XtraTabPage3</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>XtraTabPage3.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=">>XtraTabPage3.Parent" xml:space="preserve">
|
||||||
|
<value>XtraTabControlMain</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>XtraTabPage3.ZOrder" xml:space="preserve">
|
||||||
|
<value>3</value>
|
||||||
|
</data>
|
||||||
<data name=">>XtraTabControlMain.Name" xml:space="preserve">
|
<data name=">>XtraTabControlMain.Name" xml:space="preserve">
|
||||||
<value>XtraTabControlMain</value>
|
<value>XtraTabControlMain</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1693,6 +1868,12 @@
|
|||||||
<data name=">>colAddedWhen.Type" xml:space="preserve">
|
<data name=">>colAddedWhen.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>GridColumn2.Name" xml:space="preserve">
|
||||||
|
<value>GridColumn2</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridColumn2.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=">>btnCreateEnvelope.Name" xml:space="preserve">
|
<data name=">>btnCreateEnvelope.Name" xml:space="preserve">
|
||||||
<value>btnCreateEnvelope</value>
|
<value>btnCreateEnvelope</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1771,10 +1952,10 @@
|
|||||||
<data name=">>bbtnitmInfoMail.Type" xml:space="preserve">
|
<data name=">>bbtnitmInfoMail.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarButtonItem2.Name" xml:space="preserve">
|
<data name=">>bbtnitm_ResendInvitation.Name" xml:space="preserve">
|
||||||
<value>BarButtonItem2</value>
|
<value>bbtnitm_ResendInvitation</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarButtonItem2.Type" xml:space="preserve">
|
<data name=">>bbtnitm_ResendInvitation.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarButtonItem3.Name" xml:space="preserve">
|
<data name=">>BarButtonItem3.Name" xml:space="preserve">
|
||||||
@@ -1789,6 +1970,18 @@
|
|||||||
<data name=">>BarButtonItem4.Type" xml:space="preserve">
|
<data name=">>BarButtonItem4.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraBars.BarButtonItem, DevExpress.XtraBars.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>BarStaticItemGhost.Name" xml:space="preserve">
|
||||||
|
<value>BarStaticItemGhost</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>BarStaticItemGhost.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=">>bbtnitm2Faktor.Name" xml:space="preserve">
|
||||||
|
<value>bbtnitm2Faktor</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>bbtnitm2Faktor.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">
|
<data name=">>RibbonPage1.Name" xml:space="preserve">
|
||||||
<value>RibbonPage1</value>
|
<value>RibbonPage1</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1909,6 +2102,12 @@
|
|||||||
<data name=">>GridColumn7.Type" xml:space="preserve">
|
<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>
|
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
|
<data name=">>GridColumn1.Name" xml:space="preserve">
|
||||||
|
<value>GridColumn1</value>
|
||||||
|
</data>
|
||||||
|
<data name=">>GridColumn1.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">
|
<data name=">>GridViewData.Name" xml:space="preserve">
|
||||||
<value>GridViewData</value>
|
<value>GridViewData</value>
|
||||||
</data>
|
</data>
|
||||||
@@ -1933,12 +2132,6 @@
|
|||||||
<data name=">>XtraSaveFileDialog1.Type" xml:space="preserve">
|
<data name=">>XtraSaveFileDialog1.Type" xml:space="preserve">
|
||||||
<value>DevExpress.XtraEditors.XtraSaveFileDialog, DevExpress.XtraDialogs.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
<value>DevExpress.XtraEditors.XtraSaveFileDialog, DevExpress.XtraDialogs.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
|
||||||
</data>
|
</data>
|
||||||
<data name=">>BarStaticItemGhost.Name" xml:space="preserve">
|
|
||||||
<value>BarStaticItemGhost</value>
|
|
||||||
</data>
|
|
||||||
<data name=">>BarStaticItemGhost.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=">>$this.Name" xml:space="preserve">
|
<data name=">>$this.Name" xml:space="preserve">
|
||||||
<value>frmMain</value>
|
<value>frmMain</value>
|
||||||
</data>
|
</data>
|
||||||
|
|||||||
@@ -13,6 +13,9 @@ Imports EnvelopeGenerator.Common.My
|
|||||||
Imports System.Diagnostics
|
Imports System.Diagnostics
|
||||||
Imports System.ComponentModel
|
Imports System.ComponentModel
|
||||||
Imports DevExpress.XtraPrinting
|
Imports DevExpress.XtraPrinting
|
||||||
|
Imports System.Web
|
||||||
|
Imports EnvelopeGenerator.Common.Constants
|
||||||
|
Imports System.Security.Cryptography
|
||||||
|
|
||||||
Public Class frmMain
|
Public Class frmMain
|
||||||
Private ReadOnly LogConfig As LogConfig
|
Private ReadOnly LogConfig As LogConfig
|
||||||
@@ -54,8 +57,10 @@ Public Class frmMain
|
|||||||
End Try
|
End Try
|
||||||
If MYUSER.IsAdmin Then
|
If MYUSER.IsAdmin Then
|
||||||
XtraTabControlMain.TabPages(2).PageVisible = True
|
XtraTabControlMain.TabPages(2).PageVisible = True
|
||||||
|
XtraTabControlMain.TabPages(3).PageVisible = True
|
||||||
Else
|
Else
|
||||||
XtraTabControlMain.TabPages(2).PageVisible = False
|
XtraTabControlMain.TabPages(2).PageVisible = False
|
||||||
|
XtraTabControlMain.TabPages(3).PageVisible = False
|
||||||
End If
|
End If
|
||||||
LoadEnvelopeData()
|
LoadEnvelopeData()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -85,8 +90,16 @@ Public Class frmMain
|
|||||||
|
|
||||||
GridBuilder.SetReadOnlyOptions(ViewHistory)
|
GridBuilder.SetReadOnlyOptions(ViewHistory)
|
||||||
GridBuilder.SetDefaults(ViewHistory)
|
GridBuilder.SetDefaults(ViewHistory)
|
||||||
|
|
||||||
GridEnvelopes.DataSource = Controller.ListEnvelopes()
|
GridEnvelopes.DataSource = Controller.ListEnvelopes()
|
||||||
|
If ViewEnvelopes.RowCount = 0 Then
|
||||||
|
RibbonPageGroupFunctions.Enabled = False
|
||||||
|
btnDeleteEnvelope.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
|
||||||
|
btnEditEnvelope.Enabled = False
|
||||||
|
Else
|
||||||
|
RibbonPageGroupFunctions.Enabled = True
|
||||||
|
btnDeleteEnvelope.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||||
|
btnEditEnvelope.Enabled = True
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
Logger.Error(ex)
|
||||||
End Try
|
End Try
|
||||||
@@ -176,7 +189,11 @@ Public Class frmMain
|
|||||||
Private Sub btnDeleteEnvelope_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteEnvelope.ItemClick
|
Private Sub btnDeleteEnvelope_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteEnvelope.ItemClick
|
||||||
Try
|
Try
|
||||||
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
||||||
|
Dim oEnvelope As Envelope = DirectCast(ViewEnvelopes.GetRow(oSelectedRows.First), Envelope)
|
||||||
|
|
||||||
If oSelectedRows.Count > 0 Then
|
If oSelectedRows.Count > 0 Then
|
||||||
|
CurrentEnvelopID = oEnvelope.Id
|
||||||
|
CurrentEnvelopetitle = oEnvelope.Title
|
||||||
Dim ofrmAbort As New frmRueckruf
|
Dim ofrmAbort As New frmRueckruf
|
||||||
frmRueckruf.ShowDialog()
|
frmRueckruf.ShowDialog()
|
||||||
If frmRueckruf.Continue_Reject = True Then
|
If frmRueckruf.Continue_Reject = True Then
|
||||||
@@ -196,29 +213,44 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged
|
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged
|
||||||
RibbonPageGroupFunctions.Enabled = True
|
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||||
RibbonPageEnvelopeActions.Enabled = True
|
Try
|
||||||
Select Case XtraTabControlMain.SelectedTabPageIndex
|
RibbonPageGroupFunctions.Enabled = True
|
||||||
Case 1
|
RibbonPageEnvelopeActions.Enabled = True
|
||||||
btnEditEnvelope.Enabled = False
|
Select Case XtraTabControlMain.SelectedTabPageIndex
|
||||||
btnDeleteEnvelope.Enabled = False
|
Case 1
|
||||||
btnContactReceiver.Enabled = False
|
btnEditEnvelope.Enabled = False
|
||||||
btnShowDocument.Enabled = False
|
btnDeleteEnvelope.Enabled = False
|
||||||
bbtnitmEB.Enabled = True
|
btnContactReceiver.Enabled = False
|
||||||
LoadEnvelopeData()
|
btnShowDocument.Enabled = False
|
||||||
Case 0
|
bbtnitm_ResendInvitation.Enabled = False
|
||||||
btnEditEnvelope.Enabled = True
|
bbtnitmInfoMail.Enabled = False
|
||||||
btnDeleteEnvelope.Enabled = True
|
bbtnitmEB.Enabled = True
|
||||||
btnContactReceiver.Enabled = True
|
bbtnitm2Faktor.Enabled = False
|
||||||
btnShowDocument.Enabled = True
|
LoadEnvelopeData()
|
||||||
bbtnitmEB.Enabled = False
|
Case 0
|
||||||
LoadEnvelopeData()
|
btnEditEnvelope.Enabled = True
|
||||||
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
btnDeleteEnvelope.Enabled = True
|
||||||
|
btnContactReceiver.Enabled = True
|
||||||
|
btnShowDocument.Enabled = True
|
||||||
|
bbtnitm_ResendInvitation.Enabled = True
|
||||||
|
bbtnitmInfoMail.Enabled = True
|
||||||
|
bbtnitm2Faktor.Enabled = True
|
||||||
|
bbtnitmEB.Enabled = False
|
||||||
|
LoadEnvelopeData()
|
||||||
|
|
||||||
|
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
||||||
|
|
||||||
|
Case 2
|
||||||
|
RibbonPageGroupFunctions.Enabled = False
|
||||||
|
RibbonPageEnvelopeActions.Enabled = False
|
||||||
|
End Select
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
|
End Try
|
||||||
|
|
||||||
Case 2
|
|
||||||
RibbonPageGroupFunctions.Enabled = False
|
|
||||||
RibbonPageEnvelopeActions.Enabled = False
|
|
||||||
End Select
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||||
@@ -312,7 +344,7 @@ Public Class frmMain
|
|||||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.GREEN_300)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeDeleted Then
|
If oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeDeleted Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeWithdrawn Or oEnvelope.Status = Common.Constants.EnvelopeStatus.EnvelopeRejected Then
|
||||||
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.RED_300)
|
e.Appearance.BackColor = ColorTranslator.FromHtml(Common.Constants.RED_300)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -512,7 +544,7 @@ Public Class frmMain
|
|||||||
End If
|
End If
|
||||||
bbtnitmEB.Enabled = False
|
bbtnitmEB.Enabled = False
|
||||||
RefreshTimer.Start()
|
RefreshTimer.Start()
|
||||||
If USER_GHOST_MODE_ACTIVE Then
|
If USER_GHOST_MODE_ACTIVE Or MYUSER.GhostModeActive Then
|
||||||
frmGhostMode.ShowDialog()
|
frmGhostMode.ShowDialog()
|
||||||
If USER_GHOST_MODE_USRNAME <> "" Then
|
If USER_GHOST_MODE_USRNAME <> "" Then
|
||||||
MyUserModel = New UserModel(MyState)
|
MyUserModel = New UserModel(MyState)
|
||||||
@@ -520,7 +552,8 @@ Public Class frmMain
|
|||||||
Dim oUser = MyUserModel.SelectUser()
|
Dim oUser = MyUserModel.SelectUser()
|
||||||
If oUser IsNot Nothing Then
|
If oUser IsNot Nothing Then
|
||||||
MyUserModel.CheckUserLogin(oUser)
|
MyUserModel.CheckUserLogin(oUser)
|
||||||
BarStaticItemGhost.Caption = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit mode"
|
BarStaticItemGhost.Caption = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit ghost-mode"
|
||||||
|
Me.Text = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit ghost - mode"
|
||||||
BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
|
||||||
LoadEnvelopeData()
|
LoadEnvelopeData()
|
||||||
End If
|
End If
|
||||||
@@ -538,31 +571,22 @@ Public Class frmMain
|
|||||||
Dim oView As GridView = GridEnvelopes.FocusedView
|
Dim oView As GridView = GridEnvelopes.FocusedView
|
||||||
If oView.Name = ViewReceivers.Name Then
|
If oView.Name = ViewReceivers.Name Then
|
||||||
Dim oReceiver As EnvelopeReceiver = oView.GetRow(oView.FocusedRowHandle)
|
Dim oReceiver As EnvelopeReceiver = oView.GetRow(oView.FocusedRowHandle)
|
||||||
Dim oEnvelopeTitle As String = Net.WebUtility.UrlEncode(oEnvelope.Title)
|
Dim mailto As String = "mailto:support-flow@digitaldata.works"
|
||||||
Dim oCode = oReceiver.AccessCode
|
Dim subject As String = Uri.EscapeDataString("signFLOW - Envelope issue - ID: " & oEnvelope.Id)
|
||||||
Dim oUID = oEnvelope.Uuid
|
Dim body As String = Uri.EscapeDataString($"Dear Digital Data Team," & vbCrLf & "There is an error or misbehavin with following envelope and Receiver:" & vbCrLf &
|
||||||
|
$"Envelope-ID:{oEnvelope.Id}" & vbCrLf & $"Receiver: {oReceiver.Email}" & vbCrLf & "Issue/Description: Please describe the issue in Your own words...")
|
||||||
|
|
||||||
' E-Mail-Details konfigurieren
|
Dim mailtoUri As String = $"{mailto}?subject={subject}&body={body}"
|
||||||
Dim mailto As String = "support-flow@digitaldata.works"
|
|
||||||
Dim subject As String = "signFLOW - Envelope issue"
|
|
||||||
Dim body As String = $"<html><body>Dear Digital Data Team, <br> There is an error or misbehavin with following envelope and Receiver: <p> Envelope: <b>{oUID}</b> <br> Receiver: <b>{oReceiver.Email}</b>
|
|
||||||
<p>Issue/Description: Please describe the issue in Your own words...</p></body></html>"
|
|
||||||
|
|
||||||
' URL-encoding für Betreff und Inhalt der E-Mail
|
Dim psi As New ProcessStartInfo(mailtoUri)
|
||||||
'Dim encodedSubject As String = Uri.EscapeDataString(subject)
|
psi.UseShellExecute = True
|
||||||
'Dim encodedBody As String = Uri.EscapeDataString(body)
|
|
||||||
|
|
||||||
' mailto-Link erstellen
|
|
||||||
Dim mailtoLink As String = $"{mailto}?subject={subject}&body={body}"
|
|
||||||
Try
|
Try
|
||||||
Process.Start(mailtoLink)
|
Process.Start(psi)
|
||||||
Catch ex1 As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex1.Message, MsgBoxStyle.Critical, Text)
|
MessageBox.Show("Error in creating mailto-Object: " & ex.Message)
|
||||||
End Try
|
End Try
|
||||||
' E-Mail-Client öffnen
|
|
||||||
|
|
||||||
|
|
||||||
Process.Start($"mailto:{oReceiver.Email}?subject={oEnvelopeTitle}")
|
|
||||||
Else
|
Else
|
||||||
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
|
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
|
||||||
End If
|
End If
|
||||||
@@ -572,7 +596,7 @@ Public Class frmMain
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem2.ItemClick
|
Private Sub BarButtonItem2_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm_ResendInvitation.ItemClick
|
||||||
Dim oView As GridView = GridEnvelopes.FocusedView
|
Dim oView As GridView = GridEnvelopes.FocusedView
|
||||||
Dim selReceiver As EnvelopeReceiver
|
Dim selReceiver As EnvelopeReceiver
|
||||||
If oView.Name = ViewReceivers.Name Then
|
If oView.Name = ViewReceivers.Name Then
|
||||||
@@ -616,7 +640,9 @@ Public Class frmMain
|
|||||||
If SQL_REP_ENV_USER_TM <> String.Empty Then
|
If SQL_REP_ENV_USER_TM <> String.Empty Then
|
||||||
Result_Execute(SQL_REP_ENV_USER_TM)
|
Result_Execute(SQL_REP_ENV_USER_TM)
|
||||||
Else
|
Else
|
||||||
|
|
||||||
GridControlData.DataSource = Nothing
|
GridControlData.DataSource = Nothing
|
||||||
|
GridViewData.Columns.Clear()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -647,7 +673,9 @@ Public Class frmMain
|
|||||||
Try
|
Try
|
||||||
Dim oDT As DataTable = DB_DD_ECM.GetDatatable(mySQL)
|
Dim oDT As DataTable = DB_DD_ECM.GetDatatable(mySQL)
|
||||||
If Not IsNothing(oDT) Then
|
If Not IsNothing(oDT) Then
|
||||||
|
If GridViewData.Columns.Count > 0 Then
|
||||||
|
GridViewData.Columns.Clear()
|
||||||
|
End If
|
||||||
GridControlData.DataSource = oDT
|
GridControlData.DataSource = oDT
|
||||||
Else
|
Else
|
||||||
GridControlData.DataSource = Nothing
|
GridControlData.DataSource = Nothing
|
||||||
@@ -657,7 +685,7 @@ Public Class frmMain
|
|||||||
End Try
|
End Try
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub LabelControl1_Click(sender As Object, e As EventArgs) Handles LabelControl1.Click
|
Private Sub LabelControl1_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -729,4 +757,79 @@ Public Class frmMain
|
|||||||
Public Shared Sub Save_Logfiles()
|
Public Shared Sub Save_Logfiles()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnEvvallUs_thismonth_Click(sender As Object, e As EventArgs) Handles btnEvvallUs_thismonth.Click
|
||||||
|
If SQL_REP_ENV_ALL_USER_MONTH <> String.Empty Then
|
||||||
|
Result_Execute(SQL_REP_ENV_ALL_USER_MONTH)
|
||||||
|
Else
|
||||||
|
GridControlData.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnEvvallUs_lastmonth_Click(sender As Object, e As EventArgs) Handles btnEvvallUs_lastmonth.Click
|
||||||
|
If SQL_REP_ENV_ALL_USER_LAST_MONTH <> String.Empty Then
|
||||||
|
Result_Execute(SQL_REP_ENV_ALL_USER_LAST_MONTH)
|
||||||
|
Else
|
||||||
|
GridControlData.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub bbtnitm2Faktor_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm2Faktor.ItemClick
|
||||||
|
If ViewEnvelopes.FocusedRowHandle < 0 Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim oEnvelope As Envelope = ViewEnvelopes.GetRow(ViewEnvelopes.FocusedRowHandle)
|
||||||
|
Dim oView As GridView = GridEnvelopes.FocusedView
|
||||||
|
If oView.Name = ViewReceivers.Name Then
|
||||||
|
Dim oReceiver As EnvelopeReceiver = oView.GetRow(oView.FocusedRowHandle)
|
||||||
|
Dim oEnvelopeTitle As String = Net.WebUtility.UrlEncode(oEnvelope.Title)
|
||||||
|
Dim oDT As DataTable = DB_DD_ECM.GetDatatable($"SELECT * FROM TBSIG_RECEIVER WHERE EMAIL_ADDRESS = '{oReceiver.Email}'")
|
||||||
|
If Not IsNothing(oDT) Then
|
||||||
|
If oDT.Rows.Count = 1 Then
|
||||||
|
Dim oTFA_REG_DL = oDT.Rows(0).Item("TFA_REG_DEADLINE")
|
||||||
|
Dim oTOTP = oDT.Rows(0).Item("TOTP_SECRET_KEY")
|
||||||
|
Dim oForm As New frm2Factor_Properties(oReceiver.Email, oTOTP, oTFA_REG_DL, DB_DD_ECM)
|
||||||
|
oForm.ShowDialog()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
MsgBox(Resources.Envelope.Please_select_a_recipient_from_the_Recipients_tab, MsgBoxStyle.Information, Text)
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
|
||||||
|
If txtEnvID.Text = String.Empty Then
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
Dim EnvelopeModel As EnvelopeModel
|
||||||
|
Dim oState = GetState()
|
||||||
|
EnvelopeModel = New EnvelopeModel(oState)
|
||||||
|
|
||||||
|
Dim oEnvelope = EnvelopeModel.GetById(txtEnvID.Text)
|
||||||
|
Dim oMailToCreator = oEnvelope.FinalEmailToCreator
|
||||||
|
Dim oMailToReceivers = oEnvelope.FinalEmailToReceivers
|
||||||
|
|
||||||
|
If oMailToCreator <> FinalEmailType.No Then
|
||||||
|
MsgBox("Finale email an Creator könnten/würden gesendet werden!")
|
||||||
|
Else
|
||||||
|
MsgBox("Finale email an Creator könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToCreator - oMailToCreator [{oMailToCreator}] <> [{FinalEmailType.No}]")
|
||||||
|
End If
|
||||||
|
|
||||||
|
If oMailToReceivers <> FinalEmailType.No Then
|
||||||
|
MsgBox("Finale email an Unterzeichner könnten/würden gesendet werden!")
|
||||||
|
Else
|
||||||
|
MsgBox("Finale email an Unterzeichner könnte/würde nicht erzeugt werden!" & vbNewLine & $"No SendFinalEmailToReceivers - oMailToReceivers [{oMailToReceivers}] <> [{FinalEmailType.No}]")
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
Private Function GetState() As State
|
||||||
|
Return New State With {
|
||||||
|
.LogConfig = LogConfig,
|
||||||
|
.UserId = 0,
|
||||||
|
.Database = DB_DD_ECM,
|
||||||
|
.Config = Nothing,
|
||||||
|
.DbConfig = Nothing
|
||||||
|
}
|
||||||
|
End Function
|
||||||
End Class
|
End Class
|
||||||
62
EnvelopeGenerator.Form/frmRueckruf.Designer.vb
generated
62
EnvelopeGenerator.Form/frmRueckruf.Designer.vb
generated
@@ -30,13 +30,17 @@ Partial Class frmRueckruf
|
|||||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||||
Me.tsstatus = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.tsstatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.Label3 = New System.Windows.Forms.Label()
|
||||||
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
|
Me.lblID = New System.Windows.Forms.Label()
|
||||||
|
Me.lblTitle = New System.Windows.Forms.Label()
|
||||||
Me.StatusStrip1.SuspendLayout()
|
Me.StatusStrip1.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'Label2
|
'Label2
|
||||||
'
|
'
|
||||||
Me.Label2.AutoSize = True
|
Me.Label2.AutoSize = True
|
||||||
Me.Label2.Location = New System.Drawing.Point(22, 20)
|
Me.Label2.Location = New System.Drawing.Point(28, 36)
|
||||||
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||||
Me.Label2.Name = "Label2"
|
Me.Label2.Name = "Label2"
|
||||||
Me.Label2.Size = New System.Drawing.Size(380, 16)
|
Me.Label2.Size = New System.Drawing.Size(380, 16)
|
||||||
@@ -46,7 +50,7 @@ Partial Class frmRueckruf
|
|||||||
'txtReason
|
'txtReason
|
||||||
'
|
'
|
||||||
Me.txtReason.AcceptsReturn = True
|
Me.txtReason.AcceptsReturn = True
|
||||||
Me.txtReason.Location = New System.Drawing.Point(25, 40)
|
Me.txtReason.Location = New System.Drawing.Point(31, 56)
|
||||||
Me.txtReason.Margin = New System.Windows.Forms.Padding(4)
|
Me.txtReason.Margin = New System.Windows.Forms.Padding(4)
|
||||||
Me.txtReason.Multiline = True
|
Me.txtReason.Multiline = True
|
||||||
Me.txtReason.Name = "txtReason"
|
Me.txtReason.Name = "txtReason"
|
||||||
@@ -66,7 +70,7 @@ Partial Class frmRueckruf
|
|||||||
'
|
'
|
||||||
Me.btnCancel.Image = CType(resources.GetObject("btnCancel.Image"), System.Drawing.Image)
|
Me.btnCancel.Image = CType(resources.GetObject("btnCancel.Image"), System.Drawing.Image)
|
||||||
Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.btnCancel.Location = New System.Drawing.Point(251, 134)
|
Me.btnCancel.Location = New System.Drawing.Point(260, 150)
|
||||||
Me.btnCancel.Name = "btnCancel"
|
Me.btnCancel.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(203, 44)
|
Me.btnCancel.Size = New System.Drawing.Size(203, 44)
|
||||||
Me.btnCancel.TabIndex = 4
|
Me.btnCancel.TabIndex = 4
|
||||||
@@ -76,7 +80,7 @@ Partial Class frmRueckruf
|
|||||||
'StatusStrip1
|
'StatusStrip1
|
||||||
'
|
'
|
||||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsstatus})
|
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsstatus})
|
||||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 185)
|
Me.StatusStrip1.Location = New System.Drawing.Point(0, 211)
|
||||||
Me.StatusStrip1.Name = "StatusStrip1"
|
Me.StatusStrip1.Name = "StatusStrip1"
|
||||||
Me.StatusStrip1.Size = New System.Drawing.Size(488, 22)
|
Me.StatusStrip1.Size = New System.Drawing.Size(488, 22)
|
||||||
Me.StatusStrip1.TabIndex = 5
|
Me.StatusStrip1.TabIndex = 5
|
||||||
@@ -90,17 +94,59 @@ Partial Class frmRueckruf
|
|||||||
'SimpleButton1
|
'SimpleButton1
|
||||||
'
|
'
|
||||||
Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.SimpleButton1.Location = New System.Drawing.Point(25, 134)
|
Me.SimpleButton1.Location = New System.Drawing.Point(31, 150)
|
||||||
Me.SimpleButton1.Name = "SimpleButton1"
|
Me.SimpleButton1.Name = "SimpleButton1"
|
||||||
Me.SimpleButton1.Size = New System.Drawing.Size(220, 44)
|
Me.SimpleButton1.Size = New System.Drawing.Size(220, 44)
|
||||||
Me.SimpleButton1.TabIndex = 6
|
Me.SimpleButton1.TabIndex = 6
|
||||||
Me.SimpleButton1.Text = "Umschlag zurückrufen"
|
Me.SimpleButton1.Text = "Umschlag zurückrufen"
|
||||||
'
|
'
|
||||||
|
'Label3
|
||||||
|
'
|
||||||
|
Me.Label3.AutoSize = True
|
||||||
|
Me.Label3.Location = New System.Drawing.Point(28, 9)
|
||||||
|
Me.Label3.Name = "Label3"
|
||||||
|
Me.Label3.Size = New System.Drawing.Size(80, 16)
|
||||||
|
Me.Label3.TabIndex = 7
|
||||||
|
Me.Label3.Text = "Envelope-ID:"
|
||||||
|
'
|
||||||
|
'Label4
|
||||||
|
'
|
||||||
|
Me.Label4.AutoSize = True
|
||||||
|
Me.Label4.Location = New System.Drawing.Point(158, 9)
|
||||||
|
Me.Label4.Name = "Label4"
|
||||||
|
Me.Label4.Size = New System.Drawing.Size(93, 16)
|
||||||
|
Me.Label4.TabIndex = 8
|
||||||
|
Me.Label4.Text = "Envelope-Titel:"
|
||||||
|
'
|
||||||
|
'lblID
|
||||||
|
'
|
||||||
|
Me.lblID.AutoSize = True
|
||||||
|
Me.lblID.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.lblID.Location = New System.Drawing.Point(108, 9)
|
||||||
|
Me.lblID.Name = "lblID"
|
||||||
|
Me.lblID.Size = New System.Drawing.Size(49, 16)
|
||||||
|
Me.lblID.TabIndex = 9
|
||||||
|
Me.lblID.Text = "Label5"
|
||||||
|
'
|
||||||
|
'lblTitle
|
||||||
|
'
|
||||||
|
Me.lblTitle.AutoSize = True
|
||||||
|
Me.lblTitle.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.lblTitle.Location = New System.Drawing.Point(257, 9)
|
||||||
|
Me.lblTitle.Name = "lblTitle"
|
||||||
|
Me.lblTitle.Size = New System.Drawing.Size(49, 16)
|
||||||
|
Me.lblTitle.TabIndex = 10
|
||||||
|
Me.lblTitle.Text = "Label5"
|
||||||
|
'
|
||||||
'frmRueckruf
|
'frmRueckruf
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(488, 207)
|
Me.ClientSize = New System.Drawing.Size(488, 233)
|
||||||
|
Me.Controls.Add(Me.lblTitle)
|
||||||
|
Me.Controls.Add(Me.lblID)
|
||||||
|
Me.Controls.Add(Me.Label4)
|
||||||
|
Me.Controls.Add(Me.Label3)
|
||||||
Me.Controls.Add(Me.SimpleButton1)
|
Me.Controls.Add(Me.SimpleButton1)
|
||||||
Me.Controls.Add(Me.StatusStrip1)
|
Me.Controls.Add(Me.StatusStrip1)
|
||||||
Me.Controls.Add(Me.btnCancel)
|
Me.Controls.Add(Me.btnCancel)
|
||||||
@@ -129,4 +175,8 @@ Partial Class frmRueckruf
|
|||||||
Friend WithEvents StatusStrip1 As StatusStrip
|
Friend WithEvents StatusStrip1 As StatusStrip
|
||||||
Friend WithEvents tsstatus As ToolStripStatusLabel
|
Friend WithEvents tsstatus As ToolStripStatusLabel
|
||||||
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents Label3 As Label
|
||||||
|
Friend WithEvents Label4 As Label
|
||||||
|
Friend WithEvents lblID As Label
|
||||||
|
Friend WithEvents lblTitle As Label
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<data name="btnCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
wQAADsEBuJFr7QAAAUlJREFUOE+lU6GOg1AQ5BP6Cf2E+4QLnqQWV4EHjUJhGzxJJbICDxpFQvCHg4DA
|
wAAADsABataJCQAAAUlJREFUOE+lU6GOg1AQ5BP6Cf2E+4QLnqQWV4EHjUJhGzxJJbICDxpFQvCHg4DA
|
||||||
Yd/tLPvK4wJ34iaZ9GVndxh4WwtYluVCfBIVcSYGLPwA1SPp0bxpIaiqSjmOw2zbdhMJdL4S6yzLlG3b
|
Yd/tLPvK4wJ34iaZ9GVndxh4WwtYluVCfBIVcSYGLPwA1SPp0bxpIaiqSjmOw2zbdhMJdL4S6yzLlG3b
|
||||||
qigK6JHI3FCmacoi6HmeGscRSZAswDmOY9bQR7WXjK5AExJoAzBJEjTOXdexIWowoVpNvMjoChQg5Hm+
|
qigK6JHI3FCmacoi6HmeGscRSZAswDmOY9bQR7WXjK5AExJoAzBJEjTOXdexIWowoVpNvMjoChQg5Hm+
|
||||||
M8HT8Eo4G6muMrbHmQkIk2ma8PRPaT8G3Ikc1TSAKdWf0nYMGT5M4Lrun/E/iDM+nDlofgPf9/kDysgG
|
M8HT8Eo4G6muMrbHmQkIk2ma8PRPaT8G3Ikc1TSAKdWf0nYMGT5M4Lrun/E/iDM+nDlofgPf9/kDysgG
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Public Class frmRueckruf
|
|||||||
txtReason.Text = ""
|
txtReason.Text = ""
|
||||||
tsstatus.Text = ""
|
tsstatus.Text = ""
|
||||||
Continue_Reject = False
|
Continue_Reject = False
|
||||||
|
lblID.Text = CurrentEnvelopID.ToString
|
||||||
|
lblTitle.Text = CurrentEnvelopetitle
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||||
@@ -50,4 +52,8 @@ Public Class frmRueckruf
|
|||||||
tsstatus.Text = "Please add a reason for aborting - " & Now
|
tsstatus.Text = "Please add a reason for aborting - " & Now
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -121,7 +121,7 @@
|
|||||||
<data name="PictureEdit1.EditValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="PictureEdit1.EditValue" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAAyAAAADICAYAAAAQj4UaAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
iVBORw0KGgoAAAANSUhEUgAAAyAAAADICAYAAAAQj4UaAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAL
|
||||||
DQAACw0B7QfALAAASudJREFUeF7tvWusZNd5nukfcpSOmmre3Wp2s3lrdpNUk01RPxIk6iBBIjFxMBPZ
|
DAAACwwBP0AiyAAASudJREFUeF7tvWusZNd5nukfcpSOmmre3Wp2s3lrdpNUk01RPxIk6iBBIjFxMBPZ
|
||||||
DGxLEyB2M8ggkegAsSRElikHEsnBJFZrRjZtxZIpZaIZRy2AloGxrAHIRKIQRIqVGJ6AsJEAAwgDOzNJ
|
DGxLEyB2M8ggkegAsSRElikHEsnBJFZrRjZtxZIpZaIZRy2AloGxrAHIRKIQRIqVGJ6AsJEAAwgDOzNJ
|
||||||
HCBSLsqfynmq+HV9tepd+1KnLnufen88OKf2rfa67HPed3/rW+t7PnffoxNjjDHGGLNb/n4L/9t9l6b8
|
HCBSLsqfynmq+HV9tepd+1KnLnufen88OKf2rfa67HPed3/rW+t7PnffoxNjjDHGGLNb/n4L/9t9l6b8
|
||||||
vXsX+ewBn1ngkSkvCH79hy9NXr5yafKbz1yavHr10uRfv/jo5Pe//Ohk8uoMfmcb+ziGYznnc4/q663C
|
vXsX+ewBn1ngkSkvCH79hy9NXr5yafKbz1yavHr10uRfv/jo5Pe//Ohk8uoMfmcb+ziGYznnc4/q663C
|
||||||
|
|||||||
@@ -88,6 +88,10 @@ Public Class frmSplashScreen
|
|||||||
SQL_REP_ENV_USER_Y = oROW.Item("SQL_COMMAND")
|
SQL_REP_ENV_USER_Y = oROW.Item("SQL_COMMAND")
|
||||||
ElseIf oROW.Item("TITLE") = "REPORT ENV USER ALL" Then
|
ElseIf oROW.Item("TITLE") = "REPORT ENV USER ALL" Then
|
||||||
SQL_REP_ENV_USER_ALL = oROW.Item("SQL_COMMAND")
|
SQL_REP_ENV_USER_ALL = oROW.Item("SQL_COMMAND")
|
||||||
|
ElseIf oROW.Item("TITLE") = "REPORT ENV ALL_USER_THIS_MONTH" Then
|
||||||
|
SQL_REP_ENV_ALL_USER_MONTH = oROW.Item("SQL_COMMAND")
|
||||||
|
ElseIf oROW.Item("TITLE") = "REPORT ENV ALL_USER_LAST_MONTH" Then
|
||||||
|
SQL_REP_ENV_ALL_USER_LAST_MONTH = oROW.Item("SQL_COMMAND")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -1,201 +1,142 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Abstractions.Application;
|
||||||
using DigitalData.UserManager.Application.Contracts;
|
using DigitalData.UserManager.Application.Contracts;
|
||||||
using DigitalData.UserManager.Application.DTOs.User;
|
|
||||||
using Microsoft.AspNetCore.Authentication.Cookies;
|
using Microsoft.AspNetCore.Authentication.Cookies;
|
||||||
using Microsoft.AspNetCore.Authentication;
|
using Microsoft.AspNetCore.Authentication;
|
||||||
using Microsoft.AspNetCore.Mvc;
|
using Microsoft.AspNetCore.Mvc;
|
||||||
using System.Security.Claims;
|
|
||||||
using DigitalData.UserManager.Application.DTOs.Auth;
|
|
||||||
using Microsoft.AspNetCore.Authorization;
|
using Microsoft.AspNetCore.Authorization;
|
||||||
using EnvelopeGenerator.GeneratorAPI.Models;
|
using EnvelopeGenerator.GeneratorAPI.Models;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.GeneratorAPI.Controllers
|
namespace EnvelopeGenerator.GeneratorAPI.Controllers;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Controller verantwortlich für die Benutzer-Authentifizierung, einschließlich Anmelden, Abmelden und Überprüfung des Authentifizierungsstatus.
|
||||||
|
/// </summary>
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public partial class AuthController : ControllerBase
|
||||||
{
|
{
|
||||||
|
private readonly ILogger<AuthController> _logger;
|
||||||
|
private readonly IUserService _userService;
|
||||||
|
private readonly IDirectorySearchService _dirSearchService;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Controller verantwortlich für die Benutzer-Authentifizierung, einschließlich Anmelden, Abmelden und Überprüfung des Authentifizierungsstatus.
|
/// Initializes a new instance of the <see cref="AuthController"/> class.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
[Route("api/[controller]")]
|
/// <param name="logger">The logger instance.</param>
|
||||||
[ApiController]
|
/// <param name="userService">The user service instance.</param>
|
||||||
public partial class AuthController : ControllerBase
|
/// <param name="dirSearchService">The directory search service instance.</param>
|
||||||
|
public AuthController(ILogger<AuthController> logger, IUserService userService, IDirectorySearchService dirSearchService)
|
||||||
{
|
{
|
||||||
private readonly ILogger<AuthController> _logger;
|
_logger = logger;
|
||||||
private readonly IUserService _userService;
|
_userService = userService;
|
||||||
private readonly IDirectorySearchService _dirSearchService;
|
_dirSearchService = dirSearchService;
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Initializes a new instance of the <see cref="AuthController"/> class.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="logger">The logger instance.</param>
|
|
||||||
/// <param name="userService">The user service instance.</param>
|
|
||||||
/// <param name="dirSearchService">The directory search service instance.</param>
|
|
||||||
public AuthController(ILogger<AuthController> logger, IUserService userService, IDirectorySearchService dirSearchService)
|
|
||||||
{
|
|
||||||
_logger = logger;
|
|
||||||
_userService = userService;
|
|
||||||
_dirSearchService = dirSearchService;
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Authentifiziert einen Benutzer und generiert ein JWT-Token. Wenn 'cookie' wahr ist, wird das Token als HTTP-Only-Cookie zurückgegeben.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="login">Benutzeranmeldedaten (Benutzername und Passwort).</param>
|
|
||||||
/// <param name="cookie">Wenn wahr, wird das JWT-Token auch als HTTP-Only-Cookie gesendet.</param>
|
|
||||||
/// <returns>
|
|
||||||
/// Gibt eine HTTP 200 oder 401.
|
|
||||||
/// </returns>
|
|
||||||
/// <remarks>
|
|
||||||
/// Sample request:
|
|
||||||
///
|
|
||||||
/// POST /api/auth?cookie=true
|
|
||||||
/// {
|
|
||||||
/// "username": "MaxMustermann",
|
|
||||||
/// "password": "Geheim123!"
|
|
||||||
/// }
|
|
||||||
///
|
|
||||||
/// POST /api/auth?cookie=true
|
|
||||||
/// {
|
|
||||||
/// "id": "1",
|
|
||||||
/// "password": "Geheim123!"
|
|
||||||
/// }
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
|
||||||
/// <response code="401">Unbefugt. Ungültiger Benutzername oder Passwort.</response>
|
|
||||||
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
|
||||||
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
|
||||||
[AllowAnonymous]
|
|
||||||
[HttpPost]
|
|
||||||
public async Task<IActionResult> Login([FromBody] Login login, [FromQuery] bool cookie = false)
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
bool isValid = _dirSearchService.ValidateCredentials(login.Username, login.Password);
|
|
||||||
|
|
||||||
if (!isValid)
|
|
||||||
return Unauthorized();
|
|
||||||
|
|
||||||
//find the user
|
|
||||||
var uRes = await _userService.ReadByUsernameAsync(login.Username);
|
|
||||||
if (!uRes.IsSuccess || uRes.Data is null)
|
|
||||||
{
|
|
||||||
return Forbid();
|
|
||||||
}
|
|
||||||
|
|
||||||
UserReadDto user = uRes.Data;
|
|
||||||
|
|
||||||
// Create claims
|
|
||||||
var claims = new List<Claim>
|
|
||||||
{
|
|
||||||
new (ClaimTypes.NameIdentifier, user.Id.ToString()),
|
|
||||||
new (ClaimTypes.Name, user.Username),
|
|
||||||
new (ClaimTypes.Surname, user.Name!),
|
|
||||||
new (ClaimTypes.GivenName, user.Prename!),
|
|
||||||
new (ClaimTypes.Email, user.Email!),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Create claimsIdentity
|
|
||||||
var claimsIdentity = new ClaimsIdentity(claims, CookieAuthenticationDefaults.AuthenticationScheme);
|
|
||||||
|
|
||||||
// Create authProperties
|
|
||||||
var authProperties = new AuthenticationProperties
|
|
||||||
{
|
|
||||||
IsPersistent = true,
|
|
||||||
AllowRefresh = true,
|
|
||||||
ExpiresUtc = DateTime.Now.AddMinutes(180)
|
|
||||||
};
|
|
||||||
|
|
||||||
// Sign in
|
|
||||||
await HttpContext.SignInAsync(
|
|
||||||
CookieAuthenticationDefaults.AuthenticationScheme,
|
|
||||||
new ClaimsPrincipal(claimsIdentity),
|
|
||||||
authProperties);
|
|
||||||
|
|
||||||
return Ok();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Unexpected error occurred.\n{ErrorMessage}", ex.Message);
|
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Authentifiziert einen Benutzer und generiert ein JWT-Token. Das Token wird als HTTP-only-Cookie zurückgegeben.
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="login">Benutzeranmeldedaten (Benutzername und Passwort).</param>
|
|
||||||
/// <returns>
|
|
||||||
/// Gibt eine HTTP 200 oder 401.
|
|
||||||
/// </returns>
|
|
||||||
/// <remarks>
|
|
||||||
/// Sample request:
|
|
||||||
///
|
|
||||||
/// POST /api/auth/form
|
|
||||||
/// {
|
|
||||||
/// "username": "MaxMustermann",
|
|
||||||
/// "password": "Geheim123!"
|
|
||||||
/// }
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
|
||||||
/// <response code="401">Unbefugt. Ungültiger Benutzername oder Passwort.</response>
|
|
||||||
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
|
||||||
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
|
||||||
[AllowAnonymous]
|
|
||||||
[HttpPost]
|
|
||||||
[Route("form")]
|
|
||||||
public async Task<IActionResult> Login([FromForm] Login login)
|
|
||||||
{
|
|
||||||
return await Login(login, true);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Entfernt das Authentifizierungs-Cookie des Benutzers (AuthCookie)
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>
|
|
||||||
/// Gibt eine HTTP 200 oder 401.
|
|
||||||
/// </returns>
|
|
||||||
/// <remarks>
|
|
||||||
/// Sample request:
|
|
||||||
///
|
|
||||||
/// POST /api/auth/logout
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// <response code="200">Erfolgreich gelöscht, wenn der Benutzer ein berechtigtes Cookie hat.</response>
|
|
||||||
/// <response code="401">Wenn es kein zugelassenes Cookie gibt, wird „nicht zugelassen“ zurückgegeben.</response>
|
|
||||||
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
|
||||||
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
|
||||||
[Authorize]
|
|
||||||
[HttpPost("logout")]
|
|
||||||
public async Task<IActionResult> Logout()
|
|
||||||
{
|
|
||||||
try
|
|
||||||
{
|
|
||||||
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
|
||||||
return Ok();
|
|
||||||
}
|
|
||||||
catch (Exception ex)
|
|
||||||
{
|
|
||||||
_logger.LogError(ex, "Unexpected error occurred.\n{ErrorMessage}", ex.Message);
|
|
||||||
return StatusCode(StatusCodes.Status500InternalServerError);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// Prüft, ob der Benutzer ein autorisiertes Token hat.
|
|
||||||
/// </summary>
|
|
||||||
/// <returns>Wenn ein autorisiertes Token vorhanden ist HTTP 200 asynchron 401</returns>
|
|
||||||
/// <remarks>
|
|
||||||
/// Sample request:
|
|
||||||
///
|
|
||||||
/// GET /api/auth
|
|
||||||
///
|
|
||||||
/// </remarks>
|
|
||||||
/// <response code="200">Wenn es einen autorisierten Cookie gibt.</response>
|
|
||||||
/// <response code="401">Wenn kein Cookie vorhanden ist oder nicht autorisierte.</response>
|
|
||||||
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
|
||||||
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
|
||||||
[Authorize]
|
|
||||||
[HttpGet]
|
|
||||||
public IActionResult IsAuthenticated() => Ok();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Authentifiziert einen Benutzer und generiert ein JWT-Token. Wenn 'cookie' wahr ist, wird das Token als HTTP-Only-Cookie zurückgegeben.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="login">Benutzeranmeldedaten (Benutzername und Passwort).</param>
|
||||||
|
/// <param name="cookie">Wenn wahr, wird das JWT-Token auch als HTTP-Only-Cookie gesendet.</param>
|
||||||
|
/// <returns>
|
||||||
|
/// Gibt eine HTTP 200 oder 401.
|
||||||
|
/// </returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// Sample request:
|
||||||
|
///
|
||||||
|
/// POST /api/auth?cookie=true
|
||||||
|
/// {
|
||||||
|
/// "username": "MaxMustermann",
|
||||||
|
/// "password": "Geheim123!"
|
||||||
|
/// }
|
||||||
|
///
|
||||||
|
/// POST /api/auth?cookie=true
|
||||||
|
/// {
|
||||||
|
/// "id": "1",
|
||||||
|
/// "password": "Geheim123!"
|
||||||
|
/// }
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
||||||
|
/// <response code="401">Unbefugt. Ungültiger Benutzername oder Passwort.</response>
|
||||||
|
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
||||||
|
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
||||||
|
[AllowAnonymous]
|
||||||
|
[HttpPost]
|
||||||
|
public Task<IActionResult> Login([FromBody] Login login, [FromQuery] bool cookie = false)
|
||||||
|
{
|
||||||
|
// added to configure open API (swagger and scalar)
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Authentifiziert einen Benutzer und generiert ein JWT-Token. Das Token wird als HTTP-only-Cookie zurückgegeben.
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="login">Benutzeranmeldedaten (Benutzername und Passwort).</param>
|
||||||
|
/// <returns>
|
||||||
|
/// Gibt eine HTTP 200 oder 401.
|
||||||
|
/// </returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// Sample request:
|
||||||
|
///
|
||||||
|
/// POST /api/auth/form
|
||||||
|
/// {
|
||||||
|
/// "username": "MaxMustermann",
|
||||||
|
/// "password": "Geheim123!"
|
||||||
|
/// }
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <response code="200">Erfolgreiche Anmeldung. Gibt das JWT-Token im Antwortkörper oder als Cookie zurück, wenn 'cookie' wahr ist.</response>
|
||||||
|
/// <response code="401">Unbefugt. Ungültiger Benutzername oder Passwort.</response>
|
||||||
|
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
||||||
|
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
||||||
|
[AllowAnonymous]
|
||||||
|
[HttpPost]
|
||||||
|
[Route("form")]
|
||||||
|
public Task<IActionResult> Login([FromForm] Login login)
|
||||||
|
{
|
||||||
|
// added to configure open API (swagger and scalar)
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Entfernt das Authentifizierungs-Cookie des Benutzers (AuthCookie)
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>
|
||||||
|
/// Gibt eine HTTP 200 oder 401.
|
||||||
|
/// </returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// Sample request:
|
||||||
|
///
|
||||||
|
/// POST /api/auth/logout
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <response code="200">Erfolgreich gelöscht, wenn der Benutzer ein berechtigtes Cookie hat.</response>
|
||||||
|
/// <response code="401">Wenn es kein zugelassenes Cookie gibt, wird „nicht zugelassen“ zurückgegeben.</response>
|
||||||
|
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
||||||
|
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
||||||
|
[Authorize]
|
||||||
|
[HttpPost("logout")]
|
||||||
|
public async Task<IActionResult> Logout()
|
||||||
|
{
|
||||||
|
await HttpContext.SignOutAsync(CookieAuthenticationDefaults.AuthenticationScheme);
|
||||||
|
return Ok();
|
||||||
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Prüft, ob der Benutzer ein autorisiertes Token hat.
|
||||||
|
/// </summary>
|
||||||
|
/// <returns>Wenn ein autorisiertes Token vorhanden ist HTTP 200 asynchron 401</returns>
|
||||||
|
/// <remarks>
|
||||||
|
/// Sample request:
|
||||||
|
///
|
||||||
|
/// GET /api/auth
|
||||||
|
///
|
||||||
|
/// </remarks>
|
||||||
|
/// <response code="200">Wenn es einen autorisierten Cookie gibt.</response>
|
||||||
|
/// <response code="401">Wenn kein Cookie vorhanden ist oder nicht autorisierte.</response>
|
||||||
|
[ProducesResponseType(typeof(string), StatusCodes.Status200OK, "text/javascript")]
|
||||||
|
[ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)]
|
||||||
|
[Authorize]
|
||||||
|
[HttpGet]
|
||||||
|
public IActionResult IsAuthenticated() => Ok();
|
||||||
}
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user