Compare commits

...

311 Commits

Author SHA1 Message Date
Developer 02
dd7454d38e feat: Separate CSS for Cursor company created
Eine separate CSS-Datei für das Unternehmen Cursor wurde erstellt. Die site.css wurde angepasst, um das Layout entsprechend dem Cursor-Logo responsiv zu gestalten.
2024-09-17 10:14:34 +02:00
Developer 02
f7c3ed280a merge: Master-Branch integriert 2024-09-17 00:52:34 +02:00
Developer 02
9ffeb7afe8 feat: UI für die Dokumentenunterzeichnungsseite verbessert
- Layout modernisiert und responsiver gestaltet.
- Button-Stile und Farbschemata aktualisiert.
- Verbesserte Ausrichtung von Text und Symbolen für mehr visuelle Klarheit.
- Fokus auf die Verbesserung der Benutzererfahrung beim Unterzeichnen von Dokumenten.
2024-09-17 00:38:37 +02:00
Developer 02
a83994af43 feat: Google Fonts und Google Icons hinzugefügt; CSP-Anpassungen vorgenommen
- Google Fonts und Google Icons in das Projekt integriert.
- Content Security Policy (CSP) aktualisiert, um die Nutzung von Google Fonts und Google Icons zu ermöglichen.
2024-09-16 15:19:56 +02:00
Developer 02
8345034fcd refactor: Logo aktualisieren 2024-09-16 14:31:18 +02:00
Developer 02
a763d3c353 feat: Mehrsprachige Unterstützung für den Header hinzugefügt 2024-09-16 14:04:34 +02:00
Developer 02
5ba5d2755b feat: EnvelopeLocked Seite anpassen und Stile für Firmenbranding aktualisieren
- Die Datei `EnvelopeLocked.cshtml` wurde aktualisiert, um eine neue Willkommensnachricht, ein Logo und ein benutzerdefiniertes Kopfzeilen-Layout für das eSign-Portal aufzunehmen.
- Aktualisierungen der Lokalisierung hinzugefügt, um die korrekte Anzeige der ausgewählten Sprache und Flagge zu gewährleisten.
- Das Layout und die Abstände wurden angepasst, um besser mit den unternehmensspezifischen Designanforderungen übereinzustimmen.
- Modifizierte `site.css` für benutzerdefinierte Schaltflächenstile, Seitenlayout und fügte unternehmensspezifische Farben für die Markenkonsistenz hinzu.
2024-09-16 13:51:07 +02:00
Developer 02
8629599f86 fix: aktualisiere TestReceiverController zur Verwendung von CRUDControllerBase und entferne unnötige Pakete
- Ersetze TestControllerBase durch CRUDControllerBase im TestReceiverController
- Aktualisiere generische Typen auf ReceiverCreateDto, ReceiverReadDto und ReceiverUpdateDto
- Entferne nicht benötigte Pakete aus dem Projekt
2024-08-29 16:42:48 +02:00
Developer 02
d166ae5a8b Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-08-29 15:48:53 +02:00
Developer 02
145d139e3a fix(auth): Aktualisierung der Authentifizierungsstatusbehandlung
- Methode `logInOut` aktualisiert, um nach dem Logout zu `/login` zu navigieren.
- Methoden `login` und `logout` angepasst, um `#IsAuthenticated` basierend auf der Antwort zu aktualisieren.
- Sicherstellung, dass der Authentifizierungsstatus nach Login und Logout korrekt gesetzt wird.
2024-08-29 15:46:20 +02:00
Developer01
d3ce34ee31 MS TryCatchBlock Finalize Documents For Each 2024-08-28 11:14:46 +02:00
Developer01
fd61d4431f Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-08-28 11:14:13 +02:00
Developer 02
93417d1b37 fix: Den Text des Navbar-Brand von "SignFlow" auf "signFlow" geändert, um eine konsistente Gestaltung zu gewährleisten. 2024-08-23 10:58:54 +02:00
Developer 02
ca3ea36a83 chore: Favicon aktualisieren 2024-08-23 10:57:23 +02:00
Developer 02
c59d9bbf57 chore: Favicon aktualisieren 2024-08-23 10:54:13 +02:00
Developer 02
0cf1cd10c0 fix: UUID-Generierung und Typdeklarationsprobleme beheben
- `crypto.randomUUID()` durch `uuid.v4()` ersetzt, um die Kompatibilität über verschiedene Node.js-Versionen hinweg zu verbessern.
- Das `uuid`-Paket installiert und Typdeklarationen mit `@types/uuid` hinzugefügt, um TypeScript-Fehler zu beheben.
- Die Funktion `generateAccessCode` aktualisiert, um die `uuid`-Bibliothek zur UUID-Generierung zu verwenden.
2024-08-23 01:21:38 +02:00
Developer 02
1da73d1754 chore: Client-App-Dateien unter wwwroot aktualisiert
- Client-App-Dateien im Verzeichnis `wwwroot` aktualisiert, um die neuesten Änderungen und Verbesserungen widerzuspiegeln.
2024-08-23 00:57:10 +02:00
Developer 02
24037f8366 feat: Navbar mit zusätzlichem Button und Icons aktualisiert
- Neuer "Umschläge"-Button zur Navbar hinzugefügt, um die Navigation zur Startseite zu erleichtern.
- Icon des "Neuer Umschlag"-Buttons zu "forward_to_inbox" geändert für eine bessere visuelle Darstellung.
2024-08-23 00:51:18 +02:00
Developer 02
91b891513f fix: Platzhaltertext für Dateiupload in der Envelopes-Erstellungstabelle aktualisiert
- Platzhaltertext von "No file uploaded yet." zu "Noch keine Datei hochgeladen." für bessere Lokalisierung geändert.
2024-08-23 00:41:22 +02:00
Developer 02
e7d1f1574f refactor: Komponenten-Namen vereinfacht und Envelopes-Seite der '\' Route zugewiesen
- Komponenten-Namen zur besseren Lesbarkeit vereinfacht
- Envelopes-Seite der '\' Route für einfachere Navigation zugewiesen
2024-08-23 00:37:56 +02:00
Developer 02
80a3a26af8 feat: EnvelopeCreationComponent mit neuen Formularelementen und Datei-Upload-Schritt aktualisiert
- `isLinear` und `titelControl` als @Input-Eigenschaften in `EnvelopeCreationComponent` hinzugefügt
- Datei-Upload-Funktionalität mit visueller Rückmeldung für ausgewählte Dateien implementiert
- Mat-stepper refaktoriert, um den neuen Datei-Upload-Schritt einzubeziehen
- Design durch Hinzufügen von Symbolen zu den 'Weiter'-Buttons in jedem Schritt verbessert
2024-08-23 00:26:09 +02:00
Developer 02
9905ea5a12 feat: Symbole zu den Weiter-Buttons in den Envelope Creation Schritten hinzufügen 2024-08-22 23:10:12 +02:00
Developer 02
a7a77cd491 feat: Zugangscode-Generierung zu ReceiverTableComponent hinzufügen
- `generateAccessCode` Funktion implementiert, um einen eindeutigen Zugangscode zu generieren
- Zugangscode-Generierung in die `receiver_filter` Funktion integriert
- `receiver_filter` aktualisiert, um einen generierten Zugangscode der letzten Zeile zuzuweisen, wenn ein neuer Empfänger hinzugefügt wird
- Dynamisches Zeilenmanagement basierend auf Eingabeveränderungen verbessert
2024-08-22 22:53:29 +02:00
Developer 02
f795b1447f feat: ClearableInputComponent hinzufügen und in ReceiverTableComponent integrieren
- `ClearableInputComponent` erstellt mit einer Löschen-Schaltfläche für Texteingaben
- `ClearableInputComponent` in `ReceiverTableComponent` integriert, um dynamische Eingabefelder zu verwalten
- `receiver-table.component.html` aktualisiert, um `ClearableInputComponent` für das Feld 'Anrede Email' zu verwenden
2024-08-22 22:34:07 +02:00
Developer 02
e5e12bfb61 feat: Löschen-Schaltfläche zur ReceiverInputComponent hinzufügen und Verwaltung der Empfängerdaten aktualisieren
- Löschen-Schaltfläche zur `ReceiverInputComponent` hinzugefügt, um den Texteingang zu leeren
- Logik in `receiver_filter` implementiert, um eine leere Zeile hinzuzufügen, wenn ein neuer Empfänger hinzugefügt wird, und Zeilen zu entfernen, wenn Eingaben gelöscht werden
- Verwaltung der `receiverData` aktualisiert, um dynamische Hinzufügung und Entfernung von Zeilen basierend auf Eingaben zu berücksichtigen
2024-08-22 20:15:03 +02:00
Developer 02
6a8baf08ed feat: ReceiverInputComponent zu ReceiverTableComponent hinzufügen
- `ReceiverInputComponent` für E-Mail-Eingabe mit Autocomplete erstellt
- `ReceiverInputComponent` in `ReceiverTableComponent` integriert
- `ReceiverInputComponent` mit Eingabeoptionen für E-Mail-Adressen konfiguriert
2024-08-22 18:24:09 +02:00
Developer 02
10ac34a9f7 refactor: ReceiverInputComponent in ReceiverTableComponent umbenennen und in das Verzeichnis components verschieben 2024-08-22 17:40:14 +02:00
Developer 02
72af1cc2a2 refactor: nicht verwendete Filtermethode aus der Receiver-Input-Komponente entfernen 2024-08-22 17:18:17 +02:00
Developer 02
cd32ae2a35 feat: neuen Receiver-Input-Komponente mit Autocomplete und Tabellenanzeige hinzufügen
- Implementierung der `ReceiverInputComponent` mit Angular Material Autocomplete und Tabelle
- Abruf und Filterung von E-Mail-Adressen aus `ReceiverService`
- Anzeige des E-Mail-Inputs mit Autocomplete-Optionen und einer Datentabelle
- Integration der `ReceiverInputComponent` in den `envelope-creation` Formularschritt
2024-08-22 17:04:46 +02:00
Developer 02
ddc0c9c6f3 feat: DELETE-Anforderungsmethode zu API-Diensten im Angular-Frontend hinzufügen 2024-08-21 18:13:32 +02:00
Developer 02
489c2a2a9f refactor: Receiver-Update-Endpunkt entfernen durch Überschreiben und Hinzufügen des [NonAction]-Attributs 2024-08-21 18:02:09 +02:00
Developer 02
320e81719b feat: HTTP-Anforderungsdienste mit HttpClient im Frontend implementieren 2024-08-21 17:59:55 +02:00
Developer 02
66a8471f05 refactor: Code in Regionen für entfernte Endpunkte organisieren 2024-08-21 17:16:44 +02:00
Developer 02
c7a4ef4722 fix: Füge try-catch-Blöcke zur Fehlerbehandlung in der Delete-Methode und dem Service hinzu 2024-08-21 17:14:06 +02:00
Developer 02
1673ea81df fix: Füge try-catch-Blöcke zur Fehlerbehandlung in der Delete-Methode und dem Service hinzu 2024-08-21 17:09:16 +02:00
Developer 02
306956a7be feat: Löschen nach E-Mail oder Signatur zur Delete-Methode und zum Service hinzugefügt
- Die `Delete`-Methode im Controller aktualisiert, um das Löschen nach `id`, `emailAddress` oder `signature` zu unterstützen.
- `DeleteByAsync`-Methode im Service hinzugefügt, um Datensätze basierend auf `emailAddress` und `signature` zu löschen.
- Fehlerbehandlung mit Protokollierung für fehlgeschlagene Löschversuche verbessert.
2024-08-21 16:37:54 +02:00
Developer 02
bfe3d38ecc fix: E-Mail-Formatvalidierung zu ReceiverCreateDto hinzugefügt und Modellvalidierung im Create-Methoden behandelt
- `[EmailAddress]`-Attribut auf `EmailAddress` in `ReceiverCreateDto` angewendet, um das E-Mail-Format zu validieren.
- `ModelState.IsValid`-Überprüfung zur `Create`-Methode hinzugefügt, um Validierungsfehler vor dem Aufruf der Basis-`Create`-Methode zu behandeln.
2024-08-21 16:19:18 +02:00
Developer 02
6e5bb58f65 feat: E-Mail-Formatvalidierung in der Receiver-Entität mit [EmailAddress]-Attribut hinzugefügt 2024-08-21 15:10:07 +02:00
Developer 02
b96c6c10f8 feat: Filterung nach emailAddress und signature im Receiver-Repository, -Service und -Controller hinzugefügt
- `ReadBy`-Methode im Receiver-Repository implementiert, um nach `emailAddress` und `signature` zu filtern.
- `ReadByAsync`-Methode im Receiver-Service hinzugefügt, um Receiver-Daten abzurufen und zuzuordnen.
- Controller-`Get`-Endpunkt aktualisiert, um optionale `emailAddress` und `signature` Query-Parameter für die Filterung zu unterstützen.
- Fehlerbehandlung mit Protokollierung für fehlgeschlagene Service-Operationen im Controller hinzugefügt.
2024-08-21 15:05:18 +02:00
Developer 02
afedfdd596 refactor: Receiver-Service in CRUD-Service umgewandelt und DTOs aktualisiert
- Receiver-Service von einfachem CRUD zu generischem CRUD-Service umgewandelt.
- `ReceiverDto` in `ReceiverReadDto` umbenannt.
- Neues `ReceiverCreateDto` mit automatischer SHA-256-Signaturerstellung und aktuellem Zeitstempel erstellt.
- Leeres `ReceiverUpdateDto` für zukünftige Updates hinzugefügt.
2024-08-21 14:37:45 +02:00
Developer 02
3a7099feb4 fix: Füge required-Attribut zu Receiver-Eigenschaften hinzu 2024-08-21 11:29:39 +02:00
Developer 02
c704d222f0 fix: Beseitige Duplikation von formControlName="firstCtrl" 2024-08-21 11:27:17 +02:00
Developer 02
83ce528e2f feat: Füge Eingaben für die Umschlagstabelle und Statusfilteroptionen hinzu
- `data`, `displayedColumns` und `schema` wurden als `@Input`-Eigenschaften für die Umschlagstabelle hinzugefügt.
- `min`, `max` und `ignore` Statusfilter wurden als Objekt-Eingaben für Statusbeschränkungen eingeführt.
- Die Methode `getEnvelopeReceiver` wurde aktualisiert, um Statusfilter über Abfrageparameter zu unterstützen.
- `getEnvelopeReceiverAsync` wurde für die Promise-basierte Verarbeitung von Status-gefilterten Anfragen hinzugefügt.
- Die Umschlag-Tab-Konfiguration wurde geändert, um Statusfilter dynamisch anzuwenden.
2024-08-21 11:13:31 +02:00
Developer 02
9cc15f9beb feat: Envelope-Status-Enum erstellt 2024-08-21 09:13:57 +02:00
Developer 02
d323244157 feat: Füge Abfrageparameter zum GetEnvelopeReceiver-Endpunkt hinzu
- Optionale Abfrageparameter hinzugefügt: min_status, max_status und ignore_status.
- ignore_status standardmäßig auf ein leeres Array gesetzt, wenn nicht bereitgestellt.
- Aktualisierte _erService.ReadByUsernameAsync-Methode, um neue Parameter einzuschließen.
- Bestehende Fehlerbehandlung und Protokollierung beibehalten.
2024-08-20 16:15:11 +02:00
Developer 02
56d35c65bb feat: ReadByUsernameAsync-Methode im Service aktualisiert, um Statusfilter zu unterstützen
- `ReadByUsernameAsync` Methode angepasst, um zusätzliche Parameter `min_status`, `max_status` und `ignore_statuses` zu integrieren.
- Die Methode ruft jetzt die aktualisierte Repository-Methode auf, um Umschläge basierend auf Statusfiltern abzurufen.
- DTO-Zuordnung und Erfolgsrückgabe beibehalten.
2024-08-20 12:30:17 +02:00
Developer 02
15eabfc834 feat: ReadByUsernameAsync-Methode erweitert, um Statusfilter hinzuzufügen
- `ReadByUsernameAsync` aktualisiert, um optionale Parameter `min_status`, `max_status` und `ignore_statuses` zu unterstützen.
- Abfrage optimiert, um Umschläge basierend auf Statuswerten zu filtern.
- Ermöglicht das Abrufen von Umschlägen mit spezifischen Statusbereichen oder das Ignorieren bestimmter Status.
2024-08-20 11:28:25 +02:00
Developer 02
11e8c46e44 feat: Umschlag-Erstellungskomponente erstellt und Angular Material Stepper initialisiert 2024-08-20 09:35:00 +02:00
Developer 02
a14bd78415 feat: Navigationsleiste angepasst, Logout- und Neuen-Umschlag-Button hinzugefügt
- Navigationsleiste überarbeitet und das Layout optimiert.
- Logout-Button hinzugefügt, um den Benutzern das Abmelden zu erleichtern.
- Button für das Erstellen eines neuen Umschlags hinzugefügt, um die Benutzerfreundlichkeit zu verbessern.
2024-08-19 16:43:24 +02:00
Developer 02
609f7d09fc feat: Bootstrap zur Projektstruktur hinzugefügt 2024-08-19 13:32:14 +02:00
Developer 02
4c21cb4ba7 feat: Zeilen-Erweiterungsfunktion zur EnvelopeTableComponent hinzugefügt 2024-08-19 11:48:45 +02:00
Developer 02
00ebf45605 refactor: Aktualisierung von EnvelopeTableComponent zur Verwendung der Angular Material Tabelle
- Ersetzte `@generic-ui/ngx-grid` durch Angular Material Tabellenkomponenten.
- Aktualisierte `EnvelopeTableComponent`, um `mat-table` für die Tabellenanzeige zu verwenden.
- Umorganisierte Daten- und Schema-Definitionen zur Kompatibilität mit Angular Material Tabelle.
- Füge `MatTableModule` und `CommonModule` zu den Komponenten-Imports hinzu.
- Implementierte dynamische Spaltenanzeige basierend auf dem Schema.
- Hinzugefügt `updateTable` Methode zur erneuten Darstellung der Tabelle.
2024-08-19 09:41:01 +02:00
Developer 02
387777972b feat: Envelope Status Name geändert in Envelope Name mit contant.Status Enum. Diese Eigenschaft wurde zu envelope entitiy und dto hinzugefügt. Die angular Tabelle wurde entsprechend aktualisiert. 2024-08-15 18:13:51 +02:00
Developer 02
b7569982ff chore: Dateireferenzen durch NuGet-Pakete in der User Manager-Assembly ersetzt 2024-08-15 14:25:16 +02:00
Developer 02
d6be88b61d chore: Content Security Policy (CSP) aktualisiert 2024-08-15 13:06:39 +02:00
Developer01
8e454a0419 MS 2024-07-30 16:24:19 +02:00
Developer 02
f8932e14c0 fix: z-index-Problem für #flex-action-panel, um sicherzustellen, dass es über anderen Elementen angezeigt wird. 2024-07-25 17:19:49 +02:00
Developer 02
812bf9b25a fix: Korrigiere falsche DOM-Element-ID von flex-actio-panel auf flex-action-panel 2024-07-25 17:13:11 +02:00
Developer 02
0d591d5350 chore: PSPDFKit von Version 2023.5.2 auf 2024.3.2 aktualisiert 2024-07-25 17:11:01 +02:00
Developer 02
c9712af73e fix: asp-append-version aus dem PSPDFKit-Skript-Tag entfernt, um Browser-Cache zu ermöglichen; Versionierung im Pfad sorgt für automatische Updates 2024-07-25 16:55:20 +02:00
Developer 02
da483706b1 chore: PSPDFKit Versionen 2023.5.2 und 2024.3.2 separat hinzugefügt, weiterhin 2023.5.2 verwenden 2024-07-25 16:51:20 +02:00
Developer 02
4b600cb190 chore: Initialize versioning for envelope-generator-ui (Angular) 2024-07-25 16:25:47 +02:00
Developer 02
25a56a22fa release: Version 1.0.0.2 auf 1.0.0.3 erhöht 2024-07-22 11:51:02 +02:00
Developer 02
4e81f0949c fix(pspdfkit): Inline-Worker stoppen und aus CSP entfernen 2024-07-22 11:20:38 +02:00
Developer 02
18e79cf516 update(site.css): für eine responsivere Seite px in rem umgewandelt 2024-07-22 10:36:35 +02:00
Developer 02
fad0a6070c refactor(_Layout.cshtml.css): convert px to rem units 2024-07-22 10:07:44 +02:00
Developer 02
755fcfeef2 refactor(site.css): convert px to rem units 2024-07-22 10:01:09 +02:00
Developer01
40739b598b MS SignatureLink 2024-07-22 09:46:48 +02:00
Developer 02
9782503d1d Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-07-18 17:23:31 +02:00
Developer 02
35ced9b9ad feat: Hinzufügen der detaillierten aktuellen Uhrzeit mit Zeitzoneninformation im Format "dd.mm.yyyy, hh:mm:ss GMT+X". 2024-07-18 17:21:54 +02:00
Developer 02
9b28c0a1d1 chore: Minifizierte Versionen der JS- und CSS-Dateien hinzugefügt. 2024-07-18 15:50:47 +02:00
Developer 02
fd19c5be58 feat: Minifizierte Versionen aller JS- und CSS-Dateien erstellt. 2024-07-18 15:07:39 +02:00
Developer01
58b13e233c MS 2024-07-18 14:50:20 +02:00
Developer01
ce55066208 Ms Optimierung 2024-07-18 14:49:28 +02:00
Developer 02
7d582d2422 feat: Regulären Ausdruck zur Überprüfung der Stadt im Frontend hinzugefügt. 2024-07-18 14:13:33 +02:00
Developer 02
fe1d553a8d Reapply "Version von 1.0.0.1 auf 1.0.0.2 erhöht."
This reverts commit 9867e81220.
2024-07-18 11:56:42 +02:00
Developer 02
99c05a44f5 fix: CSS-Stil für die mail-link Klasse angepasst: Links sind nun blau und haben keine Unterstreichung. Aktivierung der href-Eigenschaft, die zuvor durch den Sanitizer entfernt wurde. 2024-07-18 11:56:19 +02:00
Developer 02
678360953d Hinzufügen eines neuen Werts für den Titel des Signierungsprozesses zur Ansicht show-envelope. 2024-07-18 11:37:14 +02:00
Developer 02
9867e81220 Revert "Version von 1.0.0.1 auf 1.0.0.2 erhöht."
This reverts commit 49cfc3c044.
2024-07-18 11:17:22 +02:00
Developer 02
49cfc3c044 Version von 1.0.0.1 auf 1.0.0.2 erhöht. 2024-07-18 10:54:20 +02:00
Developer 02
43ae15b71c Refaktorierung für HTML-Sanitization mit neuer Sanitizer-Klasse.
- Bestehende Sanitization überarbeitet.
- Injektionsmethode für flexible Konfiguration implementiert.
- Wichtige Abschnitte in `show-envelope` hervorgehoben.
2024-07-18 10:52:39 +02:00
Developer 02
1c2df71e0f fix: Viewport-Meta-Tag aktualisiert, um Skalierungsoptionen für eine bessere Layout-Kontrolle einzuschränken. 2024-07-17 17:20:41 +02:00
Developer 02
a806ec27db fix: Version updated from 1.1.0 to 1.1.0.1. 2024-07-17 15:57:51 +02:00
Developer 02
14bd2e22fc feat: Developed markFieldAsRequired and isFieldRequired methods to mark and validate required form fields; added user alert if location information is not provided. 2024-07-17 15:52:04 +02:00
Developer 02
f94728bf67 fix: Ort und Datum Informationen wurden horizontal ausgerichtet. 2024-07-17 14:11:20 +02:00
Developer 02
caeaf1774e feat: Alertify hinzugefügt. 2024-07-17 14:04:35 +02:00
Developer 02
1388b40a6b feat: isMobile-Methode mit Lazy Loading implementiert; Standortinformationen für mobile Browser auf readonly gesetzt. 2024-07-17 13:22:43 +02:00
Developer 02
e44d5f644c fix: Breite von City von 0,75 auf 1,2 erhöht. 2024-07-17 12:32:08 +02:00
Developer 02
fe9fd3024e refactor: Datum und Ort vertauscht. 2024-07-17 12:20:26 +02:00
Developer 02
b664e35b11 fix: Postleitzahl entfernt. 2024-07-17 12:00:50 +02:00
Developer 02
a77a31121f fix: Datum als readonly festgelegt. 2024-07-17 11:57:52 +02:00
Developer 02
381de6b554 fix: createText-Variable entfernt. 2024-07-17 11:47:40 +02:00
Developer 02
13bd727b3e feat: Configure project file for versioning and packaging; updated file and assembly versions from 1.0.0.0 to 1.1.0.0. 2024-07-16 15:58:10 +02:00
Developer 02
9021291aef Hinzufügen einer Bedingung zum Entfernen von Komponenten aus der Ignorierliste 2024-07-16 14:26:41 +02:00
Developer 02
8bd7ab13d0 Liste für ignorierte Etiketten erstellt und zu den Diensten hinzugefügt. 2024-07-16 13:55:36 +02:00
Developer 02
8eefd94569 Hinzufügen von Beschriftungen mit schreibgeschütztem PSPDF Kit-Textformularfeld. Statische PSPDF-Kit-Instanz erstellt. 2024-07-05 17:15:51 +02:00
Developer 02
b3b2baf0e4 Revert "PSPDFKit von 2023.5.2 auf 2024.3.2 aktualisiert."
This reverts commit c91446c5ac.
2024-07-05 10:05:28 +02:00
Developer 02
836380048a Reapply "Endpunkt "EncodeEnvelopeReceiverId" zum Test-Controller hinzugefügt."
This reverts commit f105aaa567.
2024-07-05 10:04:49 +02:00
Developer 02
f105aaa567 Revert "Endpunkt "EncodeEnvelopeReceiverId" zum Test-Controller hinzugefügt."
This reverts commit b615446274.
2024-07-05 10:00:54 +02:00
Developer 02
6238d66ca2 Getrennte Datumsauswahl, Postleitzahl und Stadtfelder hinzugefügt. 2024-07-05 01:37:11 +02:00
Developer 02
7e325a7eb6 Proxy-Konfiguration außerhalb von src verschoben. EmailProfilerDispatcher nuget hinzugefügt und Referenzen aktualisiert. 2024-07-04 10:34:46 +02:00
Developer 02
c91446c5ac PSPDFKit von 2023.5.2 auf 2024.3.2 aktualisiert. 2024-06-26 16:18:17 +02:00
eaf4cd773d Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-06-26 11:38:02 +02:00
8950482bac MS 2024-06-26 11:37:58 +02:00
Developer 02
b615446274 Endpunkt "EncodeEnvelopeReceiverId" zum Test-Controller hinzugefügt. 2024-06-26 10:47:04 +02:00
Developer 02
f276735b5c Referenzen für Common hinzugefügt. 2024-06-26 10:02:15 +02:00
Developer 02
31aa5829f6 Common-Projekt wurde zum Form-Projekt hinzugefügt. Content-Security-Policy wurde aktualisiert, um nominatim.openstreetmap.org zu erlauben. 2024-06-25 18:03:51 +02:00
27a5538229 Ms logging 2024-06-25 15:45:00 +02:00
322fb2fd7e MS 2024-06-25 13:28:17 +02:00
8e33094806 Merge commit 2024-06-25 13:28:03 +02:00
54b246f8e4 MS Sync Hakan 2024-06-25 13:26:35 +02:00
Developer 02
5c51ea679e Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-06-25 13:18:05 +02:00
Developer 02
e264a10a36 String-Lokalisierer für Model.resx im Common-Projekt hinzugefügt. 2024-06-25 13:07:02 +02:00
2f8aed8640 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-06-25 08:42:49 +02:00
29eac347c3 MS 2024-06-25 08:42:42 +02:00
Developer 02
dd6ab13e6e Hinzugefügt Localizer Dienste für beide api und angular 2024-06-24 15:55:27 +02:00
Developer 02
d94d9f045e Standardthema als FABRIC hinzugefügt 2024-06-24 13:29:58 +02:00
Developer 02
12bfcb1f25 Standard-Lokalisierer für generic-ui hinzugefügt. 2024-06-24 13:11:39 +02:00
Developer 02
63613f2073 Seitenverzeichnis hinzugefügt. Seite 'home' dorthin verschoben und Seite 'envelope' hinzugefügt. 2024-06-24 12:43:30 +02:00
Developer 02
1c11a0e8f0 Http-Interceptor hinzugefügt. 2024-06-24 11:56:49 +02:00
Developer 02
d376065246 Integrierte 'Core'-Nuget-Pakete. EnvelopeReceiver-Tabelle für Angular hinzugefügt. 2024-06-23 11:22:06 +02:00
Developer 02
4166dfde4b Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-06-20 11:45:20 +02:00
Developer 02
1bc43a5a77 Hinzufügen der Methode 'AddFormFieldValue' zum Hinzufügen von Datums- und Ortswerten im endgültigen Bericht. 2024-06-20 11:45:03 +02:00
Developer 02
33f4c6e489 Erstellt FormFieldValue für AnnotationData. 2024-06-19 14:12:26 +02:00
Developer 02
a4b880f1d2 pGDPictureLicenseKey als Variable hinzugefügt. 2024-06-19 12:35:46 +02:00
a7f38eafb2 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-06-19 11:16:45 +02:00
67a8506a37 MS Integrating ByteData to DB for SIG Documents 2024-06-19 11:16:32 +02:00
Developer 02
ecec1e1206 frmFinalisePDF als Startprojekt im Test zuweisen 2024-06-19 10:33:27 +02:00
Developer 02
854ed45abd Aktualisieren Sie die Position des Textfeldes Datum. 2024-06-19 09:19:14 +02:00
Developer 02
c0cece62af Entwicklung von Methoden zur Datums- und Ortserkennung. Fügen Sie "annotations" hinzu, damit der Benutzer das Datum und die Ortsangaben bei Bedarf aktualisieren kann. 2024-06-19 01:55:04 +02:00
Developer 02
408969d6dd Doppelte Operation in createAnnotations entfernt 2024-06-18 21:34:50 +02:00
Developer 02
9e019c0b69 eine separate createTextBox-Methode wurde als Teil des Signaturprozesses geschrieben, um die Stadt und das Datum zu schreiben 2024-06-18 21:27:52 +02:00
Developer 02
2f4ffac9c4 createSignatureAnnotation in 'Annotation' entfernt. 2024-06-18 19:55:57 +02:00
Developer 02
6464a591a8 'this'-Schlüsselwort in 'UI' durch 'UI' ersetzt, da dieser Schlüsselwort statisch ist. 2024-06-18 19:12:18 +02:00
Developer 02
56df8234c7 'this'-Schlüsselwort in 'Annotation' durch 'Annotation' ersetzt, da dieser Schlüsselwort statisch ist. 2024-06-18 19:11:07 +02:00
Developer 02
95958f2a1d Refaktorisierte 'UI'-Funktionen zu statischen Methoden 2024-06-18 19:01:40 +02:00
Developer 02
39cc257466 Refaktorisierte 'Annotation'-Funktionen zu statischen Methoden. 2024-06-18 18:58:56 +02:00
Developer 02
c4a66ee5bb UseCSPInDev als 'false' zugewiesen 2024-06-18 18:56:00 +02:00
Developer 02
cc3f6efbd7 Added EnvelopeReceiverService to web client application. 2024-06-18 11:09:13 +02:00
Developer 02
c0a6103eb2 Hinzufügen eines neuen Endpunkts zum EnvelopeReceiverController zum Abrufen von Umschlagempfängerdaten anhand des Benutzernamens mit Autorisierung und Protokollierung. 2024-06-17 11:58:17 +02:00
Developer 02
79bb454fd1 Die grundlegende ReadByUsernameAsync-Methode wurde sowohl dem Repository als auch dem Service, einschließlich Envelope und Receiver, hinzugefügt. 2024-06-17 11:19:35 +02:00
Developer 02
fc91a451f6 Erweiterungsmethoden hinzugefügt, um Benutzeransprüche in ControllerBase für ID, Benutzernamen, Namen, Vornamen und E-Mail abzurufen. 2024-06-17 10:46:41 +02:00
Developer 02
1efd241ab0 Die Service-Schnittstellen wurden überarbeitet, um den generischen Repository-Parameter zur Vereinfachung und besseren Lesbarkeit zu entfernen. 2024-06-15 01:04:58 +02:00
Developer 02
e8ff922726 Anmeldung über LDAP bereitgestellt. 2024-06-15 00:08:57 +02:00
Developer 02
8f3e72ae8b Nonce zum ENV_KEY-Skript hinzugefügt 2024-06-14 15:16:29 +02:00
Developer 02
9279f8e79a Aktualisierte Vererbung von EmailOutService. 2024-06-14 14:31:29 +02:00
Developer 02
1b2a316e5f Added triggers of EMAIL_OUT table to DBContext. 2024-06-14 14:20:31 +02:00
Developer 02
36d305a1e8 API_URL-Token erstellt und über Url-Dienst injiziert. 2024-06-14 11:58:19 +02:00
Developer 02
963a36acfa BaseHrefService hinzugefügt, um das Basis-href vom Dokument-Basis-Element abzurufen. 2024-06-14 10:52:54 +02:00
Developer 02
30ee71eaf5 Links und Css auf der Hauptseite bearbeitet. 2024-06-14 10:20:58 +02:00
Developer 02
5f161d81f2 Front-End-Authentifizierungsdienst und Authentifizierungswächter erstellt. 2024-06-13 17:01:38 +02:00
Developer 02
4d040959a5 Aktualisierung der Navigationsleiste und der Startseite. 2024-06-13 16:40:46 +02:00
Developer 02
5846a7433c Die Cookie-basierte Autorisierung wurde mit DirectorySearchService eingerichtet. 2024-06-13 16:12:07 +02:00
Developer 02
2f41a993ee Anmeldeformular erstellt 2024-06-13 11:42:02 +02:00
Developer 02
eac7454989 bootstrap installiert und hinzugefügt 2024-06-13 10:56:12 +02:00
Developer 02
8c767a73b4 Navbar hinzugefügt 2024-06-13 10:51:06 +02:00
Developer 02
9e33fc1d96 Startprofil für Angular-App erstellt. 2024-06-13 10:04:43 +02:00
Developer 02
23bf7579f6 ng-bootstrap-Paket hinzugefügt. 2024-06-13 09:51:43 +02:00
Developer 02
13b9394073 Angular Material mit Indigo/Pink-Theme, Animationsmodul und globalen Angular Material-Typografiestilen hinzugefügt. 2024-06-13 09:50:02 +02:00
Developer 02
af27163b08 Neues Angular-Projekt mit CLI v17 initialisiert. ngx-grid, Fabric und Hermes installiert. 2024-06-13 09:43:29 +02:00
Developer 02
155726a6b0 angular app entfernt 2024-06-13 09:15:44 +02:00
Developer 02
9f8142a5d6 Favicon.ico aktualisieren 2024-06-12 17:09:58 +02:00
Developer 02
0f97c325cf Refactored Comp Klasse zur Aufnahme der geschachtelten ActPanel Klasse mit Lazy-Initialisierung und hinzugefügten Methoden zum Umschalten der Sichtbarkeit. Konfigurierte Comp.ActPanel.Toggle() so, dass die Schaltflächen ausgeblendet werden, wenn Anmerkungen geöffnet werden, und sichtbar sind, wenn Anmerkungen geschlossen werden, über addEventListener("annotations.willChange", e). 2024-06-12 16:27:34 +02:00
Developer 02
7961fcbf0f Hinzufügen der Möglichkeit, Aktionsschaltflächen auszublenden, wenn das Unterschriftenfeld geöffnet wird 2024-06-12 15:34:54 +02:00
Developer 02
a1d251d705 Comp-Klasse hinzugefügt, um DOM-Komponenten effizient zu cachen und zu verwalten. 2024-06-12 13:36:00 +02:00
Developer 02
07ad18eccb Anzeigeprobleme der Schaltflächen auf Mobilgeräten behoben. 2024-06-12 13:26:59 +02:00
Developer 02
bf23fceb6b Aktualisierte RejectionInfo1 in .resx 2024-06-12 09:37:49 +02:00
Developer 02
2dc860b923 Initialisierung der EnvelopeGeneratorAPI und der Angular-Webschnittstelle 2024-06-12 01:50:11 +02:00
Developer 02
9b2c5d9ca5 Gitignore aktualisieren 2024-06-12 01:49:14 +02:00
Developer 02
76bfb895a9 Nicht-asynchrone Datenbankoperationen wurden aus dem Homecontroller entfernt und der History-Service vollständig genutzt. Die Vererbung von Basis-Controllern wurde abgeschafft. 2024-06-12 00:59:51 +02:00
Developer 02
38aa6a6217 EmailDispatcher ist integriert. 2024-06-12 00:40:50 +02:00
Developer 02
0268756cf9 feat: Implementierung von Caching im EmailTemplateRepository zur Leistungsverbesserung der ReadByNameAsync-Methode. 2024-06-06 17:17:06 +02:00
Developer 02
f509cc8b3b Ein weiterer informativer Text wurde für den Umschlag hinzugefügt, der von anderen Interessengruppen gestrichen wurde. 2024-06-06 16:55:42 +02:00
Developer 02
290a1dd522 Vereinfachte Zugriffscode-Validierung für den Endpunkt EnvelopeKey/{envelopeReceiverId}/Locked POST. resx aktualisiert, um den Benutzer besser zu informieren 2024-06-06 11:27:13 +02:00
Developer 02
2c147f44b7 Der nicht mehr benötigte Entwicklungsendpunkt wurde entfernt. 2024-06-06 10:04:33 +02:00
Developer 02
3fd2f90f65 Die Ansicht EnvelopeRejected (EnvelopeRejected.cshtml) wurde so entwickelt, dass sie nach Ablehnung eines Umschlags angezeigt wird. Logik hinzugefügt, um eine Umleitung zu aktivieren, nachdem ein Umschlag abgelehnt wurde. 2024-06-06 10:02:56 +02:00
Developer 02
d077a66796 Die Datei „api-service.js“ für HTTP-Anfragen erstellt. HTTP-POST-Anforderung erstellt, um die generierten Umschläge zurückzuweisen. 2024-06-05 13:04:47 +02:00
Developer 02
f16a8bcdb9 EnvelopeController aktualisiert, um das Ablehnen von Umschlägen mit optionalem Grund zu ermöglichen. 2024-06-04 16:34:15 +02:00
Developer 02
33f161a5fe Das Problem der mehrdeutigen Referenz von 'DocumentStatus' wurde durch Hinzufügen einer Referenz zur Konstruktormethode gelöst. 2024-06-04 16:20:25 +02:00
Developer 02
7697939d7e Endpunkt für die Ablehnung von Umschlägen hinzugefügt. 2024-06-04 16:11:30 +02:00
Developer 02
34b3c46720 Referenztyp hinzugefügt, um zu klassifizieren, für wen Geschichte geschrieben wird. 2024-06-04 13:50:37 +02:00
Developer 02
65618e5df9 Standardwert des Eingangs 'withReceiver' in EnvelopeHistory.ReadAsync aktualisieren 2024-06-03 16:58:14 +02:00
Developer 02
8d5493969f Entität 'Receiver' zur Entität 'EnvelopeHistory' hinzugefügt. 2024-06-03 16:13:00 +02:00
Developer 02
0818b8d606 IsRejected und ReadRejectedAsync Methoden zu EnvelopeHistoryService hinzugefügt. 2024-06-03 10:15:26 +02:00
Developer 02
047c4d09e8 Spalte 'COMMENT' zu Entitäten und Dto's hinzugefügt: 2024-06-03 09:41:30 +02:00
Developer 02
26f2e157c6 DocumentRejected zu Envelope Status hinzugefügt. 2024-06-03 09:40:09 +02:00
Developer 02
f26f400937 Entfernen der RejectedReason und IsRejected Eigenschaften aus der EnvelopeReceiver Entität und DTO. 2024-05-31 15:38:38 +02:00
Developer 02
0e4cfc452f Entfernte Duplizierung der EnterCorrectAccessCode-Methode im EnvelopeKey/{envelopeReceiverId}/Locked-Post-Endpunkt. 2024-05-31 13:30:08 +02:00
Developer 02
95b80a650c „Back“ wurde anstelle von „Review“ im Localizer für die handleFinish-Ereignisaktion in app.js verwendet. Außerdem wurde das Deutsch für „Finalize“ in resx aktualisiert. 2024-05-31 13:25:57 +02:00
Developer 02
f4dd17fca9 RejectionReason und IsRejected Eigenschaften zur EnvelopeReceiver Klasse hinzugefügt: RejectionReason speichert REJECTION_REASON und IsRejected zeigt den Ablehnungsstatus an. 2024-05-31 10:03:15 +02:00
Developer 02
e4aed5309e Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-05-31 09:39:50 +02:00
Developer 02
c31f081208 Added a signature legal agreement warning and integrated the resource file (resx) as a JavaScript object into the _Layout.cshtml file. This enables the agreement warning to support multiple languages. 2024-05-31 09:39:31 +02:00
76d4151182 Skin 2019 2024-05-29 15:52:22 +02:00
df2537bf29 MS Rückruf! 2024-05-29 14:34:56 +02:00
5ca4c04669 MS Rückruf 2024-05-29 13:43:55 +02:00
297ecfab7b Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-05-29 12:58:21 +02:00
48db26931c MS EnvelopeGenerator.Common v1.6 Reason for Aborting
XX.Form v1.7 Reason Aborting
2024-05-29 12:58:15 +02:00
Developer 02
21934928c2 Schaltfläche „Ablehnen“ in ShowEnvelope.cshtml hinzugefügt. 2024-05-29 11:57:47 +02:00
Developer 02
21e8a86a99 Text der Unterzeichnungsvereinbarung zu resx hinzugefügt. 2024-05-29 11:01:05 +02:00
Developer 02
0228e82c63 Added Hint Path of GdPicture.NET.14 (14.1.0.152) using Quick Actions. 2024-05-29 09:50:06 +02:00
Developer 02
50247517b9 Erweiterungen zusammengeführt. 2024-05-29 09:33:59 +02:00
Developer 02
1357b714cf Nullfähigkeit zu den Methoden GetEnvelopeUuid und GetReceiverSignature hinzugefügt. 2024-05-29 09:27:15 +02:00
Developer 02
88da8e4ace HTTP-Status 401 (Unauthorized) zum Endpoint EnvelopeKey/{envelopeReceiverId}/Locked hinzugefügt, wenn envelopeReceiverId nicht gefunden wird. 2024-05-29 09:23:09 +02:00
Developer 02
89290c03f9 Mehrsprachige Unterstützung für ShowEnvelope-Seite hinzugefügt; Aktualisierung der resx-Dateien für Deutsch und Englisch (US). 2024-05-28 18:01:32 +02:00
Developer 02
3b27260b14 CultureInfo zur Culture hinzugefügt und die Benutzeroberfläche aktualisiert, um den NativeName für eine verbesserte Lokalisierung anzuzeigen. 2024-05-28 16:19:01 +02:00
Developer 02
9fa5827b09 Aktualisiere site.css für eine verbesserte mobile Ansicht und entferne das Benutzericon. 2024-05-28 12:51:50 +02:00
Developer 02
3448c17d8b Mobile Ansicht angepasst, um die Textgröße zu reduzieren und Überlauf mit Ellipsen zu verhindern. 2024-05-27 17:50:00 +02:00
Developer 02
48ec83161d Removed "zu" word from ShowEnvelope View 2024-05-27 16:25:36 +02:00
Developer 02
cc63b24947 Aktualisierter Informationsteil im ShowEnvelope-Teil der Ansicht. 2024-05-27 14:04:00 +02:00
Developer 02
c3db8d0d00 Flaggensymbol mit Bootstrap-Unterrand nach oben verschoben 2024-05-27 12:44:34 +02:00
Developer 02
037ebfbe5c Schrieb die Schnittstellen des Envelope Mail Service für das Senden und Senden von Zugangscode-Mails und injizierte Speicher-Cache. 2024-05-27 11:39:02 +02:00
Developer 02
42258cbbb8 Aktualisierte EnvelopeLocked-Ansicht, um ein Verrutschen aufgrund einer Fehlermeldung zu verhindern 2024-05-24 14:21:46 +02:00
Developer 02
4c96274084 Meldung "Falscher Zugangscode" hinzugefügt. 2024-05-24 14:18:01 +02:00
Developer 02
b594ddb646 Refaktorierung des HomeController zur Verbesserung der Fehlerbehandlung, des Authentifizierungsprozesses und der Verwaltung der Benutzersprache. 2024-05-24 13:42:20 +02:00
Developer 02
b60ae62779 Aktualisierte EnvelopeClaims 2024-05-24 11:39:12 +02:00
Developer 02
7863e861c7 CSP zur Verwendung in der Produktion wurde protokolliert. 2024-05-23 16:37:13 +02:00
Developer 02
2014f6149d Interne Schaltflächen wurden entfernt. Stattdessen wurden externe Sende- und Aktualisierungsschaltflächen hinzugefügt. 2024-05-23 13:52:37 +02:00
Developer 02
60afdc23da Behebt das Scrollproblem des iframes durch Festlegen der Höhe mit Viewport-Einheiten, um eine ordnungsgemäße interne Scroll-Verarbeitung zu gewährleisten. 2024-05-23 10:42:55 +02:00
Developer 02
90ac81c576 Merged scripts 2024-05-22 16:53:55 +02:00
Developer 02
8d6d483c5d Unnötige console.log und console.errors entfernt. 2024-05-22 16:34:14 +02:00
Developer 02
824bf6fb82 B64ToBuff-Funktion zum Konvertieren von Base64-String in ArrayBuffer hinzufügen 2024-05-22 16:16:13 +02:00
Developer 02
0c6fd2efe3 Refaktorieren Sie den App-Konstruktor, um container standardmäßig auf einen Wert basierend auf dem Klassennamen zu setzen, falls nicht angegeben. 2024-05-22 15:50:32 +02:00
Developer 02
1f4cf54406 Fehler behoben: Signaturfilter in Envelope.Documents.Elements in EnvelopeReceiverRepository hinzugefügt 2024-05-22 15:48:37 +02:00
Developer 02
a6635f4a20 Falscher Schlüsselname behoben 2024-05-22 13:13:37 +02:00
Developer 02
ed25482cee Der DiP-Modus (Development in production) wurde für Swagger- und Test-Controller integriert. 2024-05-22 13:11:02 +02:00
Developer 02
1664b5739e Program.cs und appsettings.json bearbeitet. Abschnitt Config aus appsettings.json entfernt. 2024-05-22 12:03:48 +02:00
Developer 02
0ef9d3c49e Unnötige .git-Dateien unter .web wurden entfernt. 2024-05-22 09:56:02 +02:00
Developer 02
86bdb233c2 EmailProfilerDispatcher hinzugefügt und EnvelopeMailService erstellt. 2024-05-22 09:54:49 +02:00
Developer 02
bc6972bcfb ReadByName in EmailTemplate Repositroy und Dienst hinzugefügt. 2024-05-17 13:59:40 +02:00
Developer 02
2e66129485 DTO für EnvelopeHistory-Erstellung hinzugefügt, asynchrone Record-Methode implementiert und Datenbank-Trigger für Envelope- und EnvelopeHistory-Entitäten konfiguriert. 2024-05-16 16:40:38 +02:00
Developer 02
81220ac9b4 Aktualisiere CSP zur Unterstützung von PSPDFKit durch Aktivierung von unsafe-inline, unsafe-eval, Blob-URLs und Anpassung verschiedener Quellrichtlinien. 2024-05-16 11:11:40 +02:00
Developer 02
d7252ce888 Refaktorierte HomeController, um standardmäßig das Culture-Cookie zu setzen, falls es fehlt, und die Kultur aus den übergebenen Query-Parametern zu übernehmen. 2024-05-16 10:38:03 +02:00
Developer 02
ba723bdddb Removed state and ErrorResponse(Exception e) from BaseController. Added logging to catch part in Document and Envelope Controller. 2024-05-16 09:23:33 +02:00
Developer 02
68714c2937 Integrierte Mehrsprachigkeit (Deutsch und Englisch) mit Cookie-basierter Sprachauswahl 2024-05-15 16:11:26 +02:00
Developer 02
cf9286e4c3 Removed inner styles and updated CSP 2024-05-14 13:50:03 +02:00
Developer 02
87a766a2e8 feat: Add CSP configuration to use CSPMiddleware and CSP nonce to script tags in several cshtml script 2024-05-14 11:22:07 +02:00
Developer 02
674d753735 Removed unnecessary nodejs components. 2024-05-14 09:04:46 +02:00
Developer 02
c688a42e45 Hinzufügen der Bibliotheken flag-icons, popper und select2 zur Verbesserung der Dropdown-, Tooltip- und Auswahlfeldfunktionalität. 2024-05-13 17:18:37 +02:00
Developer 02
db83f25d57 Verbesserung der Benutzeroberfläche und Funktionalität des Sprachauswahl-Dropdown-Menüs 2024-05-13 16:27:46 +02:00
Developer 02
ef6e921451 Updated .gitignore 2024-05-13 16:27:38 +02:00
Developer 02
dd18094deb Erfolglose Antwort wird als unbefugt eingestuft 2024-05-08 16:04:53 +02:00
Developer 02
4f61f1b6cb Added status methods in histroy service 2024-05-08 15:55:51 +02:00
Developer 02
efcd254749 Entfernte dateibezogene Eigenschaften (Filename, Filepath, FilenameOriginal) aus EnvelopeDocumentDto. 2024-05-08 12:18:07 +02:00
Developer 02
357866ea44 Aktualisiert, um EnvelopeReceiverDto anstelle von EnvelopeResponse zu verwenden 2024-05-08 12:10:24 +02:00
Developer 02
d8617093ce Implementierung von HtmlSanitizer und UrlEncoder zur Absicherung von Benutzereingaben gegen XSS und URL-Manipulationsanfälligkeiten. 2024-05-07 16:26:04 +02:00
Developer 02
b19cccdc34 Der PSPDFKitLicenseKey-Schlüssel wurde aktualisiert, um den Lizenzcode aus appsettings.json an das Frontend zu übergeben. 2024-05-07 10:14:45 +02:00
Developer 02
79aa6f4cb3 Hinzufügen einer Cookie-basierten Sprachauswahl zum Front-End 2024-05-06 17:38:45 +02:00
Developer 02
a285a0b9c2 Refaktoriert LogInEnvelope zur Verwendung der ViewInnerServiceError Methode für konsistente Fehlerbehandlung. 2024-05-06 11:31:37 +02:00
Developer 02
84442410a5 Erweiterte Funktionalität durch Hinzufügen eines Endpunkts zur Zuweisung von Sprachen zu Cookies. Implementierte eine CORS-Richtlinie, die die Konfiguration von Ursprüngen über appsettings.json ermöglicht. 2024-05-03 22:03:26 +02:00
Developer 02
22a3ec914d Text des Cookie-Zustimmungsformulars auf Englisch und Deutsch aktualisiert. 2024-05-03 14:20:28 +02:00
Developer 02
9620cb7189 Refaktorierung: Hauptentität auf EnvelopeReceiver geändert; Endlosschleifen-Bug behoben
- HomeController und ShowEnvelopeView aktualisiert.
- Endlosschleifenproblem zwischen Envelope und EnvelopeReceiver gelöst.
- Anpassungen an Envelope, EnvelopeDTO, EnvelopeRepository und EnvelopeService vorgenommen.
2024-05-03 14:00:58 +02:00
Developer 02
eb096cb201 Refaktorisierung von HomeController, um die Verwendung von ThenAsync zu integrieren und Codelesbarkeit zu verbessern. 2024-05-03 13:00:51 +02:00
Developer 02
cc01f57125 Refaktorisierung der Lokalisierung und DTO-Integration
- Ersetzung von ITranslateService durch IStringLocalizer<X> für verbesserte Lokalisierung.
- Aktualisierung der DTO-Klassen entsprechend der neuesten Core.DTO-Struktur.
- Integration der neuen Klassen Result und DataResult aus Core.DTO für standardisierte Serviceantworten.
2024-05-02 17:36:23 +02:00
a7cf500858 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-04-26 13:17:02 +02:00
b24f06509e MS GDpictureKey in FormApp via DB 2024-04-26 13:16:54 +02:00
Developer 02
6b3c90c618 Benutzerdefinierte Fehlerseiten für die Statuscodes 404 und 500 im HomeController hinzugefügt, um verschiedene Benutzerfälle zu behandeln. 2024-04-26 12:22:09 +02:00
Developer 02
966b7de3c4 ErrorView und ErrorViewModel hinzugefügt; ContactLink als Singleton konfiguriert, serialisiert aus appSettings 2024-04-25 16:17:10 +02:00
Developer 02
8efe321cc7 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-04-24 13:57:08 +02:00
Developer 02
6338b81571 Refaktorisierung: Absicherung von DB-Operationen und Verbesserung der Geschäftslogik
- Implementierung von LINQ-Abfragen innerhalb der Core-Bibliothek zur Minderung von SQL-Injection-Anfälligkeiten für DB-Operationen von Umschlägen und Empfängern.
- Aktualisierung der Geschäftslogik in der Service-Schicht für verbessertes Transaktionshandling.
- Erweiterung der ServiceMessage um eine neue Flag-Funktion zum Verfolgen von Cybersecurity- und Datenintegritätsproblemen.
- Hinzufügen spezifischer Benutzerverhaltensflags zur besseren Erkennung und Behandlung potenzieller Datenverletzungen.
2024-04-24 13:45:03 +02:00
0582e7e002 MS GD Picture Update 2024-04-24 13:22:49 +02:00
3f40b9449b MS PARTY_MODULES = 1 2024-04-24 08:07:27 +02:00
fd694b2cee Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-04-23 14:53:49 +02:00
d4a9eba6ab MS _ Service Überprüfen der Ordnerkonfiguration 2024-04-23 14:53:40 +02:00
Developer 02
f2e718565d Add EmailOut components: entity, DTO, repository, and services
- Introduced EmailOut and EmailOutDto for data management.
- Added EmailOutRepository and service interfaces based on CRUD patterns.
2024-04-16 16:25:55 +02:00
Developer 02
f7b11e3427 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-04-16 14:28:23 +02:00
Developer 02
74cb595128 Autorisierungsprüfung zu Envelope und Document Controllern hinzufügen
Implementiere eine Signaturverifizierung in den EnvelopeController.Update (api/envelope/{envelopeKey}) und DocumentController.Open (api/document/{envelopeKey}) Methoden, die beide mit dem HTTPPost-Attribut gekennzeichnet sind. Diese Prüfung stellt sicher, dass nur der authentifizierte Empfänger mit einer übereinstimmenden Signatur Zugriff auf die spezifizierten Ressourcen hat oder diese ändern kann. Dies erhöht die Sicherheit, indem unautorisierten Zugriff verhindert wird.
2024-04-16 13:52:09 +02:00
Developer 02
23609d2bd7 [Authorize]-Attribut zu DocumentController und EnvelopeController hinzugefügt
[Authorize]-Attribute wurden zum DocumentController und EnvelopeController hinzugefügt, um die Sicherheit zu erhöhen. [NonAction]-Attribute wurden zu den Methoden DocumentController.Get (api/document/{envelopeKey}) und EnvelopeController.Get (api/envelope/{envelopeKey}) hinzugefügt, um redundante Cookie-basierte Authentifizierung zu vermeiden, da der Datenzugriffscode korrekt gehandhabt wird, nachdem er im HomeController.LogInEnvelope (/EnvelopeKey/{envelopeReceiverId}/Locked) über die entsprechende Razor-Seite (.cshtml) eingegeben wurde.
2024-04-16 13:28:52 +02:00
Developer 02
1c55c4aa99 Implementierte GDPR-konforme Cookie-Zustimmungsmechanik
- Integrierte die 'bootstrap-cookie-consent-settings' Bibliothek für Cookie-Zustimmungsdialoge
- Hinzugefügt mehrsprachige Unterstützung für Cookie-Dialoge
- Konfigurierte Anwendungseinstellungen in 'appsettings.json'
- Erstellt Datenschutz- und Cookie-Richtlinien mit TermsFeed
- Angepasste sprachbasierte Einstellungen in './wwwroot/cookie-consent-content'
2024-04-16 10:32:39 +02:00
Developer 02
87c839549a Cookie-basierte automatische Autorisierung wurde konfiguriert. Middlevare für Benutzerberechtigung hinzugefügt 2024-04-15 17:24:27 +02:00
02d883dfbf Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-04-15 14:09:06 +02:00
f51c500f90 MS Version 2.6.00 Removed CopytoDMZ 2024-04-15 14:08:47 +02:00
Developer 02
49cfeb28d9 Temporäre Lösung: Rückgabe von Ok(new object()) aufgrund falscher Fetch-API-Nutzung. 2024-04-11 09:16:12 +02:00
Developer 02
5e758899ab Methoden hinzugefügt, um UUID und Signatur aus envelopeReceiverId zu extrahieren 2024-04-10 15:54:51 +02:00
Developer 02
f5dd3cf8be PDF-Serialisierung erfolgt jetzt direkt auf Razor Page - Sicherheitsverbesserung
Externer Fetch-Vorgang entfernt, PDF-Inhalt aus Sicherheitsgründen direkt auf der Razor Page serialisiert.
2024-04-10 09:21:56 +02:00
Developer 02
2c17d440c0 Integration von RemoveIfControllerConvention zur bedingten Ausschließung von Test-Controllern
Implementierung von RemoveIfControllerConvention in der Startup-Klasse, um Controller, die mit "Test" beginnen, basierend auf einem Konfigurationsflag auszuschließen, was die Flexibilität der Dienstregistrierung erhöht.
2024-04-09 13:52:38 +02:00
Developer 02
6941a3db8d Optimize data handling by embedding EnvelopeResponse in Razor Page, eliminating additional requests 2024-04-08 17:05:01 +02:00
Developer 02
1584fd6f1c feat: Begrüßung und Dokumentdetails auf Umschlagseite aktualisiert 2024-04-08 16:39:02 +02:00
Developer 02
2512de0f26 Signaturprüfung zur Filterung der Umschlagempfänger hinzugefügt 2024-04-08 16:22:17 +02:00
Developer 02
db83eb90ee Sicherheitsverbesserung: VerifyAccessCode implementiert und Verifizierungscode aus DTO entfernt
Die VerifyAccessCode-Methode wurde zur Validierung von Zugangscodes hinzugefügt und der Verifizierungscode aus Sicherheitsgründen aus dem DTO entfernt.
2024-04-08 12:54:26 +02:00
Developer 02
501d48961e Refaktorisierung der DecodeEnvelopeReceiverId-Methode in EnvelopeGeneratorExtensions 2024-04-08 10:23:54 +02:00
Developer 02
ab713a23ac Feature-Update: Erweiterung der Envelope- und DocumentReceiverElement-Abfragen
Die Methoden `ReadAllWithAsync` und `ReadByUuidAsync` in `EnvelopeRepository` wurden erweitert, um optional DocumentReceiverElemente und Signaturdetails einzubeziehen.
2024-04-05 16:54:29 +02:00
Developer 02
cbb03d77ba Animierte Navbar-Anzeige für envelopeDto-Informationen hinzugefügt 2024-04-04 17:35:43 +02:00
Developer 02
29ae546d98 EF Core Beziehungskonfiguration für Envelope-Entität korrigiert 2024-04-04 13:25:41 +02:00
Developer 02
8de0d70e7b Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-04-04 08:58:25 +02:00
Developer 02
b43b1ef866 Implementierte individuelle Controller für alle Tabellen unter Verwendung der WebCore.API Bibliothek. 2024-04-04 08:58:03 +02:00
Developer 02
b8d4abb7b2 feat: Implementierung von Repositories, Services und DTOs für alle Entitäten
- Notwendige Repositories, Services und DTOs für jede Entität, die SQL-Tabellen entspricht, unter Verwendung der WebCore-Bibliothek erstellt.
- Mapping-Profile für effiziente Datentransformation definiert.
- Dependency Injections für Repositories und Services als scoped konfiguriert, um eine korrekte Lebenszyklusverwaltung zu gewährleisten.
2024-04-03 14:14:19 +02:00
Developer 02
b65766ce24 Alle Entitäten wurden mit Attributen erstellt und zu EFCore DBContex hinzugefügt. 2024-04-02 14:53:25 +02:00
83746abb1b MS 2024-03-31 19:26:16 +02:00
c14ed86181 Ms Änderungen FileCopy 2024-03-28 11:26:32 +01:00
56eb385312 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-03-19 15:11:07 +01:00
5abc1d9779 MS Common Verzeichnisstruktur 2024-03-19 15:10:51 +01:00
Developer 02
6fc210132d Entferne die Eigenschaft SignedMailPath aus der Config-Entität 2024-03-19 10:36:41 +01:00
a3c66ecd19 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-03-15 11:47:30 +01:00
a25b517445 MS Common V 1.5 New paths for email-Service 2024-03-15 11:47:14 +01:00
Developer 02
181ee67bab - Scheduler.cs, PDFBurner.cs und Constants.cs entfernt. 2024-03-14 13:07:42 +01:00
Developer 02
c459828706 Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-03-14 12:47:35 +01:00
Developer 02
6f59906a7e - SQL-SELECT-Anweisungen in Dokumenten aktualisiert, um alle Spalten abzurufen.
- Prioritätsbehandlung für document_path_dmz in EnvelopeService.LoadEnvelopes hinzugefügt.
- CRUD-Operationen in EnvlopeDocument und ConfigurationFile Services/Repositories unter Verwendung von WebCoreModules implementiert.
- Verschiedene Dateimethoden in [spezifischen Orten oder Klassen, falls zutreffend] auf async umgestellt.
2024-03-14 12:46:38 +01:00
21baf0bad0 MS BaseControler 2024-03-13 15:03:16 +01:00
47f924ad7e MS Envelope Common DeleteFromDisk 2024-03-13 14:43:05 +01:00
a2b0682a77 MS FileMove 2024-03-13 10:59:00 +01:00
86d9bd185a MS V2.5.0 zum Test 2024-03-12 13:37:21 +01:00
0064eee9d5 FileMOve 2024-03-06 09:15:02 +01:00
d4aa3ec82e MS Encryption 2024-03-06 09:14:04 +01:00
55f2a6a775 MS Config 2024-02-27 16:18:00 +01:00
4cd39c6c5c Merge branch 'master' of http://git.dd:3000/AppStd/EnvelopeGenerator 2024-02-21 09:19:26 +01:00
51741be5de MS Config Common Paths DMZ Version 1.4 2024-02-21 09:19:19 +01:00
31ca8b8b9e SignFlow: Version 2.4.5.0 2024-02-12 10:27:34 +01:00
dd55e2a2d9 SignFlow: Bei Initialisierung prüfen, ob es überhaupt ein USER-Object gibt 2024-02-12 10:24:55 +01:00
Jonathan Jenne
02a197e535 clean up 2024-01-17 10:34:14 +01:00
Jonathan Jenne
ddd0808f41 Version 2.4.4.1 2024-01-16 16:28:20 +01:00
Jonathan Jenne
c504567c41 Fix Init 2024-01-16 16:28:15 +01:00
2995 changed files with 202446 additions and 1967 deletions

