From bc2439069261e3d9c19c67eea5dd2a1192ca8991 Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Tue, 29 Apr 2025 17:18:24 +0200 Subject: [PATCH] ustva, etc. --- SDL/Fakturierung/cAutomailversand.vb | 27 +- .../ustCntlUSTV_AntragPosition.Designer.vb | 526 +++++++++--------- SDL/USTV/ustCntlUSTV_AntragPosition.vb | 51 +- .../Classes/USTV/cUStVLeistender.vb | 2 + .../Classes/cMDMFunctionsAllgemein.vb | 2 +- VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb | 60 +- VERAG_PROG_ALLGEMEIN/frmScan.vb | 84 ++- 7 files changed, 450 insertions(+), 302 deletions(-) diff --git a/SDL/Fakturierung/cAutomailversand.vb b/SDL/Fakturierung/cAutomailversand.vb index 1705ed91..01d9124b 100644 --- a/SDL/Fakturierung/cAutomailversand.vb +++ b/SDL/Fakturierung/cAutomailversand.vb @@ -1,5 +1,4 @@ - -Imports Microsoft.Office.Interop +Imports Microsoft.Office.Interop Imports VERAG_PROG_ALLGEMEIN Public Class cAutomailversand @@ -146,7 +145,7 @@ Public Class cAutomailversand End If End If - + Next Catch ex As System.Exception VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL) @@ -158,9 +157,13 @@ Public Class cAutomailversand Dim txtRgNr As String = IIf(RechnungsNr < 0, -1, RechnungsNr) Dim Mailtext As String - If row.Item("Steuer") = 0 Then - Mailtext &= (New SQL).getValueTxtBySql("SELECT Text FROM Rechnungstexte WHERE Firma_ID=0 AND EMailRechnung=1 AND Rechnungstexte.DrucksteuerungsKz='R' AND LandKZ='" & row.Item("RechnungsLandKz") & "'", "FMZOLL") - End If + + 'NICHT MEHR BENÖTIGT! + + 'If row.Item("Steuer") = 0 Then + ' Mailtext &= vbNewLine & vbNewLine + ' Mailtext &= (New SQL).getValueTxtBySql("SELECT Text FROM Rechnungstexte WHERE Firma_ID=0 AND EMailRechnung=1 AND Rechnungstexte.DrucksteuerungsKz='R' AND LandKZ='" & row.Item("RechnungsLandKz") & "'", "FMZOLL") + 'End If Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim listOfTextconserven As cTextkonserve_LIST = New cTextkonserve_LIST(4, "", Firma_ID) @@ -182,7 +185,9 @@ Public Class cAutomailversand Subject = r.txt_betreff Subject = Subject.Replace("%BelegNr%", txtRgNr) TextHTML &= r.txt_text - If Mailtext <> "" Then TextHTML &= Mailtext & vbNewLine + If Mailtext <> "" Then TextHTML &= Mailtext + TextHTML &= vbNewLine & vbNewLine + End If End If @@ -328,7 +333,13 @@ Public Class cAutomailversand Dim attachList As New List(Of String) For Each ATT As cFakt_MailATTach In ATTACHMENTS - attachList.Add(ATT.Pfad) + + If ATT.Pfad.ToString.ToLower.EndsWith("maut_at.pdf") Or ATT.Pfad.ToString.ToLower.EndsWith("maut_uta.pdf") Or ATT.Pfad.ToString.ToLower.EndsWith("maut_mse.pdf") Then + 'diese Anh. nicht mitanfügen! + Else + attachList.Add(ATT.Pfad) + End If + Next diff --git a/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb b/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb index 7a4cc9b4..8383fa27 100644 --- a/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb +++ b/SDL/USTV/ustCntlUSTV_AntragPosition.Designer.vb @@ -24,9 +24,12 @@ Partial Class ustCntlUSTV_AntragPosition Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() Me.tabDok = New System.Windows.Forms.TabPage() + Me.scanSonstiges = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() Me.tbcntr = New System.Windows.Forms.TabControl() Me.tabVollmachten = New System.Windows.Forms.TabPage() + Me.scanUSTVVollmachten = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() Me.tabFABest = New System.Windows.Forms.TabPage() + Me.scanUSTVFABest = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() Me.Label8 = New System.Windows.Forms.Label() Me.Label7 = New System.Windows.Forms.Label() Me.Panel2 = New System.Windows.Forms.Panel() @@ -46,31 +49,20 @@ Partial Class ustCntlUSTV_AntragPosition Me.lblAenderungsdatum = New System.Windows.Forms.Label() Me.lblSachbearbeiter = New System.Windows.Forms.Label() Me.pnl = New System.Windows.Forms.Panel() + Me.cbxAntragsfilter = New VERAG_PROG_ALLGEMEIN.MyCheckBoxValue(Me.components) Me.lblWarning = New System.Windows.Forms.Label() Me.btnLeistenderSave = New System.Windows.Forms.Button() + Me.sbLeistender = New VERAG_PROG_ALLGEMEIN.MySearchBox() Me.pnlAdresse = New System.Windows.Forms.Panel() + Me.txtStrasse = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.txtUIDNr = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.Label14 = New System.Windows.Forms.Label() Me.Label17 = New System.Windows.Forms.Label() Me.Label15 = New System.Windows.Forms.Label() - Me.Label16 = New System.Windows.Forms.Label() - Me.Panel1 = New System.Windows.Forms.Panel() - Me.btnAPIUbload = New System.Windows.Forms.Button() - Me.Panel3 = New System.Windows.Forms.Panel() - Me.Panel4 = New System.Windows.Forms.Panel() - Me.TabControl1 = New System.Windows.Forms.TabControl() - Me.TabPage1 = New System.Windows.Forms.TabPage() - Me.scanSonstiges = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() - Me.scanUSTVVollmachten = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() - Me.scanUSTVFABest = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() - Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() - Me.scanLieferschein = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan() - Me.cbxAntragsfilter = New VERAG_PROG_ALLGEMEIN.MyCheckBoxValue(Me.components) - Me.sbLeistender = New VERAG_PROG_ALLGEMEIN.MySearchBox() - Me.txtStrasse = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.txtUIDNr = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtLand = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtPLZ = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtStrassenNr = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Label16 = New System.Windows.Forms.Label() Me.txtOrt = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.cboSchnittstellennr = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.txtRgNr = New VERAG_PROG_ALLGEMEIN.MyTextBox() @@ -81,6 +73,15 @@ Partial Class ustCntlUSTV_AntragPosition Me.txtUSTBetragEUR = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtUmrechnungskurs = New VERAG_PROG_ALLGEMEIN.MyTextBox() Me.txtUSTBetrag = New VERAG_PROG_ALLGEMEIN.MyTextBox() + Me.Panel1 = New System.Windows.Forms.Panel() + Me.btnAPIUbload = New System.Windows.Forms.Button() + Me.Panel3 = New System.Windows.Forms.Panel() + Me.Panel4 = New System.Windows.Forms.Panel() + Me.TabControl1 = New System.Windows.Forms.TabControl() + Me.TabPage1 = New System.Windows.Forms.TabPage() + Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList() + Me.scanLieferschein = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan() + Me.btnDel = New System.Windows.Forms.Button() Me.tabDok.SuspendLayout() Me.tbcntr.SuspendLayout() Me.tabVollmachten.SuspendLayout() @@ -106,6 +107,27 @@ Partial Class ustCntlUSTV_AntragPosition Me.tabDok.Text = "Rechnungen" Me.tabDok.UseVisualStyleBackColor = True ' + 'scanSonstiges + ' + Me.scanSonstiges._DATENSERVER_KATEGORIE = "DOKUMENTE" + Me.scanSonstiges._DATENSERVER_ORDNER = "MDM" + Me.scanSonstiges._DATENSERVER_UOrdner1 = "" + Me.scanSonstiges._DATENSERVER_UOrdner2 = "" + Me.scanSonstiges._DATENSERVER_UOrdner3 = "" + Me.scanSonstiges._OPEN_ORIGINAL = False + Me.scanSonstiges._TYPE = "PDF" + Me.scanSonstiges.AllowDrop = True + Me.scanSonstiges.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.scanSonstiges.BackColor = System.Drawing.Color.White + Me.scanSonstiges.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.scanSonstiges.Cursor = System.Windows.Forms.Cursors.Hand + Me.scanSonstiges.Dock = System.Windows.Forms.DockStyle.Fill + Me.scanSonstiges.Location = New System.Drawing.Point(3, 3) + Me.scanSonstiges.Margin = New System.Windows.Forms.Padding(0) + Me.scanSonstiges.Name = "scanSonstiges" + Me.scanSonstiges.Size = New System.Drawing.Size(250, 191) + Me.scanSonstiges.TabIndex = 0 + ' 'tbcntr ' Me.tbcntr.Controls.Add(Me.tabDok) @@ -129,6 +151,27 @@ Partial Class ustCntlUSTV_AntragPosition Me.tabVollmachten.Text = "Vollmachten" Me.tabVollmachten.UseVisualStyleBackColor = True ' + 'scanUSTVVollmachten + ' + Me.scanUSTVVollmachten._DATENSERVER_KATEGORIE = "DOKUMENTE" + Me.scanUSTVVollmachten._DATENSERVER_ORDNER = "MDM" + Me.scanUSTVVollmachten._DATENSERVER_UOrdner1 = "" + Me.scanUSTVVollmachten._DATENSERVER_UOrdner2 = "" + Me.scanUSTVVollmachten._DATENSERVER_UOrdner3 = "" + Me.scanUSTVVollmachten._OPEN_ORIGINAL = False + Me.scanUSTVVollmachten._TYPE = "PDF" + Me.scanUSTVVollmachten.AllowDrop = True + Me.scanUSTVVollmachten.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.scanUSTVVollmachten.BackColor = System.Drawing.Color.White + Me.scanUSTVVollmachten.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.scanUSTVVollmachten.Cursor = System.Windows.Forms.Cursors.Hand + Me.scanUSTVVollmachten.Dock = System.Windows.Forms.DockStyle.Fill + Me.scanUSTVVollmachten.Location = New System.Drawing.Point(3, 3) + Me.scanUSTVVollmachten.Margin = New System.Windows.Forms.Padding(0) + Me.scanUSTVVollmachten.Name = "scanUSTVVollmachten" + Me.scanUSTVVollmachten.Size = New System.Drawing.Size(250, 191) + Me.scanUSTVVollmachten.TabIndex = 1 + ' 'tabFABest ' Me.tabFABest.Controls.Add(Me.scanUSTVFABest) @@ -139,6 +182,27 @@ Partial Class ustCntlUSTV_AntragPosition Me.tabFABest.Text = "FA_Bestätigung" Me.tabFABest.UseVisualStyleBackColor = True ' + 'scanUSTVFABest + ' + Me.scanUSTVFABest._DATENSERVER_KATEGORIE = "DOKUMENTE" + Me.scanUSTVFABest._DATENSERVER_ORDNER = "MDM" + Me.scanUSTVFABest._DATENSERVER_UOrdner1 = "" + Me.scanUSTVFABest._DATENSERVER_UOrdner2 = "" + Me.scanUSTVFABest._DATENSERVER_UOrdner3 = "" + Me.scanUSTVFABest._OPEN_ORIGINAL = False + Me.scanUSTVFABest._TYPE = "PDF" + Me.scanUSTVFABest.AllowDrop = True + Me.scanUSTVFABest.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.scanUSTVFABest.BackColor = System.Drawing.Color.White + Me.scanUSTVFABest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.scanUSTVFABest.Cursor = System.Windows.Forms.Cursors.Hand + Me.scanUSTVFABest.Dock = System.Windows.Forms.DockStyle.Fill + Me.scanUSTVFABest.Location = New System.Drawing.Point(0, 0) + Me.scanUSTVFABest.Margin = New System.Windows.Forms.Padding(0) + Me.scanUSTVFABest.Name = "scanUSTVFABest" + Me.scanUSTVFABest.Size = New System.Drawing.Size(256, 197) + Me.scanUSTVFABest.TabIndex = 1 + ' 'Label8 ' Me.Label8.AutoSize = True @@ -329,6 +393,7 @@ Partial Class ustCntlUSTV_AntragPosition 'pnl ' Me.pnl.BackColor = System.Drawing.Color.White + Me.pnl.Controls.Add(Me.btnDel) Me.pnl.Controls.Add(Me.cbxAntragsfilter) Me.pnl.Controls.Add(Me.lblWarning) Me.pnl.Controls.Add(Me.btnLeistenderSave) @@ -363,6 +428,20 @@ Partial Class ustCntlUSTV_AntragPosition Me.pnl.Size = New System.Drawing.Size(1300, 239) Me.pnl.TabIndex = 1 ' + 'cbxAntragsfilter + ' + Me.cbxAntragsfilter._date = Nothing + Me.cbxAntragsfilter._showdate = False + Me.cbxAntragsfilter._value = "" + Me.cbxAntragsfilter.AutoSize = True + Me.cbxAntragsfilter.Location = New System.Drawing.Point(779, 29) + Me.cbxAntragsfilter.Name = "cbxAntragsfilter" + Me.cbxAntragsfilter.Size = New System.Drawing.Size(134, 17) + Me.cbxAntragsfilter.TabIndex = 24 + Me.cbxAntragsfilter.Text = "*nach Antr.-Land filtern" + Me.cbxAntragsfilter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter + Me.cbxAntragsfilter.UseVisualStyleBackColor = True + ' 'lblWarning ' Me.lblWarning.AutoSize = True @@ -386,245 +465,6 @@ Partial Class ustCntlUSTV_AntragPosition Me.btnLeistenderSave.UseVisualStyleBackColor = True Me.btnLeistenderSave.Visible = False ' - 'pnlAdresse - ' - Me.pnlAdresse.AccessibleRole = System.Windows.Forms.AccessibleRole.WhiteSpace - Me.pnlAdresse.Controls.Add(Me.txtStrasse) - Me.pnlAdresse.Controls.Add(Me.txtUIDNr) - Me.pnlAdresse.Controls.Add(Me.Label14) - Me.pnlAdresse.Controls.Add(Me.Label17) - Me.pnlAdresse.Controls.Add(Me.Label15) - Me.pnlAdresse.Controls.Add(Me.txtLand) - Me.pnlAdresse.Controls.Add(Me.txtPLZ) - Me.pnlAdresse.Controls.Add(Me.txtStrassenNr) - Me.pnlAdresse.Controls.Add(Me.Label16) - Me.pnlAdresse.Controls.Add(Me.txtOrt) - Me.pnlAdresse.Location = New System.Drawing.Point(626, 76) - Me.pnlAdresse.Name = "pnlAdresse" - Me.pnlAdresse.Size = New System.Drawing.Size(287, 82) - Me.pnlAdresse.TabIndex = 14 - ' - 'Label14 - ' - Me.Label14.AutoSize = True - Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) - Me.Label14.Location = New System.Drawing.Point(4, 5) - Me.Label14.Name = "Label14" - Me.Label14.Size = New System.Drawing.Size(64, 15) - Me.Label14.TabIndex = 23 - Me.Label14.Text = "Strasse/Nr" - ' - 'Label17 - ' - Me.Label17.AutoSize = True - Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) - Me.Label17.Location = New System.Drawing.Point(129, 63) - Me.Label17.Name = "Label17" - Me.Label17.Size = New System.Drawing.Size(45, 15) - Me.Label17.TabIndex = 31 - Me.Label17.Text = "UID-Nr" - ' - 'Label15 - ' - Me.Label15.AutoSize = True - Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) - Me.Label15.Location = New System.Drawing.Point(8, 32) - Me.Label15.Name = "Label15" - Me.Label15.Size = New System.Drawing.Size(48, 15) - Me.Label15.TabIndex = 25 - Me.Label15.Text = "PLZ/Ort" - ' - 'Label16 - ' - Me.Label16.AutoSize = True - Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) - Me.Label16.Location = New System.Drawing.Point(8, 58) - Me.Label16.Name = "Label16" - Me.Label16.Size = New System.Drawing.Size(35, 15) - Me.Label16.TabIndex = 27 - Me.Label16.Text = "Land" - ' - 'Panel1 - ' - Me.Panel1.Controls.Add(Me.btnAPIUbload) - Me.Panel1.Controls.Add(Me.btnBildAuf) - Me.Panel1.Controls.Add(Me.Button1) - Me.Panel1.Dock = System.Windows.Forms.DockStyle.Right - Me.Panel1.Location = New System.Drawing.Point(937, 30) - Me.Panel1.Name = "Panel1" - Me.Panel1.Size = New System.Drawing.Size(99, 239) - Me.Panel1.TabIndex = 2 - ' - 'btnAPIUbload - ' - Me.btnAPIUbload.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom - Me.btnAPIUbload.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.btnAPIUbload.ImageAlign = System.Drawing.ContentAlignment.MiddleRight - Me.btnAPIUbload.Location = New System.Drawing.Point(16, 186) - Me.btnAPIUbload.Name = "btnAPIUbload" - Me.btnAPIUbload.Size = New System.Drawing.Size(71, 24) - Me.btnAPIUbload.TabIndex = 25 - Me.btnAPIUbload.Text = "API-Upload" - Me.btnAPIUbload.UseVisualStyleBackColor = True - ' - 'Panel3 - ' - Me.Panel3.Controls.Add(Me.tbcntr) - Me.Panel3.Controls.Add(Me.Panel4) - Me.Panel3.Dock = System.Windows.Forms.DockStyle.Right - Me.Panel3.Location = New System.Drawing.Point(1036, 30) - Me.Panel3.Name = "Panel3" - Me.Panel3.Size = New System.Drawing.Size(264, 239) - Me.Panel3.TabIndex = 25 - ' - 'Panel4 - ' - Me.Panel4.Controls.Add(Me.TabControl1) - Me.Panel4.Controls.Add(Me.scanLieferschein) - Me.Panel4.Dock = System.Windows.Forms.DockStyle.Top - Me.Panel4.Location = New System.Drawing.Point(0, 0) - Me.Panel4.Name = "Panel4" - Me.Panel4.Size = New System.Drawing.Size(264, 16) - Me.Panel4.TabIndex = 26 - ' - 'TabControl1 - ' - Me.TabControl1.Controls.Add(Me.TabPage1) - Me.TabControl1.Location = New System.Drawing.Point(39, 49) - Me.TabControl1.Name = "TabControl1" - Me.TabControl1.SelectedIndex = 0 - Me.TabControl1.Size = New System.Drawing.Size(278, 239) - Me.TabControl1.TabIndex = 3 - ' - 'TabPage1 - ' - Me.TabPage1.Controls.Add(Me.UsrcntlPDFScanList1) - Me.TabPage1.Location = New System.Drawing.Point(4, 22) - Me.TabPage1.Name = "TabPage1" - Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) - Me.TabPage1.Size = New System.Drawing.Size(270, 213) - Me.TabPage1.TabIndex = 1 - Me.TabPage1.Text = "Dokumente" - Me.TabPage1.UseVisualStyleBackColor = True - ' - 'scanSonstiges - ' - Me.scanSonstiges._DATENSERVER_KATEGORIE = "DOKUMENTE" - Me.scanSonstiges._DATENSERVER_ORDNER = "MDM" - Me.scanSonstiges._DATENSERVER_UOrdner1 = "" - Me.scanSonstiges._DATENSERVER_UOrdner2 = "" - Me.scanSonstiges._DATENSERVER_UOrdner3 = "" - Me.scanSonstiges._OPEN_ORIGINAL = False - Me.scanSonstiges._TYPE = "PDF" - Me.scanSonstiges.AllowDrop = True - Me.scanSonstiges.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.scanSonstiges.BackColor = System.Drawing.Color.White - Me.scanSonstiges.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.scanSonstiges.Cursor = System.Windows.Forms.Cursors.Hand - Me.scanSonstiges.Dock = System.Windows.Forms.DockStyle.Fill - Me.scanSonstiges.Location = New System.Drawing.Point(3, 3) - Me.scanSonstiges.Margin = New System.Windows.Forms.Padding(0) - Me.scanSonstiges.Name = "scanSonstiges" - Me.scanSonstiges.Size = New System.Drawing.Size(250, 191) - Me.scanSonstiges.TabIndex = 0 - ' - 'scanUSTVVollmachten - ' - Me.scanUSTVVollmachten._DATENSERVER_KATEGORIE = "DOKUMENTE" - Me.scanUSTVVollmachten._DATENSERVER_ORDNER = "MDM" - Me.scanUSTVVollmachten._DATENSERVER_UOrdner1 = "" - Me.scanUSTVVollmachten._DATENSERVER_UOrdner2 = "" - Me.scanUSTVVollmachten._DATENSERVER_UOrdner3 = "" - Me.scanUSTVVollmachten._OPEN_ORIGINAL = False - Me.scanUSTVVollmachten._TYPE = "PDF" - Me.scanUSTVVollmachten.AllowDrop = True - Me.scanUSTVVollmachten.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.scanUSTVVollmachten.BackColor = System.Drawing.Color.White - Me.scanUSTVVollmachten.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.scanUSTVVollmachten.Cursor = System.Windows.Forms.Cursors.Hand - Me.scanUSTVVollmachten.Dock = System.Windows.Forms.DockStyle.Fill - Me.scanUSTVVollmachten.Location = New System.Drawing.Point(3, 3) - Me.scanUSTVVollmachten.Margin = New System.Windows.Forms.Padding(0) - Me.scanUSTVVollmachten.Name = "scanUSTVVollmachten" - Me.scanUSTVVollmachten.Size = New System.Drawing.Size(250, 191) - Me.scanUSTVVollmachten.TabIndex = 1 - ' - 'scanUSTVFABest - ' - Me.scanUSTVFABest._DATENSERVER_KATEGORIE = "DOKUMENTE" - Me.scanUSTVFABest._DATENSERVER_ORDNER = "MDM" - Me.scanUSTVFABest._DATENSERVER_UOrdner1 = "" - Me.scanUSTVFABest._DATENSERVER_UOrdner2 = "" - Me.scanUSTVFABest._DATENSERVER_UOrdner3 = "" - Me.scanUSTVFABest._OPEN_ORIGINAL = False - Me.scanUSTVFABest._TYPE = "PDF" - Me.scanUSTVFABest.AllowDrop = True - Me.scanUSTVFABest.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.scanUSTVFABest.BackColor = System.Drawing.Color.White - Me.scanUSTVFABest.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.scanUSTVFABest.Cursor = System.Windows.Forms.Cursors.Hand - Me.scanUSTVFABest.Dock = System.Windows.Forms.DockStyle.Fill - Me.scanUSTVFABest.Location = New System.Drawing.Point(0, 0) - Me.scanUSTVFABest.Margin = New System.Windows.Forms.Padding(0) - Me.scanUSTVFABest.Name = "scanUSTVFABest" - Me.scanUSTVFABest.Size = New System.Drawing.Size(256, 197) - Me.scanUSTVFABest.TabIndex = 1 - ' - 'UsrcntlPDFScanList1 - ' - Me.UsrcntlPDFScanList1._DATENSERVER_KATEGORIE = "DOKUMENTE" - Me.UsrcntlPDFScanList1._DATENSERVER_ORDNER = "MDM" - Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner1 = "" - Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner2 = "" - Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner3 = "" - Me.UsrcntlPDFScanList1._OPEN_ORIGINAL = False - Me.UsrcntlPDFScanList1._TYPE = "PDF" - Me.UsrcntlPDFScanList1.AllowDrop = True - Me.UsrcntlPDFScanList1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.UsrcntlPDFScanList1.BackColor = System.Drawing.Color.White - Me.UsrcntlPDFScanList1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.UsrcntlPDFScanList1.Cursor = System.Windows.Forms.Cursors.Hand - Me.UsrcntlPDFScanList1.Dock = System.Windows.Forms.DockStyle.Fill - Me.UsrcntlPDFScanList1.Location = New System.Drawing.Point(3, 3) - Me.UsrcntlPDFScanList1.Margin = New System.Windows.Forms.Padding(0) - Me.UsrcntlPDFScanList1.Name = "UsrcntlPDFScanList1" - Me.UsrcntlPDFScanList1.Size = New System.Drawing.Size(264, 207) - Me.UsrcntlPDFScanList1.TabIndex = 0 - ' - 'scanLieferschein - ' - Me.scanLieferschein._ARCHIV = True - Me.scanLieferschein._DATENSERVER_KATEGORIE = "DOKUMENTE" - Me.scanLieferschein._DATENSERVER_ORDNER = "MDM" - Me.scanLieferschein._DATENSERVER_UOrdner1 = Nothing - Me.scanLieferschein._DATENSERVER_UOrdner2 = Nothing - Me.scanLieferschein._DATENSERVER_UOrdner3 = Nothing - Me.scanLieferschein._MULTI_FILES = True - Me.scanLieferschein._TEXT_PDF = "XX Vollmacht" - Me.scanLieferschein.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.scanLieferschein.BackColor = System.Drawing.Color.White - Me.scanLieferschein.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.scanLieferschein.Cursor = System.Windows.Forms.Cursors.Default - Me.scanLieferschein.Location = New System.Drawing.Point(146, 3) - Me.scanLieferschein.Name = "scanLieferschein" - Me.scanLieferschein.Size = New System.Drawing.Size(111, 34) - Me.scanLieferschein.TabIndex = 2 - Me.scanLieferschein.Visible = False - ' - 'cbxAntragsfilter - ' - Me.cbxAntragsfilter._date = Nothing - Me.cbxAntragsfilter._showdate = False - Me.cbxAntragsfilter._value = "" - Me.cbxAntragsfilter.AutoSize = True - Me.cbxAntragsfilter.Location = New System.Drawing.Point(779, 29) - Me.cbxAntragsfilter.Name = "cbxAntragsfilter" - Me.cbxAntragsfilter.Size = New System.Drawing.Size(134, 17) - Me.cbxAntragsfilter.TabIndex = 24 - Me.cbxAntragsfilter.Text = "*nach Antr.-Land filtern" - Me.cbxAntragsfilter.TextAlign = System.Drawing.ContentAlignment.MiddleCenter - Me.cbxAntragsfilter.UseVisualStyleBackColor = True - ' 'sbLeistender ' Me.sbLeistender._allowFreitext = True @@ -650,6 +490,24 @@ Partial Class ustCntlUSTV_AntragPosition Me.sbLeistender.TabIndex = 9 Me.sbLeistender.usrcntl = Nothing ' + 'pnlAdresse + ' + Me.pnlAdresse.AccessibleRole = System.Windows.Forms.AccessibleRole.WhiteSpace + Me.pnlAdresse.Controls.Add(Me.txtStrasse) + Me.pnlAdresse.Controls.Add(Me.txtUIDNr) + Me.pnlAdresse.Controls.Add(Me.Label14) + Me.pnlAdresse.Controls.Add(Me.Label17) + Me.pnlAdresse.Controls.Add(Me.Label15) + Me.pnlAdresse.Controls.Add(Me.txtLand) + Me.pnlAdresse.Controls.Add(Me.txtPLZ) + Me.pnlAdresse.Controls.Add(Me.txtStrassenNr) + Me.pnlAdresse.Controls.Add(Me.Label16) + Me.pnlAdresse.Controls.Add(Me.txtOrt) + Me.pnlAdresse.Location = New System.Drawing.Point(626, 76) + Me.pnlAdresse.Name = "pnlAdresse" + Me.pnlAdresse.Size = New System.Drawing.Size(287, 82) + Me.pnlAdresse.TabIndex = 14 + ' 'txtStrasse ' Me.txtStrasse._DateTimeOnly = False @@ -698,6 +556,36 @@ Partial Class ustCntlUSTV_AntragPosition Me.txtUIDNr.Size = New System.Drawing.Size(106, 20) Me.txtUIDNr.TabIndex = 15 ' + 'Label14 + ' + Me.Label14.AutoSize = True + Me.Label14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) + Me.Label14.Location = New System.Drawing.Point(4, 5) + Me.Label14.Name = "Label14" + Me.Label14.Size = New System.Drawing.Size(64, 15) + Me.Label14.TabIndex = 23 + Me.Label14.Text = "Strasse/Nr" + ' + 'Label17 + ' + Me.Label17.AutoSize = True + Me.Label17.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) + Me.Label17.Location = New System.Drawing.Point(129, 63) + Me.Label17.Name = "Label17" + Me.Label17.Size = New System.Drawing.Size(45, 15) + Me.Label17.TabIndex = 31 + Me.Label17.Text = "UID-Nr" + ' + 'Label15 + ' + Me.Label15.AutoSize = True + Me.Label15.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) + Me.Label15.Location = New System.Drawing.Point(8, 32) + Me.Label15.Name = "Label15" + Me.Label15.Size = New System.Drawing.Size(48, 15) + Me.Label15.TabIndex = 25 + Me.Label15.Text = "PLZ/Ort" + ' 'txtLand ' Me.txtLand._DateTimeOnly = False @@ -770,6 +658,16 @@ Partial Class ustCntlUSTV_AntragPosition Me.txtStrassenNr.Size = New System.Drawing.Size(45, 20) Me.txtStrassenNr.TabIndex = 11 ' + 'Label16 + ' + Me.Label16.AutoSize = True + Me.Label16.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.5!) + Me.Label16.Location = New System.Drawing.Point(8, 58) + Me.Label16.Name = "Label16" + Me.Label16.Size = New System.Drawing.Size(35, 15) + Me.Label16.TabIndex = 27 + Me.Label16.Text = "Land" + ' 'txtOrt ' Me.txtOrt._DateTimeOnly = False @@ -979,6 +877,123 @@ Partial Class ustCntlUSTV_AntragPosition Me.txtUSTBetrag.Size = New System.Drawing.Size(154, 20) Me.txtUSTBetrag.TabIndex = 17 ' + 'Panel1 + ' + Me.Panel1.Controls.Add(Me.btnAPIUbload) + Me.Panel1.Controls.Add(Me.btnBildAuf) + Me.Panel1.Controls.Add(Me.Button1) + Me.Panel1.Dock = System.Windows.Forms.DockStyle.Right + Me.Panel1.Location = New System.Drawing.Point(937, 30) + Me.Panel1.Name = "Panel1" + Me.Panel1.Size = New System.Drawing.Size(99, 239) + Me.Panel1.TabIndex = 2 + ' + 'btnAPIUbload + ' + Me.btnAPIUbload.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.btnAPIUbload.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnAPIUbload.ImageAlign = System.Drawing.ContentAlignment.MiddleRight + Me.btnAPIUbload.Location = New System.Drawing.Point(16, 186) + Me.btnAPIUbload.Name = "btnAPIUbload" + Me.btnAPIUbload.Size = New System.Drawing.Size(71, 24) + Me.btnAPIUbload.TabIndex = 25 + Me.btnAPIUbload.Text = "API-Upload" + Me.btnAPIUbload.UseVisualStyleBackColor = True + ' + 'Panel3 + ' + Me.Panel3.Controls.Add(Me.tbcntr) + Me.Panel3.Controls.Add(Me.Panel4) + Me.Panel3.Dock = System.Windows.Forms.DockStyle.Right + Me.Panel3.Location = New System.Drawing.Point(1036, 30) + Me.Panel3.Name = "Panel3" + Me.Panel3.Size = New System.Drawing.Size(264, 239) + Me.Panel3.TabIndex = 25 + ' + 'Panel4 + ' + Me.Panel4.Controls.Add(Me.TabControl1) + Me.Panel4.Controls.Add(Me.scanLieferschein) + Me.Panel4.Dock = System.Windows.Forms.DockStyle.Top + Me.Panel4.Location = New System.Drawing.Point(0, 0) + Me.Panel4.Name = "Panel4" + Me.Panel4.Size = New System.Drawing.Size(264, 16) + Me.Panel4.TabIndex = 26 + ' + 'TabControl1 + ' + Me.TabControl1.Controls.Add(Me.TabPage1) + Me.TabControl1.Location = New System.Drawing.Point(39, 49) + Me.TabControl1.Name = "TabControl1" + Me.TabControl1.SelectedIndex = 0 + Me.TabControl1.Size = New System.Drawing.Size(278, 239) + Me.TabControl1.TabIndex = 3 + ' + 'TabPage1 + ' + Me.TabPage1.Controls.Add(Me.UsrcntlPDFScanList1) + Me.TabPage1.Location = New System.Drawing.Point(4, 22) + Me.TabPage1.Name = "TabPage1" + Me.TabPage1.Padding = New System.Windows.Forms.Padding(3) + Me.TabPage1.Size = New System.Drawing.Size(270, 213) + Me.TabPage1.TabIndex = 1 + Me.TabPage1.Text = "Dokumente" + Me.TabPage1.UseVisualStyleBackColor = True + ' + 'UsrcntlPDFScanList1 + ' + Me.UsrcntlPDFScanList1._DATENSERVER_KATEGORIE = "DOKUMENTE" + Me.UsrcntlPDFScanList1._DATENSERVER_ORDNER = "MDM" + Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner1 = "" + Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner2 = "" + Me.UsrcntlPDFScanList1._DATENSERVER_UOrdner3 = "" + Me.UsrcntlPDFScanList1._OPEN_ORIGINAL = False + Me.UsrcntlPDFScanList1._TYPE = "PDF" + Me.UsrcntlPDFScanList1.AllowDrop = True + Me.UsrcntlPDFScanList1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.UsrcntlPDFScanList1.BackColor = System.Drawing.Color.White + Me.UsrcntlPDFScanList1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.UsrcntlPDFScanList1.Cursor = System.Windows.Forms.Cursors.Hand + Me.UsrcntlPDFScanList1.Dock = System.Windows.Forms.DockStyle.Fill + Me.UsrcntlPDFScanList1.Location = New System.Drawing.Point(3, 3) + Me.UsrcntlPDFScanList1.Margin = New System.Windows.Forms.Padding(0) + Me.UsrcntlPDFScanList1.Name = "UsrcntlPDFScanList1" + Me.UsrcntlPDFScanList1.Size = New System.Drawing.Size(264, 207) + Me.UsrcntlPDFScanList1.TabIndex = 0 + ' + 'scanLieferschein + ' + Me.scanLieferschein._ARCHIV = True + Me.scanLieferschein._DATENSERVER_KATEGORIE = "DOKUMENTE" + Me.scanLieferschein._DATENSERVER_ORDNER = "MDM" + Me.scanLieferschein._DATENSERVER_UOrdner1 = Nothing + Me.scanLieferschein._DATENSERVER_UOrdner2 = Nothing + Me.scanLieferschein._DATENSERVER_UOrdner3 = Nothing + Me.scanLieferschein._MULTI_FILES = True + Me.scanLieferschein._TEXT_PDF = "XX Vollmacht" + Me.scanLieferschein.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink + Me.scanLieferschein.BackColor = System.Drawing.Color.White + Me.scanLieferschein.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle + Me.scanLieferschein.Cursor = System.Windows.Forms.Cursors.Default + Me.scanLieferschein.Location = New System.Drawing.Point(146, 3) + Me.scanLieferschein.Name = "scanLieferschein" + Me.scanLieferschein.Size = New System.Drawing.Size(111, 34) + Me.scanLieferschein.TabIndex = 2 + Me.scanLieferschein.Visible = False + ' + 'btnDel + ' + Me.btnDel.BackgroundImage = Global.SDL.My.Resources.Resources.del + Me.btnDel.BackgroundImageLayout = System.Windows.Forms.ImageLayout.Zoom + Me.btnDel.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.btnDel.Location = New System.Drawing.Point(834, 162) + Me.btnDel.Name = "btnDel" + Me.btnDel.Size = New System.Drawing.Size(36, 24) + Me.btnDel.TabIndex = 25 + Me.btnDel.TextAlign = System.Drawing.ContentAlignment.TopCenter + Me.btnDel.UseVisualStyleBackColor = True + Me.btnDel.Visible = False + ' 'ustCntlUSTV_AntragPosition ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -1065,4 +1080,5 @@ Partial Class ustCntlUSTV_AntragPosition Friend WithEvents lblWarning As Label Friend WithEvents cbxAntragsfilter As VERAG_PROG_ALLGEMEIN.MyCheckBoxValue Friend WithEvents btnAPIUbload As Button + Friend WithEvents btnDel As Button End Class diff --git a/SDL/USTV/ustCntlUSTV_AntragPosition.vb b/SDL/USTV/ustCntlUSTV_AntragPosition.vb index a2d397ba..250397f4 100644 --- a/SDL/USTV/ustCntlUSTV_AntragPosition.vb +++ b/SDL/USTV/ustCntlUSTV_AntragPosition.vb @@ -265,6 +265,7 @@ Public Class ustCntlUSTV_AntragPosition txtOrt.Text = "" txtLand.Text = "" txtUIDNr.Text = "" + btnDel.Visible = False Else pnlAdresse.Enabled = True 'enablePanel 'immer änderbar! @@ -274,7 +275,12 @@ Public Class ustCntlUSTV_AntragPosition txtOrt.Text = If(UStV_Leist.UstV_Leistender_Stadt, "") txtLand.Text = If(UStV_Leist.UstV_Leistender_Land, "") txtUIDNr.Text = If(UStV_Leist.UstV_Leistender_UstNr, "") - If UStV_Leist.hasEntry Then adressLoadedByLeistender = True + If UStV_Leist.hasEntry Then + adressLoadedByLeistender = True + btnDel.Visible = True + Else + btnDel.Visible = False + End If End If @@ -340,6 +346,7 @@ Public Class ustCntlUSTV_AntragPosition End If Else + Dim adresseChanged As Boolean = False If UStV_Leist.UstV_Leistender_Strasse <> If(txtStrasse.Text, "") Then adresseChanged = True @@ -409,6 +416,7 @@ Public Class ustCntlUSTV_AntragPosition cboSchnittstellennr.Items.Add(New MyListItem("MSE neu", 9)) cboSchnittstellennr.Items.Add(New MyListItem("UTA neu", 10)) cboSchnittstellennr.Items.Add(New MyListItem("PLOSE neu", 11)) + cboSchnittstellennr.Items.Add(New MyListItem("IDS neu", 12)) End If End Sub @@ -431,7 +439,7 @@ Public Class ustCntlUSTV_AntragPosition End Sub - Private Sub txtUSTBetrag_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtUSTBetrag.PreviewKeyDown, txtUSTBetragEUR.PreviewKeyDown, txtRgDatum.PreviewKeyDown, txtRgNr.PreviewKeyDown, txtUmrechnungskurs.PreviewKeyDown, sbLeistender.PreviewKeyDown + Private Sub txtUSTBetrag_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtUSTBetrag.PreviewKeyDown, txtUSTBetragEUR.PreviewKeyDown, txtRgDatum.PreviewKeyDown, txtRgNr.PreviewKeyDown, txtUmrechnungskurs.PreviewKeyDown, sbLeistender.PreviewKeyDown, txtLeistungsbezeichnung.PreviewKeyDown If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVA_bearbeiten", Me.FindForm) Then Exit Sub If gridAktiv And Me.FindForm IsNot Nothing Then @@ -540,13 +548,20 @@ Public Class ustCntlUSTV_AntragPosition 'If IsDate(txtRgDatum.Text) Then txtChanged = True End If + ElseIf sender Is txtLeistungsbezeichnung Then + + txtChanged = True + + ElseIf sender Is sbLeistender Then If sbLeistender.Text <> "" Then If sbLeistender.Text IsNot Nothing AndAlso sbLeistender.Text <> "" Then If IsNumeric(sbLeistender.Text) Then + If UStV_Leist.UStV_LeistenderId <> sbLeistender.Text OrElse UStV_POS.UStVPo_LeistenderId <> sbLeistender.Text Then txtChanged = True UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(CInt(sbLeistender.Text)) Else + If UStV_Leist.UStV_Leistender <> sbLeistender.Text OrElse UStV_POS.UStVPo_Leistender <> sbLeistender.Text Then txtChanged = True UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(sbLeistender.Text) End If @@ -725,7 +740,7 @@ Public Class ustCntlUSTV_AntragPosition End Sub - Private Sub txtStrasse_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtStrasse.PreviewKeyDown, txtPLZ.PreviewKeyDown, txtOrt.PreviewKeyDown, txtLand.PreviewKeyDown, txtStrassenNr.PreviewKeyDown + Private Sub txtStrasse_PreviewKeyDown(sender As Object, e As PreviewKeyDownEventArgs) Handles txtStrasse.PreviewKeyDown, txtPLZ.PreviewKeyDown, txtOrt.PreviewKeyDown, txtLand.PreviewKeyDown, txtStrassenNr.PreviewKeyDown, txtUIDNr.PreviewKeyDown If gridAktiv And Me.FindForm IsNot Nothing Then @@ -749,5 +764,35 @@ Public Class ustCntlUSTV_AntragPosition + End Sub + + Private Sub btnDel_Click(sender As Object, e As EventArgs) Handles btnDel.Click + + Dim leistNew = sbLeistender.Text + UStV_Leist = New VERAG_PROG_ALLGEMEIN.cUStVLeistender(leistNew) + + If UStV_Leist.hasEntry Then + + If Not VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("MDM_USTVALeistender_deaktiveren", Me.FindForm) Then + MsgBox("Nicht berechtigt!") + Exit Sub + End If + + If Not vbYes = MsgBox("Soll der Leistende " & UStV_Leist.UStV_Leistender & " gelöscht werden?", vbYesNo) Then Exit Sub + + UStV_Leist.UstV_aktiv = False + UStV_Leist.SAVE() + sbLeistender.Text = "" + sbLeistender._value = "" + UStV_POS.UStVPo_LeistenderId = -1 + UStV_POS.UStVPo_Leistender = "" + values_changed() + btnDel.Visible = False + + + End If + + + End Sub End Class diff --git a/VERAG_PROG_ALLGEMEIN/Classes/USTV/cUStVLeistender.vb b/VERAG_PROG_ALLGEMEIN/Classes/USTV/cUStVLeistender.vb index 1e98a85d..35f933e6 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/USTV/cUStVLeistender.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/USTV/cUStVLeistender.vb @@ -12,6 +12,7 @@ Public Class cUStVLeistender Property UstV_Leistender_UstNr As Object = Nothing Property UstV_Leistender_Adresse As Boolean Property UStV_LeistenderId As Integer + Property UstV_aktiv As Boolean Public hasEntry = False @@ -52,6 +53,7 @@ Public Class cUStVLeistender list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_UstNr", UstV_Leistender_UstNr)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_Leistender_Adresse", UstV_Leistender_Adresse)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UStV_LeistenderId", UStV_LeistenderId,, True)) + list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("UstV_aktiv", UstV_aktiv)) Return list End Function diff --git a/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb b/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb index a7df8f09..eff94a60 100644 --- a/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb +++ b/VERAG_PROG_ALLGEMEIN/Classes/cMDMFunctionsAllgemein.vb @@ -988,7 +988,7 @@ Public Class cMDMFunctionsAllgemein For page As Integer = 1 To pdfReader.NumberOfPages Dim canvas As PdfContentByte = stamper.GetOverContent(page) Dim bf As BaseFont = BaseFont.CreateFont(BaseFont.HELVETICA, BaseFont.WINANSI, BaseFont.EMBEDDED) - canvas.SetFontAndSize(bf, 12) + canvas.SetFontAndSize(bf, 16) canvas.BeginText() 'The origin (0,0) is at the bottom-left corner of the page and represent coordinates in points!!!!! diff --git a/VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb b/VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb index 81a51c39..c0e7d2ee 100644 --- a/VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb +++ b/VERAG_PROG_ALLGEMEIN/frmScan.Designer.vb @@ -22,7 +22,6 @@ Partial Class frmScan 'Das Bearbeiten mit dem Code-Editor ist nicht möglich. _ Private Sub InitializeComponent() - Me.components = New System.ComponentModel.Container() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmScan)) Me.dsViewer = New Dynamsoft.Forms.DSViewer() Me.btn = New System.Windows.Forms.Button() @@ -57,7 +56,8 @@ Partial Class frmScan Me.tbxCurrentImageIndex = New System.Windows.Forms.Label() Me.tbxTotalImageNum = New System.Windows.Forms.Label() Me.pnl = New System.Windows.Forms.Panel() - Me.UsrcntlPDFScan1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScan() + Me.cbxAltFormat = New System.Windows.Forms.CheckBox() + Me.cboFormat = New System.Windows.Forms.ComboBox() Me.grpFarbe.SuspendLayout() Me.grpTyp.SuspendLayout() Me.pnl.SuspendLayout() @@ -89,7 +89,7 @@ Partial Class frmScan Me.btnScan.Enabled = False Me.btnScan.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.btnScan.Font = New System.Drawing.Font("Microsoft Sans Serif", 14.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.btnScan.Location = New System.Drawing.Point(477, 132) + Me.btnScan.Location = New System.Drawing.Point(476, 157) Me.btnScan.Name = "btnScan" Me.btnScan.Size = New System.Drawing.Size(254, 59) Me.btnScan.TabIndex = 2 @@ -139,7 +139,7 @@ Partial Class frmScan ' Me.lblDateiname.AutoSize = True Me.lblDateiname.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.lblDateiname.Location = New System.Drawing.Point(473, 566) + Me.lblDateiname.Location = New System.Drawing.Point(473, 546) Me.lblDateiname.Name = "lblDateiname" Me.lblDateiname.Size = New System.Drawing.Size(61, 13) Me.lblDateiname.TabIndex = 7 @@ -205,9 +205,9 @@ Partial Class frmScan 'cboSource ' Me.cboSource.FormattingEnabled = True - Me.cboSource.Location = New System.Drawing.Point(477, 105) + Me.cboSource.Location = New System.Drawing.Point(480, 105) Me.cboSource.Name = "cboSource" - Me.cboSource.Size = New System.Drawing.Size(254, 21) + Me.cboSource.Size = New System.Drawing.Size(251, 21) Me.cboSource.TabIndex = 9 ' 'rdbtnRGB @@ -267,7 +267,7 @@ Partial Class frmScan Me.grpTyp.Controls.Add(Me.rdbtnBMP) Me.grpTyp.Controls.Add(Me.rdbtnPNG) Me.grpTyp.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - Me.grpTyp.Location = New System.Drawing.Point(477, 493) + Me.grpTyp.Location = New System.Drawing.Point(477, 473) Me.grpTyp.Name = "grpTyp" Me.grpTyp.Size = New System.Drawing.Size(254, 64) Me.grpTyp.TabIndex = 11 @@ -279,15 +279,17 @@ Partial Class frmScan Me.tbxSaveFileName._DateTimeOnly = False Me.tbxSaveFileName._numbersOnly = False Me.tbxSaveFileName._numbersOnlyKommastellen = "" + Me.tbxSaveFileName._numbersOnlyTrennzeichen = True Me.tbxSaveFileName._Prozent = False Me.tbxSaveFileName._ShortDateNew = False Me.tbxSaveFileName._ShortDateOnly = False Me.tbxSaveFileName._TimeOnly = False + Me.tbxSaveFileName._TimeOnly_Seconds = False Me.tbxSaveFileName._value = Nothing Me.tbxSaveFileName._Waehrung = False Me.tbxSaveFileName._WaehrungZeichen = True Me.tbxSaveFileName.ForeColor = System.Drawing.Color.Black - Me.tbxSaveFileName.Location = New System.Drawing.Point(536, 563) + Me.tbxSaveFileName.Location = New System.Drawing.Point(536, 543) Me.tbxSaveFileName.MaxLineLength = -1 Me.tbxSaveFileName.MaxLines_Warning = "" Me.tbxSaveFileName.MaxLines_Warning_Label = Nothing @@ -432,7 +434,8 @@ Partial Class frmScan ' 'pnl ' - Me.pnl.Controls.Add(Me.UsrcntlPDFScan1) + Me.pnl.Controls.Add(Me.cbxAltFormat) + Me.pnl.Controls.Add(Me.cboFormat) Me.pnl.Controls.Add(Me.Label2) Me.pnl.Controls.Add(Me.dsViewer) Me.pnl.Controls.Add(Me.Button3) @@ -461,25 +464,25 @@ Partial Class frmScan Me.pnl.Size = New System.Drawing.Size(741, 683) Me.pnl.TabIndex = 21 ' - 'UsrcntlPDFScan1 + 'cbxAltFormat ' - Me.UsrcntlPDFScan1._ARCHIV = False - Me.UsrcntlPDFScan1._DATENSERVER_KATEGORIE = "DOKUMENTE" - Me.UsrcntlPDFScan1._DATENSERVER_ORDNER = "" - Me.UsrcntlPDFScan1._DATENSERVER_UOrdner1 = "" - Me.UsrcntlPDFScan1._DATENSERVER_UOrdner2 = "" - Me.UsrcntlPDFScan1._DATENSERVER_UOrdner3 = "" - Me.UsrcntlPDFScan1._MULTI_FILES = False - Me.UsrcntlPDFScan1._TEXT_PDF = Nothing - Me.UsrcntlPDFScan1.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink - Me.UsrcntlPDFScan1.BackColor = System.Drawing.Color.White - Me.UsrcntlPDFScan1.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle - Me.UsrcntlPDFScan1.Cursor = System.Windows.Forms.Cursors.Hand - Me.UsrcntlPDFScan1.Location = New System.Drawing.Point(344, 349) - Me.UsrcntlPDFScan1.Name = "UsrcntlPDFScan1" - Me.UsrcntlPDFScan1.Size = New System.Drawing.Size(8, 8) - Me.UsrcntlPDFScan1.TabIndex = 21 - Me.UsrcntlPDFScan1.Visible = False + Me.cbxAltFormat.AutoSize = True + Me.cbxAltFormat.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + Me.cbxAltFormat.Location = New System.Drawing.Point(477, 569) + Me.cbxAltFormat.Name = "cbxAltFormat" + Me.cbxAltFormat.Size = New System.Drawing.Size(88, 17) + Me.cbxAltFormat.TabIndex = 9 + Me.cbxAltFormat.Text = "speichern als" + Me.cbxAltFormat.UseVisualStyleBackColor = True + ' + 'cboFormat + ' + Me.cboFormat.Enabled = False + Me.cboFormat.FormattingEnabled = True + Me.cboFormat.Location = New System.Drawing.Point(594, 565) + Me.cboFormat.Name = "cboFormat" + Me.cboFormat.Size = New System.Drawing.Size(133, 21) + Me.cboFormat.TabIndex = 22 ' 'frmScan ' @@ -534,5 +537,6 @@ Partial Class frmScan Friend WithEvents tbxCurrentImageIndex As System.Windows.Forms.Label Friend WithEvents tbxTotalImageNum As System.Windows.Forms.Label Friend WithEvents pnl As System.Windows.Forms.Panel - Friend WithEvents UsrcntlPDFScan1 As usrcntlPDFScan + Friend WithEvents cboFormat As Windows.Forms.ComboBox + Friend WithEvents cbxAltFormat As Windows.Forms.CheckBox End Class diff --git a/VERAG_PROG_ALLGEMEIN/frmScan.vb b/VERAG_PROG_ALLGEMEIN/frmScan.vb index 96cfca62..31f27ba6 100644 --- a/VERAG_PROG_ALLGEMEIN/frmScan.vb +++ b/VERAG_PROG_ALLGEMEIN/frmScan.vb @@ -18,6 +18,10 @@ Imports Dynamsoft.Core.Annotation Imports Dynamsoft.TWAIN.Interface Imports Dynamsoft.Core.Enums Imports System.IO +Imports Dynamsoft.TWAIN.Enums +Imports Dynamsoft.DotTwain +Imports ClosedXML.Excel +Imports Dynamsoft.PDF.Enums 'Aktuell3 @@ -61,6 +65,23 @@ Public Class frmScan End Sub + Public Enum TwainSupportedSizes As UShort + TWSS_NONE = 0 + TWSS_A4 = 1 + TWSS_JISB5 = 2 + TWSS_USLETTER = 3 + TWSS_USLEGAL = 4 + TWSS_A5 = 5 + TWSS_ISOB4 = 6 + TWSS_ISOB6 = 7 + TWSS_USLEDGER = 9 + TWSS_USEXECUTIVE = 10 + TWSS_A3 = 11 + TWSS_B4 = 12 + TWSS_B6 = 13 + TWSS_BUSINESSCARD = 14 + End Enum + Public Sub OnPostAllTransfers() Implements IAcquireCallback.OnPostAllTransfers Me.Invoke(New CrossThreadOperationControl(AddressOf CallMe)) @@ -132,11 +153,11 @@ Public Class frmScan dsViewer.Bind(m_ImageCore) End Sub - _ + Private Shared Function GetSystemDirectory( lpBuffer As StringBuilder, uSize As UInteger) As UInteger End Function - _ + Private Shared Function GetWindowsDirectory( lpBuffer As StringBuilder, uSize As UInteger) As UInteger End Function @@ -267,6 +288,10 @@ Public Class frmScan m_TwainManager.SelectSourceByIndex(sSourceIndex) + + + 'm_TwainManager.SetImageLayout(New Dynamsoft.Common.Margin(0.0, 0.0, width, height)) + ''vor Opensource 'Dim tmpFile = Path.GetTempFileName & ".pdf" 'tmpFile = "D:\Andreas\Dokumente\temptest<>.pdf" @@ -314,6 +339,10 @@ Public Class frmScan End If m_TwainManager.Resolution = Integer.Parse(cboResolution.Text) + 'Dim selectedPaper = CType(cboFormat.SelectedItem, KeyValuePair(Of String, Tuple(Of Double, Double))) + 'Dim width = selectedPaper.Value.Item1 + 'Dim height = selectedPaper.Value.Item2 + 'm_TwainManager.sca() @@ -400,6 +429,30 @@ Public Class frmScan ' hasWebcamSource = true; hasTwainSource = True Next + + + + cboFormat.Items.Clear() + + 'Dim formats As New List(Of KeyValuePair(Of String, EnumPageSize)) From { + ' New KeyValuePair(Of String, EnumPageSize)(" ", EnumPageSize.ImageSize), + ' New KeyValuePair(Of String, EnumPageSize)("A4", EnumPageSize.A4), + ' New KeyValuePair(Of String, EnumPageSize)("Legal", EnumPageSize.Legal), + ' New KeyValuePair(Of String, EnumPageSize)("Letter", EnumPageSize.Letter) + ' } + + 'cboFormat.DataSource = formats + + + Dim items = [Enum].GetValues(GetType(EnumPageSize)).Cast(Of EnumPageSize)().Select(Function(e) New KeyValuePair(Of String, EnumPageSize)(e.ToString(), e)).ToList() + + With cboFormat + .DataSource = items + .DisplayMember = "Key" + .ValueMember = "Value" + End With + + If hasTwainSource Then cboSource.Enabled = True ' chkShowUI.Enabled = True @@ -438,6 +491,12 @@ Public Class frmScan Try Select Case ART Case "DirectScan" + + If cboFormat.SelectedIndex >= 0 Then + Dim selectedPaper As EnumPageSize = CType(cboFormat.SelectedValue, EnumPageSize) + If cbxAltFormat.Checked Then m_PDFCreator.PageSize = selectedPaper + End If + Dim PDF_bytes As Byte() = m_PDFCreator.SaveAsBytes(TryCast(Me, ISave)) Me.fileName = addExtension(tbxSaveFileName.Text) ' DS.LAST_ID Me.ReturnValue = PDF_bytes ' DS.LAST_ID @@ -531,7 +590,10 @@ Public Class frmScan SaveFileDialog.DefaultExt = "pdf" If SaveFileDialog.ShowDialog() = DialogResult.OK Then ' Multi page PDF - + If cboFormat.SelectedIndex >= 0 Then + Dim selectedPaper As EnumPageSize = CType(cboFormat.SelectedValue, EnumPageSize) + If cbxAltFormat.Checked Then m_PDFCreator.PageSize = selectedPaper + End If m_PDFCreator.Save(TryCast(Me, ISave), SaveFileDialog.FileName) End If End If @@ -575,12 +637,12 @@ Public Class frmScan Dim iHeight As Integer = (tempAnnotation.EndPoint.X - tempAnnotation.StartPoint.X) Select Case tempAnnotation.AnnotationType 'case AnnotationType.enumLine: - Case AnnotationType.enumEllipse, AnnotationType.enumRectangle, AnnotationType.enumText + Case Dynamsoft.Core.Enums.AnnotationType.enumEllipse, Dynamsoft.Core.Enums.AnnotationType.enumRectangle, Dynamsoft.Core.Enums.AnnotationType.enumText tempAnnotation.StartPoint = New Point(x, y) 'tempAnnotation.Size = new Size(iWidth, iHeight); tempAnnotation.EndPoint = New Point((tempAnnotation.StartPoint.X + iWidth), (tempAnnotation.StartPoint.Y + iHeight)) Exit Select - Case AnnotationType.enumLine + Case Dynamsoft.Core.Enums.AnnotationType.enumLine Dim startPoint As Point = tempAnnotation.StartPoint x = startPoint.Y y = iImageWidth - startPoint.X @@ -608,11 +670,11 @@ Public Class frmScan Dim iHeight As Integer = tempAnnotation.Size.Width Select Case tempAnnotation.AnnotationType 'case AnnotationType.enumLine: - Case AnnotationType.enumEllipse, AnnotationType.enumRectangle, AnnotationType.enumText + Case Dynamsoft.Core.Enums.AnnotationType.enumEllipse, Dynamsoft.Core.Enums.AnnotationType.enumRectangle, Dynamsoft.Core.Enums.AnnotationType.enumText tempAnnotation.StartPoint = New Point(x, y) tempAnnotation.EndPoint = New Point((tempAnnotation.StartPoint.X + iWidth), (tempAnnotation.StartPoint.Y + iHeight)) Exit Select - Case AnnotationType.enumLine + Case Dynamsoft.Core.Enums.AnnotationType.enumLine Dim startPoint As Point = tempAnnotation.StartPoint x = iImageHeight - startPoint.Y y = startPoint.X @@ -708,6 +770,10 @@ Public Class frmScan Case "QuickScan" Do startScan() + If cboFormat.SelectedIndex >= 0 Then + Dim selectedPaper As EnumPageSize = CType(cboFormat.SelectedValue, EnumPageSize) + If cbxAltFormat.Checked Then m_PDFCreator.PageSize = selectedPaper + End If Dim PDF_bytes As Byte() = m_PDFCreator.SaveAsBytes(TryCast(Me, ISave)) Me.fileName = addExtension(tbxSaveFileName.Text) ' DS.LAST_ID Me.ReturnValue = PDF_bytes ' DS.LAST_ID @@ -754,6 +820,10 @@ Public Class frmScan Return True 'Throw New NotImplementedException() End Function + + Private Sub cbxAltFormat_CheckedChanged(sender As Object, e As EventArgs) Handles cbxAltFormat.CheckedChanged + cboFormat.Enabled = cbxAltFormat.Checked + End Sub End Class