Compare commits

...

10 Commits

24 changed files with 176 additions and 67 deletions

View File

@@ -4,6 +4,7 @@ Imports GdPicture14
Imports Newtonsoft.Json.Linq
Imports EnvelopeGenerator.Common.Jobs
Imports System.IO
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
Public Class frmFinalizePDF
Private Const CONNECTIONSTRING = "Server=sDD-VMP04-SQL17\DD_DEVELOP01;Database=DD_ECM;User Id=sa;Password=+bk8oAbbQP1AzoHtvZUbd+Mbok2f8Fl4miEx1qssJ5yEaEWoQJ9prg4L14fURpPnqi1WMNs9fE4=;"
@@ -15,14 +16,14 @@ Public Class frmFinalizePDF
Private Manager As AnnotationManager
Private PDFBurner As FinalizeDocument.PDFBurner
Private pGDPictureLicenseKey As String = "kG1Qf9PwmqgR8aDmIW2zI_ebj48RzqAJegRxcystEmkbTGQqfkNBdFOXIb6C_A00Ra8zZkrHdfjqzOPXK7kgkF2YDhvrqKfqh4WDug2vOt0qO31IommzkANSuLjZ4zmraoubyEVd25rE3veQ2h_j7tGIoH_LyIHmy24GaXsxdG0yCzIBMdiLbMMMDwcPY-809KeZ83Grv76OVhFvcbBWyYc251vou1N-kGg5_ZlHDgfWoY85gTLRxafjD3KS_i9ARW4BMiy36y8n7UP2jN8kGRnW_04ubpFtfjJqvtsrP_J9D0x7bqV8xtVtT5JI6dpKsVTiMgDCrIcoFSo5gCC1fw9oUopX4TDCkBQttO4-WHBlOeq9dG5Yb0otonVmJKaQA2tP6sMR-lZDs3ql_WI9t91yPWgpssrJUxSHDd27_LMTH_owJIqkF3NOJd9mYQuAv22oNKFYbH8e41pVKb8cT33Y9CgcQ_sy6YDA5PTuIRi67mjKge_nD9rd0IN213Ir9M_EFWqg9e4haWzIdHXQUo0md70kVhPX4UIH_BKJnxEEnFfoFRNMh77bB0N4jkcBEHPl-ghOERv8dOztf4vCnNpzzWvcLD2cqWIm6THy8XGGq9h4hp8aEreRleSMwv9QQAC7mjLwhQ1rBYkpUHlpTjhTLnMwHknl6HH0Z6zzmsgkRKVyfquv94Pd7QbQfZrRka0ss_48pf9p8hAywEn81Q=="
Private ReadOnly _ignoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"}
Private ReadOnly _pdfBurnerParams As New PDFBurnerParams()
Private Sub frmFinalizePDF_Load(sender As Object, e As EventArgs) Handles MyBase.Load
LogConfig = New LogConfig(LogConfig.PathType.CustomPath, Application.StartupPath)
Database = New MSSQLServer(LogConfig, MSSQLServer.DecryptConnectionString(CONNECTIONSTRING))
PDFBurner = New FinalizeDocument.PDFBurner(LogConfig, pGDPictureLicenseKey, _ignoredLabels)
PDFBurner = New FinalizeDocument.PDFBurner(LogConfig, pGDPictureLicenseKey, _pdfBurnerParams)
Viewer = New GdViewer()
Manager = New AnnotationManager()

View File

@@ -130,7 +130,7 @@
Public Const DATABASE = "DATABASE"
Public Const LOGCONFIG = "LOGCONFIG"
Public Const GDPICTURE = "GDPICTURE"
Public Const IGNORED_LABELS = "IgnoredLabels"
Public Const PDF_BURNER_PARAMS = "PDFBurnerParams"
Public Const GREEN_300 = "#bbf7d0"
Public Const RED_300 = "#fecaca"

View File

@@ -25,6 +25,7 @@
Public Property Message As String = My.Resources.Envelope.Please_read_and_sign_this_document
Public Property AddedWhen As Date
Public Property ChangedWhen As Date
Public Property User As New User()
Public Property Documents As New List(Of EnvelopeDocument)

View File

