MS Changes OrderFiles, TFA without OPhone

This commit is contained in:
Developer01
2025-02-11 14:03:58 +01:00
parent c63f369bd6
commit 1a99041c60
16 changed files with 2283 additions and 1361 deletions

View File

@@ -103,6 +103,8 @@ Partial Public Class frmEnvelopeEditor
If oResult = DialogResult.Cancel Then
Controller.DeleteEnvelopeFromDisk(Controller.Envelope)
Me.Close()
Else
Envelope = Controller.Envelope
End If
Else
Controller = New EnvelopeEditorController(State, Envelope)
@@ -167,10 +169,11 @@ Partial Public Class frmEnvelopeEditor
End Sub
Private Sub SetPhoneNumberColumnVisible()
If IsNothing(Envelope) Then
colPhoneNumber.Visible = False
Exit Sub
End If
If Envelope.TFA_Enabled = True Then
colPhoneNumber.Visible = True
colPhoneNumber.Visible = DEF_TF_ENABLED_WITH_PHONE
Else
colPhoneNumber.Visible = False
End If
@@ -589,7 +592,9 @@ Partial Public Class frmEnvelopeEditor
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_EMAIL), oEmailAdress)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_NAME), oLastName)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_CODE), oAccessCode)
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
If Envelope.TFA_Enabled AndAlso DEF_TF_ENABLED_WITH_PHONE Then
ViewReceivers.SetRowCellValue(e.RowHandle, ViewReceivers.Columns.Item(COL_PHONE), oPhoneNumber)
End If
Else
Dim oMsg = Resources.Envelope.Error_email_Validation
oMsg = oMsg.Replace("@Mail", oEmailAdress)
@@ -642,22 +647,23 @@ Partial Public Class frmEnvelopeEditor
End Sub
Private Async Sub bbtnitm_ConcatFiles_ItemClick(sender As Object, e As DevExpress.XtraBars.ItemClickEventArgs) Handles bbtnitm_ConcatFiles.ItemClick
ENVELOPE_TEMP_DOCUMENT = String.Empty
OpenFileDialog1.Multiselect = True
OpenFileDialog1.Title = Resources.Envelope.Dialog_Concat_PDF
Dim oSuccess As Boolean = False
Dim oHandle = SplashScreenManager.ShowOverlayForm(Me)
Try
Dim oErr As Boolean = False
If OpenFileDialog1.ShowDialog() = DialogResult.OK Then
ENVELOPE_TEMP_DOCUMENT = String.Empty
Dim openform As New frmOrderFiles
openform.oTitle = Resources.Envelope.Dialog_Concat_PDF
openform.ShowDialog()
If Not IsNothing(openform.fileResults) Then
Dim oIDX As Integer = -1
For Each oFile As String In OpenFileDialog1.FileNames
For Each oFile As String In openform.fileResults
oIDX += 1
Next
Dim oSuccess As Boolean = False
Dim oErr As Boolean = False
Dim arPDF As GdPicturePDF() = New GdPicturePDF(oIDX) {}
oIDX = 0
For Each oFile As String In OpenFileDialog1.FileNames
For Each oFile As String In openform.fileResults
arPDF(oIDX) = New GdPicturePDF()
If arPDF(oIDX).LoadFromFile(oFile) <> GdPictureStatus.OK Then
MsgBox($"PDF Status of file {oFile} is not OK. Please check PDF-conformity!", MsgBoxStyle.Critical)
@@ -694,7 +700,7 @@ Partial Public Class frmEnvelopeEditor
End If
dstPDF.Dispose()
oIDX = 0
For Each oFile As String In OpenFileDialog1.FileNames
For Each oFile As String In openform.fileResults
arPDF(oIDX).CloseDocument()
oIDX += 1
Next
@@ -704,8 +710,8 @@ Partial Public Class frmEnvelopeEditor
End If
End If
End If
End If
Catch ex As Exception
Logger.Error(ex)
Finally
@@ -713,7 +719,7 @@ Partial Public Class frmEnvelopeEditor
End Try
'frmChooseDocVariant.ShowDialog()
End Sub
@@ -744,7 +750,6 @@ Partial Public Class frmEnvelopeEditor
Private Async Sub frmEnvelopeEditor_DragDrop(sender As Object, e As DragEventArgs) Handles Me.DragDrop
' Den Pfad der Datei(en) erhalten
Dim ofiles() As String = CType(e.Data.GetData(DataFormats.FileDrop), String())
' Beispiel: Ersten Dateipfad anzeigen
If ofiles IsNot Nothing AndAlso ofiles.Length > 0 Then
If Not ofiles(0).ToString.EndsWith("pdf") Then
@@ -757,7 +762,6 @@ Partial Public Class frmEnvelopeEditor
SplashScreenManager.CloseOverlayForm(oHandle)
' MessageBox.Show("Dateipfad: " & ofiles(0), "Datei abgelegt", MessageBoxButtons.OK, MessageBoxIcon.Information)
End If
End If
End Sub