4
.gitignore vendored
View File

@@ -360,4 +360,6 @@ MigrationBackup/
.ionide/
# Fody - auto-generated XML schema
FodyWeavers.xsd
FodyWeavers.xsd
/EnvelopeGenerator.Web/.config/dotnet-tools.json
/EnvelopeGenerator.GeneratorAPI/ClientApp/envelope-generator-ui/.vscode

View File

@@ -0,0 +1,17 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IConfigService : IBasicCRUDService<ConfigDto, Config, int>
{
Task<DataResult<ConfigDto>> ReadFirstAsync();
Task<ConfigDto> ReadDefaultAsync();
Task<string> ReadDefaultSignatureHost();
}
}

View File

@@ -0,0 +1,10 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IDocumentReceiverElementService : IBasicCRUDService<DocumentReceiverElementDto, DocumentReceiverElement, int>
{
}
}

View File

@@ -0,0 +1,9 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IDocumentStatusService : IBasicCRUDService<DocumentStatusDto, DocumentStatus, int>
{
}
}

View File

@@ -0,0 +1,13 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEmailTemplateService : IBasicCRUDService<EmailTemplateDto, EmailTemplate, int>
{
Task<DataResult<EmailTemplateDto>> ReadByNameAsync(EmailTemplateType type);
}
}