@@ -8,6 +8,7 @@
Public Property HasAccess As Boolean
Public Property IsAdmin As Boolean
Public Property GhostModeActive As Boolean
Public ReadOnly Property FullName() As String
Get

View File

@@ -281,6 +281,7 @@
<Compile Include="Entities\ElementStatus.vb" />
<Compile Include="Entities\EmailData.vb" />
<Compile Include="Entities\EmailTemplate.vb" />
<Compile Include="Jobs\FinalizeDocument\PDFBurnerParams.vb" />
<Compile Include="Services\TemplateService.vb" />
<Compile Include="Entities\Envelope.vb" />
<Compile Include="Entities\EnvelopeDocument.vb" />

View File

@@ -74,8 +74,8 @@ Namespace Jobs
InitializeServices(oState)
Logger.Debug("Loading PDFBurner..")
Dim ignoredLabels As List(Of String) = pContext.MergedJobDataMap.Item(Constants.IGNORED_LABELS)
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, ignoredLabels)
Dim pdfBurnerParams As PDFBurnerParams = pContext.MergedJobDataMap.Item(Constants.PDF_BURNER_PARAMS)
PDFBurner = New PDFBurner(LogConfig, oGdPictureKey, pdfBurnerParams)
Logger.Debug("Loading PDFMerger..")
PDFMerger = New PDFMerger(LogConfig, oGdPictureKey)

View File

@@ -16,9 +16,9 @@ Namespace Jobs.FinalizeDocument
Private Const ANNOTATION_TYPE_IMAGE = "pspdfkit/image"
Private Const ANNOTATION_TYPE_INK = "pspdfkit/ink"
Private Const ANNOTATION_TYPE_WIDGET = "pspdfkit/widget"
Private Property _ignoredLabels As List(Of String)
Private Property _pdfBurnerParams As PDFBurnerParams
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, ignoredLabels As List(Of String))
Public Sub New(pLogConfig As LogConfig, pGDPictureLicenseKey As String, pdfBurnerParams As PDFBurnerParams)
MyBase.New(pLogConfig)
LicenseManager = New LicenseManager()
@@ -26,7 +26,7 @@ Namespace Jobs.FinalizeDocument
Manager = New AnnotationManager()
_ignoredLabels = ignoredLabels
_pdfBurnerParams = pdfBurnerParams
End Sub
Public Function BurnInstantJSONAnnotationsToPDF(pSourceBuffer As Byte(), pInstantJSONList As List(Of String)) As Byte()
@@ -68,7 +68,8 @@ Namespace Jobs.FinalizeDocument
Private Function AddInstantJSONAnnotationToPDF(pInstantJSON As String) As Boolean
Try
Dim oAnnotationData = JsonConvert.DeserializeObject(Of AnnotationData)(pInstantJSON)
oAnnotationData.annotations.Reverse()
Dim formFieldIndex = 0
For Each oAnnotation In oAnnotationData.annotations
Logger.Debug("Adding AnnotationID: " + oAnnotation.id)
Select Case oAnnotation.type
@@ -81,10 +82,12 @@ Namespace Jobs.FinalizeDocument
Case ANNOTATION_TYPE_WIDGET
'Add form field values
Dim formFieldValue = oAnnotationData.formFieldValues.FirstOrDefault(Function(fv) fv.name = oAnnotation.id)
If formFieldValue IsNot Nothing AndAlso Not _ignoredLabels.Contains(formFieldValue.value) Then
AddFormFieldValue(oAnnotation, formFieldValue)
If formFieldValue IsNot Nothing AndAlso Not _pdfBurnerParams.IgnoredLabels.Contains(formFieldValue.value) Then
AddFormFieldValue(oAnnotation, formFieldValue, formFieldIndex)
formFieldIndex += 1
End If
End Select
Next
Return True
@@ -144,13 +147,13 @@ Namespace Jobs.FinalizeDocument
End Function
Private Function AddFormFieldValue(pAnnotation As Annotation, formFieldValue As FormFieldValue) As Boolean
Private Function AddFormFieldValue(pAnnotation As Annotation, formFieldValue As FormFieldValue, index As Integer) As Boolean
Try
' Convert pixels to Inches
Dim oBounds = pAnnotation.bbox.Select(AddressOf ToInches).ToList()
Dim oX = oBounds.Item(0)
Dim oY = oBounds.Item(1)
Dim oY = oBounds.Item(1) + _pdfBurnerParams.YOffset * index + _pdfBurnerParams.TopMargin
Dim oWidth = oBounds.Item(2)
Dim oHeight = oBounds.Item(3)
@@ -159,9 +162,9 @@ Namespace Jobs.FinalizeDocument
Dim ant = Manager.AddTextAnnot(oX, oY, oWidth, oHeight, formFieldValue.value)
' Set the font properties
ant.FontName = "Arial"
ant.FontSize = 8
ant.FontStyle = FontStyle.Italic
ant.FontName = _pdfBurnerParams.FontName
ant.FontSize = _pdfBurnerParams.FontSize
ant.FontStyle = _pdfBurnerParams.FontStyle
Manager.SaveAnnotationsToPage()
Return True
Catch ex As Exception

