FormularManager für SDL, etc.

This commit is contained in:
2024-08-06 16:41:35 +02:00
parent 58deafb5be
commit 8db41361dc
15 changed files with 2907 additions and 557 deletions

View File

@@ -859,6 +859,8 @@ Public Class cFormularManager
Try
Dim f = stamper.AcroFields
f.GenerateAppearances = True
For Each i In list
f.SetField(i.Text, i.Value)
Next
@@ -960,6 +962,51 @@ Public Class cFormularManager
Return ""
End Function
Public Function getPDFFields_Editierbar(da_kategorie As String, da_ordner As String, da_uOrdner1 As String, da_uOrdner2 As String, da_uOrdner3 As String, da_name As String) As List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.MyListItem)
Try
Dim DS As New cDATENSERVER(da_kategorie, da_ordner, da_uOrdner1, da_uOrdner2, da_uOrdner3, da_name)
If Not DS.hasITEMS Then Return list
Dim path_src = DS.OPEN_SINGLE(False)
If path_src = "" Then Return list
Dim fi As New IO.DirectoryInfo(path_src)
Dim destPath = DATENVERVER_OPTIONS.getTMPPath(fi.Name, fi.Extension, True, False)
Dim pdf As iTextSharp.text.pdf.PdfReader = New iTextSharp.text.pdf.PdfReader(path_src)
Using fw As New FileStream(destPath, FileMode.OpenOrCreate)
Dim stamper = New PdfStamper(pdf, fw)
Try
Dim f = stamper.AcroFields
f.GenerateAppearances = True
For Each r In f.Fields
Dim key = r.Key.ToString
Dim value = IIf(f.GetField(r.Key.ToString) = "", " ", r.Key.ToString)
Dim listItem As VERAG_PROG_ALLGEMEIN.MyListItem
listItem = New VERAG_PROG_ALLGEMEIN.MyListItem(r.Key.ToString, f.GetField(r.Key.ToString))
list.Add(listItem)
Next
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Using
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return list
End Function
Public Function fillPDFVorhandenesLokalesPDF_Path(path As String, listToWrite As List(Of cPDFWriteValues), Optional editierbar As Boolean = True, Optional autoDruck As Boolean = False, Optional printerName As String = "", Optional genNewPath As Boolean = True, Optional barcode As List(Of barcodeToPdf) = Nothing) As String
Return fillPDF("", "", "", "", "", "", listToWrite, editierbar, autoDruck, printerName, genNewPath, path, barcode)
End Function

View File

@@ -24,7 +24,6 @@ Partial Class frmMessenger
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle2 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim DataGridViewCellStyle3 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
@@ -39,12 +38,12 @@ Partial Class frmMessenger
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmMessenger))
Me.SplitContainer = New System.Windows.Forms.SplitContainer()
Me.SplitContainer2 = New System.Windows.Forms.SplitContainer()
Me.dgvChats = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.dgvChats = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.Panel6 = New System.Windows.Forms.Panel()
Me.Label3 = New System.Windows.Forms.Label()
Me.lblLKWChat_MsgCntInaktiv = New System.Windows.Forms.Label()
Me.cbxInaktiveChats = New System.Windows.Forms.CheckBox()
Me.DGVSonstige = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.DGVSonstige = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.Panel5 = New System.Windows.Forms.Panel()
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.PictureBox2 = New System.Windows.Forms.PictureBox()
@@ -65,7 +64,7 @@ Partial Class frmMessenger
Me.btnNeu = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel(Me.components)
Me.MyFlowLayoutPanel1 = New VERAG_PROG_ALLGEMEIN.MyFlowLayoutPanel()
Me.UsrCntlMessenger_ChatElement1 = New VERAG_PROG_ALLGEMEIN.usrCntlMessenger_ChatElement()
Me.Panel3 = New System.Windows.Forms.Panel()
Me.btnTeilnehmer = New System.Windows.Forms.Button()
@@ -93,9 +92,9 @@ Partial Class frmMessenger
Me.btnSendAtt = New System.Windows.Forms.Button()
Me.btnSenden = New System.Windows.Forms.Button()
Me.rtbChatMessage = New System.Windows.Forms.RichTextBox()
Me.TimerNEW_MESSAGE = New System.Windows.Forms.Timer(Me.components)
Me.Timer_REFRESH = New System.Windows.Forms.Timer(Me.components)
Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.TimerNEW_MESSAGE = New System.Windows.Forms.Timer()
Me.Timer_REFRESH = New System.Windows.Forms.Timer()
Me.cntxt = New System.Windows.Forms.ContextMenuStrip()
Me.ChatDeaktivierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.toolChatReminder = New System.Windows.Forms.ToolStripMenuItem()
Me.DataGridViewTextBoxColumn1 = New System.Windows.Forms.DataGridViewTextBoxColumn()