View File

@@ -0,0 +1,10 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeCertificateService : IBasicCRUDService<EnvelopeCertificateDto, EnvelopeCertificate, int>
{
}
}

View File

@@ -0,0 +1,10 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeDocumentService : IBasicCRUDService<EnvelopeDocumentDto, EnvelopeDocument, int>
{
}
}

View File

@@ -0,0 +1,29 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeHistoryService : ICRUDService<EnvelopeHistoryCreateDto, EnvelopeHistoryDto, EnvelopeHistoryDto, EnvelopeHistory, long>
{
Task<int> CountAsync(int? envelopeId = null, string? userReference = null, int? status = null);
Task<bool> AccessCodeAlreadyRequested(int envelopeId, string userReference);
Task<bool> IsSigned(int envelopeId, string userReference);
Task<bool> IsRejected(int envelopeId, string? userReference = null);
Task<IEnumerable<EnvelopeHistoryDto>> ReadAsync(int? envelopeId = null, string? userReference = null, ReferenceType? referenceType = null, int? status = null, bool withSender = false, bool withReceiver = false);
Task<IEnumerable<EnvelopeHistoryDto>> ReadRejectedAsync(int envelopeId, string? userReference = null);
Task<IEnumerable<ReceiverReadDto>> ReadRejectingReceivers(int envelopeId);
Task<DataResult<long>> RecordAsync(int envelopeId, string userReference, EnvelopeStatus status, string? comment = null);
}
}

View File

@@ -0,0 +1,13 @@
using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Abstraction.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Common;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeMailService : IEmailOutService
{
Task<DataResult<int>> SendAsync(EnvelopeReceiverDto envelopeReceiverDto, Constants.EmailTemplateType tempType);
Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto envelopeReceiverDto);
}
}

View File

@@ -0,0 +1,29 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeReceiverService : IBasicCRUDService<EnvelopeReceiverDto, EnvelopeReceiver, object>
{
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false);
Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true);
Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true);
Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true);
Task<DataResult<string>> ReadAccessCodeByIdAsync(int envelopeId, int receiverId);
Task<DataResult<bool>> VerifyAccessCodeAsync(string uuid, string signature, string accessCode);
Task<DataResult<bool>> VerifyAccessCodeAsync(string envelopeReceiverId, string accessCode);
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);
}
}

View File

@@ -0,0 +1,15 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeService : IBasicCRUDService<EnvelopeDto, Envelope, int>
{
Task<DataResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool history = false, bool documentReceiverElement = false);
Task<DataResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withHistory = false, bool withDocumentReceiverElement = false, bool withUser = false, bool withAll = false);
}
}

View File

@@ -0,0 +1,10 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IEnvelopeTypeService : IBasicCRUDService<EnvelopeTypeDto, EnvelopeType, int>
{
}
}

View File

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

View File

@@ -0,0 +1,14 @@
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.Receiver;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IReceiverService : ICRUDService<ReceiverCreateDto, ReceiverReadDto, ReceiverUpdateDto, Receiver, int>
{
public Task<DataResult<ReceiverReadDto>> ReadByAsync(string? emailAddress = null, string? signature = null);
public Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null);
}
}

View File

@@ -0,0 +1,11 @@
using DigitalData.Core.Abstractions.Application;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
namespace EnvelopeGenerator.Application.Contracts
{
public interface IUserReceiverService : IBasicCRUDService<UserReceiverDto, UserReceiver, int>
{
}
}

View File

@@ -0,0 +1,57 @@
using DigitalData.UserManager.Application.MappingProfiles;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.MappingProfiles;
using EnvelopeGenerator.Application.Services;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Infrastructure.Repositories;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace EnvelopeGenerator.Application
{
public static class DIExtensions
{
public static IServiceCollection AddEnvelopeGenerator(this IServiceCollection services)
{
//Inject CRUD Service and repositoriesad
services.AddScoped<IConfigRepository, ConfigRepository>();
services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
services.AddScoped<IConfigRepository, ConfigRepository>();
services.AddScoped<IDocumentReceiverElementRepository, DocumentReceiverElementRepository>();
services.AddScoped<IDocumentStatusRepository, DocumentStatusRepository>();
services.AddScoped<IEmailTemplateRepository, EmailTemplateRepository>();
services.AddScoped<IEnvelopeRepository, EnvelopeRepository>();
services.AddScoped<IEnvelopeCertificateRepository, EnvelopeCertificateRepository>();
services.AddScoped<IEnvelopeDocumentRepository, EnvelopeDocumentRepository>();
services.AddScoped<IEnvelopeHistoryRepository, EnvelopeHistoryRepository>();
services.AddScoped<IEnvelopeReceiverRepository, EnvelopeReceiverRepository>();
services.AddScoped<IEnvelopeTypeRepository, EnvelopeTypeRepository>();
services.AddScoped<IReceiverRepository, ReceiverRepository>();
services.AddScoped<IUserReceiverRepository, UserReceiverRepository>();
services.AddScoped<IConfigService, ConfigService>();
services.AddScoped<IDocumentReceiverElementService, DocumentReceiverElementService>();
services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
services.AddScoped<IEnvelopeHistoryService, EnvelopeHistoryService>();
services.AddScoped<IDocumentStatusService, DocumentStatusService>();
services.AddScoped<IEmailTemplateService, EmailTemplateService>();
services.AddScoped<IEnvelopeService, EnvelopeService>();
services.AddScoped<IEnvelopeCertificateService, EnvelopeCertificateService>();
services.AddScoped<IEnvelopeDocumentService, EnvelopeDocumentService>();
services.AddScoped<IEnvelopeReceiverService, EnvelopeReceiverService>();
services.AddScoped<IEnvelopeTypeService, EnvelopeTypeService>();
services.AddScoped<IReceiverService, ReceiverService>();
services.AddScoped<IUserReceiverService, UserReceiverService>();
//Auto mapping profiles
services.AddAutoMapper(typeof(BasicDtoMappingProfile).Assembly);
services.AddAutoMapper(typeof(UserMappingProfile).Assembly);
return services;
}
}
}

View File

@@ -0,0 +1,12 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record ConfigDto(
string DocumentPath,
int SendingProfile,
string SignatureHost,
string ExternalProgramName,
string ExportPath,
string DocumentPathDmz,
string ExportPathDmz,
string DocumentPathMoveAftsend);
}

View File