View File

@@ -0,0 +1,16 @@
Imports System.Drawing
Namespace Jobs.FinalizeDocument
Public Class PDFBurnerParams
Public Property IgnoredLabels As New List(Of String) From {"Date", "Datum", "ZIP", "PLZ", "Place", "Ort", "Position", "Stellung"}
Public Property TopMargin As Double = 0.1
Public Property YOffset As Double = -0.3
Public Property FontName As String = "Arial"
Public Property FontSize As Integer = 8
Public Property FontStyle As FontStyle = FontStyle.Italic
End Class
End Namespace

View File

@@ -35,6 +35,7 @@ Public Class EnvelopeModel
.Language = pRow.ItemEx("LANGUAGE", "de-DE"),
.Status = ObjectEx.ToEnum(Of Constants.EnvelopeStatus)(pRow.ItemEx("STATUS", Constants.EnvelopeStatus.EnvelopeCreated.ToString())),
.AddedWhen = pRow.Item("ADDED_WHEN"),
.ChangedWhen = pRow.Item("CHANGED_WHEN"),
.CertificationType = ObjectEx.ToEnum(Of Constants.CertificationType)(pRow.ItemEx("CERTIFICATION_TYPE", Constants.CertificationType.AdvancedElectronicSignature.ToString())),
.User = New User(),
.ExpiresWhen = pRow.ItemEx(Of Date)("EXPIRES_WHEN", Nothing),

View File

@@ -33,10 +33,10 @@ Public Class UserModel
Dim oRow = oTable.Rows.Item(0)
Dim oHasAccess = oRow.ItemEx("MODULE_ACCESS", False)
Dim oIsAdmin = oRow.ItemEx("IS_ADMIN", False)
Dim oGhostmode = oRow.ItemEx("GHOST_MODE_OVERRIDE", False)
pUser.HasAccess = oHasAccess
pUser.IsAdmin = oIsAdmin
pUser.GhostModeActive = oGhostmode
Return pUser
Catch ex As Exception
Logger.Error(ex)

View File

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

View File

@@ -220,6 +220,9 @@ Pattern: +491234567890</value>
<data name="Missing Receivers" xml:space="preserve">
<value>Fehlende Empfänger</value>
</data>
<data name="ModificationOriginFile_FormFields" xml:space="preserve">
<value />
</data>
<data name="New Envelope" xml:space="preserve">
<value>Neuer Umschlag</value>
</data>

View File

@@ -371,6 +371,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die ähnelt.
'''</summary>
Public Shared ReadOnly Property ModificationOriginFile_FormFields() As String
Get
Return ResourceManager.GetString("ModificationOriginFile_FormFields", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Neuer Umschlag ähnelt.
'''</summary>

View File

@@ -325,6 +325,15 @@ Namespace My.Resources
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die ähnelt.
'''</summary>
Public Shared ReadOnly Property ModificationOriginFile_FormFields() As String
Get
Return ResourceManager.GetString("ModificationOriginFile_FormFields", resourceCulture)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Zeichenfolge, die Nein ähnelt.
'''</summary>

View File

