Compare commits
9 Commits
c961e9fffd
...
feat/termi
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
08e2e91e9a | ||
|
|
2966d64455 | ||
|
|
186f3c3319 | ||
|
|
276adda516 | ||
|
|
ac0ae10fab | ||
|
|
3713669ec5 | ||
|
|
7f0131fc2d | ||
|
|
d9deb589d1 | ||
|
|
bf5faf53bd |
@@ -3,23 +3,8 @@
|
|||||||
/// <summary>
|
/// <summary>
|
||||||
/// Represents the response for reading a document.
|
/// Represents the response for reading a document.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public class ReadDocumentResponse
|
public class ReadDocumentResponse : ReadDocumentResponseBase
|
||||||
{
|
{
|
||||||
/// <summary>
|
|
||||||
/// The unique identifier of the document.
|
|
||||||
/// </summary>
|
|
||||||
public int Guid { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The identifier of the associated envelope.
|
|
||||||
/// </summary>
|
|
||||||
public int EnvelopeId { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
|
||||||
/// The date and time when the document was added.
|
|
||||||
/// </summary>
|
|
||||||
public DateTime AddedWhen { get; init; }
|
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The binary data of the document, if available.
|
/// The binary data of the document, if available.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|||||||
@@ -0,0 +1,22 @@
|
|||||||
|
namespace EnvelopeGenerator.Application.Documents.Queries.Read;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// Represents the response for reading a document.
|
||||||
|
/// </summary>
|
||||||
|
public class ReadDocumentResponseBase
|
||||||
|
{
|
||||||
|
/// <summary>
|
||||||
|
/// The unique identifier of the document.
|
||||||
|
/// </summary>
|
||||||
|
public int Guid { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The identifier of the associated envelope.
|
||||||
|
/// </summary>
|
||||||
|
public int EnvelopeId { get; init; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// The date and time when the document was added.
|
||||||
|
/// </summary>
|
||||||
|
public DateTime AddedWhen { get; init; }
|
||||||
|
}
|
||||||
@@ -77,6 +77,8 @@ Public Class frmFinalizePDF
|
|||||||
Dim oNewPath = Path.Combine(desktopPath, $"E{txtEnvelope.Text}R{txtReceiver.Text}.burned.pdf")
|
Dim oNewPath = Path.Combine(desktopPath, $"E{txtEnvelope.Text}R{txtReceiver.Text}.burned.pdf")
|
||||||
|
|
||||||
File.WriteAllBytes(oNewPath, oNewBuffer)
|
File.WriteAllBytes(oNewPath, oNewBuffer)
|
||||||
|
|
||||||
|
Process.Start(oNewPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
MsgBox(ex.Message, MsgBoxStyle.Critical)
|
||||||
End Try
|
End Try
|
||||||
|
|||||||
@@ -170,7 +170,7 @@ Namespace Jobs
|
|||||||
Throw New ApplicationException("Envelope could not be finalized")
|
Throw New ApplicationException("Envelope could not be finalized")
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Warn($"Unhandled exception while working envelope [{oId}] - [{ex.Message}]")
|
Logger.Warn(ex, $"Unhandled exception while working envelope [{oId}]")
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
|
|
||||||
@@ -378,12 +378,10 @@ Namespace Jobs
|
|||||||
Try
|
Try
|
||||||
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
|
oInputDocumentBuffer = File.ReadAllBytes(oInputPath)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Logger.Error(ex)
|
|
||||||
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
|
Throw New BurnAnnotationException("Source document could not be read from disk!", ex)
|
||||||
End Try
|
End Try
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Return PDFBurner.BurnInstantJSONAnnotationsToPDF(oInputDocumentBuffer, oAnnotations)
|
Return PDFBurner.BurnInstantJSONAnnotationsToPDF(oInputDocumentBuffer, oAnnotations)
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|||||||
@@ -31,45 +31,38 @@ Namespace Jobs.FinalizeDocument
|
|||||||
|
|
||||||
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
|
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
|
||||||
Dim oResult As GdPictureStatus
|
Dim oResult As GdPictureStatus
|
||||||
|
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
||||||
|
' Open PDF
|
||||||
|
oResult = Manager.InitFromStream(oSourceStream)
|
||||||
|
If oResult <> GdPictureStatus.OK Then
|
||||||
|
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
||||||
|
End If
|
||||||
|
|
||||||
Try
|
' Add annotation to PDF
|
||||||
Using oSourceStream As New MemoryStream(pSourceBuffer)
|
For Each oJSON In pInstantJSONList
|
||||||
' Open PDF
|
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
||||||
oResult = Manager.InitFromStream(oSourceStream)
|
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
||||||
|
Logger.Warn(oJSON)
|
||||||
|
Throw New BurnAnnotationException($"Adding Annotation failed")
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
||||||
|
If oResult <> GdPictureStatus.OK Then
|
||||||
|
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Save PDF
|
||||||
|
Using oNewStream As New MemoryStream()
|
||||||
|
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
||||||
If oResult <> GdPictureStatus.OK Then
|
If oResult <> GdPictureStatus.OK Then
|
||||||
Throw New BurnAnnotationException($"Could not open document for burning: [{oResult}]")
|
Throw New BurnAnnotationException($"Could not save document to stream: [{oResult}]")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' Add annotation to PDF
|
Manager.Close()
|
||||||
For Each oJSON In pInstantJSONList
|
|
||||||
If AddInstantJSONAnnotationToPDF(oJSON) = False Then
|
|
||||||
Logger.Warn($"Error in AddInstantJSONAnnotationToPDF - oJson: ")
|
|
||||||
Logger.Warn(oJSON)
|
|
||||||
Throw New BurnAnnotationException($"Adding Annotation failed")
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
oResult = Manager.BurnAnnotationsToPage(RemoveInitialAnnots:=True, VectorMode:=True)
|
|
||||||
If oResult <> GdPictureStatus.OK Then
|
|
||||||
Throw New BurnAnnotationException($"Could not burn annotations to file: [{oResult}]")
|
|
||||||
End If
|
|
||||||
|
|
||||||
'Save PDF
|
Return oNewStream.ToArray()
|
||||||
Using oNewStream As New MemoryStream()
|
|
||||||
oResult = Manager.SaveDocumentToPDF(oNewStream)
|
|
||||||
If oResult <> GdPictureStatus.OK Then
|
|
||||||
Throw New BurnAnnotationException($"Could not save document to stream: [{oResult}]")
|
|
||||||
End If
|
|
||||||
|
|
||||||
Manager.Close()
|
|
||||||
|
|
||||||
Return oNewStream.ToArray()
|
|
||||||
End Using
|
|
||||||
End Using
|
End Using
|
||||||
Catch ex As Exception
|
End Using
|
||||||
Logger.Error(ex)
|
|
||||||
|
|
||||||
Return Nothing
|
|
||||||
End Try
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Private Function AddInstantJSONAnnotationToPDF(pInstantJSON As String) As Boolean
|
Private Function AddInstantJSONAnnotationToPDF(pInstantJSON As String) As Boolean
|
||||||
|
|||||||
@@ -24,4 +24,6 @@ Module ModuleSettings
|
|||||||
Public USER_GHOST_MODE_ACTIVE As Boolean = False
|
Public USER_GHOST_MODE_ACTIVE As Boolean = False
|
||||||
Public MyUserModel As UserModel
|
Public MyUserModel As UserModel
|
||||||
Public MyState As State
|
Public MyState As State
|
||||||
|
Public CurrentEnvelopID As Integer = 0
|
||||||
|
Public CurrentEnvelopetitle As String = ""
|
||||||
End Module
|
End Module
|
||||||
|
|||||||
2
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
2
EnvelopeGenerator.Form/frmMain.Designer.vb
generated
@@ -688,7 +688,7 @@ Partial Class frmMain
|
|||||||
'SplitContainerControl2.Panel2
|
'SplitContainerControl2.Panel2
|
||||||
'
|
'
|
||||||
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
|
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
|
||||||
Me.SplitContainerControl2.SplitterPosition = 584
|
Me.SplitContainerControl2.SplitterPosition = 819
|
||||||
'
|
'
|
||||||
'GridControlData
|
'GridControlData
|
||||||
'
|
'
|
||||||
|
|||||||
@@ -1139,7 +1139,7 @@
|
|||||||
<value>0, 0</value>
|
<value>0, 0</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
|
||||||
<value>584, 390</value>
|
<value>819, 390</value>
|
||||||
</data>
|
</data>
|
||||||
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
|
||||||
<value>1</value>
|
<value>1</value>
|
||||||
|
|||||||
@@ -183,7 +183,11 @@ Public Class frmMain
|
|||||||
Private Sub btnDeleteEnvelope_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteEnvelope.ItemClick
|
Private Sub btnDeleteEnvelope_ItemClick_1(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnDeleteEnvelope.ItemClick
|
||||||
Try
|
Try
|
||||||
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
Dim oSelectedRows = ViewEnvelopes.GetSelectedRows()
|
||||||
|
Dim oEnvelope As Envelope = DirectCast(ViewEnvelopes.GetRow(oSelectedRows.First), Envelope)
|
||||||
|
|
||||||
If oSelectedRows.Count > 0 Then
|
If oSelectedRows.Count > 0 Then
|
||||||
|
CurrentEnvelopID = oEnvelope.Id
|
||||||
|
CurrentEnvelopetitle = oEnvelope.Title
|
||||||
Dim ofrmAbort As New frmRueckruf
|
Dim ofrmAbort As New frmRueckruf
|
||||||
frmRueckruf.ShowDialog()
|
frmRueckruf.ShowDialog()
|
||||||
If frmRueckruf.Continue_Reject = True Then
|
If frmRueckruf.Continue_Reject = True Then
|
||||||
@@ -203,36 +207,44 @@ Public Class frmMain
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged
|
Private Sub XtraTabControl1_SelectedPageChanged(sender As Object, e As DevExpress.XtraTab.TabPageChangedEventArgs) Handles XtraTabControlMain.SelectedPageChanged
|
||||||
RibbonPageGroupFunctions.Enabled = True
|
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
|
||||||
RibbonPageEnvelopeActions.Enabled = True
|
Try
|
||||||
Select Case XtraTabControlMain.SelectedTabPageIndex
|
RibbonPageGroupFunctions.Enabled = True
|
||||||
Case 1
|
RibbonPageEnvelopeActions.Enabled = True
|
||||||
btnEditEnvelope.Enabled = False
|
Select Case XtraTabControlMain.SelectedTabPageIndex
|
||||||
btnDeleteEnvelope.Enabled = False
|
Case 1
|
||||||
btnContactReceiver.Enabled = False
|
btnEditEnvelope.Enabled = False
|
||||||
btnShowDocument.Enabled = False
|
btnDeleteEnvelope.Enabled = False
|
||||||
bbtnitm_ResendInvitation.Enabled = False
|
btnContactReceiver.Enabled = False
|
||||||
bbtnitmInfoMail.Enabled = False
|
btnShowDocument.Enabled = False
|
||||||
bbtnitmEB.Enabled = True
|
bbtnitm_ResendInvitation.Enabled = False
|
||||||
LoadEnvelopeData()
|
bbtnitmInfoMail.Enabled = False
|
||||||
Case 0
|
bbtnitmEB.Enabled = True
|
||||||
If ViewEnvelopes.RowCount = 0 Then
|
LoadEnvelopeData()
|
||||||
RibbonPageGroupFunctions.Enabled = False
|
Case 0
|
||||||
End If
|
If ViewEnvelopes.RowCount = 0 Then
|
||||||
btnEditEnvelope.Enabled = True
|
RibbonPageGroupFunctions.Enabled = False
|
||||||
btnDeleteEnvelope.Enabled = True
|
End If
|
||||||
btnContactReceiver.Enabled = True
|
btnEditEnvelope.Enabled = True
|
||||||
btnShowDocument.Enabled = True
|
btnDeleteEnvelope.Enabled = True
|
||||||
bbtnitm_ResendInvitation.Enabled = True
|
btnContactReceiver.Enabled = True
|
||||||
bbtnitmInfoMail.Enabled = True
|
btnShowDocument.Enabled = True
|
||||||
bbtnitmEB.Enabled = False
|
bbtnitm_ResendInvitation.Enabled = True
|
||||||
LoadEnvelopeData()
|
bbtnitmInfoMail.Enabled = True
|
||||||
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
bbtnitmEB.Enabled = False
|
||||||
|
LoadEnvelopeData()
|
||||||
|
txtEnvelopeIdLabel.Caption = "No Envelope selected"
|
||||||
|
|
||||||
|
Case 2
|
||||||
|
RibbonPageGroupFunctions.Enabled = False
|
||||||
|
RibbonPageEnvelopeActions.Enabled = False
|
||||||
|
End Select
|
||||||
|
Catch ex As Exception
|
||||||
|
Logger.Error(ex)
|
||||||
|
Finally
|
||||||
|
SplashScreenManager.CloseOverlayForm(oHandle)
|
||||||
|
End Try
|
||||||
|
|
||||||
Case 2
|
|
||||||
RibbonPageGroupFunctions.Enabled = False
|
|
||||||
RibbonPageEnvelopeActions.Enabled = False
|
|
||||||
End Select
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
Private Sub BarButtonItem1_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles BarButtonItem1.ItemClick
|
||||||
@@ -621,7 +633,9 @@ Public Class frmMain
|
|||||||
If SQL_REP_ENV_USER_TM <> String.Empty Then
|
If SQL_REP_ENV_USER_TM <> String.Empty Then
|
||||||
Result_Execute(SQL_REP_ENV_USER_TM)
|
Result_Execute(SQL_REP_ENV_USER_TM)
|
||||||
Else
|
Else
|
||||||
|
|
||||||
GridControlData.DataSource = Nothing
|
GridControlData.DataSource = Nothing
|
||||||
|
GridViewData.Columns.Clear()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -652,7 +666,9 @@ Public Class frmMain
|
|||||||
Try
|
Try
|
||||||
Dim oDT As DataTable = DB_DD_ECM.GetDatatable(mySQL)
|
Dim oDT As DataTable = DB_DD_ECM.GetDatatable(mySQL)
|
||||||
If Not IsNothing(oDT) Then
|
If Not IsNothing(oDT) Then
|
||||||
|
If GridViewData.Columns.Count > 0 Then
|
||||||
|
GridViewData.Columns.Clear()
|
||||||
|
End If
|
||||||
GridControlData.DataSource = oDT
|
GridControlData.DataSource = oDT
|
||||||
Else
|
Else
|
||||||
GridControlData.DataSource = Nothing
|
GridControlData.DataSource = Nothing
|
||||||
@@ -734,4 +750,20 @@ Public Class frmMain
|
|||||||
Public Shared Sub Save_Logfiles()
|
Public Shared Sub Save_Logfiles()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnEvvallUs_thismonth_Click(sender As Object, e As EventArgs) Handles btnEvvallUs_thismonth.Click
|
||||||
|
If SQL_REP_ENV_ALL_USER_MONTH <> String.Empty Then
|
||||||
|
Result_Execute(SQL_REP_ENV_ALL_USER_MONTH)
|
||||||
|
Else
|
||||||
|
GridControlData.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub btnEvvallUs_lastmonth_Click(sender As Object, e As EventArgs) Handles btnEvvallUs_lastmonth.Click
|
||||||
|
If SQL_REP_ENV_ALL_USER_LAST_MONTH <> String.Empty Then
|
||||||
|
Result_Execute(SQL_REP_ENV_ALL_USER_LAST_MONTH)
|
||||||
|
Else
|
||||||
|
GridControlData.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
62
EnvelopeGenerator.Form/frmRueckruf.Designer.vb
generated
62
EnvelopeGenerator.Form/frmRueckruf.Designer.vb
generated
@@ -30,13 +30,17 @@ Partial Class frmRueckruf
|
|||||||
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
Me.StatusStrip1 = New System.Windows.Forms.StatusStrip()
|
||||||
Me.tsstatus = New System.Windows.Forms.ToolStripStatusLabel()
|
Me.tsstatus = New System.Windows.Forms.ToolStripStatusLabel()
|
||||||
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
Me.SimpleButton1 = New DevExpress.XtraEditors.SimpleButton()
|
||||||
|
Me.Label3 = New System.Windows.Forms.Label()
|
||||||
|
Me.Label4 = New System.Windows.Forms.Label()
|
||||||
|
Me.lblID = New System.Windows.Forms.Label()
|
||||||
|
Me.lblTitle = New System.Windows.Forms.Label()
|
||||||
Me.StatusStrip1.SuspendLayout()
|
Me.StatusStrip1.SuspendLayout()
|
||||||
Me.SuspendLayout()
|
Me.SuspendLayout()
|
||||||
'
|
'
|
||||||
'Label2
|
'Label2
|
||||||
'
|
'
|
||||||
Me.Label2.AutoSize = True
|
Me.Label2.AutoSize = True
|
||||||
Me.Label2.Location = New System.Drawing.Point(22, 20)
|
Me.Label2.Location = New System.Drawing.Point(28, 36)
|
||||||
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
Me.Label2.Margin = New System.Windows.Forms.Padding(4, 0, 4, 0)
|
||||||
Me.Label2.Name = "Label2"
|
Me.Label2.Name = "Label2"
|
||||||
Me.Label2.Size = New System.Drawing.Size(380, 16)
|
Me.Label2.Size = New System.Drawing.Size(380, 16)
|
||||||
@@ -46,7 +50,7 @@ Partial Class frmRueckruf
|
|||||||
'txtReason
|
'txtReason
|
||||||
'
|
'
|
||||||
Me.txtReason.AcceptsReturn = True
|
Me.txtReason.AcceptsReturn = True
|
||||||
Me.txtReason.Location = New System.Drawing.Point(25, 40)
|
Me.txtReason.Location = New System.Drawing.Point(31, 56)
|
||||||
Me.txtReason.Margin = New System.Windows.Forms.Padding(4)
|
Me.txtReason.Margin = New System.Windows.Forms.Padding(4)
|
||||||
Me.txtReason.Multiline = True
|
Me.txtReason.Multiline = True
|
||||||
Me.txtReason.Name = "txtReason"
|
Me.txtReason.Name = "txtReason"
|
||||||
@@ -66,7 +70,7 @@ Partial Class frmRueckruf
|
|||||||
'
|
'
|
||||||
Me.btnCancel.Image = CType(resources.GetObject("btnCancel.Image"), System.Drawing.Image)
|
Me.btnCancel.Image = CType(resources.GetObject("btnCancel.Image"), System.Drawing.Image)
|
||||||
Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
Me.btnCancel.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
|
||||||
Me.btnCancel.Location = New System.Drawing.Point(251, 134)
|
Me.btnCancel.Location = New System.Drawing.Point(260, 150)
|
||||||
Me.btnCancel.Name = "btnCancel"
|
Me.btnCancel.Name = "btnCancel"
|
||||||
Me.btnCancel.Size = New System.Drawing.Size(203, 44)
|
Me.btnCancel.Size = New System.Drawing.Size(203, 44)
|
||||||
Me.btnCancel.TabIndex = 4
|
Me.btnCancel.TabIndex = 4
|
||||||
@@ -76,7 +80,7 @@ Partial Class frmRueckruf
|
|||||||
'StatusStrip1
|
'StatusStrip1
|
||||||
'
|
'
|
||||||
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsstatus})
|
Me.StatusStrip1.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.tsstatus})
|
||||||
Me.StatusStrip1.Location = New System.Drawing.Point(0, 185)
|
Me.StatusStrip1.Location = New System.Drawing.Point(0, 211)
|
||||||
Me.StatusStrip1.Name = "StatusStrip1"
|
Me.StatusStrip1.Name = "StatusStrip1"
|
||||||
Me.StatusStrip1.Size = New System.Drawing.Size(488, 22)
|
Me.StatusStrip1.Size = New System.Drawing.Size(488, 22)
|
||||||
Me.StatusStrip1.TabIndex = 5
|
Me.StatusStrip1.TabIndex = 5
|
||||||
@@ -90,17 +94,59 @@ Partial Class frmRueckruf
|
|||||||
'SimpleButton1
|
'SimpleButton1
|
||||||
'
|
'
|
||||||
Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
Me.SimpleButton1.ImageOptions.SvgImage = CType(resources.GetObject("SimpleButton1.ImageOptions.SvgImage"), DevExpress.Utils.Svg.SvgImage)
|
||||||
Me.SimpleButton1.Location = New System.Drawing.Point(25, 134)
|
Me.SimpleButton1.Location = New System.Drawing.Point(31, 150)
|
||||||
Me.SimpleButton1.Name = "SimpleButton1"
|
Me.SimpleButton1.Name = "SimpleButton1"
|
||||||
Me.SimpleButton1.Size = New System.Drawing.Size(220, 44)
|
Me.SimpleButton1.Size = New System.Drawing.Size(220, 44)
|
||||||
Me.SimpleButton1.TabIndex = 6
|
Me.SimpleButton1.TabIndex = 6
|
||||||
Me.SimpleButton1.Text = "Umschlag zurückrufen"
|
Me.SimpleButton1.Text = "Umschlag zurückrufen"
|
||||||
'
|
'
|
||||||
|
'Label3
|
||||||
|
'
|
||||||
|
Me.Label3.AutoSize = True
|
||||||
|
Me.Label3.Location = New System.Drawing.Point(28, 9)
|
||||||
|
Me.Label3.Name = "Label3"
|
||||||
|
Me.Label3.Size = New System.Drawing.Size(80, 16)
|
||||||
|
Me.Label3.TabIndex = 7
|
||||||
|
Me.Label3.Text = "Envelope-ID:"
|
||||||
|
'
|
||||||
|
'Label4
|
||||||
|
'
|
||||||
|
Me.Label4.AutoSize = True
|
||||||
|
Me.Label4.Location = New System.Drawing.Point(158, 9)
|
||||||
|
Me.Label4.Name = "Label4"
|
||||||
|
Me.Label4.Size = New System.Drawing.Size(93, 16)
|
||||||
|
Me.Label4.TabIndex = 8
|
||||||
|
Me.Label4.Text = "Envelope-Titel:"
|
||||||
|
'
|
||||||
|
'lblID
|
||||||
|
'
|
||||||
|
Me.lblID.AutoSize = True
|
||||||
|
Me.lblID.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.lblID.Location = New System.Drawing.Point(108, 9)
|
||||||
|
Me.lblID.Name = "lblID"
|
||||||
|
Me.lblID.Size = New System.Drawing.Size(49, 16)
|
||||||
|
Me.lblID.TabIndex = 9
|
||||||
|
Me.lblID.Text = "Label5"
|
||||||
|
'
|
||||||
|
'lblTitle
|
||||||
|
'
|
||||||
|
Me.lblTitle.AutoSize = True
|
||||||
|
Me.lblTitle.Font = New System.Drawing.Font("Tahoma", 9.75!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
|
||||||
|
Me.lblTitle.Location = New System.Drawing.Point(257, 9)
|
||||||
|
Me.lblTitle.Name = "lblTitle"
|
||||||
|
Me.lblTitle.Size = New System.Drawing.Size(49, 16)
|
||||||
|
Me.lblTitle.TabIndex = 10
|
||||||
|
Me.lblTitle.Text = "Label5"
|
||||||
|
'
|
||||||
'frmRueckruf
|
'frmRueckruf
|
||||||
'
|
'
|
||||||
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
|
Me.AutoScaleDimensions = New System.Drawing.SizeF(7.0!, 16.0!)
|
||||||
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
|
||||||
Me.ClientSize = New System.Drawing.Size(488, 207)
|
Me.ClientSize = New System.Drawing.Size(488, 233)
|
||||||
|
Me.Controls.Add(Me.lblTitle)
|
||||||
|
Me.Controls.Add(Me.lblID)
|
||||||
|
Me.Controls.Add(Me.Label4)
|
||||||
|
Me.Controls.Add(Me.Label3)
|
||||||
Me.Controls.Add(Me.SimpleButton1)
|
Me.Controls.Add(Me.SimpleButton1)
|
||||||
Me.Controls.Add(Me.StatusStrip1)
|
Me.Controls.Add(Me.StatusStrip1)
|
||||||
Me.Controls.Add(Me.btnCancel)
|
Me.Controls.Add(Me.btnCancel)
|
||||||
@@ -129,4 +175,8 @@ Partial Class frmRueckruf
|
|||||||
Friend WithEvents StatusStrip1 As StatusStrip
|
Friend WithEvents StatusStrip1 As StatusStrip
|
||||||
Friend WithEvents tsstatus As ToolStripStatusLabel
|
Friend WithEvents tsstatus As ToolStripStatusLabel
|
||||||
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
Friend WithEvents SimpleButton1 As DevExpress.XtraEditors.SimpleButton
|
||||||
|
Friend WithEvents Label3 As Label
|
||||||
|
Friend WithEvents Label4 As Label
|
||||||
|
Friend WithEvents lblID As Label
|
||||||
|
Friend WithEvents lblTitle As Label
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -121,7 +121,7 @@
|
|||||||
<data name="btnCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
<data name="btnCancel.Image" type="System.Drawing.Bitmap, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||||
<value>
|
<value>
|
||||||
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAAO
|
||||||
wQAADsEBuJFr7QAAAUlJREFUOE+lU6GOg1AQ5BP6Cf2E+4QLnqQWV4EHjUJhGzxJJbICDxpFQvCHg4DA
|
wAAADsABataJCQAAAUlJREFUOE+lU6GOg1AQ5BP6Cf2E+4QLnqQWV4EHjUJhGzxJJbICDxpFQvCHg4DA
|
||||||
Yd/tLPvK4wJ34iaZ9GVndxh4WwtYluVCfBIVcSYGLPwA1SPp0bxpIaiqSjmOw2zbdhMJdL4S6yzLlG3b
|
Yd/tLPvK4wJ34iaZ9GVndxh4WwtYluVCfBIVcSYGLPwA1SPp0bxpIaiqSjmOw2zbdhMJdL4S6yzLlG3b
|
||||||
qigK6JHI3FCmacoi6HmeGscRSZAswDmOY9bQR7WXjK5AExJoAzBJEjTOXdexIWowoVpNvMjoChQg5Hm+
|
qigK6JHI3FCmacoi6HmeGscRSZAswDmOY9bQR7WXjK5AExJoAzBJEjTOXdexIWowoVpNvMjoChQg5Hm+
|
||||||
M8HT8Eo4G6muMrbHmQkIk2ma8PRPaT8G3Ikc1TSAKdWf0nYMGT5M4Lrun/E/iDM+nDlofgPf9/kDysgG
|
M8HT8Eo4G6muMrbHmQkIk2ma8PRPaT8G3Ikc1TSAKdWf0nYMGT5M4Lrun/E/iDM+nDlofgPf9/kDysgG
|
||||||
|
|||||||
@@ -22,6 +22,8 @@ Public Class frmRueckruf
|
|||||||
txtReason.Text = ""
|
txtReason.Text = ""
|
||||||
tsstatus.Text = ""
|
tsstatus.Text = ""
|
||||||
Continue_Reject = False
|
Continue_Reject = False
|
||||||
|
lblID.Text = CurrentEnvelopID.ToString
|
||||||
|
lblTitle.Text = CurrentEnvelopetitle
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
Private Sub SimpleButton1_Click(sender As Object, e As EventArgs) Handles SimpleButton1.Click
|
||||||
@@ -50,4 +52,8 @@ Public Class frmRueckruf
|
|||||||
tsstatus.Text = "Please add a reason for aborting - " & Now
|
tsstatus.Text = "Please add a reason for aborting - " & Now
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub Label2_Click(sender As Object, e As EventArgs) Handles Label2.Click
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -32,11 +32,27 @@ public class CommandManager
|
|||||||
[Subcommand]
|
[Subcommand]
|
||||||
public IEnvelopeReceiverService EnvelopeReceiver => _envelopeReceiverService;
|
public IEnvelopeReceiverService EnvelopeReceiver => _envelopeReceiverService;
|
||||||
|
|
||||||
[Command]
|
[Command(ArgumentSeparatorStrategy = ArgumentSeparatorStrategy.EndOfOptions)]
|
||||||
public async Task ReadDocument(IConsole console, int? id = null, int? envelopeId = null)
|
public async Task ReadDocument(IConsole console,
|
||||||
|
[Option(Description = "ID of the document.")] int? id = null,
|
||||||
|
[Option(Description = "ID of the envelope containing the document.")] int? envelopeId = null,
|
||||||
|
[Option(Description = "Path to save the PDF")] bool save = false,
|
||||||
|
[Option(Description = "Directory to save the PDF")] string? dir = null,
|
||||||
|
[Option(Description = "Name of file to save the PDF")] string? fileName = null)
|
||||||
{
|
{
|
||||||
ReadDocumentQuery query = new(id, envelopeId);
|
ReadDocumentQuery query = new(id, envelopeId);
|
||||||
var document = await _mediator.Send(query);
|
var document = await _mediator.Send(query);
|
||||||
console.WriteLine(JsonSerializer.Serialize(document, Options));
|
console.WriteLine(JsonSerializer.Serialize(save ? document as ReadDocumentResponseBase : document, Options));
|
||||||
|
|
||||||
|
if (save)
|
||||||
|
{
|
||||||
|
dir ??= AppContext.BaseDirectory;
|
||||||
|
fileName ??= $"D{document?.Guid}E{document?.EnvelopeId}.pdf";
|
||||||
|
|
||||||
|
var path = Path.Combine(dir, fileName);
|
||||||
|
console.WriteLine("Save to " + path);
|
||||||
|
|
||||||
|
File.WriteAllBytes(path, document?.ByteData ?? Array.Empty<byte>());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
using Microsoft.Extensions.Hosting;
|
using Microsoft.Extensions.Configuration;
|
||||||
|
using Microsoft.Extensions.Hosting;
|
||||||
|
|
||||||
namespace EnvelopeGenerator.Terminal;
|
namespace EnvelopeGenerator.Terminal;
|
||||||
|
|
||||||
@@ -8,6 +9,10 @@ public class Program
|
|||||||
{
|
{
|
||||||
var builder = Host.CreateApplicationBuilder(args);
|
var builder = Host.CreateApplicationBuilder(args);
|
||||||
|
|
||||||
|
builder.Configuration
|
||||||
|
.SetBasePath(AppContext.BaseDirectory)
|
||||||
|
.AddJsonFile("appsettings.json", optional: true, reloadOnChange: true);
|
||||||
|
|
||||||
var config = builder.Configuration;
|
var config = builder.Configuration;
|
||||||
|
|
||||||
builder.Services.AddCommandManagerRunner(config);
|
builder.Services.AddCommandManagerRunner(config);
|
||||||
|
|||||||
Reference in New Issue
Block a user