@@ -0,0 +1,22 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record DocumentReceiverElementDto(
int Id,
int DocumentId,
int ReceiverId,
int ElementType,
double X,
double Y,
double Width,
double Height,
int Page,
bool Required,
string? Tooltip,
bool ReadOnly,
int AnnotationIndex,
DateTime AddedWhen,
DateTime? ChangedWhen,
double Top,
double Left
);
}

View File

@@ -0,0 +1,12 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record DocumentStatusDto(
int Id,
int EnvelopeId,
int ReceiverId,
int Status,
DateTime? StatusChangedWhen,
string Value,
DateTime AddedWhen,
DateTime? ChangedWhen);
}

View File

@@ -0,0 +1,8 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record EmailTemplateDto(
int Id,
string Name,
string Body,
string Subject);
}

View File

@@ -0,0 +1,12 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeCertificateDto(
int Id,
int EnvelopeId,
string EnvelopeUuid,
string EnvelopeSubject,
int CreatorId,
string CreatorName,
string CreatorEmail,
int EnvelopeStatus);
}

View File

@@ -0,0 +1,10 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeDocumentDto
(
int Id,
int EnvelopeId,
DateTime AddedWhen,
IEnumerable<DocumentReceiverElementDto>? Elements
);
}

View File

@@ -0,0 +1,66 @@
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using DigitalData.UserManager.Application.DTOs.User;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeDto()
{
public int Id { get; set; }
public int UserId { get; set; }
public int Status { get; set; }
public string StatusName { get; set; }
public string Uuid { get; set; }
[TemplatePlaceholder("[MESSAGE]")]
public string Message { get; set; }
public DateTime? ExpiresWhen { get; set; }
public DateTime? ExpiresWarningWhen { get; set; }
public DateTime AddedWhen { get; set; }
public DateTime? ChangedWhen { get; set; }
[TemplatePlaceholder("[DOCUMENT_TITLE]")]
public string Title { get; set; }
public int? ContractType { 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? CertificationType { 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 DmzMoved { get; set; }
public UserReadDto? User { get; set; }
public EnvelopeType? EnvelopeType { get; set; }
public string? EnvelopeTypeTitle { get; set; }
public bool IsAlreadySent { get; set; }
public string? StatusTranslated { get; set; }
public string? ContractTypeTranslated { get; set; }
public IEnumerable<EnvelopeDocumentDto>? Documents { get; set; }
}
}

View File

@@ -0,0 +1,9 @@
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
{
public record EnvelopeHistoryCreateDto(
int EnvelopeId,
string UserReference,
int Status,
DateTime? ActionDate,
string? Comment = null);
}

View File

@@ -0,0 +1,19 @@
using DigitalData.Core.DTO;
using DigitalData.UserManager.Application.DTOs.User;
using EnvelopeGenerator.Application.DTOs.Receiver;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.DTOs.EnvelopeHistory
{
public record EnvelopeHistoryDto(
long Id,
int EnvelopeId,
string UserReference,
int Status,
DateTime AddedWhen,
DateTime? ActionDate,
UserCreateDto? Sender,
ReceiverReadDto? Receiver,
ReferenceType ReferenceType,
string? Comment = null) : BaseDTO<long>(Id);
}

View File

@@ -0,0 +1,31 @@
using DigitalData.EmailProfilerDispatcher.Abstraction.Attributes;
using EnvelopeGenerator.Application.DTOs.Receiver;
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeReceiverDto()
{
public int EnvelopeId { get; set; }
public int ReceiverId { get; set; }
public int Sequence { get; set; }
[TemplatePlaceholder("[NAME_RECEIVER]")]
public string? Name { get; set; }
public string? JobTitle { get; set; }
public string? CompanyName { get; set; }
public string? PrivateMessage { get; set; }
public DateTime AddedWhen { get; set; }
public DateTime? ChangedWhen { get; set; }
public EnvelopeDto? Envelope { get; set; }
public ReceiverReadDto? Receiver { get; set; }
}
}

View File

@@ -0,0 +1,19 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record EnvelopeTypeDto(
int Id,
string Title,
string Language,
int? ExpiresDays,
int? CertificationType,
bool? UseAccessCode,
int? FinalEmailToCreator,
int? FinalEmailToReceivers,
DateTime AddedWhen,
DateTime? ChangedWhen,
int? ExpiresWarningDays,
bool? SendReminderEmails,
int? FirstReminderDays,
int? ReminderIntervalDays,
int? ContractType);
}

View File

@@ -0,0 +1,21 @@
using System.ComponentModel.DataAnnotations;
using System.Security.Cryptography;
using System.Text;
namespace EnvelopeGenerator.Application.DTOs.Receiver
{
public record ReceiverCreateDto([EmailAddress] string EmailAddress)
{
public string Signature => sha256HexOfMail.Value;
private readonly Lazy<string> sha256HexOfMail = new(() =>
{
var bytes_arr = Encoding.UTF8.GetBytes(EmailAddress.ToUpper());
var hash_arr = SHA256.HashData(bytes_arr);
var hexa_str = BitConverter.ToString(hash_arr);
return hexa_str.Replace("-", string.Empty);
});
public DateTime AddedWhen { get; } = DateTime.Now;
};
}

View File

@@ -0,0 +1,11 @@
using DigitalData.Core.DTO;
namespace EnvelopeGenerator.Application.DTOs.Receiver
{
public record ReceiverReadDto(
int Id,
string EmailAddress,
string Signature,
DateTime AddedWhen
) : BaseDTO<int>(Id);
}

View File

@@ -0,0 +1,4 @@
namespace EnvelopeGenerator.Application.DTOs.Receiver
{
public record ReceiverUpdateDto();
}

View File

@@ -0,0 +1,11 @@
namespace EnvelopeGenerator.Application.DTOs
{
public record UserReceiverDto(
int Id,
int UserId,
int ReceiverId,
string Name,
string CompanyName,
string JobTitle,
DateTime AddedWhen);
}

View File

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

View File

@@ -0,0 +1,10 @@
namespace EnvelopeGenerator.Application
{
public enum EnvelopeFlag
{
EnvelopeOrReceiverNonexists,
NonDecodableEnvelopeReceiverId,
WrongEnvelopeReceiverId,
AccessCodeNull
}
}

View File

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

View File

@@ -0,0 +1,148 @@
using Microsoft.Extensions.Logging;
using System.Text;
namespace EnvelopeGenerator.Application
{
/// <summary>
/// Provides extension methods for decoding and extracting information from an envelope receiver ID.
/// </summary>
public static class EnvelopeGeneratorExtensions
{
/// <summary>
/// Validates whether a given string is a correctly formatted Base-64 encoded string.
/// </summary>
/// <remarks>
/// This method checks the string for proper Base-64 formatting, which includes validating
/// the length of the string (must be divisible by 4). It also checks each character to ensure
/// it belongs to the Base-64 character set (A-Z, a-z, 0-9, '+', '/', and '=' for padding).
/// The method ensures that padding characters ('=') only appear at the end of the string and
/// are in a valid configuration (either one '=' at the end if the string's length % 4 is 3,
/// or two '==' if the length % 4 is 2).
/// </remarks>
/// <param name="input">The Base-64 encoded string to validate.</param>
/// <returns>
/// <c>true</c> if the string is a valid Base-64 encoded string; otherwise, <c>false</c>.
/// </returns>
/// <example>
/// <code>
/// string testString = "TWFuIGlzIGRpc3Rpbmd1aXNoZWQsIG5vdCBvbmx5IGJ5IGhpcyByZWFzb24sIGJ1dCBieSB0aGlzIHNpbmd1bGFyIHBhc3Npb24gZnJvbSBvdGhlciBhbmltYWxzLCB3aGljaCBpcyBhIGx1c3Qgb2YgdGhlIG1pbmQsIHRoYXQgYnk=";
/// bool isValid = IsValidBase64String(testString);
/// Console.WriteLine(isValid); // Output: true
/// </code>
/// </example>
public static bool IsBase64String(this string input)
{
// Check if the string is null or empty
if (string.IsNullOrEmpty(input))
{
return false;
}
// Replace valid base-64 padding
input = input.Trim();
int mod4 = input.Length % 4;
if (mod4 > 0)
{
// Base-64 string lengths should be divisible by 4
return false;
}
// Check each character to ensure it is valid base-64
foreach (char c in input)
{
if (!char.IsLetterOrDigit(c) && c != '+' && c != '/' && c != '=')
{
// Invalid character detected
return false;
}
}
// Ensure no invalid padding scenarios exist
if (input.EndsWith("==") && (input.Length % 4 == 0) ||
input.EndsWith("=") && (input.Length % 4 == 3))
{
return true;
}
return input.IndexOf('=') == -1; // No padding allowed except at the end
}
/// <summary>
/// Decodes the envelope receiver ID and extracts the envelope UUID and receiver signature.
/// </summary>
/// <param name="envelopeReceiverId">The base64 encoded string containing the envelope UUID and receiver signature.</param>
/// <returns>A tuple containing the envelope UUID and receiver signature.</returns>
public static (string? EnvelopeUuid, string? ReceiverSignature) DecodeEnvelopeReceiverId(this string envelopeReceiverId)
{
if (!envelopeReceiverId.IsBase64String())
{
return (null, null);
}
byte[] bytes = Convert.FromBase64String(envelopeReceiverId);
string decodedString = System.Text.Encoding.UTF8.GetString(bytes);
string[] parts = decodedString.Split(new string[] { "::" }, StringSplitOptions.None);
if (parts.Length > 1)
return (EnvelopeUuid: parts[0], ReceiverSignature: parts[1]);
else
return (string.Empty, string.Empty);
}
/// <summary>
/// Gets the envelope UUID from the decoded envelope receiver ID.
/// </summary>
/// <param name="envelopeReceiverId">The base64 encoded string to decode.</param>
/// <returns>The envelope UUID.</returns>
public static string? GetEnvelopeUuid(this string envelopeReceiverId) => envelopeReceiverId.DecodeEnvelopeReceiverId().EnvelopeUuid;
/// <summary>
/// Gets the receiver signature from the decoded envelope receiver ID.
/// </summary>
/// <param name="envelopeReceiverId">The base64 encoded string to decode.</param>
/// <returns>The receiver signature.</returns>
public static string? GetReceiverSignature(this string envelopeReceiverId) => envelopeReceiverId.DecodeEnvelopeReceiverId().ReceiverSignature;
public static string EncodeEnvelopeReceiverId(this (string envelopeUuid, string receiverSignature) input)
{
string combinedString = $"{input.envelopeUuid}::{input.receiverSignature}";
byte[] bytes = Encoding.UTF8.GetBytes(combinedString);
string base64String = Convert.ToBase64String(bytes);
return base64String;
}
public static void LogEnvelopeError(this ILogger logger, string envelopeReceiverId, Exception? exception = null, string? message = null, params object?[] args)
{
var sb = new StringBuilder().AppendLine(envelopeReceiverId.DecodeEnvelopeReceiverId().ToTitle());
if (message is not null)
sb.AppendLine(message);
if(exception is null)
logger.Log(LogLevel.Error, sb.ToString(), args);
else
logger.Log(LogLevel.Error, exception, sb.AppendLine(exception.Message).ToString(), args);
}
public static void LogEnvelopeError(this ILogger logger, string? uuid, string? signature = null, Exception? exception = null, string? message = null, params object?[] args)
{
var sb = new StringBuilder($"Envelope Uuid: {uuid}");
if(signature is not null)
sb.AppendLine().Append($"Receiver Signature: {signature}");
if (message is not null)
sb.AppendLine().Append(message);
if (exception is null)
logger.Log(LogLevel.Error, sb.ToString(), args);
else
logger.Log(LogLevel.Error, exception, sb.ToString(), args);
}
public static string ToTitle(this (string? UUID, string? Signature) envelopeReceiverTuple)
{
return $"UUID is {envelopeReceiverTuple.UUID} and signature is {envelopeReceiverTuple.Signature}";
}
}
}

View File

@@ -0,0 +1,19 @@
namespace EnvelopeGenerator.Application
{
public static class Key
{
public static readonly string InnerServiceError = nameof(InnerServiceError);
public static readonly string EnvelopeNotFound = nameof(EnvelopeNotFound);
public static readonly string EnvelopeReceiverNotFound = nameof(EnvelopeReceiverNotFound);
public static readonly string AccessCodeNull = nameof(AccessCodeNull);
public static readonly string WrongAccessCode = nameof(WrongAccessCode);
public static readonly string DataIntegrityIssue = nameof(DataIntegrityIssue);
public static readonly string SecurityBreachOrDataIntegrity = nameof(SecurityBreachOrDataIntegrity);
public static readonly string PossibleDataIntegrityIssue = nameof(PossibleDataIntegrityIssue);
public static readonly string SecurityBreach = nameof(SecurityBreach);
public static readonly string PossibleSecurityBreach = nameof(PossibleSecurityBreach);
public static readonly string WrongEnvelopeReceiverId = nameof(WrongEnvelopeReceiverId);
public static readonly string EnvelopeOrReceiverNonexists = nameof(EnvelopeOrReceiverNonexists);
public static readonly string Default = nameof(Default);
}
}

View File

@@ -0,0 +1,48 @@
using AutoMapper;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.Receiver;
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<EnvelopeType, EnvelopeTypeDto>();
CreateMap<Receiver, ReceiverReadDto>();
CreateMap<Receiver, ReceiverCreateDto>();
CreateMap<Receiver, ReceiverUpdateDto>();
CreateMap<UserReceiver, UserReceiverDto>();
// 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>();
CreateMap<ReceiverCreateDto, Receiver>();
CreateMap<ReceiverUpdateDto, Receiver>();
CreateMap<UserReceiverDto, UserReceiver>();
}
}
}

View File

@@ -0,0 +1,9 @@
namespace EnvelopeGenerator.Application.Resources
{
/// <summary>
/// The place holder class for Resource.*.resx
/// </summary>
public class Resource
{
}
}

View File

@@ -0,0 +1,219 @@
<?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>
<data name="and" xml:space="preserve">
<value>und</value>
</data>
<data name="Back" xml:space="preserve">
<value>Zurück</value>
</data>
<data name="Complete" xml:space="preserve">
<value>Abschließen</value>
</data>
<data name="Confirmation" xml:space="preserve">
<value>Bestätigung</value>
</data>
<data name="de-DE" xml:space="preserve">
<value>Deutch</value>
</data>
<data name="DocProtected" xml:space="preserve">
<value>Dokument geschützt</value>
</data>
<data name="DocRejected" xml:space="preserve">
<value>Dokument abgelehnt</value>
</data>
<data name="DocSigned" xml:space="preserve">
<value>Dokument unterschrieben</value>
</data>
<data name="en-US" xml:space="preserve">
<value>Englisch</value>
</data>
<data name="EnvelopeInfo1" xml:space="preserve">
<value>Sie müssen {0} Vorgang unterzeichen. &lt;span class="highlight highlight-envelope-info-1"&gt;Bitte prüfen Sie die Seite {1}&lt;/span&gt;.</value>
</data>
<data name="EnvelopeInfo2" xml:space="preserve">
<value>Erstellt am {0} von {1}. Sie können den Absender über &lt;span class="highlight highlight-envelope-info-2"&gt;&lt;a class="mail-link" href="mailto:{2}?subject={3}&amp;body=Sehr%20geehrter%20{4}%20{5},%0A%0A%0A"&gt;{6}&lt;/a&gt;&lt;/span&gt; kontaktieren.</value>
</data>
<data name="Finalize" xml:space="preserve">
<value>Abschließen</value>
</data>
<data name="Hello" xml:space="preserve">
<value>Hallo</value>
</data>
<data name="LocakedOpen" xml:space="preserve">
<value>Öffnen</value>
</data>
<data name="LocationWarning" xml:space="preserve">
<value>Bitte überprüfen Sie die Standortinformationen. Wenn sie falsch sind, korrigieren Sie diese bitte.</value>
</data>
<data name="LockedAccessCode" xml:space="preserve">
<value>Zugriffscode</value>
</data>
<data name="LockedBody" xml:space="preserve">
<value>Wir haben Ihnen gerade den Zugriffscode an die hinterlegte Email Adresse gesendet. Dies kann evtl. einige Minuten dauern.</value>
</data>
<data name="LockedFooterBody" xml:space="preserve">
<value>Bitte überprüfen Sie Ihr Email Postfach inklusive Spam-Ordner. Sie können auch den Absender bitten, Ihnen den Code auf anderem Wege zukommen zu lassen.</value>
</data>
<data name="LockedFooterTitle" xml:space="preserve">
<value>Sie haben keinen Zugriffscode erhalten?</value>
</data>
<data name="LockedTitle" xml:space="preserve">
<value>Dokument erfordert einen Zugriffscode</value>
</data>
<data name="Reject" xml:space="preserve">
<value>Ablehnen</value>
</data>
<data name="Rejection" xml:space="preserve">
<value>Ablehnung</value>
</data>
<data name="RejectionInfo1" xml:space="preserve">
<value>Dieser Unterzeichnungsvorgang wurde abgelehnt!</value>
</data>
<data name="RejectionInfo1_ext" xml:space="preserve">
<value>Vorgang abgebrochen!</value>
</data>
<data name="RejectionInfo2" xml:space="preserve">
<value>Sie können bei Bedarf mit {0}, &lt;a href="mailto:{1}?subject={2}&amp;body=Sehr geehrte(r)%20{0},%0A%0A%0A"&gt;{1}&lt;/a&gt; Kontakt aufnehmen.</value>
</data>
<data name="RejectionInfo2_ext" xml:space="preserve">
<value>Das Vorgang wurde von einer der beteiligten Parteien abgelehnt. Sie können bei Bedarf mit {0}, &lt;a href="mailto:{1}?subject={2}&amp;body=Sehr geehrte(r)%20{0},%0A%0A%0A"&gt;{1}&lt;/a&gt; Kontakt aufnehmen.</value>
</data>
<data name="RejectionReasonQ" xml:space="preserve">
<value>Bitte geben Sie einen Grund an:</value>
</data>
<data name="SigAgree" xml:space="preserve">
<value>Durch Klick auf Abschließen stimme ich zu, dass die abgebildete und übermittelte Signatur als elektronische Darstellung meiner Signatur in den Fällen gelten, in denen ich sie auf Dokumenten, einschließlich rechtsgültiger Verträge verwende.</value>
</data>
<data name="SignDoc" xml:space="preserve">
<value>Dokument unterschreiben</value>
</data>
<data name="SigningProcessTitle" xml:space="preserve">
<value>Titel des Unterzeichnungs-Vorgangs</value>
</data>
<data name="UnexpectedError" xml:space="preserve">
<value>Ein unerwarteter Fehler ist aufgetreten.</value>
</data>
<data name="WelcomeToTheESignPortal" xml:space="preserve">
<value>Herzlich willkommen im eSign-Portal</value>
</data>
<data name="WrongAccessCode" xml:space="preserve">
<value>Ungültiger Zugangscode.</value>
</data>
</root>

View File

@@ -0,0 +1,219 @@
<?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>
<data name="and" xml:space="preserve">
<value>and</value>
</data>
<data name="Back" xml:space="preserve">
<value>Back</value>
</data>
<data name="Complete" xml:space="preserve">
<value>Complete</value>
</data>
<data name="Confirmation" xml:space="preserve">
<value>Confirmation</value>
</data>
<data name="de-DE" xml:space="preserve">
<value>German</value>
</data>
<data name="DocProtected" xml:space="preserve">
<value>Document protected</value>
</data>
<data name="DocRejected" xml:space="preserve">
<value>Document rejected</value>
</data>
<data name="DocSigned" xml:space="preserve">
<value>Document signed</value>
</data>
<data name="en-US" xml:space="preserve">
<value>English</value>
</data>
<data name="EnvelopeInfo1" xml:space="preserve">
<value>You have to sign {0} process. &lt;span class="highlight highlight-envelope-info-1"&gt;Please check page {1}&lt;/span&gt;.</value>
</data>
<data name="EnvelopeInfo2" xml:space="preserve">
<value>Created on {0} by {1}. You can contact the sender via &lt;span class="highlight highlight-envelope-info-2"&gt;&lt;a class="mail-link" href="mailto:{2}?subject={3}&amp;body=Dear%20{4}%20{5},%0A%0A%0A"&gt;{6}&lt;/a&gt;&lt;/span&gt;.</value>
</data>
<data name="Finalize" xml:space="preserve">
<value>Finalize</value>
</data>
<data name="Hello" xml:space="preserve">
<value>Hello</value>
</data>
<data name="LocakedOpen" xml:space="preserve">
<value>Open</value>
</data>
<data name="LocationWarning" xml:space="preserve">
<value>Please review the location information. If it is incorrect, kindly make the necessary corrections.</value>
</data>
<data name="LockedAccessCode" xml:space="preserve">
<value>Access Code</value>
</data>
<data name="LockedBody" xml:space="preserve">
<value>We have just sent you the access code to the email address you provided. This may take a few minutes.</value>
</data>
<data name="LockedFooterBody" xml:space="preserve">
<value>Please check your email inbox including your spam folder. Furthermore, you can also ask the sender to send the code by other means.</value>
</data>
<data name="LockedFooterTitle" xml:space="preserve">
<value>You have not received an access code?</value>
</data>
<data name="LockedTitle" xml:space="preserve">
<value>Document requires an access code</value>
</data>
<data name="Reject" xml:space="preserve">
<value>Reject</value>
</data>
<data name="Rejection" xml:space="preserve">
<value>Rejection</value>
</data>
<data name="RejectionInfo1" xml:space="preserve">
<value>This signing process was rejected!</value>
</data>
<data name="RejectionInfo1_ext" xml:space="preserve">
<value>Process canceled!</value>
</data>
<data name="RejectionInfo2" xml:space="preserve">
<value>You can contact {0}, &lt;a href="mailto:{1}?subject={2}&amp;body=Dear%20{0},%0A%0A%0A"&gt;{1}&lt;/a&gt; if required.</value>
</data>
<data name="RejectionInfo2_ext" xml:space="preserve">
<value>The process has been rejected by one of the parties involved. You can contact {0}, &lt;a href="mailto:{1}?subject={2}&amp;body=Dear%20{0},%0A%0A%0A"&gt;{1}&lt;/a&gt; if required.</value>
</data>
<data name="RejectionReasonQ" xml:space="preserve">
<value>Please give a reason:</value>
</data>
<data name="SigAgree" xml:space="preserve">
<value>By clicking on Finalize, I agree that the signature shown and submitted is an electronic representation of my signature in cases where I use it on documents, including legally binding contracts.</value>
</data>
<data name="SignDoc" xml:space="preserve">
<value>Sign document</value>
</data>
<data name="SigningProcessTitle" xml:space="preserve">
<value>Title of the signing process</value>
</data>
<data name="UnexpectedError" xml:space="preserve">
<value>An unexpected error has occurred.</value>
</data>
<data name="WelcomeToTheESignPortal" xml:space="preserve">
<value>Welcome to the eSign portal</value>
</data>
<data name="WrongAccessCode" xml:space="preserve">
<value>Invalid access code.</value>
</data>
</root>

View File