@@ -416,6 +416,7 @@
</EmbeddedResource>
<EmbeddedResource Include="frmGhostMode.resx">
<DependentUpon>frmGhostMode.vb</DependentUpon>
<SubType>Designer</SubType>
</EmbeddedResource>
<EmbeddedResource Include="frmMain.en.resx">
<DependentUpon>frmMain.vb</DependentUpon>

View File

@@ -18,6 +18,9 @@ Public Class FlattenFormFields
Dim newFilesPath As String = Path.Combine(oFolder, "InputFieldsFlattend_" & Path.GetFileName(pFilePath))
If gdpicturePdf.SaveToFile(newFilesPath) = GdPictureStatus.OK Then
Dim oNameofFile = Path.GetFileName(newFilesPath)
MsgBox("Your PDF-file contained form-fields!" & vbNewLine & "We needed to adapt the file and created an new version!" & vbNewLine &
$"New filename: {oNameofFile}", MsgBoxStyle.Exclamation, "Information")
Return newFilesPath
End If

View File

@@ -32,5 +32,5 @@ Imports System.Runtime.InteropServices
' You can specify all the values or you can default the Build and Revision Numbers
' by using the '*' as shown below:
' [assembly: AssemblyVersion("1.0.*")]
<Assembly: AssemblyVersion("2.9.0.0")>
<Assembly: AssemblyVersion("2.9.1.0")>
<Assembly: AssemblyFileVersion("1.0.0.0")>

View File

@@ -200,7 +200,7 @@ Partial Public Class frmEnvelopeEditor
Private Sub btnSave_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles btnSave.ItemClick
Try
If SaveEnvelopeWithOutValidation() = True Then
bsitm_info.Caption = "Data saved succeddfully " + Now.ToString
bsitm_info.Caption = "Data saved successfully " + Now.ToString
Else
bsitm_info.Caption = "Exceprion - Error saving Data. Check LOG"
End If

View File

