diff --git a/SDL/My Project/AssemblyInfo.vb b/SDL/My Project/AssemblyInfo.vb index ded1e0b1..2ed9f5cd 100644 --- a/SDL/My Project/AssemblyInfo.vb +++ b/SDL/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/SDL/mdm/frmMDMDatenverarbetiung.Designer.vb b/SDL/mdm/frmMDMDatenverarbetiung.Designer.vb index 0fe9a2b7..a7f9efcd 100644 --- a/SDL/mdm/frmMDMDatenverarbetiung.Designer.vb +++ b/SDL/mdm/frmMDMDatenverarbetiung.Designer.vb @@ -47,6 +47,11 @@ Partial Class frmMDMDatenverarbetiung Me.Label1 = New System.Windows.Forms.Label() Me.lbl = New System.Windows.Forms.Label() Me.Panel1 = New System.Windows.Forms.Panel() + Me.pnlAsfinag = New System.Windows.Forms.Panel() + Me.bntDatumzuruecksetzen = New System.Windows.Forms.Button() + Me.bntDatumsetzen = New System.Windows.Forms.Button() + Me.Panel3 = New System.Windows.Forms.Panel() + Me.Button6 = New System.Windows.Forms.Button() Me.pnlIDS = New System.Windows.Forms.Panel() Me.Button10 = New System.Windows.Forms.Button() Me.btnRechenwertesetzen = New System.Windows.Forms.Button() @@ -55,11 +60,6 @@ Partial Class frmMDMDatenverarbetiung Me.lblProzPruef = New System.Windows.Forms.Label() Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.pic = New System.Windows.Forms.PictureBox() - Me.pnlAsfinag = New System.Windows.Forms.Panel() - Me.bntDatumzuruecksetzen = New System.Windows.Forms.Button() - Me.bntDatumsetzen = New System.Windows.Forms.Button() - Me.Panel3 = New System.Windows.Forms.Panel() - Me.Button6 = New System.Windows.Forms.Button() Me.Button5 = New System.Windows.Forms.Button() Me.Button1 = New System.Windows.Forms.Button() Me.btnKunde = New System.Windows.Forms.Button() @@ -82,17 +82,18 @@ Partial Class frmMDMDatenverarbetiung Me.Button2 = New System.Windows.Forms.Button() Me.MyDatagridview1 = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.ContextMenuStrip1 = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.cbxKopie = New System.Windows.Forms.CheckBox() Me.pnl.SuspendLayout() Me.Panel5.SuspendLayout() CType(Me.PictureBox5, System.ComponentModel.ISupportInitialize).BeginInit() Me.Panel4.SuspendLayout() Me.FlowLayoutPanel.SuspendLayout() Me.Panel1.SuspendLayout() + Me.pnlAsfinag.SuspendLayout() + Me.Panel3.SuspendLayout() Me.pnlIDS.SuspendLayout() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() - Me.pnlAsfinag.SuspendLayout() - Me.Panel3.SuspendLayout() Me.Panel2.SuspendLayout() CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).BeginInit() Me.SuspendLayout() @@ -365,6 +366,55 @@ Partial Class frmMDMDatenverarbetiung Me.Panel1.Size = New System.Drawing.Size(1163, 151) Me.Panel1.TabIndex = 2 ' + 'pnlAsfinag + ' + Me.pnlAsfinag.Controls.Add(Me.bntDatumzuruecksetzen) + Me.pnlAsfinag.Controls.Add(Me.bntDatumsetzen) + Me.pnlAsfinag.Location = New System.Drawing.Point(896, 6) + Me.pnlAsfinag.Name = "pnlAsfinag" + Me.pnlAsfinag.Size = New System.Drawing.Size(267, 30) + Me.pnlAsfinag.TabIndex = 29 + Me.pnlAsfinag.Visible = False + ' + 'bntDatumzuruecksetzen + ' + Me.bntDatumzuruecksetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.bntDatumzuruecksetzen.Location = New System.Drawing.Point(123, 3) + Me.bntDatumzuruecksetzen.Name = "bntDatumzuruecksetzen" + Me.bntDatumzuruecksetzen.Size = New System.Drawing.Size(140, 25) + Me.bntDatumzuruecksetzen.TabIndex = 49 + Me.bntDatumzuruecksetzen.Text = "Abr-datum zurücksetzen" + Me.bntDatumzuruecksetzen.UseVisualStyleBackColor = True + ' + 'bntDatumsetzen + ' + Me.bntDatumsetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.bntDatumsetzen.Location = New System.Drawing.Point(3, 4) + Me.bntDatumsetzen.Name = "bntDatumsetzen" + Me.bntDatumsetzen.Size = New System.Drawing.Size(114, 23) + Me.bntDatumsetzen.TabIndex = 48 + Me.bntDatumsetzen.Text = "Abr-datum setzen" + Me.bntDatumsetzen.UseVisualStyleBackColor = True + ' + 'Panel3 + ' + Me.Panel3.BackColor = System.Drawing.Color.White + Me.Panel3.Controls.Add(Me.Button6) + Me.Panel3.Location = New System.Drawing.Point(603, 9) + Me.Panel3.Name = "Panel3" + Me.Panel3.Size = New System.Drawing.Size(313, 139) + Me.Panel3.TabIndex = 48 + ' + 'Button6 + ' + Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat + Me.Button6.Location = New System.Drawing.Point(102, 4) + Me.Button6.Name = "Button6" + Me.Button6.Size = New System.Drawing.Size(107, 23) + Me.Button6.TabIndex = 47 + Me.Button6.Text = "MautD Check" + Me.Button6.UseVisualStyleBackColor = True + ' 'pnlIDS ' Me.pnlIDS.Controls.Add(Me.Button10) @@ -463,55 +513,6 @@ Partial Class frmMDMDatenverarbetiung Me.pic.TabStop = False Me.pic.Visible = False ' - 'pnlAsfinag - ' - Me.pnlAsfinag.Controls.Add(Me.bntDatumzuruecksetzen) - Me.pnlAsfinag.Controls.Add(Me.bntDatumsetzen) - Me.pnlAsfinag.Location = New System.Drawing.Point(896, 6) - Me.pnlAsfinag.Name = "pnlAsfinag" - Me.pnlAsfinag.Size = New System.Drawing.Size(267, 30) - Me.pnlAsfinag.TabIndex = 29 - Me.pnlAsfinag.Visible = False - ' - 'bntDatumzuruecksetzen - ' - Me.bntDatumzuruecksetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.bntDatumzuruecksetzen.Location = New System.Drawing.Point(123, 3) - Me.bntDatumzuruecksetzen.Name = "bntDatumzuruecksetzen" - Me.bntDatumzuruecksetzen.Size = New System.Drawing.Size(140, 25) - Me.bntDatumzuruecksetzen.TabIndex = 49 - Me.bntDatumzuruecksetzen.Text = "Abr-datum zurücksetzen" - Me.bntDatumzuruecksetzen.UseVisualStyleBackColor = True - ' - 'bntDatumsetzen - ' - Me.bntDatumsetzen.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.bntDatumsetzen.Location = New System.Drawing.Point(3, 4) - Me.bntDatumsetzen.Name = "bntDatumsetzen" - Me.bntDatumsetzen.Size = New System.Drawing.Size(114, 23) - Me.bntDatumsetzen.TabIndex = 48 - Me.bntDatumsetzen.Text = "Abr-datum setzen" - Me.bntDatumsetzen.UseVisualStyleBackColor = True - ' - 'Panel3 - ' - Me.Panel3.BackColor = System.Drawing.Color.White - Me.Panel3.Controls.Add(Me.Button6) - Me.Panel3.Location = New System.Drawing.Point(603, 9) - Me.Panel3.Name = "Panel3" - Me.Panel3.Size = New System.Drawing.Size(313, 139) - Me.Panel3.TabIndex = 48 - ' - 'Button6 - ' - Me.Button6.FlatStyle = System.Windows.Forms.FlatStyle.Flat - Me.Button6.Location = New System.Drawing.Point(102, 4) - Me.Button6.Name = "Button6" - Me.Button6.Size = New System.Drawing.Size(107, 23) - Me.Button6.TabIndex = 47 - Me.Button6.Text = "MautD Check" - Me.Button6.UseVisualStyleBackColor = True - ' 'Button5 ' Me.Button5.FlatStyle = System.Windows.Forms.FlatStyle.Flat @@ -594,6 +595,7 @@ Partial Class frmMDMDatenverarbetiung ' 'Panel2 ' + Me.Panel2.Controls.Add(Me.cbxKopie) Me.Panel2.Controls.Add(Me.Label43) Me.Panel2.Controls.Add(Me.datPloseAnhang) Me.Panel2.Controls.Add(Me.btnREerstellen) @@ -780,6 +782,19 @@ Partial Class frmMDMDatenverarbetiung Me.ContextMenuStrip1.Name = "ContextMenuStrip1" Me.ContextMenuStrip1.Size = New System.Drawing.Size(61, 4) ' + 'cbxKopie + ' + Me.cbxKopie.AutoSize = True + Me.cbxKopie.Checked = True + Me.cbxKopie.CheckState = System.Windows.Forms.CheckState.Checked + Me.cbxKopie.Location = New System.Drawing.Point(198, 16) + Me.cbxKopie.Name = "cbxKopie" + Me.cbxKopie.Size = New System.Drawing.Size(92, 17) + Me.cbxKopie.TabIndex = 53 + Me.cbxKopie.Text = "IDS RE Kopie" + Me.cbxKopie.UseVisualStyleBackColor = True + Me.cbxKopie.Visible = False + ' 'frmMDMDatenverarbetiung ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) @@ -803,11 +818,11 @@ Partial Class frmMDMDatenverarbetiung Me.FlowLayoutPanel.ResumeLayout(False) Me.Panel1.ResumeLayout(False) Me.Panel1.PerformLayout() + Me.pnlAsfinag.ResumeLayout(False) + Me.Panel3.ResumeLayout(False) Me.pnlIDS.ResumeLayout(False) CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.pic, System.ComponentModel.ISupportInitialize).EndInit() - Me.pnlAsfinag.ResumeLayout(False) - Me.Panel3.ResumeLayout(False) Me.Panel2.ResumeLayout(False) Me.Panel2.PerformLayout() CType(Me.MyDatagridview1, System.ComponentModel.ISupportInitialize).EndInit() @@ -873,4 +888,5 @@ Partial Class frmMDMDatenverarbetiung Friend WithEvents btnRechenwertesetzen As Button Friend WithEvents Button10 As Button Friend WithEvents ContextMenuStrip1 As ContextMenuStrip + Friend WithEvents cbxKopie As CheckBox End Class diff --git a/SDL/mdm/frmMDMDatenverarbetiung.vb b/SDL/mdm/frmMDMDatenverarbetiung.vb index 95c8237d..fd644636 100644 --- a/SDL/mdm/frmMDMDatenverarbetiung.vb +++ b/SDL/mdm/frmMDMDatenverarbetiung.vb @@ -2,9 +2,11 @@ Imports System.IO Imports Challenge Imports com.sun.org.glassfish.external.probe.provider.annotations +Imports itextsharp.text.pdf Imports MDM_Worker Imports TAlex.WPF.Helpers Imports VERAG_PROG_ALLGEMEIN +Imports VERAG_PROG_ALLGEMEIN.TESTJSON Public Class frmMDMDatenverarbetiung @@ -1084,6 +1086,7 @@ Public Class frmMDMDatenverarbetiung pnlIDS.Visible = False Panel4.Visible = False Panel5.Visible = False + cbxKopie.Visible = False Select Case Me.LIEFERANT @@ -1108,6 +1111,7 @@ Public Class frmMDMDatenverarbetiung Panel3.Controls.Add(c) c.Dock = DockStyle.Fill pnlIDS.Visible = True + cbxKopie.Visible = True Case "MSE" Panel5.Visible = True @@ -1487,7 +1491,7 @@ Public Class frmMDMDatenverarbetiung LEFT JOIN tblIDSInvoicesNew on tblIDSInvoicesNew.CustomerCode = tblIDSTransactionsNew.CustomerCode and tblIDSInvoicesNew.Invoicenumber = Paymentsummarynumber - WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null and isnull(charged,0)= 0 " & sqlWhere & " + WHERE cast(tblIDSTransactionsNew.YearMonthDay as Date) = '" & DateTimePicker2.Text & "' AND tblIDSTransactionsNew.[UStVAn_ID] is null and isnull(charged,0) = 0 " & sqlWhere & " order by tblIDSTransactionsNew.KdNrVERAG" Dim dt_Main As DataTable = SQL.loadDgvBySql_Param(SQLStr, "FMZOLL", 1200) @@ -1534,8 +1538,28 @@ Public Class frmMDMDatenverarbetiung If IDS("InvoiceID") > 0 Then Dim DS = New VERAG_PROG_ALLGEMEIN.cDATENSERVER(IDS("InvoiceID")) - File.Copy(DS.GET_TOP1_PATH, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), True) - End If + If cbxKopie.Checked Then + + Dim pdfReader As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader(DS.GET_TOP1_PATH) + + Dim fm As New VERAG_PROG_ALLGEMEIN.cFormularManager + Dim listTowrite As New List(Of VERAG_PROG_ALLGEMEIN.cPDFWriteValues) + + Dim Y = 60 + For page As Integer = 1 To pdfReader.NumberOfPages + listTowrite.Add(New VERAG_PROG_ALLGEMEIN.cPDFWriteValues("KOPIE ", 121, Y, 200, 15, "bold", 15, , itextsharp.text.Element.ALIGN_LEFT, page)) + Next + + pdfReader.Close() + + Dim PdfTmp = fm.fillPDFVorhandenesLokalesPDF_Path(DS.GET_TOP1_PATH, listTowrite, , , , ,) + File.Copy(PdfTmp, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), True) + + + Else +File.Copy(DS.GET_TOP1_PATH, dir & "\" & IDS("KdNrVERAG") & "_" & (DS.da_name), True) + End If +End If If verarbOK Then