@@ -0,0 +1,62 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.Extensions.Caching.Memory;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
namespace EnvelopeGenerator.Application.Services
{
public class ConfigService : BasicCRUDService<IConfigRepository, ConfigDto, Config, int>, IConfigService
{
private static readonly Guid DefaultConfigCacheId = Guid.NewGuid();
private readonly IMemoryCache _cache;
private readonly ILogger<ConfigService> _logger;
public ConfigService(IConfigRepository repository, IMapper mapper, IMemoryCache memoryCache, ILogger<ConfigService> logger) : base(repository, mapper)
{
_cache = memoryCache;
_logger = logger;
}
public async Task<DataResult<ConfigDto>> ReadFirstAsync()
{
var config = await _repository.ReadFirstAsync();
return config is null
? Result.Fail<ConfigDto>().Notice(LogLevel.Error, Flag.DataIntegrityIssue, "There is no configuration in DB.")
: Result.Success(_mapper.MapOrThrow<ConfigDto>(config));
}
/// <summary>
/// Reads the default configuration asynchronously.
/// </summary>
/// <remarks>
/// The configuration is cached in memory upon the first retrieval. If the configuration is updated,
/// the application needs to be restarted for the changes to take effect as the memory cache will not be updated automatically.
/// </remarks>
/// <returns>
/// A task that represents the asynchronous read operation. The task result contains the default configuration as a <see cref="ConfigDto"/>.
/// </returns>
/// <exception cref="InvalidOperationException">
/// Thrown when the default configuration cannot be found.
/// </exception>
public async Task<ConfigDto> ReadDefaultAsync()
{
var config = await _cache.GetOrCreateAsync(DefaultConfigCacheId, _ => ReadFirstAsync().ThenAsync(
Success: config => config,
Fail: (mssg, ntc) =>
{
_logger.LogNotice(ntc);
throw new InvalidOperationException("Default configuration cannot find.");
}));
return config!;
}
public async Task<string> ReadDefaultSignatureHost() => (await ReadDefaultAsync()).SignatureHost;
}
}

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.Extensions.Localization;
namespace EnvelopeGenerator.Application.Services
{
public class DocumentReceiverElementService : BasicCRUDService<IDocumentReceiverElementRepository, DocumentReceiverElementDto, DocumentReceiverElement, int>, IDocumentReceiverElementService
{
public DocumentReceiverElementService(IDocumentReceiverElementRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.Extensions.Localization;
namespace EnvelopeGenerator.Application.Services
{
public class DocumentStatusService : BasicCRUDService<IDocumentStatusRepository, DocumentStatusDto, DocumentStatus, int>, IDocumentStatusService
{
public DocumentStatusService(IDocumentStatusRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -0,0 +1,32 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Resources;
using static EnvelopeGenerator.Common.Constants;
using DigitalData.Core.DTO;
using Microsoft.Extensions.Logging;
namespace EnvelopeGenerator.Application.Services
{
public class EmailTemplateService : BasicCRUDService<IEmailTemplateRepository, EmailTemplateDto, EmailTemplate, int>, IEmailTemplateService
{
public EmailTemplateService(IEmailTemplateRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
public async Task<DataResult<EmailTemplateDto>> ReadByNameAsync(EmailTemplateType type)
{
var temp = await _repository.ReadByNameAsync(type);
return temp is null
? Result.Fail<EmailTemplateDto>()
.Message(Key.InnerServiceError)
.Notice(LogLevel.Error, Flag.DataIntegrityIssue, $"EmailTemplateType '{type}' is not found in DB. Please, define required e-mail template.")
: Result.Success(_mapper.MapOrThrow<EmailTemplateDto>(temp));
}
}
}

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Resources;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeCertificateService : BasicCRUDService<IEnvelopeCertificateRepository, EnvelopeCertificateDto, EnvelopeCertificate, int>, IEnvelopeCertificateService
{
public EnvelopeCertificateService(IEnvelopeCertificateRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -0,0 +1,16 @@
using AutoMapper;
using DigitalData.Core.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeDocumentService : BasicCRUDService<IEnvelopeDocumentRepository, EnvelopeDocumentDto, EnvelopeDocument, int>, IEnvelopeDocumentService
{
public EnvelopeDocumentService(IEnvelopeDocumentRepository repository, IMapper mapper) : base(repository, mapper)
{
}
}
}

View File

@@ -0,0 +1,87 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using static EnvelopeGenerator.Common.Constants;
using EnvelopeGenerator.Application.Resources;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.DTOs.EnvelopeHistory;
using EnvelopeGenerator.Application.DTOs.Receiver;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeHistoryService : CRUDService<IEnvelopeHistoryRepository, EnvelopeHistoryCreateDto, EnvelopeHistoryDto, EnvelopeHistoryDto, EnvelopeHistory, long>, IEnvelopeHistoryService
{
public EnvelopeHistoryService(IEnvelopeHistoryRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper)
: base(repository, mapper)
{
}
public async Task<int> CountAsync(int? envelopeId = null, string? userReference = null, int? status = null) => await _repository.CountAsync(envelopeId: envelopeId, userReference: userReference, status: status);
public async Task<bool> HasStatus(EnvelopeStatus status, int envelopeId, string userReference) => await _repository.CountAsync(
envelopeId: envelopeId,
userReference: userReference,
status: (int) status) > 0;
public async Task<bool> AccessCodeAlreadyRequested(int envelopeId, string userReference) => await _repository.CountAsync(
envelopeId: envelopeId,
userReference:userReference,
status: (int) EnvelopeStatus.AccessCodeRequested) > 0;
public async Task<bool> IsSigned(int envelopeId, string userReference) => await _repository.CountAsync(
envelopeId: envelopeId,
userReference: userReference,
status: (int) EnvelopeStatus.DocumentSigned) > 0;
/// <summary>
/// Checks if the specified envelope has been rejected.
/// <para><b>Note:</b> <i>If any document within the envelope is rejected, the entire envelope will be considered rejected.</i></para>
/// </summary>
/// <param name="envelopeId">The ID of the envelope to check.</param>
/// <param name="userReference">Optional user reference associated with the envelope.</param>
/// <returns>A task that represents the asynchronous operation. The task result contains a boolean value indicating whether the envelope is rejected.</returns>
public async Task<bool> IsRejected(int envelopeId, string? userReference = null)
{
return await _repository.CountAsync(
envelopeId: envelopeId,
userReference: userReference,
status: (int)EnvelopeStatus.DocumentRejected) > 0;
}
public async Task<IEnumerable<EnvelopeHistoryDto>> ReadAsync(int? envelopeId = null, string? userReference = null, ReferenceType? referenceType = null, int? status = null, bool withSender = false, bool withReceiver = false)
{
var histDTOs = _mapper.MapOrThrow<IEnumerable<EnvelopeHistoryDto>>(
await _repository.ReadAsync(
envelopeId: envelopeId,
userReference: userReference,
status: status,
withSender: withSender,
withReceiver: withReceiver));
return referenceType is null ? histDTOs : histDTOs.Where(h => h.ReferenceType == referenceType);
}
public async Task<IEnumerable<EnvelopeHistoryDto>> ReadRejectedAsync(int envelopeId, string? userReference = null) =>
await ReadAsync(envelopeId: envelopeId, userReference: userReference, status: (int)EnvelopeStatus.DocumentRejected, withReceiver:true);
//TODO: use IQueryable in repository to incerease the performance
public async Task<IEnumerable<ReceiverReadDto>> ReadRejectingReceivers(int envelopeId)
{
var envelopes = await ReadRejectedAsync(envelopeId);
return envelopes is null
? Enumerable.Empty<ReceiverReadDto>()
: envelopes
.Where(eh => eh?.Receiver != null)
.Select(eh => eh.Receiver!);
}
public async Task<DataResult<long>> RecordAsync(int envelopeId, string userReference, EnvelopeStatus status, string? comment = null) =>
await CreateAsync(new (EnvelopeId: envelopeId, UserReference: userReference, Status: (int)status, ActionDate: DateTime.Now, Comment: comment))
.ThenAsync(
Success: id => Result.Success(id),
Fail: (mssg, ntc) => Result.Fail<long>().Message(mssg).Notice(ntc)
);
}
}

View File

@@ -0,0 +1,99 @@
using AutoMapper;
using DigitalData.Core.DTO;
using DigitalData.EmailProfilerDispatcher.Abstraction.Contracts;
using DigitalData.EmailProfilerDispatcher.Abstraction.DTOs.EmailOut;
using DigitalData.EmailProfilerDispatcher.Abstraction.Services;
using DigitalData.UserManager.Application;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Common;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
using Microsoft.Extensions.Options;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeMailService : EmailOutService, IEnvelopeMailService
{
private readonly IEmailTemplateService _tempService;
private readonly IEnvelopeReceiverService _envRcvService;
private readonly DispatcherConfig _dConfig;
private readonly IConfigService _configService;
public EnvelopeMailService(IEmailOutRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper, IEmailTemplateService tempService, IEnvelopeReceiverService envelopeReceiverService, IOptions<DispatcherConfig> dispatcherConfigOptions, IConfigService configService) : base(repository, mapper)
{
_tempService = tempService;
_envRcvService = envelopeReceiverService;
_dConfig = dispatcherConfigOptions.Value;
_configService = configService;
}
//TODO: create ioptions and implement TemplatePlaceHolderAttribute instead of this method
private async Task<Dictionary<string, string>> CreatePlaceholders(string? accessCode = null, EnvelopeReceiverDto? envelopeReceiverDto = null)
{
Dictionary<string, string> placeholders = new() {
{ "[NAME_PORTAL]", "signFlow" },
{ "[SIGNATURE_TYPE]" , "signieren"},
{ "[REASON]", string.Empty } };
if (accessCode is not null)
placeholders["[DOCUMENT_ACCESS_CODE]"] = accessCode;
if(envelopeReceiverDto is not null && envelopeReceiverDto.Envelope is not null && envelopeReceiverDto.Receiver is not null)
{
var erId = (envelopeReceiverDto.Envelope.Uuid, envelopeReceiverDto.Receiver.Signature).EncodeEnvelopeReceiverId();
var sigHost = await _configService.ReadDefaultSignatureHost();
var linkToDoc = $"{sigHost}/envelope/{erId}";
placeholders["[LINK_TO_DOCUMENT]"] = linkToDoc;
placeholders["[LINK_TO_DOCUMENT_TEXT]"] = linkToDoc[..Math.Min(40, linkToDoc.Length)];
}
return placeholders;
}
public async Task<DataResult<int>> SendAccessCodeAsync(EnvelopeReceiverDto dto) => await SendAsync(dto: dto, tempType: Constants.EmailTemplateType.DocumentAccessCodeReceived);
public async Task<DataResult<int>> SendAsync(EnvelopeReceiverDto dto, Constants.EmailTemplateType tempType)
{
var tempSerResult = await _tempService.ReadByNameAsync(tempType);
if (tempSerResult.IsFailed)
return tempSerResult.ToFail<int>().Notice(LogLevel.Error, Flag.DataIntegrityIssue, $"The email cannot send because '{tempType}' template cannot found.");
var temp = tempSerResult.Data;
var mail = new EmailOutCreateDto()
{
EmailAddress = dto.Receiver!.EmailAddress,
EmailSubj = temp.Subject,
EmailBody = temp.Body,
//email_type = envelope_status,
//message = envelope_message,
ReferenceId = dto.EnvelopeId, //REFERENCE_ID = ENVELOPE_ID
ReferenceString = dto!.Envelope!.Uuid, //REFERENCE_STRING = ENVELOPE_UUID
//receiver_name = receiver.name,
//receiver_access_code = receiver.access_code,
//sender_adress = envelope.user.email,
//sender_name = envelope.user.full_name,
//envelope_title = envelope.title,
ReminderTypeId = _dConfig.ReminderTypeId,
SendingProfile = _dConfig.SendingProfile,
EntityId = null,
WfId = (int) EnvelopeStatus.MessageAccessCodeSent,
WfReference = null,
AddedWho = _dConfig.AddedWho,
EmailAttmt1 = _dConfig.EmailAttmt1
};
//get acccess code
var acResult = await _envRcvService.ReadAccessCodeByIdAsync(envelopeId: dto.EnvelopeId, receiverId: dto.ReceiverId);
if (acResult.IsFailed)
return acResult.ToFail<int>().Notice(LogLevel.Error, "Therefore, access code cannot be sent");
var accessCode = acResult.Data;
var placeholders = await CreatePlaceholders(accessCode: accessCode, envelopeReceiverDto: dto);
return await CreateWithTemplateAsync(createDto: mail,placeholders: placeholders,
dto, dto.Envelope.User!, dto.Envelope);
}
}
}

View File

@@ -0,0 +1,126 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeReceiverService : BasicCRUDService<IEnvelopeReceiverRepository, EnvelopeReceiverDto, EnvelopeReceiver, object>, IEnvelopeReceiverService
{
private readonly IStringLocalizer<Resource> _localizer;
public EnvelopeReceiverService(IEnvelopeReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper)
: base(repository, mapper)
{
_localizer = localizer;
}
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadBySignatureAsync(string signature, bool withEnvelope = false, bool withReceiver = true)
{
var env_rcvs = await _repository.ReadBySignatureAsync(signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver);
return Result.Success(_mapper.MapOrThrow<IEnumerable<EnvelopeReceiverDto>>(env_rcvs));
}
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUuidAsync(string uuid, bool withEnvelope = true, bool withReceiver = false)
{
var env_rcvs = await _repository.ReadByUuidAsync(uuid: uuid, withEnvelope: withEnvelope, withReceiver: withReceiver);
return Result.Success(_mapper.MapOrThrow<IEnumerable<EnvelopeReceiverDto>>(env_rcvs));
}
public async Task<DataResult<EnvelopeReceiverDto>> ReadByUuidSignatureAsync(string uuid, string signature, bool withEnvelope = true, bool withReceiver = true)
{
var env_rcv = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver);
if (env_rcv is null)
return Result.Fail<EnvelopeReceiverDto>()
.Message(Key.EnvelopeReceiverNotFound);
return Result.Success(_mapper.MapOrThrow<EnvelopeReceiverDto>(env_rcv));
}
public async Task<DataResult<EnvelopeReceiverDto>> ReadByEnvelopeReceiverIdAsync(string envelopeReceiverId, bool withEnvelope = true, bool withReceiver = true)
{
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
if (uuid is null || signature is null)
return Result.Fail<EnvelopeReceiverDto>()
.Message(_localizer[Key.WrongEnvelopeReceiverId])
.Notice(LogLevel.Warning, (uuid, signature).ToTitle())
.Notice(LogLevel.Warning, EnvelopeFlag.WrongEnvelopeReceiverId)
.Notice(LogLevel.Warning, Flag.PossibleSecurityBreach);
return await ReadByUuidSignatureAsync(uuid: uuid, signature: signature, withEnvelope: withEnvelope, withReceiver: withReceiver);
}
public async Task<DataResult<bool>> VerifyAccessCodeAsync(string uuid, string signature, string accessCode)
{
var er = await _repository.ReadByUuidSignatureAsync(uuid: uuid, signature: signature);
if (er is null)
return Result.Fail<bool>()
.Message(_localizer[Key.EnvelopeOrReceiverNonexists])
.Notice(LogLevel.Warning, (uuid, signature).ToTitle())
.Notice(LogLevel.Warning, EnvelopeFlag.EnvelopeOrReceiverNonexists)
.Notice(LogLevel.Warning, Flag.PossibleDataIntegrityIssue);
var actualAccessCode = er.AccessCode;
if (actualAccessCode is null)
return Result.Fail<bool>()
.Message(_localizer[Key.AccessCodeNull])
.Notice(LogLevel.Critical, (uuid, signature).ToTitle())
.Notice(LogLevel.Critical, EnvelopeFlag.AccessCodeNull)
.Notice(LogLevel.Critical, Flag.DataIntegrityIssue);
else if (accessCode != actualAccessCode)
return Result.Success(false).Message(_localizer[Key.WrongAccessCode]);
else
return Result.Success(true);
}
public async Task<DataResult<bool>> VerifyAccessCodeAsync(string envelopeReceiverId, string accessCode)
{
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
if (uuid is null || signature is null)
return Result.Fail<bool>()
.Message(Key.WrongEnvelopeReceiverId)
.Notice(LogLevel.Critical, EnvelopeFlag.WrongEnvelopeReceiverId)
.Notice(LogLevel.Critical, Flag.SecurityBreach)
.Notice(LogLevel.Critical, "Attempt to verify access code detected. Such actions are generally not initiated by well-intentioned users. Potential security breach suspected. Immediate investigation required.");
return await VerifyAccessCodeAsync(uuid: uuid, signature: signature, accessCode: accessCode);
}
public async Task<DataResult<bool>> IsExisting(string envelopeReceiverId)
{
(string? uuid, string? signature) = envelopeReceiverId.DecodeEnvelopeReceiverId();
if (uuid is null || signature is null)
return Result.Fail<bool>().Notice(LogLevel.Warning, EnvelopeFlag.NonDecodableEnvelopeReceiverId, "In IsExisting(string envelopeReceiverId)");
int count = await _repository.CountAsync(uuid:uuid, signature:signature);
return Result.Success(count > 0);
}
public async Task<DataResult<string>> ReadAccessCodeByIdAsync(int envelopeId, int receiverId)
{
var code = await _repository.ReadAccessCodeByIdAsync(envelopeId: envelopeId, receiverId: receiverId);
return code is null ?
Result.Fail<string>().Notice(LogLevel.Error, Flag.DataIntegrityIssue, $"Access code is null. Envelope ID is {envelopeId} and receiver ID {receiverId}")
: Result.Success(code);
}
public async Task<DataResult<IEnumerable<EnvelopeReceiverDto>>> ReadByUsernameAsync(string username, int? min_status = null, int? max_status = 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 dto_list = _mapper.MapOrThrow<IEnumerable<EnvelopeReceiverDto>>(er_list);
return Result.Success(dto_list);
}
}
}

View File

@@ -0,0 +1,41 @@
using AutoMapper;
using DigitalData.Core.Application;
using DigitalData.Core.DTO;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using Microsoft.Extensions.Localization;
using Microsoft.Extensions.Logging;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeService : BasicCRUDService<IEnvelopeRepository, EnvelopeDto, Envelope, int>, IEnvelopeService
{
private readonly ILogger _logger;
public EnvelopeService(IEnvelopeRepository repository, IMapper mapper, ILogger<EnvelopeService> logger)
: base(repository, mapper)
{
_logger = logger;
}
public async Task<DataResult<IEnumerable<EnvelopeDto>>> ReadAllWithAsync(bool documents = false, bool history = false, bool documentReceiverElement = false)
{
var envelopes = await _repository.ReadAllWithAsync(documents: documents, history: history, documentReceiverElement: documentReceiverElement);
var readDto = _mapper.MapOrThrow<IEnumerable<EnvelopeDto>>(envelopes);
return Result.Success(readDto);
}
public async Task<DataResult<EnvelopeDto>> ReadByUuidAsync(string uuid, bool withDocuments = false, bool withHistory = false, bool withDocumentReceiverElement = false, bool withUser = false, bool withAll = false)
{
var envelope = await _repository.ReadByUuidAsync(uuid: uuid, withDocuments: withDocuments, withHistory: withHistory, withDocumentReceiverElement: withDocumentReceiverElement, withUser:withUser, withAll:withAll);
if (envelope is null)
return Result.Fail<EnvelopeDto>();
var readDto = _mapper.MapOrThrow<EnvelopeDto>(envelope);
return Result.Success(readDto);
}
}
}

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Resources;
namespace EnvelopeGenerator.Application.Services
{
public class EnvelopeTypeService : BasicCRUDService<IEnvelopeTypeRepository, EnvelopeTypeDto, EnvelopeType, int>, IEnvelopeTypeService
{
public EnvelopeTypeService(IEnvelopeTypeRepository repository, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -0,0 +1,40 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Resources;
using EnvelopeGenerator.Application.DTOs.Receiver;
using DigitalData.Core.DTO;
namespace EnvelopeGenerator.Application.Services
{
public class ReceiverService : CRUDService<IReceiverRepository, ReceiverCreateDto, ReceiverReadDto, ReceiverUpdateDto, Receiver, int>, IReceiverService
{
public ReceiverService(IReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper)
: base(repository, mapper)
{
}
public async Task<DataResult<ReceiverReadDto>> ReadByAsync(string? emailAddress = null, string? signature = null)
{
var rcv = await _repository.ReadByAsync(emailAddress: emailAddress, signature: signature);
if (rcv is null)
return Result.Fail<ReceiverReadDto>();
return Result.Success(_mapper.MapOrThrow<ReceiverReadDto>(rcv));
}
public async Task<Result> DeleteByAsync(string? emailAddress = null, string? signature = null)
{
var rcv = await _repository.ReadByAsync(emailAddress: emailAddress, signature: signature);
if (rcv is null)
return Result.Fail();
return await _repository.DeleteAsync(rcv) ? Result.Success() : Result.Fail();
}
}
}

View File

@@ -0,0 +1,19 @@
using AutoMapper;
using DigitalData.Core.Application;
using Microsoft.Extensions.Localization;
using EnvelopeGenerator.Application.Contracts;
using EnvelopeGenerator.Application.DTOs;
using EnvelopeGenerator.Domain.Entities;
using EnvelopeGenerator.Infrastructure.Contracts;
using EnvelopeGenerator.Application.Resources;
namespace EnvelopeGenerator.Application.Services
{
public class UserReceiverService : BasicCRUDService<IUserReceiverRepository, UserReceiverDto, UserReceiver, int>, IUserReceiverService
{
public UserReceiverService(IUserReceiverRepository repository, IStringLocalizer<Resource> localizer, IMapper mapper)
: base(repository, mapper)
{
}
}
}

View File

@@ -18,6 +18,7 @@
DocumentOpened = 2004
DocumentSigned = 2005
SignatureConfirmed = 2006
DocumentRejected = 2007
MessageInvitationSent = 3001 ' Wird von Trigger verwendet
MessageAccessCodeSent = 3002
MessageConfirmationSent = 3003
@@ -25,6 +26,13 @@
MessageCompletionSent = 3005
End Enum
Public Enum ReferenceType
Receiver
Sender
System
Unknown
End Enum
Public Enum ElementStatus
Created = 0
End Enum
@@ -94,6 +102,7 @@
Public Const DATABASE = "DATABASE"
Public Const LOGCONFIG = "LOGCONFIG"
Public Const GDPICTURE = "GDPICTURE"
Public Const IGNORED_LABELS = "IgnoredLabels"
Public Const GREEN_300 = "#bbf7d0"
Public Const RED_300 = "#fecaca"

View File

@@ -1,7 +1,15 @@
Public Class DbConfig
Public Property ExternalProgramName As String = "Sign Flow"
Public Property DocumentPathOrigin As String = ""
Public Property DocumentPath As String = ""
Public Property ExportPath As String = ""
Public Property DocumentPath_DMZ As String = ""
Public Property ExportPath_DMZ As String = ""
Public Property DOCUMENT_PATH_MOVE_AFTSEND As String = ""
Public Property FINISHED_PATH_EX_DMZ As String = ""
Public Property EML_PATH_EX_DMZ As String = ""
Public Property SendingProfile As Integer = 0
Public Property SignatureHost As String = ""
Public Property NetUse_necessary As Boolean = False
Public Property NetUse_Finish As Boolean = False
End Class

View File

@@ -17,6 +17,8 @@ Public Class EmailData
Public Property EnvelopeTitle As String = ""
Public Property EmailAttachment As String = ""
Public Property ATT1_RELATED_ID As Long
Public Property ATT1_REL_TYPE As String = ""
''' <summary>
''' Constructor for sending email to receiver

View File

@@ -31,10 +31,10 @@
Public Property Receivers As New List(Of EnvelopeReceiver)
Public Property History As New List(Of EnvelopeHistoryEntry)
Public Property EnvelopeType As EnvelopeType
Public Property DOC_RESULT As Byte()
Public ReadOnly Property EnvelopeTypeTitle As String
Get
Return EnvelopeType.Title
Return EnvelopeType?.Title
End Get
End Property

View File

@@ -19,10 +19,5 @@ Public Class EnvelopeDocument
Public Property Filepath As String
Public Property PageCount As Integer
Public ReadOnly Property PageCountTranslated As String
Get
Return $"{PageCount} Seiten"
End Get
End Property
End Class
Public Property Byte_Data As Byte()
End Class

View File

@@ -220,6 +220,8 @@
<DesignTime>True</DesignTime>
<DependentUpon>Model.resx</DependentUpon>
</Compile>
<Compile Include="Strings\Model.vb" />
<Compile Include="TempFiles.vb" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="My Project\licenses.licx" />
@@ -241,11 +243,13 @@
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Envelope.en.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings\Envelope.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
<LastGenOutput>Envelope1.Designer.vb</LastGenOutput>
<CustomToolNamespace>My.Resources</CustomToolNamespace>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="Strings\Email.resx">
<Generator>PublicResXFileCodeGenerator</Generator>
@@ -264,6 +268,7 @@
</EmbeddedResource>
</ItemGroup>
<ItemGroup>
<None Include="app.config" />
<None Include="My Project\Application.myapp">
<Generator>MyApplicationCodeGenerator</Generator>
<LastGenOutput>Application.Designer.vb</LastGenOutput>

View File

@@ -1,9 +1,28 @@
Imports System.Drawing
Imports System.IO
Imports System.Security.Cryptography
Imports System.Text
Imports DevExpress.Utils.Svg
Imports EnvelopeGenerator.Common.Constants
Public Class Helpers
Private Shared key As String = "$xzBvyPETUS&amm8)D8x#)f;4%;?[BPd" ' Passwort-Schlüssel (16, 24, or 32 bytes)
Private Shared iv As String = "1wN&e[zrQ6_B7X/0" ' Initialisierungsvektor (16 bytes)
' Entschlüsselungsfunktion
Public Shared Function Decrypt(cipherText As String) As String
Dim aesAlg As Aes = Aes.Create()
aesAlg.Key = Encoding.UTF8.GetBytes(key)
aesAlg.IV = Encoding.UTF8.GetBytes(iv)
Dim decryptor As ICryptoTransform = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV)
Dim cipherBytes As Byte() = Convert.FromBase64String(cipherText)
Dim msDecrypt As New IO.MemoryStream(cipherBytes)
Using csDecrypt As New CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)
Using srDecrypt As New IO.StreamReader(csDecrypt)
Return srDecrypt.ReadToEnd()
End Using
End Using
End Function
''' <summary>
''' Encodes the EnvelopeUUID and the ReceiverSignature into an EnvelopeKey

View File

@@ -7,8 +7,9 @@ Imports System.Security.Cryptography
Imports System.IO
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument.FinalizeDocumentExceptions
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
Imports EnvelopeGenerator.Common.My.Resources
Imports EnvelopeGenerator.Common.Constants
Imports DevExpress.DataProcessing
Imports System.Data.SqlClient
Namespace Jobs
Public Class FinalizeDocumentJob
@@ -32,12 +33,16 @@ Namespace Jobs
Private PDFMerger As PDFMerger
Private ReportCreator As ReportCreator
Private ReadOnly CompleteWaitTimeInMinutes As Integer = 5
Private ReadOnly CompleteWaitTime As Integer = 5
Private ParentFolderUID As String = ""
Private myTempFiles As TempFiles
Private Class EnvelopeData
Public EnvelopeId As Integer
Public EnvelopeUUID As String
Public DocumentPath As String
Public AnnotationData As List(Of String)
Public DocAsByte As Byte()
End Class
@@ -45,7 +50,8 @@ Namespace Jobs
Dim oGdPictureKey As String = pContext.MergedJobDataMap.Item(Constants.GDPICTURE)
LogConfig = pContext.MergedJobDataMap.Item(Constants.LOGCONFIG)
Logger = LogConfig.GetLogger()
myTempFiles = New TempFiles(LogConfig)
myTempFiles.Create()
Dim JobId = pContext.JobDetail.Key
Logger.Info("Starting job {0}", JobId)
@@ -68,19 +74,59 @@ Namespace Jobs
InitializeServices(oState)
Logger.Debug("Loading PDFBurner..")
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey)
Dim ignoredLabels As List(Of String) = pContext.MergedJobDataMap.Item(Constants.IGNORED_LABELS)
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, ignoredLabels)
Logger.Debug("Loading PDFMerger..")
PDFMerger = New PDFMerger(LogConfig, oGdPictureKey)
Logger.Debug("Loading ReportCreator..")
ReportCreator = New ReportCreator(LogConfig, oState)
Logger.Debug("My.Settings.RuninDMZ: [{0}]", My.Settings.RuninDMZ.ToString)
Logger.Debug("My.Settings.NetUse_Usr: [{0}]", My.Settings.NetUse_Usr)
If My.Settings.RuninDMZ = True Then
If Config.DocumentPath_DMZ <> String.Empty Then
Logger.Debug("RuninDMZ - Using DocumentPath_DMZ: [{0}] - Overwrite Document-Path", Config.DocumentPath_DMZ)
Config.DocumentPath = Config.DocumentPath_DMZ
Config.NetUse_necessary = True
Else
Config.DocumentPath = Config.DocumentPath
End If
Else
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
Logger.Debug("Using DMZRemotePath: [{0}] - Overwrite Document-Path ...", Config.DOCUMENT_PATH_MOVE_AFTSEND)
Config.DocumentPath = Config.DOCUMENT_PATH_MOVE_AFTSEND
Config.NetUse_Finish = True
Else
Config.DocumentPath = Config.DocumentPath
End If
End If
Logger.Debug("DocumentPath: [{0}]", Config.DocumentPath)
If My.Settings.RuninDMZ = True Then
If Config.FINISHED_PATH_EX_DMZ <> String.Empty Then
Logger.Debug("RuninDMZ - FINISHED_PATH_EX_DMZ configured: [{0}]", Config.FINISHED_PATH_EX_DMZ)
Config.NetUse_Finish = True
End If
If Config.ExportPath_DMZ <> String.Empty Then
Logger.Debug("RuninDMZ - Using ExportPath_DMZ: [{0}] - Overwrite ExportPath", Config.ExportPath_DMZ)
Config.ExportPath = Config.ExportPath_DMZ
End If
End If
Logger.Debug("ExportPath: [{0}]", Config.ExportPath)
If Config.NetUse_Finish = True Then
If NetUse_Command(Config.DocumentPath, My.Settings.NetUse_Usr, My.Settings.NetUse_PW) = True Then
Logger.Debug("NetUse_Finish = successful!")
End If
End If
Dim oCompleteStatus As Integer = Constants.EnvelopeStatus.EnvelopeCompletelySigned
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTimeInMinutes}"
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE WHERE STATUS = {oCompleteStatus} AND DATEDIFF(minute, CHANGED_WHEN, GETDATE()) >= {CompleteWaitTime} ORDER BY GUID"
Dim oTable = Database.GetDatatable(oSql)
Dim oEnvelopeIds As List(Of Integer) = oTable.Rows.Cast(Of DataRow).
@@ -88,81 +134,98 @@ Namespace Jobs
Cast(Of Integer).
ToList()
Logger.Info("Found [{0}] completed envelopes.", oEnvelopeIds.Count)
If oEnvelopeIds.Count > 0 Then
Logger.Info("Found [{0}] completed envelopes.", oEnvelopeIds.Count)
End If
Dim oTotal As Integer = oEnvelopeIds.Count
Dim oCurrent As Integer = 1
For Each oId In oEnvelopeIds
Logger.Info("Finalizing Envelope [{0}] ({1}/{2})", oId, oCurrent, oTotal)
Logger.Debug("Loading Envelope..")
Dim oEnvelope = EnvelopeModel.GetById(oId)
If oEnvelope Is Nothing Then
Logger.Warn("Envelope could not be loaded for Id [{0}]!", oId)
Throw New ArgumentNullException("EnvelopeData")
End If
Logger.Debug("Loading Envelope Data..")
Dim oEnvelopeData = GetEnvelopeData(oId)
If oEnvelopeData Is Nothing Then
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
Throw New ArgumentNullException("EnvelopeData")
End If
Logger.Debug("Burning Annotations to pdf")
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
If oBurnedDocument Is Nothing Then
Logger.Warn("Document could not be finalized!")
Throw New ApplicationException("Document could not be finalized")
End If
If ActionService.CreateReport(oEnvelope) = False Then
Logger.Warn("Document Report could not be created!")
Throw New ApplicationException("Document Report could not be created")
End If
Logger.Debug("Creating report..")
Dim oReport As Byte() = ReportCreator.CreateReport(oEnvelope)
Logger.Debug("Report created.")
Logger.Debug("Merging documents..")
Dim oMergedDocument As Byte() = PDFMerger.MergeDocuments(oBurnedDocument, oReport)
Logger.Debug("Documents merged.")
Dim oOutputDirectoryPath = Config.ExportPath
Dim oOutputFilePath = Path.Combine(oOutputDirectoryPath, $"{oEnvelope.Uuid}.pdf")
Logger.Info("Writing finalized Pdf to disk..")
Logger.Info("Output path is [{0}]", oOutputFilePath)
Try
File.WriteAllBytes(oOutputFilePath, oMergedDocument)
Dim oEnvelope = EnvelopeModel.GetById(oId)
If oEnvelope Is Nothing Then
Logger.Warn("Envelope could not be loaded for Id [{0}]!", oId)
Throw New ArgumentNullException("EnvelopeData")
End If
Logger.Debug("Loading Envelope Data..")
Dim oEnvelopeData = GetEnvelopeData(oId)
If oEnvelopeData Is Nothing Then
Logger.Warn("EnvelopeData could not be loaded for Id [{0}]!", oId)
Throw New ArgumentNullException("EnvelopeData")
End If
If Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
oEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
Logger.Debug("Replaced Path in oEnvelopeData.DocumentPath!")
End If
Logger.Debug("Burning Annotations to pdf ...")
Dim oBurnedDocument As Byte() = BurnAnnotationsToPdf(oEnvelopeData)
If oBurnedDocument Is Nothing Then
Logger.Warn("Document could not be finalized!")
Throw New ApplicationException("Document could not be finalized")
End If
If ActionService.CreateReport(oEnvelope) = False Then
Logger.Warn("Document Report could not be created!")
Throw New ApplicationException("Document Report could not be created")
End If
Logger.Debug("Creating report..")
Dim oReport As Byte() = ReportCreator.CreateReport(oEnvelope)
Logger.Debug("Report created!")
Logger.Debug("Merging documents ...")
Dim oMergedDocument As Byte() = PDFMerger.MergeDocuments(oBurnedDocument, oReport)
Logger.Debug("Documents merged!")
Dim oOutputDirectoryPath = Path.Combine(Config.ExportPath, ParentFolderUID)
If Not Directory.Exists(oOutputDirectoryPath) Then
Directory.CreateDirectory(oOutputDirectoryPath)
End If
Dim oOutputFilePath = Path.Combine(oOutputDirectoryPath, $"{oEnvelope.Uuid}.pdf")
Logger.Info("Writing finalized Pdf to disk..")
Logger.Info("Output path is [{0}]", oOutputFilePath)
Try
File.WriteAllBytes(oOutputFilePath, oMergedDocument)
Catch ex As Exception
Logger.Warn("Could not export final document to disk!")
Throw New ExportDocumentException("Could not export final document to disk!", ex)
End Try
If Config.NetUse_Finish = True Then
If Config.FINISHED_PATH_EX_DMZ <> String.Empty Then
If My.Settings.NetUse_PW <> String.Empty And My.Settings.NetUse_Usr <> String.Empty Then
Clean_DNZ_PAth(Config.FINISHED_PATH_EX_DMZ)
End If
End If
End If
Logger.Info("Writing EB-bytes to database...")
Update_File_DB(oOutputFilePath, oEnvelope.Id)
Logger.Info("Sending finalized report-mails..")
If SendFinalEmails(oEnvelope) = False Then ', oOutputFilePath
Throw New ApplicationException("Final emails could not be sent!")
End If
Logger.Debug("Setting envelope status..")
If ActionService.FinalizeEnvelope(oEnvelope) = False Then
Logger.Warn("Envelope could not be finalized!")
Throw New ApplicationException("Envelope could not be finalized")
End If
Catch ex As Exception
Logger.Warn("Could not export final document to disk!")
Throw New ExportDocumentException("Could not export final document to disk!", ex)
Logger.Warn($"Unhandled exception while working envelope [{oId}] - [{ex.Message}]")
End Try
Logger.Info("Sending final Emails..")
If SendFinalEmails(oEnvelope, oOutputFilePath) = False Then
Throw New ApplicationException("Final emails could not be sent!")
End If
Logger.Debug("Setting envelope status..")
If ActionService.FinalizeEnvelope(oEnvelope) = False Then
Logger.Warn("Envelope could not be finalized!")
Throw New ApplicationException("Envelope could not be finalized")
End If
oCurrent += 1
Logger.Info("Envelope finalized!")
Next
Logger.Info("Completed job {0} successfully!", JobId)
Logger.Debug("Completed job {0} successfully!", JobId)
Catch ex As MergeDocumentException
Logger.Warn("Certificate Document job failed at step: Merging documents!")
Logger.Error(ex)
@@ -180,34 +243,119 @@ Namespace Jobs
Return Task.FromResult(True)
End Function
Private Sub Update_File_DB(pFilePath As String, pEnvelopeID As Long)
Dim SqlCom As SqlCommand
Dim imageData As Byte()
Dim sFileName As String
Dim qry As String
Private Function SendFinalEmails(pEnvelope As Envelope, pAttachment As String) As Boolean
Try
'Read Image Bytes into a byte array
'Initialize SQL Server Connection
'Convert File to bytes Array
imageData = ReadFile(pFilePath)
If Not IsNothing(imageData) Then
sFileName = System.IO.Path.GetFileName(pFilePath)
'Set insert query
qry = $"UPDATE TBSIG_ENVELOPE SET DOC_RESULT = @ImageData WHERE GUID = {pEnvelopeID}"
'Initialize SqlCommand object for insert.
SqlCom = New SqlCommand(qry, Database.GetConnection)
'We are passing File Name and Image byte data as sql parameters.
SqlCom.Parameters.Add(New SqlParameter("@ImageData", DirectCast(imageData, Object)))
'Execute the Query
SqlCom.ExecuteNonQuery()
End If
Catch ex As Exception
Logger.Error(ex)
End Try
End Sub
'Open file in to a filestream and read data in a byte array.
Private Function ReadFile(ByVal sPath As String) As Byte()
'Initialize byte array with a null value initially.
Dim data As Byte() = Nothing
'Use FileInfo object to get file size.
Dim fInfo As New FileInfo(sPath)
Dim numBytes As Long = fInfo.Length
'Open FileStream to read file
Dim fStream As New FileStream(sPath, FileMode.Open, FileAccess.Read)
'Use BinaryReader to read file stream into byte array.
Dim br As New BinaryReader(fStream)
'When you use BinaryReader, you need to supply number of bytes to read from file.
'In this case we want to read entire file. So supplying total number of bytes.
data = br.ReadBytes(CInt(numBytes))
Return data
End Function
Private Function NetUse_Command(pDestinationPath As String, pUsername As String, pPassword As String)
Dim oDectryptedPW = Helpers.Decrypt(My.Settings.NetUse_PW)
Dim netUseCommand As String = $"net use {pDestinationPath} /user:{pUsername} {oDectryptedPW}"
Logger.Debug("EXECUTING NetUse_Command for " & pDestinationPath)
Dim processInfo As New ProcessStartInfo("cmd.exe", $"/C {netUseCommand}")
processInfo.RedirectStandardOutput = True
processInfo.UseShellExecute = False
processInfo.CreateNoWindow = True
Using process As Process = Process.Start(processInfo)
process.WaitForExit()
' Prüfe den Rückgabewert des net use Befehls
If process.ExitCode = 0 Then
Return True
Else
Return False
End If
End Using
End Function
Private Function Clean_DNZ_PAth(pSourcePath As String) As Boolean
Dim oFilename = System.IO.Path.GetFileName(pSourcePath)
Logger.Debug("## Starting Clean_DNZ_PAth ...")
Logger.Debug("## pSourcePath {0}", pSourcePath)
Dim oDirectorySource = Path.Combine(pSourcePath, ParentFolderUID)
Try
Logger.Debug($"Deleting oDirectorySource {oDirectorySource} ...")
Directory.Delete(oDirectorySource, True)
Console.WriteLine($"Folder successfully deleted!")
Logger.Debug($"...Deleted!")
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Private Function SendFinalEmails(pEnvelope As Envelope) As Boolean ', pAttachment As String
Dim oMailToCreator = pEnvelope.FinalEmailToCreator
Dim oMailToReceivers = pEnvelope.FinalEmailToReceivers
If oMailToCreator <> FinalEmailType.No Then
Logger.Debug("Sending email to creator..")
SendFinalEmailToCreator(pEnvelope, pAttachment)
Logger.Debug("Sending email to creator ...")
SendFinalEmailToCreator(pEnvelope) ', pAttachment
End If
If oMailToReceivers <> FinalEmailType.No Then
Logger.Debug("Sending emails to receivers..")
SendFinalEmailToReceivers(pEnvelope, pAttachment)
SendFinalEmailToReceivers(pEnvelope) ', pAttachment
End If
Return True
End Function
Private Function SendFinalEmailToCreator(pEnvelope As Envelope, pAttachment As String) As Boolean
Private Function SendFinalEmailToCreator(pEnvelope As Envelope) As Boolean ', pAttachment As String
Dim oIncludeAttachment = SendFinalEmailWithAttachment(pEnvelope.FinalEmailToCreator)
Dim oAttachment = String.Empty
' Dim oAttachment = String.Empty
Logger.Debug("Attachment included: [{0}]", oIncludeAttachment)
If oIncludeAttachment Then
oAttachment = pAttachment
'oAttachment = pAttachment
End If
If ActionService.CompleteEnvelope(pEnvelope, oAttachment) = False Then
If ActionService.CompleteEnvelope(pEnvelope) = False Then ', oAttachment
Logger.Error("Envelope could not be completed for receiver [{0}]", pEnvelope.User.Email)
Return False
End If
@@ -215,17 +363,18 @@ Namespace Jobs
Return True
End Function
Private Function SendFinalEmailToReceivers(pEnvelope As Envelope, pAttachment As String) As Boolean
Private Function SendFinalEmailToReceivers(pEnvelope As Envelope) As Boolean ', pAttachment As String
Dim oIncludeAttachment = SendFinalEmailWithAttachment(pEnvelope.FinalEmailToReceivers)
Dim oAttachment = String.Empty
'Dim oAttachment = String.Empty
Logger.Debug("Attachment included: [{0}]", oIncludeAttachment)
If oIncludeAttachment Then
oAttachment = pAttachment
' oAttachment = pAttachment
End If
For Each oReceiver In pEnvelope.Receivers
If ActionService.CompleteEnvelope(pEnvelope, oReceiver, oAttachment) = False Then
If ActionService.CompleteEnvelope(pEnvelope, oReceiver) = False Then ', oAttachment
Logger.Error("Envelope could not be completed for receiver [{0}]", oReceiver.Email)
Return False
End If
@@ -242,27 +391,58 @@ Namespace Jobs
End If
End Function
Private Function BurnAnnotationsToPdf(pData As EnvelopeData) As Byte()
Dim pEnvelopeId = pData.EnvelopeId
Private Function BurnAnnotationsToPdf(pEnvelopeData As EnvelopeData) As Byte()
Dim pEnvelopeId = pEnvelopeData.EnvelopeId
Logger.Info("Burning [{0}] signatures", pData.AnnotationData.Count)
Dim oAnnotations = pData.AnnotationData
Dim oInputPath = pData.DocumentPath
Logger.Info($"Burning [{pEnvelopeData.AnnotationData.Count}] signatures")
Dim oAnnotations = pEnvelopeData.AnnotationData
Dim oInputPath = ""
If IsNothing(pEnvelopeData.DocAsByte) Then
If My.Settings.RuninDMZ Then
Logger.Debug("Replacing Path in pData.DocumentPath ...")
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DocumentPath)
ElseIf Config.DOCUMENT_PATH_MOVE_AFTSEND <> String.Empty Then
Logger.Debug("Replacing Path in pData.DocumentPath ...")
oInputPath = pEnvelopeData.DocumentPath.Replace(Config.DocumentPathOrigin, Config.DOCUMENT_PATH_MOVE_AFTSEND)
Else
oInputPath = pEnvelopeData.DocumentPath
End If
Logger.Info($"Input path: [{oInputPath}]")
Else
Logger.Info($"we got bytes..")
oInputPath = Config.DocumentPathOrigin
Logger.Info($"oInputPath: {Config.DocumentPathOrigin}")
End If
Logger.Info("Input path: [{0}]", oInputPath)
If IsNothing(pEnvelopeData.DocAsByte) Then
Dim oDirectorySource As String = Path.GetDirectoryName(oInputPath)
Dim split As String() = oDirectorySource.Split("\")
ParentFolderUID = split(split.Length - 1)
Else
ParentFolderUID = pEnvelopeData.EnvelopeUUID
End If
Logger.Info("ParentFolderUID: [{0}]", ParentFolderUID)
Dim oInputDocumentBuffer As Byte()
Try
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
Catch ex As Exception
Logger.Error(ex)
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
End Try
If Not IsNothing(pEnvelopeData.DocAsByte) Then
oInputDocumentBuffer = pEnvelopeData.DocAsByte
Else
Try
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
Catch ex As Exception
Logger.Error(ex)
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
End Try
End If
Return PDFBurner.BurnInstantJSONAnnotationsToPDF(oInputDocumentBuffer, oAnnotations)
End Function
Private Function GetEnvelopeData(pEnvelopeId As Integer) As EnvelopeData
Dim oSql = $"SELECT T.GUID, T2.FILEPATH FROM [dbo].[TBSIG_ENVELOPE] T
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)
@@ -275,7 +455,9 @@ Namespace Jobs
Dim oData As New EnvelopeData With {
.EnvelopeId = pEnvelopeId,
.DocumentPath = oRow.ItemEx("FILEPATH", ""),
.AnnotationData = oAnnotationData
.AnnotationData = oAnnotationData,
.DocAsByte = DirectCast(oRow.Item("BYTE_DATA"), Byte()),
.EnvelopeUUID = oRow.ItemEx("ENVELOPE_UUID", "")
}
Logger.Debug("Document path: [{0}]", oData.DocumentPath)