@@ -47,6 +47,7 @@ Partial Class frmMain
Me.colStatus = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colTitle = New DevExpress.XtraGrid.Columns.GridColumn()
Me.colAddedWhen = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn2 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.RibbonControl = New DevExpress.XtraBars.Ribbon.RibbonControl()
Me.btnCreateEnvelope = New DevExpress.XtraBars.BarButtonItem()
Me.btnEditEnvelope = New DevExpress.XtraBars.BarButtonItem()
@@ -88,14 +89,16 @@ Partial Class frmMain
Me.GridColumn4 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn5 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn7 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.GridColumn1 = New DevExpress.XtraGrid.Columns.GridColumn()
Me.XtraTabPageAdmin = New DevExpress.XtraTab.XtraTabPage()
Me.SplitContainerControl2 = New DevExpress.XtraEditors.SplitContainerControl()
Me.GridControlData = New DevExpress.XtraGrid.GridControl()
Me.GridViewData = New DevExpress.XtraGrid.Views.Grid.GridView()
Me.PanelControl1 = New DevExpress.XtraEditors.PanelControl()
Me.GroupControl2 = New DevExpress.XtraEditors.GroupControl()
Me.GroupControl1 = New DevExpress.XtraEditors.GroupControl()
Me.btnEvvallUs_lastmonth = New DevExpress.XtraEditors.SimpleButton()
Me.btnEvvallUs_thismonth = New DevExpress.XtraEditors.SimpleButton()
Me.GroupControl1 = New DevExpress.XtraEditors.GroupControl()
Me.btnEnvelopes_All = New DevExpress.XtraEditors.SimpleButton()
Me.btnEnvelopes_thisYear = New DevExpress.XtraEditors.SimpleButton()
Me.btnEnvelopes_lastmonth = New DevExpress.XtraEditors.SimpleButton()
@@ -103,7 +106,6 @@ Partial Class frmMain
Me.RefreshTimer = New System.Windows.Forms.Timer(Me.components)
Me.SaveFileDialog1 = New System.Windows.Forms.SaveFileDialog()
Me.XtraSaveFileDialog1 = New DevExpress.XtraEditors.XtraSaveFileDialog(Me.components)
Me.btnEvvallUs_lastmonth = New DevExpress.XtraEditors.SimpleButton()
CType(Me.SplitContainerControl1, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.SplitContainerControl1.Panel1, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SplitContainerControl1.Panel1.SuspendLayout()
@@ -279,11 +281,12 @@ Partial Class frmMain
'
'ViewEnvelopes
'
Me.ViewEnvelopes.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colEnvelopeId, Me.colContractType, Me.colStatus, Me.colTitle, Me.colAddedWhen})
Me.ViewEnvelopes.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.colEnvelopeId, Me.colContractType, Me.colStatus, Me.colTitle, Me.colAddedWhen, Me.GridColumn2})
Me.ViewEnvelopes.GridControl = Me.GridEnvelopes
Me.ViewEnvelopes.Name = "ViewEnvelopes"
Me.ViewEnvelopes.OptionsBehavior.Editable = False
Me.ViewEnvelopes.OptionsBehavior.ReadOnly = True
Me.ViewEnvelopes.OptionsView.ShowAutoFilterRow = True
Me.ViewEnvelopes.OptionsView.ShowIndicator = False
'
'colEnvelopeId
@@ -318,6 +321,14 @@ Partial Class frmMain
Me.colAddedWhen.FieldName = "AddedWhen"
Me.colAddedWhen.Name = "colAddedWhen"
'
'GridColumn2
'
resources.ApplyResources(Me.GridColumn2, "GridColumn2")
Me.GridColumn2.DisplayFormat.FormatString = "G"
Me.GridColumn2.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.GridColumn2.FieldName = "ChangedWhen"
Me.GridColumn2.Name = "GridColumn2"
'
'RibbonControl
'
Me.RibbonControl.ExpandCollapseItem.Id = 0
@@ -637,11 +648,12 @@ Partial Class frmMain
'
'ViewCompleted
'
Me.ViewCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn3, Me.GridColumn4, Me.GridColumn5, Me.GridColumn7})
Me.ViewCompleted.Columns.AddRange(New DevExpress.XtraGrid.Columns.GridColumn() {Me.GridColumn3, Me.GridColumn4, Me.GridColumn5, Me.GridColumn7, Me.GridColumn1})
Me.ViewCompleted.GridControl = Me.GridCompleted
Me.ViewCompleted.Name = "ViewCompleted"
Me.ViewCompleted.OptionsBehavior.Editable = False
Me.ViewCompleted.OptionsBehavior.ReadOnly = True
Me.ViewCompleted.OptionsView.ShowAutoFilterRow = True
Me.ViewCompleted.OptionsView.ShowIndicator = False
'
'GridColumn3
@@ -665,9 +677,19 @@ Partial Class frmMain
'GridColumn7
'
resources.ApplyResources(Me.GridColumn7, "GridColumn7")
Me.GridColumn7.DisplayFormat.FormatString = "G"
Me.GridColumn7.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.GridColumn7.FieldName = "AddedWhen"
Me.GridColumn7.Name = "GridColumn7"
'
'GridColumn1
'
resources.ApplyResources(Me.GridColumn1, "GridColumn1")
Me.GridColumn1.DisplayFormat.FormatString = "G"
Me.GridColumn1.DisplayFormat.FormatType = DevExpress.Utils.FormatType.DateTime
Me.GridColumn1.FieldName = "ChangedWhen"
Me.GridColumn1.Name = "GridColumn1"
'
'XtraTabPageAdmin
'
Me.XtraTabPageAdmin.Controls.Add(Me.SplitContainerControl2)
@@ -688,7 +710,7 @@ Partial Class frmMain
'SplitContainerControl2.Panel2
'
resources.ApplyResources(Me.SplitContainerControl2.Panel2, "SplitContainerControl2.Panel2")
Me.SplitContainerControl2.SplitterPosition = 819
Me.SplitContainerControl2.SplitterPosition = 907
'
'GridControlData
'
@@ -702,6 +724,7 @@ Partial Class frmMain
'
Me.GridViewData.GridControl = Me.GridControlData
Me.GridViewData.Name = "GridViewData"
Me.GridViewData.OptionsView.ShowAutoFilterRow = True
'
'PanelControl1
'
@@ -717,6 +740,20 @@ Partial Class frmMain
resources.ApplyResources(Me.GroupControl2, "GroupControl2")
Me.GroupControl2.Name = "GroupControl2"
'
'btnEvvallUs_lastmonth
'
Me.btnEvvallUs_lastmonth.Appearance.BackColor = System.Drawing.Color.MediumPurple
Me.btnEvvallUs_lastmonth.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEvvallUs_lastmonth, "btnEvvallUs_lastmonth")
Me.btnEvvallUs_lastmonth.Name = "btnEvvallUs_lastmonth"
'
'btnEvvallUs_thismonth
'
Me.btnEvvallUs_thismonth.Appearance.BackColor = System.Drawing.Color.MediumSlateBlue
Me.btnEvvallUs_thismonth.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEvvallUs_thismonth, "btnEvvallUs_thismonth")
Me.btnEvvallUs_thismonth.Name = "btnEvvallUs_thismonth"
'
'GroupControl1
'
Me.GroupControl1.Controls.Add(Me.btnEnvelopes_All)
@@ -726,13 +763,6 @@ Partial Class frmMain
resources.ApplyResources(Me.GroupControl1, "GroupControl1")
Me.GroupControl1.Name = "GroupControl1"
'
'btnEvvallUs_thismonth
'
Me.btnEvvallUs_thismonth.Appearance.BackColor = System.Drawing.Color.MediumSlateBlue
Me.btnEvvallUs_thismonth.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEvvallUs_thismonth, "btnEvvallUs_thismonth")
Me.btnEvvallUs_thismonth.Name = "btnEvvallUs_thismonth"
'
'btnEnvelopes_All
'
Me.btnEnvelopes_All.Appearance.BackColor = System.Drawing.Color.MediumTurquoise
@@ -773,13 +803,6 @@ Partial Class frmMain
'
Me.XtraSaveFileDialog1.FileName = "XtraSaveFileDialog1"
'
'btnEvvallUs_lastmonth
'
Me.btnEvvallUs_lastmonth.Appearance.BackColor = System.Drawing.Color.MediumPurple
Me.btnEvvallUs_lastmonth.Appearance.Options.UseBackColor = True
resources.ApplyResources(Me.btnEvvallUs_lastmonth, "btnEvvallUs_lastmonth")
Me.btnEvvallUs_lastmonth.Name = "btnEvvallUs_lastmonth"
'
'frmMain
'
resources.ApplyResources(Me, "$this")
@@ -906,4 +929,6 @@ Partial Class frmMain
Friend WithEvents BarStaticItemGhost As DevExpress.XtraBars.BarStaticItem
Friend WithEvents btnEvvallUs_thismonth As DevExpress.XtraEditors.SimpleButton
Friend WithEvents btnEvvallUs_lastmonth As DevExpress.XtraEditors.SimpleButton
Friend WithEvents GridColumn1 As DevExpress.XtraGrid.Columns.GridColumn
Friend WithEvents GridColumn2 As DevExpress.XtraGrid.Columns.GridColumn
End Class

