Compare commits
1 Commits
feat/final
...
refactor/f
| Author | SHA1 | Date | |
|---|---|---|---|
| 8db72037e0 |
@@ -1,22 +0,0 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<RootNamespace>EnvelopeGenerator.Application.VB</RootNamespace>
|
||||
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="DevExpress.Data" Version="21.2.4" />
|
||||
<PackageReference Include="DevExpress.Reporting.Core" Version="21.2.4" />
|
||||
<PackageReference Include="DevExpress.Win" Version="21.2.0" />
|
||||
<PackageReference Include="DevExpress.Xpo" Version="21.2.4" />
|
||||
<PackageReference Include="System.Drawing.Common" Version="7.0.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Update="Reports\rptEnvelopeHistory.vb">
|
||||
<SubType>Component</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
@@ -1,730 +0,0 @@
|
||||
<Global.Microsoft.VisualBasic.CompilerServices.DesignerGenerated()> _
|
||||
Partial Public Class rptEnvelopeHistory
|
||||
Inherits DevExpress.XtraReports.UI.XtraReport
|
||||
|
||||
'XtraReport overrides dispose to clean up the component list.
|
||||
<System.Diagnostics.DebuggerNonUserCode()> _
|
||||
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
|
||||
If disposing AndAlso components IsNot Nothing Then
|
||||
components.Dispose()
|
||||
End If
|
||||
MyBase.Dispose(disposing)
|
||||
End Sub
|
||||
|
||||
'Required by the Designer
|
||||
Private components As System.ComponentModel.IContainer
|
||||
|
||||
'NOTE: The following procedure is required by the Designer
|
||||
'It can be modified using the Designer.
|
||||
'Do not modify it using the code editor.
|
||||
<System.Diagnostics.DebuggerStepThrough()> _
|
||||
Private Sub InitializeComponent()
|
||||
Me.components = New System.ComponentModel.Container()
|
||||
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(rptEnvelopeHistory))
|
||||
Me.TopMargin = New DevExpress.XtraReports.UI.TopMarginBand()
|
||||
Me.BottomMargin = New DevExpress.XtraReports.UI.BottomMarginBand()
|
||||
Me.XrLabel1 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.pageInfo1 = New DevExpress.XtraReports.UI.XRPageInfo()
|
||||
Me.pageInfo2 = New DevExpress.XtraReports.UI.XRPageInfo()
|
||||
Me.ReportHeader = New DevExpress.XtraReports.UI.ReportHeaderBand()
|
||||
Me.label1 = New DevExpress.XtraReports.UI.XRLabel()
|
||||
Me.XrTable3 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.XrTableRow8 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell13 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell15 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableRow9 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell14 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell17 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell16 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell18 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableRow10 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell19 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell20 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell21 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell22 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableRow11 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.XrTableCell23 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell24 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell25 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.XrTableCell26 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.GroupHeader1 = New DevExpress.XtraReports.UI.GroupHeaderBand()
|
||||
Me.table1 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.tableRow1 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.tableCell1 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.tableCell2 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.tableCell3 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.Detail = New DevExpress.XtraReports.UI.DetailBand()
|
||||
Me.table2 = New DevExpress.XtraReports.UI.XRTable()
|
||||
Me.tableRow2 = New DevExpress.XtraReports.UI.XRTableRow()
|
||||
Me.tableCell4 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.tableCell5 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.tableCell6 = New DevExpress.XtraReports.UI.XRTableCell()
|
||||
Me.Title = New DevExpress.XtraReports.UI.XRControlStyle()
|
||||
Me.DetailCaption1 = New DevExpress.XtraReports.UI.XRControlStyle()
|
||||
Me.DetailData1 = New DevExpress.XtraReports.UI.XRControlStyle()
|
||||
Me.DetailData3_Odd = New DevExpress.XtraReports.UI.XRControlStyle()
|
||||
Me.PageInfo = New DevExpress.XtraReports.UI.XRControlStyle()
|
||||
Me.GalleryDropDown1 = New DevExpress.XtraBars.Ribbon.GalleryDropDown(Me.components)
|
||||
Me.ObjectDataSource1 = New DevExpress.DataAccess.ObjectBinding.ObjectDataSource(Me.components)
|
||||
CType(Me.XrTable3, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.table1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.table2, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.GalleryDropDown1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
CType(Me, System.ComponentModel.ISupportInitialize).BeginInit()
|
||||
'
|
||||
'TopMargin
|
||||
'
|
||||
Me.TopMargin.Dpi = 254.0!
|
||||
Me.TopMargin.HeightF = 190.6042!
|
||||
Me.TopMargin.Name = "TopMargin"
|
||||
'
|
||||
'BottomMargin
|
||||
'
|
||||
Me.BottomMargin.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.XrLabel1, Me.pageInfo1, Me.pageInfo2})
|
||||
Me.BottomMargin.Dpi = 254.0!
|
||||
Me.BottomMargin.Name = "BottomMargin"
|
||||
'
|
||||
'XrLabel1
|
||||
'
|
||||
Me.XrLabel1.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.XrLabel1.Borders = DevExpress.XtraPrinting.BorderSide.Top
|
||||
Me.XrLabel1.Dpi = 254.0!
|
||||
Me.XrLabel1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold)
|
||||
Me.XrLabel1.LocationFloat = New DevExpress.Utils.PointFloat(896.5417!, 0!)
|
||||
Me.XrLabel1.Name = "XrLabel1"
|
||||
Me.XrLabel1.Padding = New DevExpress.XtraPrinting.PaddingInfo(0, 0, 0, 0, 254.0!)
|
||||
Me.XrLabel1.SizeF = New System.Drawing.SizeF(645.5836!, 58.0!)
|
||||
Me.XrLabel1.StyleName = "Title"
|
||||
Me.XrLabel1.StylePriority.UseBorderColor = False
|
||||
Me.XrLabel1.StylePriority.UseBorders = False
|
||||
Me.XrLabel1.StylePriority.UseFont = False
|
||||
Me.XrLabel1.StylePriority.UsePadding = False
|
||||
Me.XrLabel1.Text = "Erstellt mit SignFlow"
|
||||
'
|
||||
'pageInfo1
|
||||
'
|
||||
Me.pageInfo1.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.pageInfo1.Borders = DevExpress.XtraPrinting.BorderSide.Top
|
||||
Me.pageInfo1.Dpi = 254.0!
|
||||
Me.pageInfo1.LocationFloat = New DevExpress.Utils.PointFloat(0!, 0!)
|
||||
Me.pageInfo1.Name = "pageInfo1"
|
||||
Me.pageInfo1.PageInfo = DevExpress.XtraPrinting.PageInfo.DateTime
|
||||
Me.pageInfo1.SizeF = New System.Drawing.SizeF(896.5417!, 58.0!)
|
||||
Me.pageInfo1.StyleName = "PageInfo"
|
||||
Me.pageInfo1.StylePriority.UseBorderColor = False
|
||||
Me.pageInfo1.StylePriority.UseBorders = False
|
||||
Me.pageInfo1.TextFormatString = "{0:dddd, d. MMMM yyyy HH:mm}"
|
||||
'
|
||||
'pageInfo2
|
||||
'
|
||||
Me.pageInfo2.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.pageInfo2.Borders = DevExpress.XtraPrinting.BorderSide.Top
|
||||
Me.pageInfo2.Dpi = 254.0!
|
||||
Me.pageInfo2.LocationFloat = New DevExpress.Utils.PointFloat(1542.125!, 0!)
|
||||
Me.pageInfo2.Name = "pageInfo2"
|
||||
Me.pageInfo2.SizeF = New System.Drawing.SizeF(357.875!, 58.0!)
|
||||
Me.pageInfo2.StyleName = "PageInfo"
|
||||
Me.pageInfo2.StylePriority.UseBorderColor = False
|
||||
Me.pageInfo2.StylePriority.UseBorders = False
|
||||
Me.pageInfo2.TextAlignment = DevExpress.XtraPrinting.TextAlignment.TopRight
|
||||
Me.pageInfo2.TextFormatString = "Seite {0} von {1}"
|
||||
'
|
||||
'ReportHeader
|
||||
'
|
||||
Me.ReportHeader.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.label1, Me.XrTable3})
|
||||
Me.ReportHeader.Dpi = 254.0!
|
||||
Me.ReportHeader.HeightF = 406.0843!
|
||||
Me.ReportHeader.Name = "ReportHeader"
|
||||
'
|
||||
'label1
|
||||
'
|
||||
Me.label1.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.label1.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.label1.Borders = DevExpress.XtraPrinting.BorderSide.Bottom
|
||||
Me.label1.BorderWidth = 2.0!
|
||||
Me.label1.Dpi = 254.0!
|
||||
Me.label1.Font = New System.Drawing.Font("Segoe UI", 14.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.label1.ForeColor = System.Drawing.Color.Black
|
||||
Me.label1.LocationFloat = New DevExpress.Utils.PointFloat(0.0002422333!, 0!)
|
||||
Me.label1.Name = "label1"
|
||||
Me.label1.Padding = New DevExpress.XtraPrinting.PaddingInfo(10, 10, 5, 5, 254.0!)
|
||||
Me.label1.SizeF = New System.Drawing.SizeF(1900.0!, 77.32857!)
|
||||
Me.label1.StyleName = "Title"
|
||||
Me.label1.StylePriority.UseBackColor = False
|
||||
Me.label1.StylePriority.UseBorderColor = False
|
||||
Me.label1.StylePriority.UseBorders = False
|
||||
Me.label1.StylePriority.UseBorderWidth = False
|
||||
Me.label1.StylePriority.UseFont = False
|
||||
Me.label1.StylePriority.UseForeColor = False
|
||||
Me.label1.StylePriority.UsePadding = False
|
||||
Me.label1.Text = "Signierungszertifikat"
|
||||
'
|
||||
'XrTable3
|
||||
'
|
||||
Me.XrTable3.Dpi = 254.0!
|
||||
Me.XrTable3.LocationFloat = New DevExpress.Utils.PointFloat(0.0002422333!, 96.60422!)
|
||||
Me.XrTable3.Name = "XrTable3"
|
||||
Me.XrTable3.OddStyleName = "DetailData3_Odd"
|
||||
Me.XrTable3.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.XrTableRow8, Me.XrTableRow9, Me.XrTableRow10, Me.XrTableRow11})
|
||||
Me.XrTable3.SizeF = New System.Drawing.SizeF(1900.0!, 284.4801!)
|
||||
'
|
||||
'XrTableRow8
|
||||
'
|
||||
Me.XrTableRow8.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell13, Me.XrTableCell15})
|
||||
Me.XrTableRow8.Dpi = 254.0!
|
||||
Me.XrTableRow8.Name = "XrTableRow8"
|
||||
Me.XrTableRow8.Weight = 1.0R
|
||||
'
|
||||
'XrTableCell13
|
||||
'
|
||||
Me.XrTableCell13.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.XrTableCell13.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.XrTableCell13.Borders = DevExpress.XtraPrinting.BorderSide.Bottom
|
||||
Me.XrTableCell13.BorderWidth = 1.0!
|
||||
Me.XrTableCell13.Dpi = 254.0!
|
||||
Me.XrTableCell13.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell13.Name = "XrTableCell13"
|
||||
Me.XrTableCell13.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell13.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell13.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell13.StylePriority.UseBorders = False
|
||||
Me.XrTableCell13.StylePriority.UseBorderWidth = False
|
||||
Me.XrTableCell13.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell13.Text = "Ersteller"
|
||||
Me.XrTableCell13.Weight = 0.38139956730411484R
|
||||
'
|
||||
'XrTableCell15
|
||||
'
|
||||
Me.XrTableCell15.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.XrTableCell15.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.XrTableCell15.Borders = DevExpress.XtraPrinting.BorderSide.Bottom
|
||||
Me.XrTableCell15.BorderWidth = 1.0!
|
||||
Me.XrTableCell15.Dpi = 254.0!
|
||||
Me.XrTableCell15.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell15.Name = "XrTableCell15"
|
||||
Me.XrTableCell15.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell15.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell15.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell15.StylePriority.UseBorders = False
|
||||
Me.XrTableCell15.StylePriority.UseBorderWidth = False
|
||||
Me.XrTableCell15.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell15.Text = "Umschlag"
|
||||
Me.XrTableCell15.Weight = 0.49859081604996847R
|
||||
'
|
||||
'XrTableRow9
|
||||
'
|
||||
Me.XrTableRow9.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell14, Me.XrTableCell17, Me.XrTableCell16, Me.XrTableCell18})
|
||||
Me.XrTableRow9.Dpi = 254.0!
|
||||
Me.XrTableRow9.Name = "XrTableRow9"
|
||||
Me.XrTableRow9.Weight = 1.0R
|
||||
'
|
||||
'XrTableCell14
|
||||
'
|
||||
Me.XrTableCell14.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell14.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell14.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell14.Dpi = 254.0!
|
||||
Me.XrTableCell14.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell14.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell14.Multiline = True
|
||||
Me.XrTableCell14.Name = "XrTableCell14"
|
||||
Me.XrTableCell14.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell14.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell14.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell14.StylePriority.UseBorders = False
|
||||
Me.XrTableCell14.StylePriority.UseFont = False
|
||||
Me.XrTableCell14.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell14.Text = "Name"
|
||||
Me.XrTableCell14.Weight = 0.11578820509129036R
|
||||
'
|
||||
'XrTableCell17
|
||||
'
|
||||
Me.XrTableCell17.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell17.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell17.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell17.Dpi = 254.0!
|
||||
Me.XrTableCell17.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[User].[FullName]")})
|
||||
Me.XrTableCell17.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell17.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell17.Multiline = True
|
||||
Me.XrTableCell17.Name = "XrTableCell17"
|
||||
Me.XrTableCell17.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell17.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell17.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell17.StylePriority.UseBorders = False
|
||||
Me.XrTableCell17.StylePriority.UseFont = False
|
||||
Me.XrTableCell17.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell17.Text = "XrTableCell17"
|
||||
Me.XrTableCell17.Weight = 0.2656113622128245R
|
||||
'
|
||||
'XrTableCell16
|
||||
'
|
||||
Me.XrTableCell16.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell16.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell16.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell16.Dpi = 254.0!
|
||||
Me.XrTableCell16.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell16.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell16.Multiline = True
|
||||
Me.XrTableCell16.Name = "XrTableCell16"
|
||||
Me.XrTableCell16.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell16.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell16.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell16.StylePriority.UseBorders = False
|
||||
Me.XrTableCell16.StylePriority.UseFont = False
|
||||
Me.XrTableCell16.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell16.Text = "Titel"
|
||||
Me.XrTableCell16.Weight = 0.11578821158083684R
|
||||
'
|
||||
'XrTableCell18
|
||||
'
|
||||
Me.XrTableCell18.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell18.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell18.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell18.Dpi = 254.0!
|
||||
Me.XrTableCell18.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[Title]")})
|
||||
Me.XrTableCell18.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell18.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell18.Multiline = True
|
||||
Me.XrTableCell18.Name = "XrTableCell18"
|
||||
Me.XrTableCell18.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell18.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell18.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell18.StylePriority.UseBorders = False
|
||||
Me.XrTableCell18.StylePriority.UseFont = False
|
||||
Me.XrTableCell18.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell18.Text = "XrTableCell18"
|
||||
Me.XrTableCell18.Weight = 0.38280260446913167R
|
||||
'
|
||||
'XrTableRow10
|
||||
'
|
||||
Me.XrTableRow10.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell19, Me.XrTableCell20, Me.XrTableCell21, Me.XrTableCell22})
|
||||
Me.XrTableRow10.Dpi = 254.0!
|
||||
Me.XrTableRow10.Name = "XrTableRow10"
|
||||
Me.XrTableRow10.Weight = 1.0R
|
||||
'
|
||||
'XrTableCell19
|
||||
'
|
||||
Me.XrTableCell19.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell19.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell19.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell19.Dpi = 254.0!
|
||||
Me.XrTableCell19.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell19.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell19.Multiline = True
|
||||
Me.XrTableCell19.Name = "XrTableCell19"
|
||||
Me.XrTableCell19.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell19.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell19.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell19.StylePriority.UseBorders = False
|
||||
Me.XrTableCell19.StylePriority.UseFont = False
|
||||
Me.XrTableCell19.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell19.Text = "EmailAddress"
|
||||
Me.XrTableCell19.Weight = 0.11578820509129036R
|
||||
'
|
||||
'XrTableCell20
|
||||
'
|
||||
Me.XrTableCell20.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell20.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell20.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell20.Dpi = 254.0!
|
||||
Me.XrTableCell20.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[User].[EmailAddress]")})
|
||||
Me.XrTableCell20.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell20.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell20.Multiline = True
|
||||
Me.XrTableCell20.Name = "XrTableCell20"
|
||||
Me.XrTableCell20.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell20.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell20.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell20.StylePriority.UseBorders = False
|
||||
Me.XrTableCell20.StylePriority.UseFont = False
|
||||
Me.XrTableCell20.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell20.Text = "XrTableCell20"
|
||||
Me.XrTableCell20.Weight = 0.2656113622128245R
|
||||
'
|
||||
'XrTableCell21
|
||||
'
|
||||
Me.XrTableCell21.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell21.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell21.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell21.Dpi = 254.0!
|
||||
Me.XrTableCell21.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell21.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell21.Multiline = True
|
||||
Me.XrTableCell21.Name = "XrTableCell21"
|
||||
Me.XrTableCell21.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell21.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell21.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell21.StylePriority.UseBorders = False
|
||||
Me.XrTableCell21.StylePriority.UseFont = False
|
||||
Me.XrTableCell21.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell21.Text = "Umschlag-ID"
|
||||
Me.XrTableCell21.Weight = 0.11578821158083684R
|
||||
'
|
||||
'XrTableCell22
|
||||
'
|
||||
Me.XrTableCell22.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell22.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell22.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell22.Dpi = 254.0!
|
||||
Me.XrTableCell22.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[Uuid]")})
|
||||
Me.XrTableCell22.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell22.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell22.Multiline = True
|
||||
Me.XrTableCell22.Name = "XrTableCell22"
|
||||
Me.XrTableCell22.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell22.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell22.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell22.StylePriority.UseBorders = False
|
||||
Me.XrTableCell22.StylePriority.UseFont = False
|
||||
Me.XrTableCell22.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell22.Text = "XrTableCell22"
|
||||
Me.XrTableCell22.Weight = 0.38280260446913167R
|
||||
'
|
||||
'XrTableRow11
|
||||
'
|
||||
Me.XrTableRow11.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.XrTableCell23, Me.XrTableCell24, Me.XrTableCell25, Me.XrTableCell26})
|
||||
Me.XrTableRow11.Dpi = 254.0!
|
||||
Me.XrTableRow11.Name = "XrTableRow11"
|
||||
Me.XrTableRow11.Weight = 1.0R
|
||||
'
|
||||
'XrTableCell23
|
||||
'
|
||||
Me.XrTableCell23.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell23.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell23.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell23.Dpi = 254.0!
|
||||
Me.XrTableCell23.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell23.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell23.Multiline = True
|
||||
Me.XrTableCell23.Name = "XrTableCell23"
|
||||
Me.XrTableCell23.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell23.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell23.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell23.StylePriority.UseBorders = False
|
||||
Me.XrTableCell23.StylePriority.UseFont = False
|
||||
Me.XrTableCell23.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell23.Weight = 0.11578820509129036R
|
||||
'
|
||||
'XrTableCell24
|
||||
'
|
||||
Me.XrTableCell24.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell24.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell24.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell24.Dpi = 254.0!
|
||||
Me.XrTableCell24.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell24.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell24.Multiline = True
|
||||
Me.XrTableCell24.Name = "XrTableCell24"
|
||||
Me.XrTableCell24.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell24.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell24.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell24.StylePriority.UseBorders = False
|
||||
Me.XrTableCell24.StylePriority.UseFont = False
|
||||
Me.XrTableCell24.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell24.Weight = 0.2656113622128245R
|
||||
'
|
||||
'XrTableCell25
|
||||
'
|
||||
Me.XrTableCell25.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell25.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell25.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell25.Dpi = 254.0!
|
||||
Me.XrTableCell25.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell25.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell25.Multiline = True
|
||||
Me.XrTableCell25.Name = "XrTableCell25"
|
||||
Me.XrTableCell25.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell25.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell25.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell25.StylePriority.UseBorders = False
|
||||
Me.XrTableCell25.StylePriority.UseFont = False
|
||||
Me.XrTableCell25.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell25.Text = "Zertifizierung"
|
||||
Me.XrTableCell25.Weight = 0.11578821158083684R
|
||||
'
|
||||
'XrTableCell26
|
||||
'
|
||||
Me.XrTableCell26.BackColor = System.Drawing.Color.White
|
||||
Me.XrTableCell26.BorderColor = System.Drawing.Color.Empty
|
||||
Me.XrTableCell26.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.XrTableCell26.Dpi = 254.0!
|
||||
Me.XrTableCell26.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[Envelope].[CertificationType]")})
|
||||
Me.XrTableCell26.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||
Me.XrTableCell26.ForeColor = System.Drawing.Color.Black
|
||||
Me.XrTableCell26.Multiline = True
|
||||
Me.XrTableCell26.Name = "XrTableCell26"
|
||||
Me.XrTableCell26.StyleName = "DetailCaption1"
|
||||
Me.XrTableCell26.StylePriority.UseBackColor = False
|
||||
Me.XrTableCell26.StylePriority.UseBorderColor = False
|
||||
Me.XrTableCell26.StylePriority.UseBorders = False
|
||||
Me.XrTableCell26.StylePriority.UseFont = False
|
||||
Me.XrTableCell26.StylePriority.UseForeColor = False
|
||||
Me.XrTableCell26.Text = "XrTableCell26"
|
||||
Me.XrTableCell26.Weight = 0.38280260446913161R
|
||||
'
|
||||
'GroupHeader1
|
||||
'
|
||||
Me.GroupHeader1.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.table1})
|
||||
Me.GroupHeader1.Dpi = 254.0!
|
||||
Me.GroupHeader1.GroupUnion = DevExpress.XtraReports.UI.GroupUnion.WithFirstDetail
|
||||
Me.GroupHeader1.HeightF = 71.12!
|
||||
Me.GroupHeader1.Name = "GroupHeader1"
|
||||
'
|
||||
'table1
|
||||
'
|
||||
Me.table1.Dpi = 254.0!
|
||||
Me.table1.LocationFloat = New DevExpress.Utils.PointFloat(0!, 0!)
|
||||
Me.table1.Name = "table1"
|
||||
Me.table1.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.tableRow1})
|
||||
Me.table1.SizeF = New System.Drawing.SizeF(1900.0!, 71.12!)
|
||||
'
|
||||
'tableRow1
|
||||
'
|
||||
Me.tableRow1.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.tableCell1, Me.tableCell2, Me.tableCell3})
|
||||
Me.tableRow1.Dpi = 254.0!
|
||||
Me.tableRow1.Name = "tableRow1"
|
||||
Me.tableRow1.Weight = 1.0R
|
||||
'
|
||||
'tableCell1
|
||||
'
|
||||
Me.tableCell1.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.tableCell1.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.tableCell1.Borders = DevExpress.XtraPrinting.BorderSide.Bottom
|
||||
Me.tableCell1.BorderWidth = 1.0!
|
||||
Me.tableCell1.Dpi = 254.0!
|
||||
Me.tableCell1.ForeColor = System.Drawing.Color.Black
|
||||
Me.tableCell1.Name = "tableCell1"
|
||||
Me.tableCell1.StyleName = "DetailCaption1"
|
||||
Me.tableCell1.StylePriority.UseBackColor = False
|
||||
Me.tableCell1.StylePriority.UseBorderColor = False
|
||||
Me.tableCell1.StylePriority.UseBorders = False
|
||||
Me.tableCell1.StylePriority.UseBorderWidth = False
|
||||
Me.tableCell1.StylePriority.UseForeColor = False
|
||||
Me.tableCell1.Text = "Ereignis"
|
||||
Me.tableCell1.Weight = 0.51726482588176181R
|
||||
'
|
||||
'tableCell2
|
||||
'
|
||||
Me.tableCell2.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.tableCell2.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.tableCell2.Borders = DevExpress.XtraPrinting.BorderSide.Bottom
|
||||
Me.tableCell2.BorderWidth = 1.0!
|
||||
Me.tableCell2.Dpi = 254.0!
|
||||
Me.tableCell2.ForeColor = System.Drawing.Color.Black
|
||||
Me.tableCell2.Name = "tableCell2"
|
||||
Me.tableCell2.StyleName = "DetailCaption1"
|
||||
Me.tableCell2.StylePriority.UseBackColor = False
|
||||
Me.tableCell2.StylePriority.UseBorderColor = False
|
||||
Me.tableCell2.StylePriority.UseBorders = False
|
||||
Me.tableCell2.StylePriority.UseBorderWidth = False
|
||||
Me.tableCell2.StylePriority.UseForeColor = False
|
||||
Me.tableCell2.Text = "Benutzer"
|
||||
Me.tableCell2.Weight = 0.45140669898958585R
|
||||
'
|
||||
'tableCell3
|
||||
'
|
||||
Me.tableCell3.BackColor = System.Drawing.Color.FromArgb(CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer), CType(CType(224, Byte), Integer))
|
||||
Me.tableCell3.BorderColor = System.Drawing.Color.FromArgb(CType(CType(165, Byte), Integer), CType(CType(36, Byte), Integer), CType(CType(49, Byte), Integer))
|
||||
Me.tableCell3.Borders = DevExpress.XtraPrinting.BorderSide.Bottom
|
||||
Me.tableCell3.BorderWidth = 1.0!
|
||||
Me.tableCell3.Dpi = 254.0!
|
||||
Me.tableCell3.ForeColor = System.Drawing.Color.Black
|
||||
Me.tableCell3.Name = "tableCell3"
|
||||
Me.tableCell3.StyleName = "DetailCaption1"
|
||||
Me.tableCell3.StylePriority.UseBackColor = False
|
||||
Me.tableCell3.StylePriority.UseBorderColor = False
|
||||
Me.tableCell3.StylePriority.UseBorders = False
|
||||
Me.tableCell3.StylePriority.UseBorderWidth = False
|
||||
Me.tableCell3.StylePriority.UseForeColor = False
|
||||
Me.tableCell3.Text = "Zeitstempel"
|
||||
Me.tableCell3.Weight = 0.22479583469004233R
|
||||
'
|
||||
'Detail
|
||||
'
|
||||
Me.Detail.Controls.AddRange(New DevExpress.XtraReports.UI.XRControl() {Me.table2})
|
||||
Me.Detail.Dpi = 254.0!
|
||||
Me.Detail.HeightF = 86.174!
|
||||
Me.Detail.HierarchyPrintOptions.Indent = 50.8!
|
||||
Me.Detail.Name = "Detail"
|
||||
'
|
||||
'table2
|
||||
'
|
||||
Me.table2.Dpi = 254.0!
|
||||
Me.table2.LocationFloat = New DevExpress.Utils.PointFloat(0!, 0!)
|
||||
Me.table2.Name = "table2"
|
||||
Me.table2.Rows.AddRange(New DevExpress.XtraReports.UI.XRTableRow() {Me.tableRow2})
|
||||
Me.table2.SizeF = New System.Drawing.SizeF(1900.0!, 63.42!)
|
||||
'
|
||||
'tableRow2
|
||||
'
|
||||
Me.tableRow2.Cells.AddRange(New DevExpress.XtraReports.UI.XRTableCell() {Me.tableCell4, Me.tableCell5, Me.tableCell6})
|
||||
Me.tableRow2.Dpi = 254.0!
|
||||
Me.tableRow2.Name = "tableRow2"
|
||||
Me.tableRow2.Weight = 11.683999633789062R
|
||||
'
|
||||
'tableCell4
|
||||
'
|
||||
Me.tableCell4.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.tableCell4.Dpi = 254.0!
|
||||
Me.tableCell4.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ItemStatusTranslated]")})
|
||||
Me.tableCell4.Name = "tableCell4"
|
||||
Me.tableCell4.StyleName = "DetailData1"
|
||||
Me.tableCell4.StylePriority.UseBorders = False
|
||||
Me.tableCell4.Weight = 0.51726482142156094R
|
||||
'
|
||||
'tableCell5
|
||||
'
|
||||
Me.tableCell5.Dpi = 254.0!
|
||||
Me.tableCell5.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ItemUserReference]")})
|
||||
Me.tableCell5.Name = "tableCell5"
|
||||
Me.tableCell5.StyleName = "DetailData1"
|
||||
Me.tableCell5.Weight = 0.45140669932916544R
|
||||
'
|
||||
'tableCell6
|
||||
'
|
||||
Me.tableCell6.Dpi = 254.0!
|
||||
Me.tableCell6.ExpressionBindings.AddRange(New DevExpress.XtraReports.UI.ExpressionBinding() {New DevExpress.XtraReports.UI.ExpressionBinding("BeforePrint", "Text", "[ItemDate]")})
|
||||
Me.tableCell6.Name = "tableCell6"
|
||||
Me.tableCell6.StyleName = "DetailData1"
|
||||
Me.tableCell6.StylePriority.UseTextAlignment = False
|
||||
Me.tableCell6.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleRight
|
||||
Me.tableCell6.Weight = 0.22479581593269077R
|
||||
'
|
||||
'Title
|
||||
'
|
||||
Me.Title.BackColor = System.Drawing.Color.Transparent
|
||||
Me.Title.BorderColor = System.Drawing.Color.Black
|
||||
Me.Title.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.Title.BorderWidth = 1.0!
|
||||
Me.Title.Font = New System.Drawing.Font("Arial", 14.25!)
|
||||
Me.Title.ForeColor = System.Drawing.Color.FromArgb(CType(CType(75, Byte), Integer), CType(CType(75, Byte), Integer), CType(CType(75, Byte), Integer))
|
||||
Me.Title.Name = "Title"
|
||||
Me.Title.Padding = New DevExpress.XtraPrinting.PaddingInfo(15, 15, 0, 0, 254.0!)
|
||||
'
|
||||
'DetailCaption1
|
||||
'
|
||||
Me.DetailCaption1.BackColor = System.Drawing.Color.FromArgb(CType(CType(75, Byte), Integer), CType(CType(75, Byte), Integer), CType(CType(75, Byte), Integer))
|
||||
Me.DetailCaption1.BorderColor = System.Drawing.Color.White
|
||||
Me.DetailCaption1.Borders = DevExpress.XtraPrinting.BorderSide.Left
|
||||
Me.DetailCaption1.BorderWidth = 2.0!
|
||||
Me.DetailCaption1.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold)
|
||||
Me.DetailCaption1.ForeColor = System.Drawing.Color.White
|
||||
Me.DetailCaption1.Name = "DetailCaption1"
|
||||
Me.DetailCaption1.Padding = New DevExpress.XtraPrinting.PaddingInfo(15, 15, 0, 0, 254.0!)
|
||||
Me.DetailCaption1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft
|
||||
'
|
||||
'DetailData1
|
||||
'
|
||||
Me.DetailData1.BorderColor = System.Drawing.Color.Transparent
|
||||
Me.DetailData1.Borders = DevExpress.XtraPrinting.BorderSide.Left
|
||||
Me.DetailData1.BorderWidth = 2.0!
|
||||
Me.DetailData1.Font = New System.Drawing.Font("Arial", 8.25!)
|
||||
Me.DetailData1.ForeColor = System.Drawing.Color.Black
|
||||
Me.DetailData1.Name = "DetailData1"
|
||||
Me.DetailData1.Padding = New DevExpress.XtraPrinting.PaddingInfo(15, 15, 0, 0, 254.0!)
|
||||
Me.DetailData1.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft
|
||||
'
|
||||
'DetailData3_Odd
|
||||
'
|
||||
Me.DetailData3_Odd.BackColor = System.Drawing.Color.FromArgb(CType(CType(231, Byte), Integer), CType(CType(231, Byte), Integer), CType(CType(231, Byte), Integer))
|
||||
Me.DetailData3_Odd.BorderColor = System.Drawing.Color.Transparent
|
||||
Me.DetailData3_Odd.Borders = DevExpress.XtraPrinting.BorderSide.None
|
||||
Me.DetailData3_Odd.BorderWidth = 1.0!
|
||||
Me.DetailData3_Odd.Font = New System.Drawing.Font("Arial", 8.25!)
|
||||
Me.DetailData3_Odd.ForeColor = System.Drawing.Color.Black
|
||||
Me.DetailData3_Odd.Name = "DetailData3_Odd"
|
||||
Me.DetailData3_Odd.Padding = New DevExpress.XtraPrinting.PaddingInfo(15, 15, 0, 0, 254.0!)
|
||||
Me.DetailData3_Odd.TextAlignment = DevExpress.XtraPrinting.TextAlignment.MiddleLeft
|
||||
'
|
||||
'PageInfo
|
||||
'
|
||||
Me.PageInfo.Font = New System.Drawing.Font("Arial", 8.25!, System.Drawing.FontStyle.Bold)
|
||||
Me.PageInfo.ForeColor = System.Drawing.Color.FromArgb(CType(CType(75, Byte), Integer), CType(CType(75, Byte), Integer), CType(CType(75, Byte), Integer))
|
||||
Me.PageInfo.Name = "PageInfo"
|
||||
Me.PageInfo.Padding = New DevExpress.XtraPrinting.PaddingInfo(15, 15, 0, 0, 254.0!)
|
||||
'
|
||||
'GalleryDropDown1
|
||||
'
|
||||
Me.GalleryDropDown1.Manager = Nothing
|
||||
Me.GalleryDropDown1.Name = "GalleryDropDown1"
|
||||
'
|
||||
'ObjectDataSource1
|
||||
'
|
||||
Me.ObjectDataSource1.DataMember = "Items"
|
||||
'Me.ObjectDataSource1.DataSource = GetType(EnvelopeGenerator.CommonServices.ReportSource)
|
||||
Me.ObjectDataSource1.Name = "ObjectDataSource1"
|
||||
'
|
||||
'rptEnvelopeHistory
|
||||
'
|
||||
Me.Bands.AddRange(New DevExpress.XtraReports.UI.Band() {Me.TopMargin, Me.BottomMargin, Me.ReportHeader, Me.GroupHeader1, Me.Detail})
|
||||
Me.ComponentStorage.AddRange(New System.ComponentModel.IComponent() {Me.ObjectDataSource1})
|
||||
Me.DataSource = Me.ObjectDataSource1
|
||||
Me.Dpi = 254.0!
|
||||
Me.Font = New System.Drawing.Font("Arial", 9.75!)
|
||||
Me.Margins = New System.Drawing.Printing.Margins(100, 100, 191, 100)
|
||||
Me.PageHeight = 2970
|
||||
Me.PageWidth = 2100
|
||||
Me.PaperKind = System.Drawing.Printing.PaperKind.A4
|
||||
Me.ReportUnit = DevExpress.XtraReports.UI.ReportUnit.TenthsOfAMillimeter
|
||||
Me.SnapGridSize = 25.0!
|
||||
Me.StyleSheet.AddRange(New DevExpress.XtraReports.UI.XRControlStyle() {Me.Title, Me.DetailCaption1, Me.DetailData1, Me.DetailData3_Odd, Me.PageInfo})
|
||||
Me.Version = "21.2"
|
||||
Me.Watermark.ImageSource = New DevExpress.XtraPrinting.Drawing.ImageSource("img", resources.GetString("rptEnvelopeHistory.Watermark.ImageSource"))
|
||||
Me.Watermark.ImageTransparency = 220
|
||||
CType(Me.XrTable3, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.table1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.table2, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.GalleryDropDown1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me.ObjectDataSource1, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
CType(Me, System.ComponentModel.ISupportInitialize).EndInit()
|
||||
|
||||
End Sub
|
||||
|
||||
Friend WithEvents TopMargin As DevExpress.XtraReports.UI.TopMarginBand
|
||||
Friend WithEvents BottomMargin As DevExpress.XtraReports.UI.BottomMarginBand
|
||||
Friend WithEvents pageInfo1 As DevExpress.XtraReports.UI.XRPageInfo
|
||||
Friend WithEvents pageInfo2 As DevExpress.XtraReports.UI.XRPageInfo
|
||||
Friend WithEvents ReportHeader As DevExpress.XtraReports.UI.ReportHeaderBand
|
||||
Friend WithEvents label1 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents GroupHeader1 As DevExpress.XtraReports.UI.GroupHeaderBand
|
||||
Friend WithEvents table1 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents tableRow1 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents tableCell1 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents tableCell2 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents tableCell3 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents Detail As DevExpress.XtraReports.UI.DetailBand
|
||||
Friend WithEvents table2 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents tableRow2 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents tableCell4 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents tableCell5 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents tableCell6 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents ObjectDataSource1 As DevExpress.DataAccess.ObjectBinding.ObjectDataSource
|
||||
Friend WithEvents Title As DevExpress.XtraReports.UI.XRControlStyle
|
||||
Friend WithEvents DetailCaption1 As DevExpress.XtraReports.UI.XRControlStyle
|
||||
Friend WithEvents DetailData1 As DevExpress.XtraReports.UI.XRControlStyle
|
||||
Friend WithEvents DetailData3_Odd As DevExpress.XtraReports.UI.XRControlStyle
|
||||
Friend WithEvents PageInfo As DevExpress.XtraReports.UI.XRControlStyle
|
||||
Friend WithEvents XrLabel1 As DevExpress.XtraReports.UI.XRLabel
|
||||
Friend WithEvents XrTable3 As DevExpress.XtraReports.UI.XRTable
|
||||
Friend WithEvents XrTableRow8 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell13 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell15 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableRow9 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell14 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell17 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell16 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell18 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableRow10 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell19 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell20 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell21 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell22 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableRow11 As DevExpress.XtraReports.UI.XRTableRow
|
||||
Friend WithEvents XrTableCell23 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell24 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell25 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents XrTableCell26 As DevExpress.XtraReports.UI.XRTableCell
|
||||
Friend WithEvents GalleryDropDown1 As DevExpress.XtraBars.Ribbon.GalleryDropDown
|
||||
End Class
|
||||
File diff suppressed because one or more lines are too long
@@ -1,3 +0,0 @@
|
||||
Public Class rptEnvelopeHistory
|
||||
|
||||
End Class
|
||||
@@ -0,0 +1,8 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Configurations;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DbTriggerParams : Dictionary<string, ICollection<string>>
|
||||
{
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Configurations;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class GdPictureParams
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string License { get; set; } = null!;
|
||||
}
|
||||
@@ -1,78 +0,0 @@
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Model;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Drawing;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Configurations;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PDFBurnerParams : ITextStyle
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ConcurrencyLimit { get; set; } = 5;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public IEnumerable<string> IgnoredLabels { get; set; } = new List<string>
|
||||
{
|
||||
"Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
|
||||
public double TopMargin { get; set; } = 0.1;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double YOffset { get; set; } = -0.3;
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FontName { get; set; } = "Arial";
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int FontSize { get; set; } = 8;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
|
||||
public FontStyle FontStyle { get; set; } = FontStyle.Italic;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Dictionary<string, int> IndexOfAnnot { get; init; } = new()
|
||||
{
|
||||
{ string.Empty, 0 },
|
||||
{ "seal", 0 },
|
||||
{ "position", 1 },
|
||||
{ "city", 2 },
|
||||
{ "date", 3 }
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int DefaultIndexOfAnnot { get; set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="name"></param>
|
||||
/// <returns></returns>
|
||||
public int GetAnnotationIndex(string name) => IndexOfAnnot.TryGetValue(name, out var value) ? value : DefaultIndexOfAnnot;
|
||||
}
|
||||
@@ -1,73 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public record AnnotationCreateDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ElementId { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Value { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Type { get; init; } = null!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? X { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? Y { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? Width { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public double? Height { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public record AnnotationDto : AnnotationCreateDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public long Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? ChangedWho { get; init; }
|
||||
}
|
||||
@@ -1,44 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public record EnvelopeReportDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; set; }
|
||||
|
||||
// --- HEAD ---
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string HeadUuid { get; set; } = null!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string EnvelopeTitle { get; set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string HeadMessage { get; set; } = null!;
|
||||
|
||||
// --- POSITIONS ---
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ItemStatus { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? ItemDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ItemUserReference { get; set; } = null!;
|
||||
}
|
||||
@@ -35,9 +35,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<EnvelopeType, EnvelopeTypeDto>();
|
||||
CreateMap<Domain.Entities.Receiver, ReceiverDto>();
|
||||
CreateMap<Domain.Entities.EnvelopeReceiverReadOnly, EnvelopeReceiverReadOnlyDto>();
|
||||
CreateMap<ElementAnnotation, AnnotationDto>();
|
||||
CreateMap<ThirdPartyModule, ThirdPartyModuleDto>();
|
||||
CreateMap<EnvelopeReport, EnvelopeReportDto>();
|
||||
|
||||
// DTO to Entity mappings
|
||||
CreateMap<ConfigDto, Config>();
|
||||
@@ -53,8 +50,6 @@ public class MappingProfile : Profile
|
||||
CreateMap<ReceiverDto, Domain.Entities.Receiver>().ForMember(rcv => rcv.EnvelopeReceivers, rcvReadDto => rcvReadDto.Ignore());
|
||||
CreateMap<EnvelopeReceiverReadOnlyCreateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||
CreateMap<EnvelopeReceiverReadOnlyUpdateDto, Domain.Entities.EnvelopeReceiverReadOnly>();
|
||||
CreateMap<AnnotationCreateDto, ElementAnnotation>()
|
||||
.ForMember(dest => dest.AddedWhen, opt => opt.MapFrom(_ => DateTime.UtcNow));
|
||||
|
||||
// Messaging mappings
|
||||
// for GTX messaging
|
||||
|
||||
@@ -1,122 +0,0 @@
|
||||
using EnvelopeGenerator.Application.Exceptions;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class Annotation
|
||||
{
|
||||
private string? _id;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int EnvelopeId { get; private set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int ReceiverId { get; private set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Index { get; private set; } = 0;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string EgName { get; private set; } = string.Empty;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool HasStructuredID { get; private set; } = false;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool IsLabel
|
||||
{
|
||||
get
|
||||
{
|
||||
if (string.IsNullOrEmpty(EgName))
|
||||
return false;
|
||||
|
||||
var parts = EgName.Split('_');
|
||||
return parts.Length > 1 && parts[1] == "label";
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Id
|
||||
{
|
||||
get => _id;
|
||||
set
|
||||
{
|
||||
_id = value;
|
||||
|
||||
if (string.IsNullOrWhiteSpace(value))
|
||||
throw new BurnAnnotationException("The identifier of annotation is null or empty.");
|
||||
|
||||
var parts = value.Split('#');
|
||||
|
||||
if (parts.Length != 4)
|
||||
return;
|
||||
// throw new BurnAnnotationException($"The identifier of annotation has more or less than 4 sub-part. Id: {_id}");
|
||||
|
||||
if (!int.TryParse(parts[0], out int envelopeId))
|
||||
throw new BurnAnnotationException($"The envelope ID of annotation is not integer. Id: {_id}");
|
||||
EnvelopeId = envelopeId;
|
||||
|
||||
if (!int.TryParse(parts[1], out int receiverId))
|
||||
throw new BurnAnnotationException($"The receiver ID of annotation is not integer. Id: {_id}");
|
||||
ReceiverId = receiverId;
|
||||
|
||||
if (!int.TryParse(parts[2], out int index))
|
||||
throw new BurnAnnotationException($"The index of annotation is not integer. Id: {_id}");
|
||||
Index = index;
|
||||
|
||||
EgName = parts[3];
|
||||
HasStructuredID = true;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<double>? Bbox { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Type { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool IsSignature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? ImageAttachmentId { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Lines? Lines { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int PageIndex { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? StrokeColor { get; set; }
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="Binary"></param>
|
||||
/// <param name="ContentType"></param>
|
||||
public record Attachment(string Binary, string ContentType);
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="Name"></param>
|
||||
/// <param name="Value"></param>
|
||||
public record FormFieldValue(string Name, string? Value = null);
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="Lines"></param>
|
||||
/// <param name="StrokeColor"></param>
|
||||
public record Ink(Lines Lines, string? StrokeColor = null);
|
||||
@@ -1,50 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class InstantData
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<Annotation>? Annotations { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public IEnumerable<List<Annotation>>? AnnotationsByReceiver
|
||||
{
|
||||
get
|
||||
{
|
||||
return Annotations?
|
||||
.Where(a => a.HasStructuredID)
|
||||
.GroupBy(a => a.ReceiverId)
|
||||
.Select(g => g.ToList());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public IEnumerable<List<Annotation>>? UnstructuredAnnotations
|
||||
{
|
||||
get
|
||||
{
|
||||
return Annotations?
|
||||
.Where(a => !a.HasStructuredID)
|
||||
.GroupBy(a => a.ReceiverId)
|
||||
.Select(g => g.ToList());
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public Dictionary<string, Attachment>? Attachments { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public List<FormFieldValue>? FormFieldValues { get; set; }
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="Points"></param>
|
||||
public record Lines(List<List<List<float>>> Points);
|
||||
@@ -1,5 +1,4 @@
|
||||
using EnvelopeGenerator.Domain.Interfaces;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Dto;
|
||||
|
||||
@@ -7,7 +6,7 @@ namespace EnvelopeGenerator.Application.Common.Dto;
|
||||
/// Data Transfer Object representing a positioned element assigned to a document receiver.
|
||||
/// </summary>
|
||||
[ApiExplorerSettings(IgnoreApi = true)]
|
||||
public class SignatureDto : ISignature
|
||||
public class SignatureDto
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the unique identifier of the element.
|
||||
|
||||
@@ -1,57 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Dto;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public record ThirdPartyModuleDto
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int Id { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool Active { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Name { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? Description { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string License { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string Version { get; init; } = default!;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? AddedWho { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? AddedWhen { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string? ChangedWho { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime? ChangedWhen { get; init; }
|
||||
}
|
||||
@@ -1,176 +0,0 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using GdPicture14;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Newtonsoft.Json;
|
||||
using SixLabors.ImageSharp;
|
||||
using System.Drawing;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Model;
|
||||
using EnvelopeGenerator.Application.Common.Configurations;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class GdPictureExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="width"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="value"></param>
|
||||
/// <param name="textStyle"></param>
|
||||
public static void AddFormFieldValue(this AnnotationManager manager, double x, double y, double width, double height, int page, string value, ITextStyle textStyle)
|
||||
{
|
||||
manager.SelectPage(page);
|
||||
|
||||
// Add the text annotation
|
||||
var ant = manager.AddTextAnnot((float)x, (float)y, (float)width, (float)height, value);
|
||||
|
||||
// Set the font properties
|
||||
ant.FontName = textStyle.FontName;
|
||||
ant.FontSize = textStyle.FontSize;
|
||||
ant.FontStyle = textStyle.FontStyle;
|
||||
|
||||
manager.SaveAnnotationsToPage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="pAnnotation"></param>
|
||||
/// <param name="formFieldValue"></param>
|
||||
/// <param name="options"></param>
|
||||
public static void AddFormFieldValue(this AnnotationManager manager, Annotation pAnnotation, FormFieldValue formFieldValue, PDFBurnerParams options)
|
||||
{
|
||||
var ffIndex = options.GetAnnotationIndex(pAnnotation.EgName);
|
||||
|
||||
// Convert pixels to Inches
|
||||
var oBounds = pAnnotation.Bbox?.Select(points => points.ToInches()).ToList();
|
||||
|
||||
if (oBounds is null || oBounds.Count < 4)
|
||||
return;
|
||||
|
||||
double oX = oBounds[0];
|
||||
double oY = oBounds[1] + options.YOffset * ffIndex + options.TopMargin;
|
||||
double oWidth = oBounds[2];
|
||||
double oHeight = oBounds[3];
|
||||
|
||||
manager.SelectPage(pAnnotation.PageIndex + 1);
|
||||
|
||||
// Add the text annotation
|
||||
var ant = manager.AddTextAnnot((float)oX, (float)oY, (float)oWidth, (float)oHeight, formFieldValue.Value);
|
||||
|
||||
// Set the font properties
|
||||
ant.FontName = options.FontName;
|
||||
ant.FontSize = options.FontSize;
|
||||
ant.FontStyle = options.FontStyle;
|
||||
|
||||
manager.SaveAnnotationsToPage();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="x"></param>
|
||||
/// <param name="y"></param>
|
||||
/// <param name="width"></param>
|
||||
/// <param name="height"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="base64"></param>
|
||||
public static void AddImageAnnotation(this AnnotationManager manager, double x, double y, double width, double height, int page, string base64)
|
||||
{
|
||||
manager.SelectPage(page);
|
||||
manager.AddEmbeddedImageAnnotFromBase64(base64, (float)x, (float)y, (float)width, (float)height);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="pAnnotation"></param>
|
||||
/// <param name="pAttachments"></param>
|
||||
public static void AddImageAnnotation(this AnnotationManager manager, Annotation pAnnotation, Dictionary<string, Attachment> pAttachments)
|
||||
{
|
||||
var oAttachment = pAttachments
|
||||
.Where(a => a.Key == pAnnotation.ImageAttachmentId)
|
||||
.SingleOrDefault();
|
||||
|
||||
if (oAttachment.Value == null)
|
||||
return;
|
||||
|
||||
// Convert pixels to Inches
|
||||
var oBounds = pAnnotation.Bbox?.Select(post => post.ToInches()).ToList();
|
||||
|
||||
if (oBounds is null || oBounds.Count < 4)
|
||||
return;
|
||||
|
||||
var oX = oBounds[0];
|
||||
var oY = oBounds[1];
|
||||
var oWidth = oBounds[2];
|
||||
var oHeight = oBounds[3];
|
||||
|
||||
manager.SelectPage(pAnnotation.PageIndex + 1);
|
||||
manager.AddEmbeddedImageAnnotFromBase64(oAttachment.Value.Binary, (float)oX, (float)oY, (float)oWidth, (float)oHeight);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="page"></param>
|
||||
/// <param name="value"></param>
|
||||
public static void AddInkAnnotation(this AnnotationManager manager, int page, string value)
|
||||
{
|
||||
var ink = JsonConvert.DeserializeObject<Ink>(value);
|
||||
|
||||
var oSegments = ink?.Lines.Points;
|
||||
var oColor = ColorTranslator.FromHtml(ink?.StrokeColor ?? "#000000");
|
||||
manager.SelectPage(page);
|
||||
|
||||
if (oSegments is null)
|
||||
return;
|
||||
|
||||
foreach (var oSegment in oSegments)
|
||||
{
|
||||
var oPoints = oSegment
|
||||
.Select(points => points.ToPointF())
|
||||
.ToArray();
|
||||
|
||||
manager.AddFreeHandAnnot(oColor, oPoints);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="pAnnotation"></param>
|
||||
public static void AddInkAnnotation(this AnnotationManager manager, Annotation pAnnotation)
|
||||
{
|
||||
var oSegments = pAnnotation.Lines?.Points;
|
||||
var oColor = ColorTranslator.FromHtml(pAnnotation.StrokeColor ?? "#000000");
|
||||
manager.SelectPage(pAnnotation.PageIndex + 1);
|
||||
|
||||
if (oSegments is null)
|
||||
return;
|
||||
|
||||
foreach (var oSegment in oSegments)
|
||||
{
|
||||
var oPoints = oSegment
|
||||
.Select(points => points.ToPointF())
|
||||
.ToArray();
|
||||
|
||||
manager.AddFreeHandAnnot(oColor, oPoints);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,18 +0,0 @@
|
||||
using System.Text.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class JsonExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="obj"></param>
|
||||
/// <param name="options"></param>
|
||||
/// <returns></returns>
|
||||
public static string ToJson(this object obj, JsonSerializerOptions? options = null)
|
||||
=> JsonSerializer.Serialize(obj, options);
|
||||
}
|
||||
@@ -1,40 +0,0 @@
|
||||
using System.Drawing;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class MathematExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="points"></param>
|
||||
/// <returns></returns>
|
||||
public static PointF ToPointF(this List<float> points)
|
||||
{
|
||||
var pointsInch = points.Select(ToInches).ToList();
|
||||
return new PointF(pointsInch[0], pointsInch[1]);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static double ToInches(this double value)
|
||||
{
|
||||
return value / 72.0;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="value"></param>
|
||||
/// <returns></returns>
|
||||
public static float ToInches(this float value)
|
||||
{
|
||||
return value / 72f;
|
||||
}
|
||||
}
|
||||
@@ -1,30 +1,14 @@
|
||||
using OtpNet;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class StringExtension
|
||||
namespace EnvelopeGenerator.Application.Common.Extensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="totp"></param>
|
||||
/// <param name="secret"></param>
|
||||
/// <returns></returns>
|
||||
public static bool IsValidTotp(this string totp, string secret)
|
||||
public static class StringExtension
|
||||
{
|
||||
var secret_bytes = Base32Encoding.ToBytes(secret);
|
||||
var secret_totp = new Totp(secret_bytes);
|
||||
return secret_totp.VerifyTotp(totp, out _, VerificationWindow.RfcSpecifiedNetworkDelay);
|
||||
public static bool IsValidTotp(this string totp, string secret)
|
||||
{
|
||||
var secret_bytes = Base32Encoding.ToBytes(secret);
|
||||
var secret_totp = new Totp(secret_bytes);
|
||||
return secret_totp.VerifyTotp(totp, out _, VerificationWindow.RfcSpecifiedNetworkDelay);
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="seperator"></param>
|
||||
/// <param name="values"></param>
|
||||
/// <returns></returns>
|
||||
public static string Join(this IEnumerable<string> values, string seperator) => string.Join(seperator, values);
|
||||
}
|
||||
@@ -1,27 +0,0 @@
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using System.Drawing;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Model;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public interface ITextStyle
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string FontName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public int FontSize { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[SuppressMessage("Interoperability", "CA1416:Validate platform compatibility", Justification = "<Pending>")]
|
||||
public FontStyle FontStyle { get; set; }
|
||||
}
|
||||
@@ -1,20 +1,11 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Common.Notifications.RemoveSignature;
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
using Newtonsoft.Json;
|
||||
using System.Dynamic;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="Instant"></param>
|
||||
/// <param name="Structured"></param>
|
||||
public record PsPdfKitAnnotation(ExpandoObject Instant, IEnumerable<AnnotationCreateDto> Structured);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -24,7 +15,7 @@ public record DocSignedNotification(EnvelopeReceiverDto Original) : EnvelopeRece
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public PsPdfKitAnnotation PsPdfKitAnnotation { get; init; } = null!;
|
||||
public required ExpandoObject Annotations { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -36,7 +27,7 @@ public record DocSignedNotification(EnvelopeReceiverDto Original) : EnvelopeRece
|
||||
/// </summary>
|
||||
public string EmailAddress => Receiver?.EmailAddress
|
||||
?? throw new InvalidOperationException($"Receiver is null." +
|
||||
$"DocSignedNotification:\n{this.ToJson(Format.Json.ForDiagnostics)}");
|
||||
$"DocSignedNotification:\n{JsonConvert.SerializeObject(this, Format.Json.ForDiagnostics)}");
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -48,41 +39,17 @@ public static class DocSignedNotificationExtensions
|
||||
/// Converts an <see cref="EnvelopeReceiverDto"/> to a <see cref="DocSignedNotification"/>.
|
||||
/// </summary>
|
||||
/// <param name="dto">The DTO to convert.</param>
|
||||
/// <param name="psPdfKitAnnotation"></param>
|
||||
/// <param name="annotations"></param>
|
||||
/// <returns>A new <see cref="DocSignedNotification"/> instance.</returns>
|
||||
public static DocSignedNotification ToDocSignedNotification(this EnvelopeReceiverDto dto, PsPdfKitAnnotation psPdfKitAnnotation)
|
||||
=> new(dto) { PsPdfKitAnnotation = psPdfKitAnnotation };
|
||||
public static DocSignedNotification ToDocSignedNotification(this EnvelopeReceiverDto dto, ExpandoObject annotations)
|
||||
=> new(dto) { Annotations = annotations };
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// Asynchronously converts a <see cref="Task{EnvelopeReceiverDto}"/> to a <see cref="DocSignedNotification"/>.
|
||||
/// </summary>
|
||||
/// <param name="dtoTask"></param>
|
||||
/// <param name="psPdfKitAnnotation"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task<DocSignedNotification?> ToDocSignedNotification(this Task<EnvelopeReceiverDto?> dtoTask, PsPdfKitAnnotation psPdfKitAnnotation)
|
||||
=> await dtoTask is EnvelopeReceiverDto dto ? new(dto) { PsPdfKitAnnotation = psPdfKitAnnotation } : null;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="publisher"></param>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static async Task PublishSafely(this IPublisher publisher, DocSignedNotification notification, CancellationToken cancel = default)
|
||||
{
|
||||
try
|
||||
{
|
||||
await publisher.Publish(notification, cancel);
|
||||
}
|
||||
catch (Exception)
|
||||
{
|
||||
await publisher.Publish(new RemoveSignatureNotification()
|
||||
{
|
||||
EnvelopeId = notification.EnvelopeId,
|
||||
ReceiverId = notification.ReceiverId
|
||||
}, cancel);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
/// <param name="dtoTask">The task that returns the DTO to convert.</param>
|
||||
/// <param name="annotations"></param>
|
||||
/// <returns>A task that represents the asynchronous conversion operation.</returns>
|
||||
public static async Task<DocSignedNotification?> ToDocSignedNotification(this Task<EnvelopeReceiverDto?> dtoTask, ExpandoObject annotations)
|
||||
=> await dtoTask is EnvelopeReceiverDto dto ? new(dto) { Annotations = annotations } : null;
|
||||
}
|
||||
@@ -1,6 +1,8 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
|
||||
using EnvelopeGenerator.Application.DocStatus.Commands;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers;
|
||||
|
||||
@@ -9,18 +11,15 @@ namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers;
|
||||
/// </summary>
|
||||
public class AnnotationHandler : INotificationHandler<DocSignedNotification>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private readonly IRepository<ElementAnnotation> _repo;
|
||||
private readonly ISender _sender;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public AnnotationHandler(IRepository<ElementAnnotation> repository)
|
||||
/// <param name="sender"></param>
|
||||
public AnnotationHandler(ISender sender)
|
||||
{
|
||||
_repo = repository;
|
||||
_sender = sender;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -29,6 +28,13 @@ public class AnnotationHandler : INotificationHandler<DocSignedNotification>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public Task Handle(DocSignedNotification notification, CancellationToken cancel)
|
||||
=> _repo.CreateAsync(notification.PsPdfKitAnnotation.Structured, cancel);
|
||||
public async Task Handle(DocSignedNotification notification, CancellationToken cancel)
|
||||
{
|
||||
await _sender.Send(new SaveDocStatusCommand()
|
||||
{
|
||||
Envelope = new() { Id = notification.EnvelopeId },
|
||||
Receiver = new() { Id = notification.ReceiverId},
|
||||
Value = JsonConvert.SerializeObject(notification.Annotations, Format.Json.ForAnnotations)
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -1,39 +0,0 @@
|
||||
using EnvelopeGenerator.Application.DocStatus.Commands;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
using System.Text.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DocStatusHandler : INotificationHandler<DocSignedNotification>
|
||||
{
|
||||
private readonly ISender _sender;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
public DocStatusHandler(ISender sender)
|
||||
{
|
||||
_sender = sender;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task Handle(DocSignedNotification notification, CancellationToken cancel)
|
||||
{
|
||||
await _sender.Send(new SaveDocStatusCommand()
|
||||
{
|
||||
Envelope = new() { Id = notification.EnvelopeId },
|
||||
Receiver = new() { Id = notification.ReceiverId},
|
||||
Value = JsonSerializer.Serialize(notification.PsPdfKitAnnotation.Instant, Format.Json.ForAnnotations)
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,8 @@
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
|
||||
using EnvelopeGenerator.Application.Histories.Commands;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers;
|
||||
|
||||
@@ -29,14 +30,16 @@ public class HistoryHandler : INotificationHandler<DocSignedNotification>
|
||||
/// <returns></returns>
|
||||
public async Task Handle(DocSignedNotification notification, CancellationToken cancel)
|
||||
{
|
||||
if (notification.Receiver is null)
|
||||
throw new InvalidOperationException($"Receiver information is missing in the notification. DocSignedNotification:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
|
||||
if(notification.Receiver is null)
|
||||
if (notification.Receiver is null)
|
||||
throw new InvalidOperationException($"Receiver information is missing in the notification. DocSignedNotification:\n {JsonConvert.SerializeObject(notification, Format.Json.ForDiagnostics)}");
|
||||
|
||||
await _sender.Send(new CreateHistoryCommand()
|
||||
{
|
||||
EnvelopeId = notification.EnvelopeId,
|
||||
UserReference = notification.Receiver.EmailAddress,
|
||||
Status = EnvelopeStatus.DocumentSigned,
|
||||
Comment = JsonConvert.SerializeObject(notification.Annotations, Format.Json.ForAnnotations)
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RemoveAnnotationHandler : INotificationHandler<RemoveSignatureNotification>
|
||||
{
|
||||
private readonly IRepository<ElementAnnotation> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public RemoveAnnotationHandler(IRepository<ElementAnnotation> repository)
|
||||
{
|
||||
_repo = repository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||
{
|
||||
notification.ThrowIfHasNoFilter();
|
||||
return _repo.DeleteAsync(annots =>
|
||||
{
|
||||
// envelope ID filter
|
||||
if (notification.EnvelopeId is int envelopeId)
|
||||
annots = annots.Where(annot => annot.Element!.Document.EnvelopeId == envelopeId);
|
||||
|
||||
// envelope UUID filter
|
||||
if (notification.EnvelopeUuid is string envelopeUuid)
|
||||
annots = annots.Where(annot => annot.Element!.Document.Envelope!.Uuid == envelopeUuid);
|
||||
|
||||
// receiver ID
|
||||
if (notification.ReceiverId is int receiverId)
|
||||
annots = annots.Where(annot => annot.Element!.ReceiverId == receiverId);
|
||||
|
||||
// receiver signature
|
||||
if (notification.ReceiverSignature is string receiverSignature)
|
||||
annots = annots.Where(annot => annot.Element!.Receiver!.Signature == receiverSignature);
|
||||
|
||||
return annots;
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -1,47 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RemoveDocResult : INotificationHandler<RemoveSignatureNotification>
|
||||
{
|
||||
private readonly IRepository<Envelope> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public RemoveDocResult(IRepository<Envelope> repository)
|
||||
{
|
||||
_repo = repository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||
{
|
||||
if(notification.EnvelopeId is null && notification.EnvelopeUuid is null)
|
||||
return Task.CompletedTask;
|
||||
|
||||
return _repo.UpdateAsync(
|
||||
envelope => envelope.DocResult = null,
|
||||
query => {
|
||||
if (notification.EnvelopeId is int envelopeId)
|
||||
query = query.Where(envelope => envelope.Id == envelopeId);
|
||||
|
||||
if (notification.EnvelopeUuid is string uuid)
|
||||
query = query.Where(envelope => envelope.Uuid == uuid);
|
||||
|
||||
return query;
|
||||
}, cancel);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
using AngleSharp.Html;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RemoveDocStatusHandler : INotificationHandler<RemoveSignatureNotification>
|
||||
{
|
||||
private readonly IRepository<Domain.Entities.DocumentStatus> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public RemoveDocStatusHandler(IRepository<Domain.Entities.DocumentStatus> repository)
|
||||
{
|
||||
_repo = repository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||
{
|
||||
notification.ThrowIfHasNoFilter();
|
||||
return _repo.DeleteAsync(statuses =>
|
||||
{
|
||||
// envelope ID filter
|
||||
if (notification.EnvelopeId is int envelopeId)
|
||||
statuses = statuses.Where(status => status.EnvelopeId == envelopeId);
|
||||
|
||||
// envelope UUID filter
|
||||
if (notification.EnvelopeUuid is string envelopeUuid)
|
||||
statuses = statuses.Where(status => status.Envelope!.Uuid == envelopeUuid);
|
||||
|
||||
// receiver Id filter
|
||||
if (notification.ReceiverId is int receiverId)
|
||||
statuses = statuses.Where(status => status.ReceiverId == receiverId);
|
||||
|
||||
// receiver signature filter
|
||||
if (notification.ReceiverSignature is string receiverSignature)
|
||||
statuses = statuses.Where(status => status.Receiver!.Signature == receiverSignature);
|
||||
|
||||
return statuses;
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature.Handlers;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class RemoveHistoryHandler : INotificationHandler<RemoveSignatureNotification>
|
||||
{
|
||||
private readonly IRepository<Domain.Entities.History> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repository"></param>
|
||||
public RemoveHistoryHandler(IRepository<Domain.Entities.History> repository)
|
||||
{
|
||||
_repo = repository;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="notification"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public Task Handle(RemoveSignatureNotification notification, CancellationToken cancel)
|
||||
{
|
||||
notification.ThrowIfHasNoFilter();
|
||||
return _repo.DeleteAsync(hists =>
|
||||
{
|
||||
hists = hists.Where(hist => hist.Status == EnvelopeStatus.DocumentSigned);
|
||||
|
||||
// envelope ID filter
|
||||
if (notification.EnvelopeId is int envelopeId)
|
||||
hists = hists.Where(hist => hist.EnvelopeId == envelopeId);
|
||||
|
||||
// envelope UUID filter
|
||||
if (notification.EnvelopeUuid is string envelopeUuid)
|
||||
hists = hists.Where(hist => hist.Envelope!.Uuid == envelopeUuid);
|
||||
|
||||
// receiver ID filter
|
||||
if (notification.ReceiverId is int receiverId)
|
||||
hists = hists.Where(hist => hist.Receiver!.Id == receiverId);
|
||||
|
||||
// receiver signature filter
|
||||
if (notification.ReceiverSignature is string receiverSignature)
|
||||
hists = hists.Where(hist => hist.Receiver!.Signature == receiverSignature);
|
||||
|
||||
return hists;
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Notifications.RemoveSignature;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="EnvelopeId"></param>
|
||||
/// <param name="ReceiverId"></param>
|
||||
/// <param name="EnvelopeUuid"></param>
|
||||
/// <param name="ReceiverSignature"></param>
|
||||
public record RemoveSignatureNotification(
|
||||
int? EnvelopeId = null,
|
||||
int? ReceiverId = null,
|
||||
string? EnvelopeUuid = null,
|
||||
string? ReceiverSignature = null
|
||||
) : INotification
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool HasFilter =>
|
||||
EnvelopeId is not null
|
||||
|| ReceiverId is not null
|
||||
|| EnvelopeUuid is not null
|
||||
|| ReceiverSignature is not null;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <exception cref="InvalidOperationException"></exception>
|
||||
public void ThrowIfHasNoFilter()
|
||||
{
|
||||
if (!HasFilter)
|
||||
throw new InvalidOperationException("At least one filter parameter must be provided.");
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.EmailProfilerDispatcher.Abstraction.Entities;
|
||||
using EnvelopeGenerator.Application.Common.Configurations;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
@@ -99,10 +98,10 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
||||
var placeHolders = CreatePlaceHolders(notification);
|
||||
|
||||
var temp = await TempRepo
|
||||
.Where(x => x.Name == notification.TemplateType.ToString())
|
||||
.SingleOrDefaultAsync(cancel)
|
||||
.ReadOnly()
|
||||
.SingleOrDefaultAsync(x => x.Name == notification.TemplateType.ToString(), cancel)
|
||||
?? throw new InvalidOperationException($"Receiver information is missing in the notification." +
|
||||
$"{typeof(TNotification)}:\n {notification.ToJson(Format.Json.ForDiagnostics)}");
|
||||
$"{typeof(TNotification)}:\n {JsonConvert.SerializeObject(notification, Format.Json.ForDiagnostics)}");
|
||||
|
||||
temp.Subject = ReplacePlaceHolders(temp.Subject, placeHolders, MailParams.Placeholders);
|
||||
|
||||
@@ -111,7 +110,7 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
||||
var emailOut = new EmailOut
|
||||
{
|
||||
EmailAddress = notification.EmailAddress,
|
||||
EmailBody = temp.Body,
|
||||
EmailBody = TextToHtml(temp.Body),
|
||||
EmailSubj = temp.Subject,
|
||||
AddedWhen = DateTime.UtcNow,
|
||||
AddedWho = DispatcherParams.AddedWho,
|
||||
@@ -132,4 +131,22 @@ public abstract class SendMailHandler<TNotification> : INotificationHandler<TNot
|
||||
text = text.Replace(ph.Key, ph.Value);
|
||||
return text;
|
||||
}
|
||||
|
||||
private static string TextToHtml(string input)
|
||||
{
|
||||
if (string.IsNullOrEmpty(input)) return "";
|
||||
|
||||
// HTML encoding special characters
|
||||
string encoded = System.Net.WebUtility.HtmlEncode(input);
|
||||
|
||||
// Convert tabs to (4 non-breaking spaces)
|
||||
encoded = encoded.Replace("\t", " ");
|
||||
|
||||
// Convert line breaks to <br />
|
||||
encoded = encoded.Replace("\r\n", "<br />"); // Windows
|
||||
encoded = encoded.Replace("\r", "<br />"); // Mac old
|
||||
encoded = encoded.Replace("\n", "<br />"); // Unix/Linux
|
||||
|
||||
return encoded;
|
||||
}
|
||||
}
|
||||
@@ -20,14 +20,4 @@ public record ReceiverQueryBase
|
||||
/// Eindeutige Signatur des Empfängers
|
||||
/// </summary>
|
||||
public virtual string? Signature { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Checks whether any of the specified query criteria have a value.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// This property returns <c>true</c> if at least one of the fields
|
||||
/// <see cref="Id"/>, <see cref="EmailAddress"/>, or <see cref="Signature"/> is not null.
|
||||
/// <para>Usage example: The query can be executed only if at least one criterion is specified.</para>
|
||||
/// </remarks>
|
||||
public bool HasAnyCriteria => Id is not null || EmailAddress is not null || Signature is not null;
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
using Dapper;
|
||||
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
using DigitalData.Core.Exceptions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.SQL;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Dapper;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using System.Data;
|
||||
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
using Dapper;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.SQL;
|
||||
|
||||
@@ -1,87 +0,0 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Exceptions;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Configs;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DefaultReadConfigQuery : IRequest<ConfigDto>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static readonly Guid MemoryCacheKey = Guid.NewGuid();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class DefaultReadConfigQueryExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<ConfigDto> ReadDefaultConfigAsync(this ISender sender, CancellationToken cancel = default)
|
||||
=> sender.Send(new DefaultReadConfigQuery(), cancel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class DefaultReadConfigQueryHandler : IRequestHandler<DefaultReadConfigQuery, ConfigDto>
|
||||
{
|
||||
private readonly IRepository<Config> _repo;
|
||||
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
private readonly IMemoryCache _cache;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repo"></param>
|
||||
/// <param name="mapper"></param>
|
||||
/// <param name="cache"></param>
|
||||
public DefaultReadConfigQueryHandler(IRepository<Config> repo, IMapper mapper, IMemoryCache cache)
|
||||
{
|
||||
_repo = repo;
|
||||
_mapper = mapper;
|
||||
_cache = cache;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<ConfigDto> Handle(DefaultReadConfigQuery request, CancellationToken cancel)
|
||||
{
|
||||
var config = await _cache.GetOrCreateAsync(DefaultReadConfigQuery.MemoryCacheKey, async entry =>
|
||||
{
|
||||
entry.AbsoluteExpirationRelativeToNow = TimeSpan.FromMinutes(5);
|
||||
var configs = await _repo.GetAllAsync(cancel);
|
||||
var defaultConfig = configs.FirstOrDefault();
|
||||
var defaultConfigDto = _mapper.Map<ConfigDto>(defaultConfig);
|
||||
return defaultConfigDto;
|
||||
});
|
||||
|
||||
if(config is null)
|
||||
{
|
||||
_cache.Remove(DefaultReadConfigQuery.MemoryCacheKey);
|
||||
throw new NotFoundException("No configuration record is found.");
|
||||
}
|
||||
|
||||
return config;
|
||||
}
|
||||
}
|
||||
@@ -1,17 +1,12 @@
|
||||
using DigitalData.Core.Client;
|
||||
using EnvelopeGenerator.Application.Common.Configurations;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using EnvelopeGenerator.Application.Services;
|
||||
using EnvelopeGenerator.Application.ThirdPartyModules.Queries;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.DependencyInjection.Extensions;
|
||||
using Microsoft.Extensions.Options;
|
||||
using QRCoder;
|
||||
using System.Reflection;
|
||||
using GdPicture14;
|
||||
using EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
namespace EnvelopeGenerator.Application;
|
||||
|
||||
@@ -51,30 +46,7 @@ public static class DependencyInjection
|
||||
services.Configure<MailParams>(config.GetSection(nameof(MailParams)));
|
||||
services.Configure<AuthenticatorParams>(config.GetSection(nameof(AuthenticatorParams)));
|
||||
services.Configure<TotpSmsParams>(config.GetSection(nameof(TotpSmsParams)));
|
||||
|
||||
#region PDF Burner
|
||||
services.Configure<PDFBurnerParams>(config.GetSection(nameof(PDFBurnerParams)));
|
||||
services.AddOptions<GdPictureParams>()
|
||||
.Configure((GdPictureParams opt, IServiceProvider provider) =>
|
||||
{
|
||||
opt.License = config["GdPictureLicenseKey"]
|
||||
?? provider.GetRequiredService<IMediator>().ReadThirdPartyModuleLicenseAsync("GDPICTURE").GetAwaiter().GetResult()
|
||||
?? throw new InvalidOperationException($"License record not found for key: {"GDPICTURE"}");
|
||||
});
|
||||
services.AddSingleton(provider =>
|
||||
{
|
||||
var license = provider.GetRequiredService<IOptions<GdPictureParams>>().Value.License;
|
||||
var licenseManager = new LicenseManager();
|
||||
licenseManager.RegisterKEY(license);
|
||||
return licenseManager;
|
||||
});
|
||||
services.AddTransient(provider =>
|
||||
{
|
||||
// Ensure LicenseManager is resolved so that its constructor is called
|
||||
_ = provider.GetRequiredService<LicenseManager>();
|
||||
return new AnnotationManager();
|
||||
});
|
||||
#endregion PDF Burner
|
||||
services.Configure<DbTriggerParams>(config.GetSection(nameof(DbTriggerParams)));
|
||||
|
||||
services.AddHttpClientService<GtxMessagingParams>(config.GetSection(nameof(GtxMessagingParams)));
|
||||
services.TryAddSingleton<ISmsSender, GTXSmsSender>();
|
||||
@@ -85,23 +57,8 @@ public static class DependencyInjection
|
||||
services.AddMediatR(cfg =>
|
||||
{
|
||||
cfg.RegisterServicesFromAssembly(Assembly.GetExecutingAssembly());
|
||||
|
||||
cfg.AddBehavior<CreateHistoryBehavior>();
|
||||
cfg.AddBehavior<SavePdfBehavior>();
|
||||
#if WINDOWS
|
||||
cfg.AddBehavior<SendEmailBehavior>();
|
||||
cfg.AddBehavior<WritePdfBehavior>();
|
||||
cfg.AddBehavior<PdfMergeBehavior>();
|
||||
cfg.AddBehavior<AddReportBehavior>();
|
||||
#endif
|
||||
});
|
||||
|
||||
// Add memory cache
|
||||
services.AddMemoryCache();
|
||||
|
||||
// Register mail services
|
||||
services.AddScoped<IEnvelopeMailService, EnvelopeMailService>();
|
||||
|
||||
return services;
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFrameworks>net7.0;net8.0;net9.0;net8.0-windows</TargetFrameworks>
|
||||
<TargetFrameworks>net7.0;net8.0;net9.0</TargetFrameworks>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
@@ -14,8 +14,7 @@
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Dapper" Version="2.1.66" />
|
||||
<PackageReference Include="DevExpress.Reporting.Core" Version="21.2.4" />
|
||||
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.5.0" />
|
||||
<PackageReference Include="DigitalData.Core.Abstraction.Application" Version="1.2.1" />
|
||||
<PackageReference Include="DigitalData.Core.Application" Version="3.4.0" />
|
||||
<PackageReference Include="DigitalData.Core.Client" Version="2.1.0" />
|
||||
<PackageReference Include="DigitalData.Core.Exceptions" Version="1.1.0" />
|
||||
@@ -26,36 +25,23 @@
|
||||
<PackageReference Include="Otp.NET" Version="1.4.0" />
|
||||
<PackageReference Include="QRCoder" Version="1.6.0" />
|
||||
<PackageReference Include="QRCoder-ImageSharp" Version="0.10.0" />
|
||||
<PackageReference Include="SixLabors.ImageSharp" Version="3.1.12" />
|
||||
<PackageReference Include="UserManager" Version="1.1.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net7.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="8.0.0" />
|
||||
<PackageReference Include="System.Formats.Asn1" Version="8.0.2" />
|
||||
<PackageReference Include="GdPicture" Version="14.3.19.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net8.0-windows'">
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
<PackageReference Include="System.Formats.Asn1" Version="9.0.10" />
|
||||
<PackageReference Include="GdPicture" Version="14.3.19.1" />
|
||||
<PackageReference Include="GdPicture.runtimes.windows" Version="14.3.19.1" />
|
||||
<PackageReference Include="GdPicture.runtimes.linux" Version="14.3.19.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net9.0'">
|
||||
<PackageReference Include="Microsoft.Extensions.DependencyInjection" Version="9.0.5" />
|
||||
<PackageReference Include="System.Formats.Asn1" Version="9.0.10" />
|
||||
<PackageReference Include="GdPicture" Version="14.3.19.1" />
|
||||
<PackageReference Include="GdPicture.runtimes.windows" Version="14.3.19.1" />
|
||||
<PackageReference Include="GdPicture.runtimes.linux" Version="14.3.19.1" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\EnvelopeGenerator.CommonServices\EnvelopeGenerator.CommonServices.vbproj" />
|
||||
<ProjectReference Include="..\EnvelopeGenerator.Domain\EnvelopeGenerator.Domain.csproj" />
|
||||
<ProjectReference Include="..\EnvelopeGenerator.PdfEditor\EnvelopeGenerator.PdfEditor.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
@@ -93,7 +79,7 @@
|
||||
</PackageReference>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0' Or '$(TargetFramework)' == 'net8.0-windows'">
|
||||
<ItemGroup Condition="'$(TargetFramework)' == 'net8.0'">
|
||||
<PackageReference Include="AutoMapper" Version="14.0.0" />
|
||||
<PackageReference Include="Microsoft.Data.SqlClient" Version="6.0.2" />
|
||||
<PackageReference Include="CommandDotNet">
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
using EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
|
||||
namespace EnvelopeGenerator.Application.EnvelopeReceivers.Commands;
|
||||
|
||||
|
||||
@@ -91,8 +91,6 @@ public class ReadEnvelopeReceiverQueryHandler : IRequestHandler<ReadEnvelopeRece
|
||||
{
|
||||
private readonly IRepository<EnvelopeReceiver> _repo;
|
||||
|
||||
private readonly IRepository<Receiver> _rcvRepo;
|
||||
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
/// <summary>
|
||||
@@ -100,11 +98,10 @@ public class ReadEnvelopeReceiverQueryHandler : IRequestHandler<ReadEnvelopeRece
|
||||
/// </summary>
|
||||
/// <param name="envelopeReceiver"></param>
|
||||
/// <param name="mapper"></param>
|
||||
public ReadEnvelopeReceiverQueryHandler(IRepository<EnvelopeReceiver> envelopeReceiver, IRepository<Receiver> rcvRepo, IMapper mapper)
|
||||
public ReadEnvelopeReceiverQueryHandler(IRepository<EnvelopeReceiver> envelopeReceiver, IMapper mapper)
|
||||
{
|
||||
_repo = envelopeReceiver;
|
||||
_mapper = mapper;
|
||||
_rcvRepo = rcvRepo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -141,14 +138,6 @@ public class ReadEnvelopeReceiverQueryHandler : IRequestHandler<ReadEnvelopeRece
|
||||
.Include(er => er.Receiver)
|
||||
.ToListAsync(cancel);
|
||||
|
||||
if (request.Receiver.HasAnyCriteria && envRcvs.Any())
|
||||
{
|
||||
var receiver = await _rcvRepo.ReadOnly().Where(request.Receiver).FirstAsync(cancel);
|
||||
|
||||
foreach (var envRcv in envRcvs)
|
||||
envRcv.Envelope?.Documents?.First().Elements.RemoveAll(s => s.ReceiverId != receiver.Id);
|
||||
}
|
||||
|
||||
return _mapper.Map<List<EnvelopeReceiverDto>>(envRcvs);
|
||||
}
|
||||
}
|
||||
@@ -1,92 +0,0 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Exceptions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Text.Json.Serialization;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EnvelopeGenerator.Application.EnvelopeReports;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public record ReadEnvelopeReportQuery(int EnvelopeId) : IRequest<IEnumerable<EnvelopeReport>>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
[JsonIgnore]
|
||||
[NotMapped]
|
||||
public bool ThrowIfNotFound { get; init; } = true;
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class ReadEnvelopeReportQueryExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="envelopeId"></param>
|
||||
/// <param name="throwIfNotFound"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<IEnumerable<EnvelopeReport>> ReadEnvelopeReportAsync(this ISender sender, int envelopeId, bool throwIfNotFound = true, CancellationToken cancel = default)
|
||||
=> sender.Send(new ReadEnvelopeReportQuery(envelopeId)
|
||||
{
|
||||
ThrowIfNotFound = throwIfNotFound
|
||||
}, cancel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ReadEnvelopeReportQueryHandler : IRequestHandler<ReadEnvelopeReportQuery, IEnumerable<EnvelopeReport>>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private readonly IRepository<EnvelopeReport> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="repo"></param>
|
||||
/// <param name="mapper"></param>
|
||||
public ReadEnvelopeReportQueryHandler(IRepository<EnvelopeReport> repo, IMapper mapper)
|
||||
{
|
||||
_repo = repo;
|
||||
_mapper = mapper;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<IEnumerable<EnvelopeReport>> Handle(ReadEnvelopeReportQuery request, CancellationToken cancel = default)
|
||||
{
|
||||
var reports = await _repo.Where(r => r.EnvelopeId == request.EnvelopeId).ToListAsync(cancel);
|
||||
var reportDtos = _mapper.Map<IEnumerable<EnvelopeReport>>(reports);
|
||||
|
||||
if(request.ThrowIfNotFound && !reportDtos.Any())
|
||||
throw new NotFoundException($"EnvelopeReport with EnvelopeId '{request.EnvelopeId}' was not found.");
|
||||
|
||||
return reportDtos;
|
||||
}
|
||||
}
|
||||
@@ -1,6 +1,6 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
using MediatR;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
using AutoMapper;
|
||||
using EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Envelopes.Commands;
|
||||
|
||||
|
||||
@@ -1,29 +1,18 @@
|
||||
using MediatR;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Application.Common.Query;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Envelopes.Queries;
|
||||
|
||||
/// <summary>
|
||||
/// Repräsentiert eine Abfrage für Umschläge.
|
||||
/// </summary>
|
||||
public record ReadEnvelopeQuery : EnvelopeQueryBase, IRequest<IEnumerable<EnvelopeDto>>
|
||||
public record ReadEnvelopeQuery : EnvelopeQueryBase, IRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// Abfrage des Include des Umschlags
|
||||
/// </summary>
|
||||
public EnvelopeStatusQuery? Status { get; init; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public bool? HasDocResult { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -76,53 +65,4 @@ public record EnvelopeStatusQuery
|
||||
/// Eine Liste von Statuswerten, die ignoriert werden werden.
|
||||
/// </summary>
|
||||
public EnvelopeStatus[]? Ignore { get; init; }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ReadEnvelopeQueryHandler : IRequestHandler<ReadEnvelopeQuery, IEnumerable<EnvelopeDto>>
|
||||
{
|
||||
private readonly IMapper _mapper;
|
||||
|
||||
private readonly IRepository<Envelope> _repo;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="mapper"></param>
|
||||
/// <param name="repo"></param>
|
||||
public ReadEnvelopeQueryHandler(IMapper mapper, IRepository<Envelope> repo)
|
||||
{
|
||||
_mapper = mapper;
|
||||
_repo = repo;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<IEnumerable<EnvelopeDto>> Handle(ReadEnvelopeQuery request, CancellationToken cancel)
|
||||
{
|
||||
var envelopesQ = _repo.Query.Where(request, notnull: false);
|
||||
|
||||
EnvelopeStatusQuery? statusQ = request.Status;
|
||||
bool? hasDocResult = request.HasDocResult;
|
||||
|
||||
var filtered =
|
||||
from envelope in envelopesQ
|
||||
where (statusQ == null || statusQ.Include == null || statusQ.Include.Contains(envelope.Status))
|
||||
&& (statusQ == null || statusQ.Ignore == null || !statusQ.Ignore.Contains(envelope.Status))
|
||||
&& (statusQ == null || statusQ.Min == null || envelope.Status > statusQ.Min)
|
||||
&& (statusQ == null || statusQ.Max == null || envelope.Status < statusQ.Max)
|
||||
&& (!hasDocResult.HasValue || (hasDocResult.Value ? envelope.DocResult != null : envelope.DocResult == null))
|
||||
select envelope;
|
||||
|
||||
var envelopes = await filtered.ToListAsync(cancel);
|
||||
|
||||
return _mapper.Map<IEnumerable<EnvelopeDto>>(envelopes);
|
||||
}
|
||||
}
|
||||
@@ -1,19 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BurnAnnotationException : ApplicationException
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public BurnAnnotationException(string message)
|
||||
: base(message) { }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public BurnAnnotationException(string message, Exception innerException)
|
||||
: base(message, innerException) { }
|
||||
}
|
||||
@@ -1,28 +0,0 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CreateReportException : ApplicationException
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public CreateReportException(string message)
|
||||
: base(message) { }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public CreateReportException(string message, Exception innerException)
|
||||
: base(message, innerException) { }
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ExportDocumentException : ApplicationException
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public ExportDocumentException(string message)
|
||||
: base(message) { }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public ExportDocumentException(string message, Exception innerException)
|
||||
: base(message, innerException) { }
|
||||
}
|
||||
@@ -1,22 +0,0 @@
|
||||
namespace EnvelopeGenerator.Application.Exceptions;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class MergeDocumentException : ApplicationException
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public MergeDocumentException(string message)
|
||||
: base(message) { }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="innerException"></param>
|
||||
public MergeDocumentException(string message, Exception innerException)
|
||||
: base(message, innerException) { }
|
||||
}
|
||||
@@ -34,7 +34,7 @@ public record CreateHistoryCommand : EnvelopeReceiverQueryBase, IRequest<History
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public DateTime AddedWhen { get; } = DateTime.UtcNow;
|
||||
public DateTime AddedWhen { get; } = DateTime.Now;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -3,7 +3,7 @@ using EnvelopeGenerator.Application.Envelopes.Queries;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,6 +1,6 @@
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using Dapper;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,6 +1,6 @@
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
/// Provides methods for executing common queries on a given entity type.
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
/// Represents a raw SQL query contract.
|
||||
@@ -1,4 +1,4 @@
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
/// Defines methods for executing raw SQL queries or custom SQL query classes and returning query executors for further operations.
|
||||
@@ -1,6 +1,6 @@
|
||||
using Dapper;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.SQLExecutor;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.SQLExecutor;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,6 +1,6 @@
|
||||
using OtpNet;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -3,7 +3,7 @@ using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using DigitalData.Core.Abstraction.Application;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -5,7 +5,7 @@ using EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -10,7 +10,7 @@ using EnvelopeGenerator.Domain;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,7 +1,7 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.Common.Dto.Messaging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -2,7 +2,7 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -4,7 +4,7 @@ using EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
using EnvelopeGenerator.Application.Receivers.Commands;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
@@ -1,6 +1,6 @@
|
||||
using EnvelopeGenerator.Application.Common.Dto.Messaging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
namespace EnvelopeGenerator.Application.Interfaces.Services;
|
||||
|
||||
//TODO: move to DigitalData.Core
|
||||
/// <summary>
|
||||
@@ -1,99 +0,0 @@
|
||||
#if WINDOWS
|
||||
using MediatR;
|
||||
using EnvelopeGenerator.Application.EnvelopeReports;
|
||||
using EnvelopeGenerator.Application.Exceptions;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using EnvelopeGenerator.CommonServices;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class AddReportBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
|
||||
{
|
||||
private readonly ISender _sender;
|
||||
|
||||
private readonly ILogger<AddReportBehavior> _logger;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="logger"></param>
|
||||
public AddReportBehavior(ISender sender, ILogger<AddReportBehavior> logger)
|
||||
{
|
||||
_sender = sender;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
|
||||
{
|
||||
var docResult = await next(cancel);
|
||||
|
||||
request.Report = await CreateReport(request.Envelope!, cancel);
|
||||
|
||||
return docResult;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="envelope"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="CreateReportException"></exception>
|
||||
public async Task<byte[]> CreateReport(Envelope envelope, CancellationToken cancel)
|
||||
{
|
||||
var oItems = await _sender.ReadEnvelopeReportAsync(envelope.Id, cancel: cancel);
|
||||
|
||||
if (!oItems.Any())
|
||||
{
|
||||
throw new CreateReportException("No report data found!");
|
||||
}
|
||||
|
||||
var oBuffer = DoCreateReport(oItems);
|
||||
|
||||
return oBuffer;
|
||||
}
|
||||
|
||||
private static byte[] DoCreateReport(IEnumerable<EnvelopeReport> oItems)
|
||||
{
|
||||
var oSource = new ReportSource { Items = oItems };
|
||||
var oReport = new rptEnvelopeHistory
|
||||
{
|
||||
DataSource = oSource,
|
||||
DataMember = "Items"
|
||||
};
|
||||
|
||||
// Creating report in memory
|
||||
oReport.CreateDocument();
|
||||
|
||||
// Exporting report to stream
|
||||
using var oStream = new MemoryStream();
|
||||
oReport.ExportToPdf(oStream);
|
||||
|
||||
// Writing report to buffer
|
||||
return oStream.ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class ReportSource
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public required IEnumerable<EnvelopeReport> Items { get; init; }
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,49 +0,0 @@
|
||||
using MediatR;
|
||||
using EnvelopeGenerator.Application.Histories.Commands;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class CreateHistoryBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
|
||||
{
|
||||
private readonly ISender _sender;
|
||||
|
||||
private readonly ILogger<CreateHistoryBehavior> _logger;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="logger"></param>
|
||||
public CreateHistoryBehavior(ISender sender, ILogger<CreateHistoryBehavior> logger)
|
||||
{
|
||||
_sender = sender;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
|
||||
{
|
||||
var doc = await next(cancel);
|
||||
|
||||
if (!request.Debug)
|
||||
await _sender.Send(new CreateHistoryCommand()
|
||||
{
|
||||
EnvelopeId = request.EnvelopeId,
|
||||
UserReference = "System",
|
||||
Status = EnvelopeStatus.EnvelopeReportCreated,
|
||||
}, cancel);
|
||||
|
||||
return doc;
|
||||
}
|
||||
}
|
||||
@@ -1,71 +0,0 @@
|
||||
#if WINDOWS
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Exceptions;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using GdPicture14;
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class PdfMergeBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
|
||||
{
|
||||
var doc = await next(cancel);
|
||||
|
||||
if (request.Report is null)
|
||||
throw new InvalidOperationException("The final document report could not be merged."
|
||||
+ "There may be an error related to the behavior register order."
|
||||
+ "Request details:\n" + request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
using var oDocumentStream = new MemoryStream(doc);
|
||||
using var oReportStream = new MemoryStream(request.Report);
|
||||
using var oFinalStream = new MemoryStream();
|
||||
using var oDocumentPDF = new GdPicturePDF();
|
||||
using var oReportPDF = new GdPicturePDF();
|
||||
GdPictureStatus oStatus = GdPictureStatus.OK;
|
||||
|
||||
// Load the source file into memory
|
||||
oDocumentPDF.LoadFromStream(oDocumentStream, true);
|
||||
|
||||
oStatus = oDocumentPDF.GetStat();
|
||||
if (oStatus != GdPictureStatus.OK)
|
||||
throw new MergeDocumentException($"Document could not be loaded: {oStatus}."
|
||||
+ "Request details:\n" + request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
// Load the report file into memory
|
||||
oReportPDF.LoadFromStream(oReportStream, true);
|
||||
oStatus = oReportPDF.GetStat();
|
||||
if (oStatus != GdPictureStatus.OK)
|
||||
throw new MergeDocumentException($"Report could not be loaded: {oStatus}."
|
||||
+ "Request details:\n" + request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
// Merge the documents
|
||||
var oMergedPDF = oDocumentPDF.Merge2Documents(oDocumentPDF, oReportPDF);
|
||||
oStatus = oMergedPDF.GetStat();
|
||||
if (oStatus != GdPictureStatus.OK)
|
||||
throw new MergeDocumentException($"Documents could not be merged: {oStatus}."
|
||||
+ "Request details:\n" + request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
// Convert to byte
|
||||
oMergedPDF.SaveToStream(oFinalStream);
|
||||
oStatus = oDocumentPDF.GetStat();
|
||||
if (oStatus != GdPictureStatus.OK)
|
||||
throw new MergeDocumentException($"Document could not be converted to byte: {oStatus}."
|
||||
+ "Request details:\n" + request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
return oFinalStream.ToArray();
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,23 +0,0 @@
|
||||
using MediatR;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SavePdfBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
|
||||
{
|
||||
var docResult = await next(cancel);
|
||||
var base64 = Convert.ToBase64String(docResult);
|
||||
return docResult;
|
||||
}
|
||||
}
|
||||
@@ -1,113 +0,0 @@
|
||||
using EnvelopeGenerator.Application.Histories.Commands;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class SendEmailBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
|
||||
{
|
||||
private readonly ILogger<SendEmailBehavior> _logger;
|
||||
|
||||
private readonly ISender _sender;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="sender"></param>
|
||||
public SendEmailBehavior(ILogger<SendEmailBehavior> logger, ISender sender)
|
||||
{
|
||||
_logger = logger;
|
||||
_sender = sender;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
|
||||
{
|
||||
var docResult = await next(cancel);
|
||||
|
||||
var mailToCreator = request.Envelope!.FinalEmailToCreator;
|
||||
var mailToReceivers = request.Envelope.FinalEmailToReceivers;
|
||||
|
||||
if (mailToCreator is not null && mailToCreator != (int)FinalEmailType.No)
|
||||
{
|
||||
_logger.LogDebug("Sending email to creator ...");
|
||||
await SendFinalEmailToCreatorAsync(request, cancel); // , pAttachment
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("No SendFinalEmailToCreatorAsync - mailToCreator [{mailToCreator}] <> [{FinalEmailType.No}] ",
|
||||
mailToCreator, FinalEmailType.No);
|
||||
}
|
||||
|
||||
if (mailToReceivers != (int)FinalEmailType.No)
|
||||
{
|
||||
_logger.LogDebug("Sending emails to receivers...");
|
||||
await SendFinalEmailToReceiversAsync(request, cancel); // , pAttachment
|
||||
}
|
||||
else
|
||||
{
|
||||
_logger.LogWarning("No SendFinalEmailToReceiversAsync - mailToReceivers [{mailToReceivers}] <> [{FinalEmailType.No}] ",
|
||||
mailToReceivers, FinalEmailType.No);
|
||||
}
|
||||
|
||||
return docResult;
|
||||
}
|
||||
|
||||
private async Task SendFinalEmailToCreatorAsync(BurnPdfCommand request, CancellationToken cancel) //, string pAttachment
|
||||
{
|
||||
bool oIncludeAttachment = SendFinalEmailWithAttachment((int)request.Envelope!.FinalEmailToCreator!);
|
||||
// string oAttachment = string.Empty;
|
||||
|
||||
_logger.LogDebug("Attachment included: [{oIncludeAttachment}]", oIncludeAttachment);
|
||||
if (oIncludeAttachment)
|
||||
{
|
||||
// oAttachment = pAttachment;
|
||||
}
|
||||
|
||||
await _sender.Send(new CreateHistoryCommand()
|
||||
{
|
||||
EnvelopeId = request.Envelope!.Id,
|
||||
Status = EnvelopeStatus.MessageCompletionSent,
|
||||
UserReference = request.Envelope.User.Email,
|
||||
}, cancel);
|
||||
}
|
||||
|
||||
private async Task SendFinalEmailToReceiversAsync(BurnPdfCommand request, CancellationToken cancel) //, string pAttachment
|
||||
{
|
||||
bool oIncludeAttachment = SendFinalEmailWithAttachment((int)request.Envelope!.FinalEmailToReceivers!);
|
||||
// string oAttachment = string.Empty;
|
||||
|
||||
_logger.LogDebug("Attachment included: [{oIncludeAttachment}]", oIncludeAttachment);
|
||||
if (oIncludeAttachment)
|
||||
{
|
||||
// oAttachment = pAttachment;
|
||||
}
|
||||
|
||||
// TODO update CreateHistoryCommand to be able to create all records together
|
||||
foreach (var receiver in request.Envelope.EnvelopeReceivers!)
|
||||
{
|
||||
if (receiver.Receiver?.EmailAddress != null)
|
||||
{
|
||||
await _sender.Send(new CreateHistoryCommand()
|
||||
{
|
||||
EnvelopeId = request.Envelope.Id,
|
||||
Status = EnvelopeStatus.MessageCompletionSent,
|
||||
UserReference = receiver.Receiver.EmailAddress,
|
||||
}, cancel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private static bool SendFinalEmailWithAttachment(int type) => type == (int)FinalEmailType.YesWithAttachment;
|
||||
}
|
||||
@@ -1,64 +0,0 @@
|
||||
#if WINDOWS
|
||||
using EnvelopeGenerator.Application.Configs;
|
||||
using MediatR;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf.Behaviors;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class WritePdfBehavior : IPipelineBehavior<BurnPdfCommand, byte[]>
|
||||
{
|
||||
private readonly ISender _sender;
|
||||
|
||||
private readonly ILogger<WritePdfBehavior> _logger;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="logger"></param>
|
||||
public WritePdfBehavior(ISender sender, ILogger<WritePdfBehavior> logger)
|
||||
{
|
||||
_sender = sender;
|
||||
_logger = logger;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="next"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, RequestHandlerDelegate<byte[]> next, CancellationToken cancel)
|
||||
{
|
||||
var docResult = await next(cancel);
|
||||
|
||||
var config = await _sender.ReadDefaultConfigAsync(cancel);
|
||||
|
||||
var exportPath = config.ExportPath ?? throw new InvalidOperationException(nameof(WritePdfBehavior) + " is not possible."
|
||||
+ "No export path found in config table.");
|
||||
|
||||
var dirPath = Path.Combine(exportPath, request.Envelope!.Uuid);
|
||||
|
||||
_logger.LogDebug("dirPath is {dirPath}", dirPath);
|
||||
|
||||
if (!Directory.Exists(dirPath))
|
||||
{
|
||||
_logger.LogDebug("Directory not existing. Creating ...");
|
||||
Directory.CreateDirectory(dirPath);
|
||||
}
|
||||
|
||||
var outputFilePath = Path.Combine(dirPath, $"{request.Envelope.Uuid}.pdf");
|
||||
|
||||
_logger.LogDebug("Writing finalized Pdf to disk..");
|
||||
_logger.LogInformation("Output path is {outputFilePath}", outputFilePath);
|
||||
|
||||
await File.WriteAllBytesAsync(outputFilePath, docResult, cancel);
|
||||
|
||||
return docResult;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1,305 +0,0 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using DigitalData.Core.Exceptions;
|
||||
using EnvelopeGenerator.Application.Common.Configurations;
|
||||
using EnvelopeGenerator.Application.Common.Dto.PSPDFKitInstant;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Exceptions;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using GdPicture14;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.Extensions.Configuration;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Pdf;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public record BurnPdfCommand(int? EnvelopeId = null, string? EnvelopeUuid = null) : IRequest<byte[]>
|
||||
{
|
||||
internal bool Debug { get; set; }
|
||||
|
||||
internal Envelope? Envelope { get; set; }
|
||||
|
||||
#if WINDOWS
|
||||
internal byte[]? Report { get; set; }
|
||||
#endif
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static class BurnPdfCommandExtensions
|
||||
{
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="envelopeId"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<byte[]> BurnPdf(this ISender sender, int envelopeId, CancellationToken cancel = default)
|
||||
=> sender.Send(new BurnPdfCommand(EnvelopeId: envelopeId), cancel);
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="sender"></param>
|
||||
/// <param name="envelopeUuid"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<byte[]> BurnPdf(this ISender sender, string envelopeUuid, CancellationToken cancel = default)
|
||||
=> sender.Send(new BurnPdfCommand(EnvelopeUuid: envelopeUuid), cancel);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public class BurnPdfCommandHandler : IRequestHandler<BurnPdfCommand, byte[]>
|
||||
{
|
||||
private readonly PDFBurnerParams _options;
|
||||
|
||||
private readonly AnnotationManager _manager;
|
||||
|
||||
private readonly ILogger<BurnPdfCommandHandler> _logger;
|
||||
|
||||
private readonly IRepository<Envelope> _envRepo;
|
||||
|
||||
private readonly IRepository<Domain.Entities.DocumentStatus> _docStatusRepo;
|
||||
|
||||
private readonly IConfiguration _config;
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="pdfBurnerParams"></param>
|
||||
/// <param name="manager"></param>
|
||||
/// <param name="logger"></param>
|
||||
/// <param name="envRepo"></param>
|
||||
/// <param name="docStatusRepo"></param>
|
||||
/// <param name="config"></param>
|
||||
public BurnPdfCommandHandler(IOptions<PDFBurnerParams> pdfBurnerParams, AnnotationManager manager, ILogger<BurnPdfCommandHandler> logger, IRepository<Envelope> envRepo, IRepository<Domain.Entities.DocumentStatus> docStatusRepo, IConfiguration config)
|
||||
{
|
||||
_options = pdfBurnerParams.Value;
|
||||
_manager = manager;
|
||||
_docStatusRepo = docStatusRepo;
|
||||
_logger = logger;
|
||||
_envRepo = envRepo;
|
||||
_config = config;
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <param name="request"></param>
|
||||
/// <param name="cancel"></param>
|
||||
/// <returns></returns>
|
||||
/// <exception cref="NotImplementedException"></exception>
|
||||
public async Task<byte[]> Handle(BurnPdfCommand request, CancellationToken cancel)
|
||||
{
|
||||
request.Debug = _config.GetValue<bool>("Debug");
|
||||
var envQuery =
|
||||
request.EnvelopeId is not null ? _envRepo.Where(env => env.Id == request.EnvelopeId) :
|
||||
request.EnvelopeUuid is not null ? _envRepo.Where(env => env.Uuid == request.EnvelopeUuid) :
|
||||
throw new BadRequestException("Request validation failed: Either Envelope Id or Envelope Uuid must be provided.");
|
||||
|
||||
request.Envelope = await envQuery
|
||||
.Include(env => env.Documents!).ThenInclude(doc => doc.Elements!).ThenInclude(element => element.Annotations)
|
||||
.Include(env => env.User)
|
||||
.Include(env => env.EnvelopeReceivers!).ThenInclude(envRcv => envRcv.Receiver)
|
||||
.FirstOrDefaultAsync(cancel)
|
||||
?? throw new BadRequestException($"Envelope could not be found. Request details:\n" +
|
||||
request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
var doc = request.Envelope.Documents?.FirstOrDefault()
|
||||
?? throw new NotFoundException($"Document could not be located within the specified envelope. Request details:\n" +
|
||||
request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
if (doc.ByteData is null)
|
||||
throw new InvalidOperationException($"Document byte data is missing, indicating a potential data integrity issue. Request details:\n" +
|
||||
request.ToJson(Format.Json.ForDiagnostics));
|
||||
|
||||
return doc.Elements?.SelectMany(e => e.Annotations ?? Enumerable.Empty<ElementAnnotation>()).Where(annot => annot is not null).Any() ?? false
|
||||
? BurnElementAnnotsToPDF(doc.ByteData, doc.Elements)
|
||||
: BurnInstantJSONAnnotsToPDF(doc.ByteData, await _docStatusRepo
|
||||
.Where(status => status.EnvelopeId == request.Envelope.Id)
|
||||
.Select(status => status.Value)
|
||||
.ToListAsync(cancel));
|
||||
}
|
||||
|
||||
private byte[] BurnElementAnnotsToPDF(byte[] pSourceBuffer, List<Signature> elements)
|
||||
{
|
||||
// Add background
|
||||
using var doc = PdfEditor.Pdf.FromMemory(pSourceBuffer);
|
||||
// TODO: take the length from the largest y
|
||||
pSourceBuffer = doc.Background(elements, 1.9500000000000002 * 0.93, 2.52 * 0.67)
|
||||
.ExportStream()
|
||||
.ToArray();
|
||||
|
||||
GdPictureStatus oResult;
|
||||
using var oSourceStream = new MemoryStream(pSourceBuffer);
|
||||
// Open PDF
|
||||
oResult = _manager.InitFromStream(oSourceStream);
|
||||
if (oResult != GdPictureStatus.OK)
|
||||
throw new BurnAnnotationException($"Could not open document for burning: [{oResult}]");
|
||||
|
||||
// Imported from background (add to configuration)
|
||||
var margin = 0.2;
|
||||
var inchFactor = 72;
|
||||
|
||||
// Y offset of form fields
|
||||
var keys = new[] { "position", "city", "date" }; // add to configuration
|
||||
var unitYOffsets = 0.2;
|
||||
|
||||
var yOffsetsOfFF = keys
|
||||
.Select((k, i) => new { Key = k, Value = unitYOffsets * i + 1 })
|
||||
.ToDictionary(x => x.Key, x => x.Value);
|
||||
|
||||
// Add annotations
|
||||
foreach (var element in elements)
|
||||
{
|
||||
var frameX = element.Left - 0.7 - margin;
|
||||
|
||||
var frame = element.Annotations?.FirstOrDefault(a => a.Name == "frame");
|
||||
var frameY = element.Top - 0.5 - margin;
|
||||
var frameYShift = (frame!.Y ?? default) - frameY * inchFactor;
|
||||
var frameXShift = (frame.X ?? default) - frameX * inchFactor;
|
||||
|
||||
foreach (var annot in element.Annotations!)
|
||||
{
|
||||
if (!yOffsetsOfFF.TryGetValue(annot.Name, out var yOffsetofFF))
|
||||
yOffsetofFF = 0;
|
||||
|
||||
var y = frameY + yOffsetofFF;
|
||||
|
||||
if (annot.Type == AnnotationType.PSPDFKit.FormField)
|
||||
{
|
||||
_manager.AddFormFieldValue(
|
||||
(annot.X ?? default) / inchFactor,
|
||||
y,
|
||||
(annot.Width ?? default) / inchFactor,
|
||||
(annot.Height ?? default) / inchFactor,
|
||||
element.Page,
|
||||
annot.Value,
|
||||
_options
|
||||
);
|
||||
}
|
||||
else if (annot.Type == AnnotationType.PSPDFKit.Image)
|
||||
{
|
||||
_manager.AddImageAnnotation(
|
||||
(annot.X ?? default) / inchFactor,
|
||||
annot.Name == "signature" ? ((annot.Y ?? default) - frameYShift) / inchFactor : y,
|
||||
(annot.Width ?? default) / inchFactor,
|
||||
(annot.Height ?? default) / inchFactor,
|
||||
element.Page,
|
||||
annot.Value
|
||||
);
|
||||
}
|
||||
else if (annot.Type == AnnotationType.PSPDFKit.Ink)
|
||||
{
|
||||
_manager.AddInkAnnotation(element.Page, annot.Value);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// Save PDF
|
||||
using var oNewStream = new MemoryStream();
|
||||
oResult = _manager.SaveDocumentToPDF(oNewStream);
|
||||
if (oResult != GdPictureStatus.OK)
|
||||
throw new BurnAnnotationException($"Could not save document to stream: [{oResult}]");
|
||||
|
||||
_manager.Close();
|
||||
|
||||
return oNewStream.ToArray();
|
||||
}
|
||||
|
||||
private byte[] BurnInstantJSONAnnotsToPDF(byte[] pSourceBuffer, List<string> pInstantJSONList)
|
||||
{
|
||||
GdPictureStatus oResult;
|
||||
|
||||
using var oSourceStream = new MemoryStream(pSourceBuffer);
|
||||
// Open PDF
|
||||
oResult = _manager.InitFromStream(oSourceStream);
|
||||
if (oResult != GdPictureStatus.OK)
|
||||
{
|
||||
throw new BurnAnnotationException($"Could not open document for burning: [{oResult}]");
|
||||
}
|
||||
|
||||
// Add annotation to PDF
|
||||
foreach (var oJSON in pInstantJSONList)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (oJSON is string json)
|
||||
AddInstantJsonAnnotationToPdf(json);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogWarning("Error in AddInstantJSONAnnotationToPDF - oJson: ");
|
||||
_logger.LogWarning(oJSON);
|
||||
throw new BurnAnnotationException("Adding Annotation failed", ex);
|
||||
}
|
||||
}
|
||||
|
||||
oResult = _manager.BurnAnnotationsToPage(RemoveInitialAnnots: true, VectorMode: true);
|
||||
if (oResult != GdPictureStatus.OK)
|
||||
{
|
||||
throw new BurnAnnotationException($"Could not burn annotations to file: [{oResult}]");
|
||||
}
|
||||
|
||||
// Save PDF
|
||||
using var oNewStream = new MemoryStream();
|
||||
oResult = _manager.SaveDocumentToPDF(oNewStream);
|
||||
if (oResult != GdPictureStatus.OK)
|
||||
{
|
||||
throw new BurnAnnotationException($"Could not save document to stream: [{oResult}]");
|
||||
}
|
||||
|
||||
_manager.Close();
|
||||
|
||||
return oNewStream.ToArray();
|
||||
}
|
||||
|
||||
private void AddInstantJsonAnnotationToPdf(string instantJson)
|
||||
{
|
||||
var annotationData = JsonConvert.DeserializeObject<InstantData>(instantJson);
|
||||
|
||||
annotationData?.Annotations?.Reverse();
|
||||
|
||||
if (annotationData?.Annotations is null)
|
||||
return;
|
||||
|
||||
foreach (var annotation in annotationData.Annotations)
|
||||
{
|
||||
_logger.LogDebug("Adding AnnotationID: {id}", annotation.Id);
|
||||
|
||||
switch (annotation.Type)
|
||||
{
|
||||
case AnnotationType.PSPDFKit.Image:
|
||||
if (annotationData?.Attachments is not null)
|
||||
_manager.AddImageAnnotation(annotation, annotationData.Attachments);
|
||||
break;
|
||||
|
||||
case AnnotationType.PSPDFKit.Ink:
|
||||
_manager.AddInkAnnotation(annotation);
|
||||
break;
|
||||
|
||||
case AnnotationType.PSPDFKit.Widget:
|
||||
// Add form field values
|
||||
var formFieldValue = annotationData?.FormFieldValues?
|
||||
.FirstOrDefault(fv => fv.Name == annotation.Id);
|
||||
|
||||
if (formFieldValue != null && !_options.IgnoredLabels.Contains(formFieldValue.Value))
|
||||
{
|
||||
_manager.AddFormFieldValue(annotation, formFieldValue, _options);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,5 @@
|
||||
using EnvelopeGenerator.Application.Common.Configurations;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using Microsoft.Extensions.Options;
|
||||
using OtpNet;
|
||||
using QRCoder;
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using Microsoft.Extensions.Caching.Memory;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Dto;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
using AutoMapper;
|
||||
using DigitalData.Core.Application;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Application.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Application.Common.Dto.History;
|
||||
using EnvelopeGenerator.Application.Common.Dto.Receiver;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Repositories;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
@@ -5,13 +5,13 @@ using DigitalData.EmailProfilerDispatcher.Abstraction.Services;
|
||||
using Microsoft.Extensions.Logging;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Newtonsoft.Json;
|
||||
using EnvelopeGenerator.Application.Interfaces.Services;
|
||||
using DigitalData.Core.Abstraction.Application.DTO;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Application.Common.Configurations;
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiverReadOnly;
|
||||
using EnvelopeGenerator.Application.Common.Extensions;
|
||||
using EnvelopeGenerator.Application.Common.Interfaces.Services;
|
||||
|
||||
namespace EnvelopeGenerator.Application.Services;
|
||||
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user