View File

@@ -15,14 +15,18 @@ Namespace Jobs.FinalizeDocument
Private Const ANNOTATION_TYPE_IMAGE = "pspdfkit/image"
Private Const ANNOTATION_TYPE_INK = "pspdfkit/ink"
Private Const ANNOTATION_TYPE_WIDGET = "pspdfkit/widget"
Private Property _ignoredLabels As List(Of String)
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String)
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, ignoredLabels As List(Of String))
MyBase.New(pLogConfig)
LicenseManager = New LicenseManager()
LicenseManager.RegisterKEY(pGDPictureLicenseKey)
Manager = New AnnotationManager()
_ignoredLabels = ignoredLabels
End Sub
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
@@ -37,11 +41,11 @@ Namespace Jobs.FinalizeDocument
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}]")
@@ -70,6 +74,7 @@ Namespace Jobs.FinalizeDocument
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
For Each oAnnotation In oAnnotationData.annotations
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
Select Case oAnnotation.type
Case ANNOTATION_TYPE_IMAGE
AddImageAnnotation(oAnnotation, oAnnotationData.attachments)
@@ -77,6 +82,12 @@ Namespace Jobs.FinalizeDocument
Case ANNOTATION_TYPE_INK
AddInkAnnotation(oAnnotation)
Case ANNOTATION_TYPE_WIDGET
'Add form field values
Dim formFieldValue = oAnnotationData.formFieldValues.FirstOrDefault(Function(fv) fv.name = oAnnotation.id)
If formFieldValue IsNot Nothing AndAlso Not _ignoredLabels.Contains(formFieldValue.value) Then
AddFormFieldValue(oAnnotation, formFieldValue)
End If
End Select
Next
@@ -137,6 +148,33 @@ Namespace Jobs.FinalizeDocument
End Function
Private Function AddFormFieldValue(pAnnotation As Annotation, formFieldValue As FormFieldValue) As Boolean
Try
' Convert pixels to Inches
Dim oBounds = pAnnotation.bbox.Select(AddressOf ToInches).ToList()
Dim oX = oBounds.Item(0)
Dim oY = oBounds.Item(1)
Dim oWidth = oBounds.Item(2)
Dim oHeight = oBounds.Item(3)
Manager.SelectPage(pAnnotation.pageIndex + 1)
' Add the text annotation
Dim ant = Manager.AddTextAnnot(oX, oY, oWidth, oHeight, formFieldValue.value)
' Set the font properties
ant.FontName = "Arial"
ant.FontSize = 8
ant.FontStyle = FontStyle.Italic
Manager.SaveAnnotationsToPage()
Return True
Catch ex As Exception
Logger.Warn("Could not add image annotation!")
Logger.Error(ex)
Return False
End Try
End Function
Private Function ToPointF(pPoints As List(Of Single)) As PointF
Dim oPoints = pPoints.Select(AddressOf ToInches).ToList()
Return New PointF(oPoints.Item(0), oPoints.Item(1))
@@ -153,6 +191,7 @@ Namespace Jobs.FinalizeDocument
Friend Class AnnotationData
Public Property annotations As List(Of Annotation)
Public Property attachments As Dictionary(Of String, Attachment)
Public Property formFieldValues As List(Of FormFieldValue)
End Class
Friend Class Annotation
@@ -174,5 +213,10 @@ Namespace Jobs.FinalizeDocument
Public Property binary As String
Public Property contentType As String
End Class
Friend Class FormFieldValue
Public Property name As String
Public Property value As String
End Class
End Class
End Namespace