View File

@@ -265,7 +265,7 @@
<value>2</value>
</data>
<data name="colContractType.Width" type="System.Int32, mscorlib">
<value>120</value>
<value>112</value>
</data>
<data name="colStatus.Caption" xml:space="preserve">
<value>Status</value>
@@ -277,7 +277,7 @@
<value>1</value>
</data>
<data name="colStatus.Width" type="System.Int32, mscorlib">
<value>193</value>
<value>180</value>
</data>
<data name="colTitle.Caption" xml:space="preserve">
<value>Titel</value>
@@ -289,7 +289,7 @@
<value>0</value>
</data>
<data name="colTitle.Width" type="System.Int32, mscorlib">
<value>575</value>
<value>538</value>
</data>
<data name="colAddedWhen.Caption" xml:space="preserve">
<value>Erstellt am</value>
@@ -301,7 +301,19 @@
<value>3</value>
</data>
<data name="colAddedWhen.Width" type="System.Int32, mscorlib">
<value>196</value>
<value>130</value>
</data>
<data name="GridColumn2.Caption" xml:space="preserve">
<value>Zuletzt geändert am</value>
</data>
<data name="GridColumn2.Visible" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="GridColumn2.VisibleIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="GridColumn2.Width" type="System.Int32, mscorlib">
<value>130</value>
</data>
<data name="RibbonControl.ExpandCollapseItem.ImageOptions.ImageIndex" type="System.Int32, mscorlib">
<value>0</value>
@@ -1052,7 +1064,7 @@
<value>2</value>
</data>
<data name="GridColumn3.Width" type="System.Int32, mscorlib">
<value>120</value>
<value>100</value>
</data>
<data name="GridColumn4.Caption" xml:space="preserve">
<value>Status</value>
@@ -1064,7 +1076,7 @@
<value>1</value>
</data>
<data name="GridColumn4.Width" type="System.Int32, mscorlib">
<value>195</value>
<value>163</value>
</data>
<data name="GridColumn5.Caption" xml:space="preserve">
<value>Titel</value>
@@ -1076,7 +1088,7 @@
<value>0</value>
</data>
<data name="GridColumn5.Width" type="System.Int32, mscorlib">
<value>574</value>
<value>482</value>
</data>
<data name="GridColumn7.Caption" xml:space="preserve">
<value>Erstellt am</value>
@@ -1088,7 +1100,19 @@
<value>3</value>
</data>
<data name="GridColumn7.Width" type="System.Int32, mscorlib">
<value>195</value>
<value>120</value>
</data>
<data name="GridColumn1.Caption" xml:space="preserve">
<value>Zuletzt geändert am</value>
</data>
<data name="GridColumn1.Visible" type="System.Boolean, mscorlib">
<value>True</value>
</data>
<data name="GridColumn1.VisibleIndex" type="System.Int32, mscorlib">
<value>4</value>
</data>
<data name="GridColumn1.Width" type="System.Int32, mscorlib">
<value>120</value>
</data>
<data name="GridCompleted.Size" type="System.Drawing.Size, System.Drawing">
<value>1088, 469</value>
@@ -1139,7 +1163,7 @@
<value>0, 0</value>
</data>
<data name="GridControlData.Size" type="System.Drawing.Size, System.Drawing">
<value>819, 390</value>
<value>907, 390</value>
</data>
<data name="GridControlData.TabIndex" type="System.Int32, mscorlib">
<value>1</value>
@@ -1262,7 +1286,7 @@
<value>2</value>
</data>
<data name="GroupControl2.Text" xml:space="preserve">
<value>Umschläge alle User</value>
<value>Umschläge alle User (abrechnungsrelevant)</value>
</data>
<data name="&gt;&gt;GroupControl2.Name" xml:space="preserve">
<value>GroupControl2</value>
@@ -1717,6 +1741,12 @@
<data name="&gt;&gt;colAddedWhen.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;GridColumn2.Name" xml:space="preserve">
<value>GridColumn2</value>
</data>
<data name="&gt;&gt;GridColumn2.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;btnCreateEnvelope.Name" xml:space="preserve">
<value>btnCreateEnvelope</value>
</data>
@@ -1939,6 +1969,12 @@
<data name="&gt;&gt;GridColumn7.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;GridColumn1.Name" xml:space="preserve">
<value>GridColumn1</value>
</data>
<data name="&gt;&gt;GridColumn1.Type" xml:space="preserve">
<value>DevExpress.XtraGrid.Columns.GridColumn, DevExpress.XtraGrid.v21.2, Version=21.2.4.0, Culture=neutral, PublicKeyToken=b88d1754d700e49a</value>
</data>
<data name="&gt;&gt;GridViewData.Name" xml:space="preserve">
<value>GridViewData</value>
</data>

View File

@@ -90,9 +90,11 @@ Public Class frmMain
If ViewEnvelopes.RowCount = 0 Then
RibbonPageGroupFunctions.Enabled = False
btnDeleteEnvelope.Visibility = DevExpress.XtraBars.BarItemVisibility.Never
btnEditEnvelope.Enabled = False
Else
RibbonPageGroupFunctions.Enabled = True
btnDeleteEnvelope.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
btnEditEnvelope.Enabled = True
End If
Catch ex As Exception
Logger.Error(ex)
@@ -222,9 +224,6 @@ Public Class frmMain
bbtnitmEB.Enabled = True
LoadEnvelopeData()
Case 0
If ViewEnvelopes.RowCount = 0 Then
RibbonPageGroupFunctions.Enabled = False
End If
btnEditEnvelope.Enabled = True
btnDeleteEnvelope.Enabled = True
btnContactReceiver.Enabled = True
@@ -233,6 +232,7 @@ Public Class frmMain
bbtnitmInfoMail.Enabled = True
bbtnitmEB.Enabled = False
LoadEnvelopeData()
txtEnvelopeIdLabel.Caption = "No Envelope selected"
Case 2
@@ -538,7 +538,7 @@ Public Class frmMain
End If
bbtnitmEB.Enabled = False
RefreshTimer.Start()
If USER_GHOST_MODE_ACTIVE Then
If USER_GHOST_MODE_ACTIVE Or MYUSER.GhostModeActive Then
frmGhostMode.ShowDialog()
If USER_GHOST_MODE_USRNAME <> "" Then
MyUserModel = New UserModel(MyState)
@@ -546,7 +546,8 @@ Public Class frmMain
Dim oUser = MyUserModel.SelectUser()
If oUser IsNot Nothing Then
MyUserModel.CheckUserLogin(oUser)
BarStaticItemGhost.Caption = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit mode"
BarStaticItemGhost.Caption = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit ghost-mode"
Me.Text = $"GhostMode active: {USER_GHOST_MODE_USRNAME} - End signFLOW to quit ghost - mode"
BarStaticItemGhost.Visibility = DevExpress.XtraBars.BarItemVisibility.Always
LoadEnvelopeData()
End If