View File

@@ -17,10 +17,16 @@ Public Class ConfigModel
Return New DbConfig() With {
.DocumentPath = oRow.ItemEx("DOCUMENT_PATH", ""),
.DocumentPathOrigin = oRow.ItemEx("DOCUMENT_PATH", ""),
.DocumentPath_DMZ = oRow.ItemEx("DOCUMENT_PATH_DMZ", ""),
.ExportPath = oRow.ItemEx("EXPORT_PATH", ""),
.ExportPath_DMZ = oRow.ItemEx("EXPORT_PATH_DMZ", ""),
.SendingProfile = oRow.ItemEx("SENDING_PROFILE", 0),
.SignatureHost = oRow.ItemEx("SIGNATURE_HOST", ""),
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", "")
.ExternalProgramName = oRow.ItemEx("EXTERNAL_PROGRAM_NAME", ""),
.DOCUMENT_PATH_MOVE_AFTSEND = oRow.ItemEx("DOCUMENT_PATH_MOVE_AFTSEND", ""),
.FINISHED_PATH_EX_DMZ = oRow.ItemEx("FINISHED_PATH_EX_DMZ", ""),
.EML_PATH_EX_DMZ = oRow.ItemEx("EML_PATH_EX_DMZ", "")
}
Catch ex As Exception
Logger.Error(ex)

View File

@@ -24,7 +24,8 @@ Public Class DocumentModel
.Filepath = pRow.ItemEx("FILEPATH", ""),
.FileNameOriginal = pRow.ItemEx("FILENAME_ORIGINAL", ""),
.IsTempFile = False,
.Elements = ElementModel.List(oDocumentId, pReceiverId)
.Elements = ElementModel.List(oDocumentId, pReceiverId),
.Byte_Data = DirectCast(pRow.Item("BYTE_DATA"), Byte())
}
End Function
@@ -79,18 +80,21 @@ Public Class DocumentModel
([FILENAME]
,[FILENAME_ORIGINAL]
,[FILEPATH]
,[ENVELOPE_ID])
,[ENVELOPE_ID]
,[BYTE_DATA])
VALUES
(@FILENAME
,@FILENAME_ORIGINAL
,@FILEPATH
,@ENVELOPE_ID)"
,@ENVELOPE_ID
,@BYTE_DATA)"
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("FILENAME", SqlDbType.NVarChar).Value = pDocument.Filename
oCommand.Parameters.Add("FILENAME_ORIGINAL", SqlDbType.NVarChar).Value = pDocument.FileNameOriginal
oCommand.Parameters.Add("FILEPATH", SqlDbType.NVarChar).Value = pDocument.Filepath
oCommand.Parameters.Add("ENVELOPE_ID", SqlDbType.Int).Value = pEnvelope.Id
oCommand.Parameters.Add(New SqlParameter("@BYTE_DATA", DirectCast(pDocument.Byte_Data, Object)))
If Database.ExecuteNonQuery(oCommand, pTransaction) Then
pDocument.EnvelopeId = pEnvelope.Id

View File

@@ -12,8 +12,8 @@ Public Class EmailModel
Public Function Insert(pEmail As EmailData) As Boolean
Try
Dim oSql = "INSERT INTO [dbo].[TBEMLP_EMAIL_OUT] "
oSql += " (EMAIL_ADRESS, EMAIL_SUBJ, EMAIL_BODY, ADDED_WHO, SENDING_PROFILE, REFERENCE_ID, REFERENCE_STRING, REMINDER_TYPE_ID, EMAIL_ATTMT1, WF_ID) "
oSql += " VALUES (@EMAIL_ADRESS, @EMAIL_SUBJ, @EMAIL_BODY, @ADDED_WHO, @SENDING_PROFILE, @REFERENCE_ID, @REFERENCE_STRING, @REMINDER_TYPE_ID, @EMAIL_ATTMT1, @WF_ID)"
oSql += " (EMAIL_ADRESS, EMAIL_SUBJ, EMAIL_BODY, ADDED_WHO, SENDING_PROFILE, REFERENCE_ID, REFERENCE_STRING, REMINDER_TYPE_ID, WF_ID,ATT1_RELATED_ID,ATT1_REL_TYPE) "
oSql += " VALUES (@EMAIL_ADRESS, @EMAIL_SUBJ, @EMAIL_BODY, @ADDED_WHO, @SENDING_PROFILE, @REFERENCE_ID, @REFERENCE_STRING, @REMINDER_TYPE_ID, @WF_ID,@ATT1_RELATED_ID,@ATT1_REL_TYPE)"
Dim oCommand As New SqlCommand(oSql)
oCommand.Parameters.Add("EMAIL_ADRESS", SqlDbType.NVarChar).Value = pEmail.EmailAdress
oCommand.Parameters.Add("EMAIL_SUBJ", SqlDbType.NVarChar).Value = pEmail.EmailSubject
@@ -23,8 +23,10 @@ Public Class EmailModel
oCommand.Parameters.Add("REFERENCE_ID", SqlDbType.Int).Value = pEmail.ReferenceID
oCommand.Parameters.Add("REFERENCE_STRING", SqlDbType.NVarChar).Value = pEmail.ReferenceString
oCommand.Parameters.Add("REMINDER_TYPE_ID", SqlDbType.Int).Value = 202377
oCommand.Parameters.Add("EMAIL_ATTMT1", SqlDbType.NVarChar).Value = pEmail.EmailAttachment
'oCommand.Parameters.Add("EMAIL_ATTMT1", SqlDbType.NVarChar).Value = pEmail.EmailAttachment
oCommand.Parameters.Add("WF_ID", SqlDbType.Int).Value = pEmail.EmailType ' Wegen DB-Trigger MUSS dieser Wert gesetzt werden
oCommand.Parameters.Add("ATT1_RELATED_ID", SqlDbType.Int).Value = pEmail.ATT1_RELATED_ID
oCommand.Parameters.Add("ATT1_REL_TYPE", SqlDbType.NVarChar).Value = pEmail.ATT1_REL_TYPE
If Database.ExecuteNonQuery(oCommand) Then
Return True

View File

@@ -47,7 +47,15 @@ Public Class EnvelopeModel
.FinalEmailToCreator = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_CREATOR", Constants.FinalEmailType.No.ToString())),
.FinalEmailToReceivers = ObjectEx.ToEnum(Of Constants.FinalEmailType)(pRow.ItemEx("FINAL_EMAIL_TO_RECEIVERS", Constants.FinalEmailType.No.ToString()))
}
Dim oDOC_RESULT = pRow.Item("DOC_RESULT")
If Not IsDBNull(oDOC_RESULT) Then
Dim oByte As Byte() = DirectCast(pRow.Item("DOC_RESULT"), Byte())
If Not IsNothing(oByte) Then
oEnvelope.DOC_RESULT = oByte
End If
Else
oEnvelope.DOC_RESULT = Nothing
End If
oEnvelope.User = UserModel.SelectUser(oEnvelope.UserId)
oEnvelope.Receivers = ReceiverModel.ListEnvelopeReceivers(oEnvelope.Id)
oEnvelope.Documents = DocumentModel.List(oEnvelope.Id)
@@ -185,6 +193,9 @@ Public Class EnvelopeModel
oCommand.Parameters.Add("TITLE", SqlDbType.NVarChar).Value = pEnvelope.Title
oCommand.Parameters.Add("ENVELOPE_TYPE", SqlDbType.Int).Value = pEnvelope.EnvelopeTypeId
oCommand.Parameters.Add("CONTRACT_TYPE", SqlDbType.Int).Value = pEnvelope.ContractType
If IsNothing(pEnvelope.Language) Then
pEnvelope.Language = "de-DE"
End If
oCommand.Parameters.Add("LANGUAGE", SqlDbType.NVarChar).Value = pEnvelope.Language
oCommand.Parameters.Add("CERTIFICATION_TYPE", SqlDbType.Int).Value = pEnvelope.CertificationType
oCommand.Parameters.Add("EXPIRES_WHEN_DAYS", SqlDbType.Int).Value = pEnvelope.ExpiresWhenDays

View File

@@ -10,7 +10,7 @@ Public Class HistoryModel
Private Function ToEnvelopeHistoryEntry(pRow As DataRow) As EnvelopeHistoryEntry
Return New EnvelopeHistoryEntry() With {
.ActionDate = pRow.Item("ACTION_DATE"),
.ActionDate = pRow.ItemEx(Of Date)("ACTION_DATE", Nothing),
.EnvelopeId = pRow.Item("ENVELOPE_ID"),
.Status = pRow.Item("STATUS"),
.UserReference = pRow.ItemEx("USER_REFERENCE", "")
@@ -18,7 +18,7 @@ Public Class HistoryModel
End Function
Public Function List(pEnvelopeId As Integer) As List(Of EnvelopeHistoryEntry)
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE_HISTORY WHERE ENVELOPE_ID = {pEnvelopeId} ORDER BY GUID DESC"
Dim oSql = $"SELECT * FROM TBSIG_ENVELOPE_HISTORY WHERE ENVELOPE_ID = {pEnvelopeId} AND ACTION_DATE IS NOT NULL ORDER BY GUID DESC"
Dim oTable = Database.GetDatatable(oSql)
Return oTable?.Rows.
Cast(Of DataRow).

View File

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

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -53,6 +53,33 @@ Namespace My
Return defaultInstance
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("False")> _
Public ReadOnly Property RuninDMZ() As Boolean
Get
Return CType(Me("RuninDMZ"),Boolean)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("dd-gan\Administrator")> _
Public ReadOnly Property NetUse_Usr() As String
Get
Return CType(Me("NetUse_Usr"),String)
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("sY4vnATDXwosbTJGip6SqA==")> _
Public ReadOnly Property NetUse_PW() As String
Get
Return CType(Me("NetUse_PW"),String)
End Get
End Property
End Class
End Namespace

View File

@@ -1,7 +1,15 @@
<?xml version='1.0' encoding='utf-8'?>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" UseMySettingsClassName="true">
<Profiles>
<Profile Name="(Default)" />
</Profiles>
<Settings />
</SettingsFile>
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="RuninDMZ" Type="System.Boolean" Scope="Application">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="NetUse_Usr" Type="System.String" Scope="Application">
<Value Profile="(Default)">dd-gan\Administrator</Value>
</Setting>
<Setting Name="NetUse_PW" Type="System.String" Scope="Application">
<Value Profile="(Default)">sY4vnATDXwosbTJGip6SqA==</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -1,5 +1,6 @@
Imports DevExpress.DataAccess.Native.Web
Imports DigitalData.Modules.Base
Imports EnvelopeGenerator.Common.My.Resources
Public Class ActionService
Inherits BaseService
@@ -33,14 +34,18 @@ Public Class ActionService
Return True
End Function
Public Function ResendReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
EmailService.SendDocumentReceivedEmail(pEnvelope, pReceiver)
End Function
Public Function DeleteEnvelope(pEnvelope As Envelope) 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
Return False
End If
Dim oSendResult = pEnvelope.Receivers.
Select(Function(r) EmailService.SendEnvelopeDeletedEmail(pEnvelope, r)).
Select(Function(r) EmailService.SendEnvelopeDeletedEmail(pEnvelope, r, pReason)).
All(Function(r) r = True)
If oSendResult = False Then
@@ -108,20 +113,20 @@ Public Class ActionService
Return True
End Function
Public Function CompleteEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pAttachment As String) As Boolean
Public Function CompleteEnvelope(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean ', pAttachment As String
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent, pReceiver.Email) = False Then
Return False
End If
Return EmailService.SendDocumentCompletedEmailToReceiver(pEnvelope, pReceiver, pAttachment)
Return EmailService.SendDocumentCompletedEmailToReceiver(pEnvelope, pReceiver) ', pAttachment
End Function
Public Function CompleteEnvelope(pEnvelope As Envelope, pAttachment As String) As Boolean
Public Function CompleteEnvelope(pEnvelope As Envelope) As Boolean ', pAttachment As String
If HistoryService.SetEnvelopeStatus(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent, pEnvelope.User.Email) = False Then
Return False
End If
Return EmailService.SendDocumentCompletedEmailToCreator(pEnvelope, pAttachment)
Return EmailService.SendDocumentCompletedEmailToCreator(pEnvelope) ', pAttachment
End Function
Public Function CreateReport(pEnvelope As Envelope) As Boolean

View File

@@ -1,6 +1,7 @@
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.Common.My.Resources
Public Class EmailService
Inherits BaseService
@@ -15,14 +16,14 @@ Public Class EmailService
EmailTemplate = New TemplateService(pState)
End Sub
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
Public Function SendEnvelopeDeletedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pReason As String) As Boolean
Logger.Debug("Creating email data object.")
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageDeletionSent) With
{
.SignatureLink = ""
}
EmailTemplate.FillEnvelopeDeletedEmailBody(oEmailData)
EmailTemplate.FillEnvelopeDeletedEmailBody(oEmailData, pReason)
If EmailModel.Insert(oEmailData) = False Then
Logger.Error("EMail data could not be inserted.")
@@ -49,6 +50,15 @@ Public Class EmailService
Return True
End Function
Public Function GetReceiverUrl(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As String
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageInvitationSent) With
{
.SignatureLink = Helpers.GetEnvelopeURL(State.DbConfig.SignatureHost, pEnvelope.Uuid, pReceiver.Signature)
}
Return oEmailData.SignatureLink
End Function
Public Function SendDocumentAccessCodeReceivedEmail(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
Logger.Debug("Creating email data object.")
Dim oEmailData As New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageAccessCodeSent) With
@@ -83,14 +93,15 @@ Public Class EmailService
Return True
End Function
Public Function SendDocumentCompletedEmailToReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver, pAttachment As String) As Boolean
Public Function SendDocumentCompletedEmailToReceiver(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean ', pAttachment As String
Logger.Debug("Creating email data object.")
Dim oEmailData = New EmailData(pEnvelope, pReceiver, Constants.EnvelopeStatus.MessageCompletionSent) With
{
.SignatureLink = "",
.EmailAttachment = pAttachment
.ATT1_RELATED_ID = pEnvelope.Id,
.ATT1_REL_TYPE = "EnvelopeResult"
}
' .EmailAttachment = pAttachment,
Logger.Debug("Sending mail to receiver: [{0}]", oEmailData.EmailAdress)
EmailTemplate.FillDocumentCompletedEmailBody(oEmailData)
@@ -103,14 +114,15 @@ Public Class EmailService
Return True
End Function
Public Function SendDocumentCompletedEmailToCreator(pEnvelope As Envelope, pAttachment As String) As Boolean
Public Function SendDocumentCompletedEmailToCreator(pEnvelope As Envelope) As Boolean ', pAttachment As String
Logger.Debug("Creating email data object.")
Dim oEmailData = New EmailData(pEnvelope, Constants.EnvelopeStatus.MessageCompletionSent) With
{
.SignatureLink = "",
.EmailAttachment = pAttachment
.ATT1_RELATED_ID = pEnvelope.Id,
.ATT1_REL_TYPE = "EnvelopeResult"
}
'.EmailAttachment = pAttachment,
EmailTemplate.FillDocumentCompletedEmailBody(oEmailData)
If EmailModel.Insert(oEmailData) = False Then

View File

@@ -16,7 +16,7 @@ Public Class TemplateService
EmailHtmlTemplateModel = New EmailTemplateModel(pState)
End Sub
Private Sub InitDictionary(pEmailData As EmailData)
Private Sub InitDictionary(pEmailData As EmailData, Optional pReason As String = "")
Logger.Debug("Initializing dictionary..")
_replaceDictionary = New Dictionary(Of String, String) From {
@@ -28,7 +28,8 @@ Public Class TemplateService
{"[LINK_TO_DOCUMENT_TEXT]", $"{pEmailData.SignatureLink.Truncate(40)}.."},
{"[DOCUMENT_TITLE]", pEmailData.EnvelopeTitle},
{"[MESSAGE]", pEmailData.Message},
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode}
{"[DOCUMENT_ACCESS_CODE]", pEmailData.ReceiverAccessCode},
{"[REASON]", pReason}
}
End Sub
@@ -40,11 +41,11 @@ Public Class TemplateService
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
End Sub
Public Sub FillEnvelopeDeletedEmailBody(pEmailData As EmailData)
InitDictionary(pEmailData)
Public Sub FillEnvelopeDeletedEmailBody(pEmailData As EmailData, pReason As String)
InitDictionary(pEmailData, pReason)
Dim oTemplate = EmailHtmlTemplateModel.GetById(Constants.EmailTemplateType.DocumentDeleted)
pEmailData.EmailBody = FillTemplate(oTemplate.Body)
pEmailData.EmailBody = FillTemplate(oTemplate.Body, pReason)
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
End Sub
@@ -72,11 +73,12 @@ Public Class TemplateService
pEmailData.EmailSubject = FillTemplate(oTemplate.Subject)
End Sub
Private Function FillTemplate(pTemplate As String) As String
Private Function FillTemplate(pTemplate As String, Optional pReason As String = "") As String
Dim oText As String = pTemplate
For Each dictItem As KeyValuePair(Of String, String) In _replaceDictionary
If oText.Contains(dictItem.Key) Then
oText = oText.Replace(dictItem.Key, dictItem.Value)
End If

View File

@@ -154,7 +154,7 @@
<value>Envelope could not be sent!</value>
</data>
<data name="Envelope Invitations Sent" xml:space="preserve">
<value>Envelope Invitations Sent</value>
<value>The invitations have been scheduled for dispatch.s</value>
</data>
<data name="Envelope Overview" xml:space="preserve">
<value>Overview</value>

View File

@@ -154,7 +154,7 @@
<value>Umschlag konnte nicht gesendet werden!</value>
</data>
<data name="Envelope Invitations Sent" xml:space="preserve">
<value>Die Einladungen wurden versendet</value>
<value>Die Einladungen zum Signieren wurden zum Versand eingereiht.</value>
</data>
<data name="Envelope Overview" xml:space="preserve">
<value>Übersicht</value>

View File

@@ -182,7 +182,7 @@ Namespace My.Resources
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Die Einladungen wurden versendet ähnelt.
''' Sucht eine lokalisierte Zeichenfolge, die Die Einladungen zum Signieren wurden zum Versand eingereiht. ähnelt.
'''</summary>
Public Shared ReadOnly Property Envelope_Invitations_Sent() As String
Get

View File

@@ -0,0 +1,3 @@
Public Class Model
End Class

View File

@@ -0,0 +1,60 @@
Imports System.IO
Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Logging
Public Class TempFiles
Inherits BaseClass
Public Property TempPath As String
Public Sub New(pLogConfig As LogConfig)
MyBase.New(pLogConfig)
Dim oTempDirectoryPath = Path.GetTempPath()
TempPath = Path.Combine(oTempDirectoryPath, "EnvelopeGenerator")
End Sub
Public Function Create() As Boolean
Try
If Directory.Exists(TempPath) = False Then
Directory.CreateDirectory(TempPath)
Else
CleanUpFiles()
End If
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Private Function CleanUpFiles() As Boolean
Try
For Each fileItem As String In Directory.GetFiles(TempPath)
Logger.Debug("Deleting tempPath-file: {0} ...", fileItem)
File.Delete(fileItem)
Next
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
Public Function CleanUp() As Boolean
Try
Logger.Debug("Deleting tempPath-Data: {0} ...", TempPath)
Directory.Delete(TempPath, True)
Return True
Catch ex As Exception
Logger.Error(ex)
Return False
End Try
End Function
End Class

View File

@@ -0,0 +1,45 @@
<?xml version="1.0" encoding="utf-8" ?>
<configuration>
<configSections>
<sectionGroup name="applicationSettings" type="System.Configuration.ApplicationSettingsGroup, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" >
<section name="EnvelopeGenerator.Common.My.MySettings" type="System.Configuration.ClientSettingsSection, System, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</sectionGroup>
</configSections>
<system.diagnostics>
<sources>
<!-- Dieser Abschnitt definiert die Protokollierungskonfiguration für My.Application.Log -->
<source name="DefaultSource" switchName="DefaultSwitch">
<listeners>
<add name="FileLog"/>
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben, um in das Anwendungsereignisprotokoll zu schreiben -->
<!--<add name="EventLog"/>-->
</listeners>
</source>
</sources>
<switches>
<add name="DefaultSwitch" value="Information" />
</switches>
<sharedListeners>
<add name="FileLog"
type="Microsoft.VisualBasic.Logging.FileLogTraceListener, Microsoft.VisualBasic, Version=8.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL"
initializeData="FileLogWriter"/>
<!-- Auskommentierung des nachfolgenden Abschnitts aufheben und APPLICATION_NAME durch den Namen der Anwendung ersetzen, um in das Anwendungsereignisprotokoll zu schreiben -->
<!--<add name="EventLog" type="System.Diagnostics.EventLogTraceListener" initializeData="APPLICATION_NAME"/> -->
</sharedListeners>
</system.diagnostics>
<applicationSettings>
<EnvelopeGenerator.Common.My.MySettings>
<setting name="RuninDMZ" serializeAs="String">
<value>False</value>
</setting>
<setting name="NetUse_Usr" serializeAs="String">
<value>dd-gan\Administrator</value>
</setting>
<setting name="NetUse_PW" serializeAs="String">
<value>sY4vnATDXwosbTJGip6SqA==</value>
</setting>
</EnvelopeGenerator.Common.My.MySettings>
</applicationSettings>
</configuration>

View File