View File

@@ -1,16 +1,13 @@
Imports DigitalData.Modules.Config.ConfigAttributes
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
Public Class Config
<ConnectionString>
Public Property ConnectionString As String = ""
Public Property Debug As Boolean = False
Public Property IntervalInMin As Integer = 1
Public Property IgnoredLabels As List(Of String) = New List(Of String) From {
"Date", "Datum",
"ZIP", "PLZ",
"Place", "Ort",
"Position", "Stellung"
}
Public Property PDFBurnerParams As PDFBurnerParams = New PDFBurnerParams()
End Class

View File

@@ -3,6 +3,7 @@ Imports DigitalData.Modules.Base
Imports DigitalData.Modules.Database
Imports DigitalData.Modules.Logging
Imports EnvelopeGenerator.Common.Jobs
Imports EnvelopeGenerator.Common.Jobs.FinalizeDocument
Imports Quartz
Public Class Scheduler
@@ -11,15 +12,15 @@ Public Class Scheduler
Private Scheduler As IScheduler
Private ReadOnly ConnectionString As String
Private ReadOnly LicenseKey As String
Private Property _ignoredLabels As List(Of String)
Private Property _pdfBurnerParams As PDFBurnerParams
Private Const JobName = "CertificateDocumentJob"
Public Sub New(pLogConfig As LogConfig, pConnectionString As String, pLicenseKey As String, ignoredLabels As List(Of String))
Public Sub New(pLogConfig As LogConfig, pConnectionString As String, pLicenseKey As String, pdfBurnerParams As PDFBurnerParams)
MyBase.New(pLogConfig)
ConnectionString = pConnectionString
LicenseKey = pLicenseKey
_ignoredLabels = ignoredLabels
_pdfBurnerParams = pdfBurnerParams
Dim oLogProvider = New LogProvider(Logger)
Logging.LogProvider.SetCurrentLogProvider(oLogProvider)
@@ -40,7 +41,7 @@ Public Class Scheduler
{Common.Constants.GDPICTURE, LicenseKey},
{Common.Constants.LOGCONFIG, LogConfig},
{Common.Constants.DATABASE, ConnectionString},
{Common.Constants.IGNORED_LABELS, _ignoredLabels}
{Common.Constants.PDF_BURNER_PARAMS, _pdfBurnerParams}
}
Logger.Debug("Initialized Job [{0}]", JobName)

View File

@@ -55,7 +55,7 @@ Public Class Service
Logger.Debug("Inititalize Quartz")
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey, Config.IgnoredLabels)
Scheduler = New Scheduler(LogConfig, Config.ConnectionString, oKey, Config.PDFBurnerParams)
Await Scheduler.Start(Config.IntervalInMin)
Logger.Info("Started [{0}] !", ServiceName)