@@ -0,0 +1,43 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_CONFIG", Schema = "dbo")]
public class Config
{
[Column("DOCUMENT_PATH", TypeName = "nvarchar(256)")]
public string DocumentPath { get; set; }
[Column("SENDING_PROFILE", TypeName = "int")]
[Required]
[DatabaseGenerated(DatabaseGeneratedOption.None)] // Assuming SENDING_PROFILE is manually entered or controlled by the application logic
[DefaultValue(0)] // This sets the default value for SENDING_PROFILE
public int SendingProfile { get; set; }
[Column("SIGNATURE_HOST", TypeName = "nvarchar(128)")]
public string SignatureHost { get; set; }
[Column("EXTERNAL_PROGRAM_NAME", TypeName = "nvarchar(30)")]
public string ExternalProgramName { get; set; }
[Column("EXPORT_PATH", TypeName = "nvarchar(256)")]
public string ExportPath { get; set; }
[Column("DOCUMENT_PATH_DMZ", TypeName = "nvarchar(512)")]
[Required]
[DefaultValue("")] // This sets the default value for DOCUMENT_PATH_DMZ
public string DocumentPathDmz { get; set; }
[Column("EXPORT_PATH_DMZ", TypeName = "nvarchar(512)")]
[Required]
[DefaultValue("")] // This sets the default value for EXPORT_PATH_DMZ
public string ExportPathDmz { get; set; }
[Column("DOCUMENT_PATH_MOVE_AFTSEND", TypeName = "nvarchar(512)")]
[Required]
[DefaultValue("")] // This sets the default value for DOCUMENT_PATH_MOVE_AFTSEND
public string DocumentPathMoveAftsend { get; set; }
}
}

View File

@@ -0,0 +1,91 @@
using System.ComponentModel;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_DOCUMENT_RECEIVER_ELEMENT", Schema = "dbo")]
public class DocumentReceiverElement
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("DOCUMENT_ID")]
public int DocumentId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("ELEMENT_TYPE")]
[DefaultValue(0)]
public int ElementType { get; set; }
[Required]
[Column("POSITION_X")]
[DefaultValue(0)]
public double X { get; set; }
[Required]
[Column("POSITION_Y")]
[DefaultValue(0)]
public double Y { get; set; }
[Required]
[Column("WIDTH")]
[DefaultValue(0)]
public double Width { get; set; }
[Required]
[Column("HEIGHT")]
[DefaultValue(0)]
public double Height { get; set; }
[Required]
[Column("PAGE")]
[DefaultValue(1)]
public int Page { get; set; }
[Required]
[Column("REQUIRED")]
[DefaultValue(false)]
public bool Required { get; set; }
[Column("TOOLTIP")]
public string? Tooltip { get; set; }
[Required]
[Column("READ_ONLY")]
[DefaultValue(false)]
public bool ReadOnly { get; set; }
[Required]
[Column("ANNOTATION_INDEX")]
[DefaultValue(0)]
public int AnnotationIndex { 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; }
[ForeignKey("DocumentId")]
public virtual EnvelopeDocument? Document { get; set; }
[ForeignKey("ReceiverId")]
public virtual Receiver? Receiver { get; set; }
[NotMapped]
public double Top => Math.Round(Y, 5);
[NotMapped]
public double Left => Math.Round(X, 5);
}
}

View File

@@ -0,0 +1,45 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_DOCUMENT_STATUS", Schema = "dbo")]
public class DocumentStatus
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("STATUS")]
public int Status { get; set; }
[Column("STATUS_CHANGED_WHEN", TypeName = "datetime")]
public DateTime? StatusChangedWhen { get; set; }
[Column("VALUE", TypeName = "nvarchar(max)")]
public string Value { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
[ForeignKey("EnvelopeId")]
public virtual Envelope? Envelope { get; set; }
[ForeignKey("ReceiverId")]
public virtual Receiver? Receiver { get; set; }
}
}

View File

@@ -0,0 +1,23 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_EMAIL_TEMPLATE", Schema = "dbo")]
public class EmailTemplate
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Column("NAME", TypeName = "nvarchar(64)")]
public string Name { get; set; }
[Column("BODY", TypeName = "nvarchar(max)")]
public string Body { get; set; }
[Column("SUBJECT", TypeName = "nvarchar(512)")]
public string Subject { get; set; }
}
}

View File

@@ -0,0 +1,110 @@
using EnvelopeGenerator.Common;
using EnvelopeGenerator.Common.My.Resources;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE", Schema = "dbo")]
public class Envelope
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("USER_ID")]
public int UserId { get; set; }
[Required]
[Column("STATUS")]
public int Status { get; set; }
[NotMapped]
public string StatusName => ((Constants.EnvelopeStatus)Status).ToString();
[Required]
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
public string Uuid { get; set; }
[Required]
[Column("MESSAGE", TypeName = "nvarchar(max)")]
public string Message { get; set; }
[Column("EXPIRES_WHEN", TypeName = "datetime")]
public DateTime? ExpiresWhen { get; set; }
[Column("EXPIRES_WARNING_WHEN", TypeName = "datetime")]
public DateTime? ExpiresWarningWhen { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
[Column("TITLE", TypeName = "nvarchar(128)")]
public string Title { get; set; }
[Column("CONTRACT_TYPE")]
public int? ContractType { get; set; }
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
public string Language { get; set; }
[Column("SEND_REMINDER_EMAILS")]
public bool? SendReminderEmails { get; set; }
[Column("FIRST_REMINDER_DAYS")]
public int? FirstReminderDays { get; set; }
[Column("REMINDER_INTERVAL_DAYS")]
public int? ReminderIntervalDays { get; set; }
[Column("ENVELOPE_TYPE")]
public int? EnvelopeTypeId { get; set; }
[Column("CERTIFICATION_TYPE")]
public int? CertificationType { get; set; }
[Column("USE_ACCESS_CODE")]
public bool? UseAccessCode { get; set; }
[Column("FINAL_EMAIL_TO_CREATOR")]
public int? FinalEmailToCreator { get; set; }
[Column("FINAL_EMAIL_TO_RECEIVERS")]
public int? FinalEmailToReceivers { get; set; }
[Column("EXPIRES_WHEN_DAYS")]
public int? ExpiresWhenDays { get; set; }
[Column("EXPIRES_WARNING_WHEN_DAYS")]
public int? ExpiresWarningWhenDays { get; set; }
[Required]
[Column("DMZ_MOVED")]
public bool DmzMoved { get; set; }
/// <summary>
/// The sender of envelope
/// </summary>
[ForeignKey("UserId")]
public DigitalData.UserManager.Domain.Entities.User? User { get; set; }
[ForeignKey("EnvelopeTypeId")]
public EnvelopeType? EnvelopeType { get; set; }
[NotMapped]
public string? EnvelopeTypeTitle => EnvelopeType?.Title;
[NotMapped]
public bool IsAlreadySent => Status > (int) Constants.EnvelopeStatus.EnvelopeSaved;
public IEnumerable<EnvelopeDocument>? Documents { get; set; }
public IEnumerable<EnvelopeHistory>? History { get; set; }
}
}

View File

@@ -0,0 +1,42 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_CERTIFICATE", Schema = "dbo")]
public class EnvelopeCertificate
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("ENVELOPE_UUID", TypeName = "nvarchar(36)")]
public string EnvelopeUuid { get; set; }
[Required]
[Column("ENVELOPE_SUBJECT", TypeName = "nvarchar(512)")]
public string EnvelopeSubject { get; set; }
[Required]
[Column("CREATOR_ID")]
public int CreatorId { get; set; }
[Required]
[Column("CREATOR_NAME", TypeName = "nvarchar(128)")]
public string CreatorName { get; set; }
[Required]
[Column("CREATOR_EMAIL", TypeName = "nvarchar(128)")]
public string CreatorEmail { get; set; }
[Required]
[Column("ENVELOPE_STATUS")]
public int EnvelopeStatus { get; set; }
}
}

View File

@@ -0,0 +1,35 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_DOCUMENT", Schema = "dbo")]
public class EnvelopeDocument
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("FILENAME", TypeName = "nvarchar(256)")]
public string Filename { get; set; }
[Required]
[Column("FILEPATH", TypeName = "nvarchar(256)")]
public string Filepath { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("FILENAME_ORIGINAL", TypeName = "nvarchar(256)")]
public string FilenameOriginal { get; set; }
public IEnumerable<DocumentReceiverElement>? Elements { get; set; }
}
}

View File

@@ -0,0 +1,53 @@
using DigitalData.UserManager.Domain.Entities;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using static EnvelopeGenerator.Common.Constants;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_HISTORY", Schema = "dbo")]
public class EnvelopeHistory
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public long Id { get; set; }
[Required]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Required]
[Column("USER_REFERENCE", TypeName = "nvarchar(128)")]
public string UserReference { get; set; }
[Required]
[Column("STATUS")]
public int Status { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
[DatabaseGenerated(DatabaseGeneratedOption.Computed)]
public DateTime AddedWhen { get; set; }
[Column("ACTION_DATE", TypeName = "datetime")]
public DateTime? ActionDate { get; set; }
[Column("COMMENT", TypeName = "nvarchar(max)")]
public string? Comment { get; set; }
[ForeignKey("UserReference")]
public virtual User? Sender { get; set; }
[ForeignKey("UserReference")]
public virtual Receiver? Receiver { get; set; }
[NotMapped]
public ReferenceType ReferenceType => (Status / 3) switch
{
1 => ReferenceType.Sender,
2 or 3 => ReferenceType.Receiver,
_ => ReferenceType.Unknown,
};
}
}

View File

@@ -0,0 +1,49 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_RECEIVER", Schema = "dbo")]
public class EnvelopeReceiver
{
[Key]
[Column("ENVELOPE_ID")]
public int EnvelopeId { get; set; }
[Key]
[Column("RECEIVER_ID")]
public int ReceiverId { get; set; }
[Required]
[Column("SEQUENCE")]
public int Sequence { get; set; }
[Column("NAME", TypeName = "nvarchar(128)")]
public string? Name { get; set; }
[Column("JOB_TITLE", TypeName = "nvarchar(128)")]
public string? JobTitle { get; set; }
[Column("COMPANY_NAME", TypeName = "nvarchar(128)")]
public string? CompanyName { get; set; }
[Column("PRIVATE_MESSAGE", TypeName = "nvarchar(max)")]
public string? PrivateMessage { get; set; }
[Column("ACCESS_CODE", TypeName = "nvarchar(64)")]
public string? AccessCode { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
[ForeignKey("EnvelopeId")]
public Envelope? Envelope { get; set; }
[ForeignKey("ReceiverId")]
public Receiver? Receiver { get; set; }
}
}

View File

@@ -0,0 +1,60 @@
using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_ENVELOPE_TYPE", Schema = "dbo")]
public class EnvelopeType
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required]
[Column("TITLE", TypeName = "nvarchar(128)")]
public string Title { get; set; }
[Column("LANGUAGE", TypeName = "nvarchar(5)")]
public string Language { get; set; }
[Column("EXPIRES_DAYS")]
public int? ExpiresDays { get; set; }
[Column("CERTIFICATION_TYPE")]
public int? CertificationType { get; set; }
[Column("USE_ACCESS_CODE")]
public bool? UseAccessCode { get; set; }
[Column("FINAL_EMAIL_TO_CREATOR")]
public int? FinalEmailToCreator { get; set; }
[Column("FINAL_EMAIL_TO_RECEIVERS")]
public int? FinalEmailToReceivers { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
[Column("CHANGED_WHEN", TypeName = "datetime")]
public DateTime? ChangedWhen { get; set; }
[Column("EXPIRES_WARNING_DAYS")]
public int? ExpiresWarningDays { get; set; }
[Column("SEND_REMINDER_EMAILS")]
public bool? SendReminderEmails { get; set; }
[Column("FIRST_REMINDER_DAYS")]
public int? FirstReminderDays { get; set; }
[Column("REMINDER_INTERVAL_DAYS")]
public int? ReminderIntervalDays { get; set; }
[Column("CONTRACT_TYPE")]
public int? ContractType { get; set; }
}
}

View File

@@ -0,0 +1,26 @@
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
namespace EnvelopeGenerator.Domain.Entities
{
[Table("TBSIG_RECEIVER", Schema = "dbo")]
public class Receiver
{
[Key]
[DatabaseGenerated(DatabaseGeneratedOption.Identity)]
[Column("GUID")]
public int Id { get; set; }
[Required, EmailAddress]
[Column("EMAIL_ADDRESS", TypeName = "nvarchar(128)")]
public required string EmailAddress { get; set; }
[Required]
[Column("SIGNATURE", TypeName = "nvarchar(64)")]
public required string Signature { get; set; }
[Required]
[Column("ADDED_WHEN", TypeName = "datetime")]
public DateTime AddedWhen { get; set; }
}
}

View File

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

View File

@@ -0,0 +1,18 @@
<Project Sdk="Microsoft.NET.Sdk">
<PropertyGroup>
<TargetFramework>net7.0</TargetFramework>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="DigitalData.EmailProfilerDispatcher.Abstraction" Version="1.0.0" />
<PackageReference Include="UserManager.Domain" Version="1.0.0" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EnvelopeGenerator.Common\EnvelopeGenerator.Common.vbproj" />
</ItemGroup>
</Project>

View File

@@ -0,0 +1,19 @@
Imports Microsoft.VisualBasic.ApplicationServices
Namespace My
' Für MyApplication sind folgende Ereignisse verfügbar:
' Startup: Wird beim Starten der Anwendung noch vor dem Erstellen des Startformulars ausgelöst.
' Shutdown: Wird nach dem Schließen aller Anwendungsformulare ausgelöst. Dieses Ereignis wird nicht ausgelöst, wenn die Anwendung mit einem Fehler beendet wird.
' UnhandledException: Wird bei einem Ausnahmefehler ausgelöst.
' StartupNextInstance: Wird beim Starten einer Einzelinstanzanwendung ausgelöst, wenn die Anwendung bereits aktiv ist.
' NetworkAvailabilityChanged: Wird beim Herstellen oder Trennen der Netzwerkverbindung ausgelöst.
Partial Friend Class MyApplication
Protected Overrides Function OnUnhandledException(e As UnhandledExceptionEventArgs) As Boolean
Dim oMessage = $"Unexpected Error occurred, Application will close.{vbNewLine}{vbNewLine}{e.Exception.Message}{vbNewLine}Stacktrace:{vbNewLine}{e.Exception.StackTrace}"
MsgBox(oMessage, MsgBoxStyle.Critical, "EnvelopeCreator")
e.ExitApplication = True
Return True
End Function
End Class
End Namespace

View File

@@ -4,6 +4,7 @@ Imports EnvelopeGenerator.Common
Imports System.Data.SqlClient
Imports DevExpress.DocumentView
Imports System.Transactions
Imports System.IO
Public MustInherit Class BaseController
Inherits BaseClass
@@ -41,7 +42,7 @@ Public MustInherit Class BaseController
ChartModel = New ChartModel(pState)
End Sub
Public Function DeleteEnvelope(pEnvelope As Envelope) As Boolean
Public Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
If pEnvelope Is Nothing Then
Return True
End If
@@ -51,7 +52,7 @@ Public MustInherit Class BaseController
Return False
End If
Return ActionService.DeleteEnvelope(pEnvelope)
Return ActionService.DeleteEnvelope(pEnvelope, pReason)
Else
Return DeleteEnvelopeFromDisk(pEnvelope)
End If
@@ -128,14 +129,27 @@ Public MustInherit Class BaseController
End Function
Public Function DeleteDocumentsFromDisk(pEnvelope As Envelope) As Boolean
Return pEnvelope.Documents.
Select(Function(d) DeleteDocumentFromDisk(d)).
All(Function(r) r = True)
If Not IsNothing(pEnvelope.Documents) Then
Return pEnvelope.Documents.
Select(Function(d) DeleteDocumentFromDisk(d)).
All(Function(r) r = True)
Else
Return True
End If
End Function
Public Function DeleteDocumentFromDisk(pDocument As EnvelopeDocument) As Boolean
Try
IO.File.Delete(pDocument.Filepath)
If IO.File.Exists(pDocument.Filepath) Then
IO.File.Delete(pDocument.Filepath)
End If
Dim oFolder As String = Path.GetDirectoryName(pDocument.Filepath)
If Directory.Exists(oFolder) Then
Directory.Delete(oFolder)
End If
Return True
Catch ex As Exception
Logger.Error(ex)

View File

@@ -38,6 +38,9 @@ Public Class EnvelopeEditorController
Public Function SendEnvelope() As Boolean
Return ActionService.SendEnvelope(Envelope)
End Function
Public Function ResendReceiverInvitation(pEnvelope As Envelope, pReceiver As EnvelopeReceiver) As Boolean
Return ActionService.ResendReceiver(pEnvelope, pReceiver)
End Function
Public Function ValidateEnvelopeForSending(pErrors As List(Of String)) As List(Of String)
Dim oEnvelopeErrors = pErrors
@@ -164,7 +167,8 @@ Public Class EnvelopeEditorController
.Filepath = oFileInfoTemp.FullName,
.FileNameOriginal = oFileInfo.Name,
.Thumbnail = Thumbnail.GetThumbnailFromPDFFile(oTempFilePath),
.PageCount = Thumbnail.GetPageCount(oTempFilePath)
.PageCount = Thumbnail.GetPageCount(oTempFilePath),
.Byte_Data = ReadFile(pDocumentFilePath)
}
Return oDocument
@@ -174,7 +178,22 @@ Public Class EnvelopeEditorController
Return Nothing
End Try
End Function
'Open file in to a filestream and read data in a byte array.
Private Function ReadFile(ByVal sPath As String) As Byte()
'Initialize byte array with a null value initially.
Dim data As Byte() = Nothing
'Use FileInfo object to get file size.
Dim fInfo As New FileInfo(sPath)
Dim numBytes As Long = fInfo.Length
'Open FileStream to read file
Dim fStream As New FileStream(sPath, FileMode.Open, FileAccess.Read)
'Use BinaryReader to read file stream into byte array.
Dim br As New BinaryReader(fStream)
'When you use BinaryReader, you need to supply number of bytes to read from file.
'In this case we want to read entire file. So supplying total number of bytes.
data = br.ReadBytes(CInt(numBytes))
Return data
End Function
Public Function CreateThumbnail(pDocumentPath As String) As Bitmap
Try
Dim oThumbNail As Bitmap = Thumbnail.GetThumbnailFromPDFFile(pDocumentPath)

View File

@@ -15,8 +15,8 @@ Public Class EnvelopeListController
Return EnvelopeModel.ListCompleted()
End Function
Public Overloads Function DeleteEnvelope(pEnvelope As Envelope) As Boolean
Return MyBase.DeleteEnvelope(pEnvelope)
Public Overloads Function DeleteEnvelope(pEnvelope As Envelope, pReason As String) As Boolean
Return MyBase.DeleteEnvelope(pEnvelope, pReason)
End Function
Public Function GetPieChart() As ChartControl

View File

@@ -84,6 +84,10 @@
<Reference Include="DigitalData.Modules.Logging">
<HintPath>..\..\DDModules\Logging\bin\Debug\DigitalData.Modules.Logging.dll</HintPath>
</Reference>
<Reference Include="EnvelopeGenerator.Common, Version=1.8.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\EnvelopeGenerator.Common\bin\Debug\EnvelopeGenerator.Common.dll</HintPath>
</Reference>
<Reference Include="GdPicture.NET.14">
<HintPath>D:\ProgramFiles\GdPicture.NET 14\Redist\GdPicture.NET (.NET Framework 4.5)\GdPicture.NET.14.dll</HintPath>
</Reference>
@@ -121,6 +125,7 @@
<Import Include="System" />
</ItemGroup>
<ItemGroup>
<Compile Include="ApplicationEvents.vb" />
<Compile Include="Controllers\EnvelopeEditorController.vb" />
<Compile Include="Controllers\EnvelopeListController.vb" />
<Compile Include="Controllers\FieldEditorController.vb" />
@@ -149,16 +154,24 @@
<Compile Include="frmMain.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmRueckruf.Designer.vb">
<DependentUpon>frmRueckruf.vb</DependentUpon>
</Compile>
<Compile Include="frmRueckruf.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="frmSplashScreen.Designer.vb">
<DependentUpon>frmSplashScreen.vb</DependentUpon>
</Compile>
<Compile Include="frmSplashScreen.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Helper\Encryption.vb" />
<Compile Include="Helper\RefreshHelper.vb" />
<Compile Include="Helper\TempFiles.vb" />
<Compile Include="Helper\Thumbnail.vb" />
<Compile Include="Helper\Validator.vb" />
<Compile Include="ModuleSettings.vb" />
<Compile Include="My Project\Application.Designer.vb">
<AutoGen>True</AutoGen>
<DependentUpon>Application.myapp</DependentUpon>
@@ -170,9 +183,11 @@
</EmbeddedResource>
<EmbeddedResource Include="frmEnvelopeEditor.resx">
<DependentUpon>frmEnvelopeEditor.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmEnvelopeMainData.en.resx">
<DependentUpon>frmEnvelopeMainData.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmEnvelopeMainData.resx">
<DependentUpon>frmEnvelopeMainData.vb</DependentUpon>
@@ -191,6 +206,9 @@
<DependentUpon>frmMain.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmRueckruf.resx">
<DependentUpon>frmRueckruf.vb</DependentUpon>
</EmbeddedResource>
<EmbeddedResource Include="frmSplashScreen.resx">
<DependentUpon>frmSplashScreen.vb</DependentUpon>
</EmbeddedResource>
@@ -234,7 +252,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\EnvelopeGenerator.Common\EnvelopeGenerator.Common.vbproj">
<Project>{6ea0c51f-c2b1-4462-8198-3de0b32b74f8}</Project>
<Project>{6EA0C51F-C2B1-4462-8198-3DE0B32B74F8}</Project>
<Name>EnvelopeGenerator.Common</Name>
</ProjectReference>
</ItemGroup>

View File

@@ -0,0 +1,24 @@
Imports System.Security.Cryptography
Imports System.Text
Public Class Decryption
Private Shared key As String = "$xzBvyPETUS&amm8)D8x#)f;4%;?[BPd" ' Passwort-Schlüssel (16, 24, or 32 bytes)
Private Shared iv As String = "1wN&e[zrQ6_B7X/0" ' Initialisierungsvektor (16 bytes)
' Entschlüsselungsfunktion
Public Shared Function Decrypt(cipherText As String) As String
Dim aesAlg As Aes = Aes.Create()
aesAlg.Key = Encoding.UTF8.GetBytes(key)
aesAlg.IV = Encoding.UTF8.GetBytes(iv)
Dim decryptor As ICryptoTransform = aesAlg.CreateDecryptor(aesAlg.Key, aesAlg.IV)
Dim cipherBytes As Byte() = Convert.FromBase64String(cipherText)
Dim msDecrypt As New IO.MemoryStream(cipherBytes)
Using csDecrypt As New CryptoStream(msDecrypt, decryptor, CryptoStreamMode.Read)
Using srDecrypt As New IO.StreamReader(csDecrypt)
Return srDecrypt.ReadToEnd()
End Using
End Using
End Function
End Class

View File

@@ -33,6 +33,7 @@ Public Class TempFiles
Private Function CleanUpFiles() As Boolean
Try
For Each fileItem As String In Directory.GetFiles(TempPath)
Logger.Debug("Deleting tempPath-file: {0} ...", fileItem)
File.Delete(fileItem)
Next
@@ -46,7 +47,8 @@ Public Class TempFiles
Public Function CleanUp() As Boolean
Try
Directory.Delete(TempPath)
Logger.Debug("Deleting tempPath-Data: {0} ...", TempPath)
Directory.Delete(TempPath, True)
Return True
Catch ex As Exception

View File

@@ -12,7 +12,7 @@ Public Class Thumbnail
MyBase.New(pLogConfig)
GDViewer = New GdViewer()
Dim oGDPictureKey As String = "21182889975216572111813147150675976632"
Dim oGDPictureKey As String = MS_GDPICTUREKEY
Dim licenseManager As GdPicture14.LicenseManager = New GdPicture14.LicenseManager()
licenseManager.RegisterKEY(oGDPictureKey)

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