From 59873ed3e0a8d75bb374bf9483b7422ce66c26e1 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Thu, 29 Aug 2024 11:03:52 +0200 Subject: [PATCH 1/3] vers --- Aviso/My Project/AssemblyInfo.vb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Aviso/My Project/AssemblyInfo.vb b/Aviso/My Project/AssemblyInfo.vb index 664c789..c483ad8 100644 --- a/Aviso/My Project/AssemblyInfo.vb +++ b/Aviso/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + From 2d6ad53ddd0750d303a6a287abaf650db55ce141 Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Fri, 30 Aug 2024 22:41:48 +0200 Subject: [PATCH 2/3] .Net 4.8, Spire PDF, PDF Kopmrimieren --- .../frmSendungAnhangImport.Designer.vb | 87 ++++++------- Aviso/Anhänge/frmSendungAnhangImport.vb | 123 ++++++++++++++++-- .../usrCntlSendungAnhangElement.Designer.vb | 58 ++++++--- Aviso/Anhänge/usrCntlSendungAnhangElement.vb | 29 +++++ Aviso/App.config | 50 +++---- Aviso/Aviso.vbproj | 17 +-- Aviso/My Project/Application.Designer.vb | 6 + Aviso/My Project/Resources.Designer.vb | 10 ++ Aviso/My Project/Resources.resx | 3 + Aviso/My Project/Settings.Designer.vb | 2 +- Aviso/My Project/license.elic.xml | 21 +-- Aviso/Resources/license.elic.xml | 21 +-- Aviso/frmLogin.vb | 2 + Aviso/packages.config | 4 +- Gemeinsames/App.config | 2 +- Gemeinsames/Gemeinsames.vbproj | 3 +- Gemeinsames/My Project/Settings.Designer.vb | 2 +- 17 files changed, 310 insertions(+), 130 deletions(-) diff --git a/Aviso/Anhänge/frmSendungAnhangImport.Designer.vb b/Aviso/Anhänge/frmSendungAnhangImport.Designer.vb index 83d9606..46545ed 100644 --- a/Aviso/Anhänge/frmSendungAnhangImport.Designer.vb +++ b/Aviso/Anhänge/frmSendungAnhangImport.Designer.vb @@ -22,12 +22,9 @@ Partial Class frmSendungAnhangImport '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(frmSendungAnhangImport)) Me.lbl = New System.Windows.Forms.Label() Me.flpnlAviso = New System.Windows.Forms.FlowLayoutPanel() - Me.UsrCntlSendungAnhangElement1 = New AVISO.usrCntlSendungAnhangElement() - Me.UsrCntlSendungAnhangElement2 = New AVISO.usrCntlSendungAnhangElement() Me.flpnlSendungen = New System.Windows.Forms.FlowLayoutPanel() Me.lblSendungen = New System.Windows.Forms.Label() Me.lblImport = New System.Windows.Forms.Label() @@ -49,7 +46,7 @@ Partial Class frmSendungAnhangImport Me.lblSeiten = New System.Windows.Forms.Label() Me.cbxDelPDF = New System.Windows.Forms.CheckBox() Me.btnAdd = New System.Windows.Forms.Button() - Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components) + Me.cntxt = New System.Windows.Forms.ContextMenuStrip() Me.DateiHochladenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.DateiScannenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.AusZwischenablageeinfügenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() @@ -57,7 +54,6 @@ Partial Class frmSendungAnhangImport Me.pnl = New System.Windows.Forms.Panel() Me.Button5 = New System.Windows.Forms.Button() Me.PdfViewer = New Spire.PdfViewer.Forms.PdfViewer() - Me.WebBrowser = New System.Windows.Forms.WebBrowser() Me.Button3 = New System.Windows.Forms.Button() Me.btnSndDel = New System.Windows.Forms.Button() Me.PrintDocument1 = New System.Drawing.Printing.PrintDocument() @@ -72,6 +68,9 @@ Partial Class frmSendungAnhangImport Me.Button17 = New System.Windows.Forms.Button() Me.lblRgPreis = New System.Windows.Forms.Label() Me.pnlSendung = New System.Windows.Forms.Panel() + Me.UsrCntlSendungAnhangElement1 = New AVISO.usrCntlSendungAnhangElement() + Me.UsrCntlSendungAnhangElement2 = New AVISO.usrCntlSendungAnhangElement() + Me.WebBrowser = New System.Windows.Forms.WebBrowser() Me.flpnlAviso.SuspendLayout() Me.pnlAnfuegen.SuspendLayout() Me.cntxt.SuspendLayout() @@ -103,36 +102,6 @@ Partial Class frmSendungAnhangImport Me.flpnlAviso.Size = New System.Drawing.Size(200, 825) Me.flpnlAviso.TabIndex = 7 ' - 'UsrCntlSendungAnhangElement1 - ' - Me.UsrCntlSendungAnhangElement1.ACTIVE = False - Me.UsrCntlSendungAnhangElement1.BackColor = System.Drawing.Color.White - Me.UsrCntlSendungAnhangElement1.FILE_ANHID = Nothing - Me.UsrCntlSendungAnhangElement1.FILE_DOCID = Nothing - Me.UsrCntlSendungAnhangElement1.FILE_NAME = "False" - Me.UsrCntlSendungAnhangElement1.FILE_PAGES = Nothing - Me.UsrCntlSendungAnhangElement1.FILE_PATH = Nothing - Me.UsrCntlSendungAnhangElement1.FILE_TYPE = Nothing - Me.UsrCntlSendungAnhangElement1.Location = New System.Drawing.Point(3, 3) - Me.UsrCntlSendungAnhangElement1.Name = "UsrCntlSendungAnhangElement1" - Me.UsrCntlSendungAnhangElement1.Size = New System.Drawing.Size(130, 64) - Me.UsrCntlSendungAnhangElement1.TabIndex = 0 - ' - 'UsrCntlSendungAnhangElement2 - ' - Me.UsrCntlSendungAnhangElement2.ACTIVE = False - Me.UsrCntlSendungAnhangElement2.BackColor = System.Drawing.Color.White - Me.UsrCntlSendungAnhangElement2.FILE_ANHID = Nothing - Me.UsrCntlSendungAnhangElement2.FILE_DOCID = Nothing - Me.UsrCntlSendungAnhangElement2.FILE_NAME = "False" - Me.UsrCntlSendungAnhangElement2.FILE_PAGES = Nothing - Me.UsrCntlSendungAnhangElement2.FILE_PATH = Nothing - Me.UsrCntlSendungAnhangElement2.FILE_TYPE = Nothing - Me.UsrCntlSendungAnhangElement2.Location = New System.Drawing.Point(3, 73) - Me.UsrCntlSendungAnhangElement2.Name = "UsrCntlSendungAnhangElement2" - Me.UsrCntlSendungAnhangElement2.Size = New System.Drawing.Size(130, 64) - Me.UsrCntlSendungAnhangElement2.TabIndex = 1 - ' 'flpnlSendungen ' Me.flpnlSendungen.AllowDrop = True @@ -504,15 +473,6 @@ Partial Class frmSendungAnhangImport Me.PdfViewer.Threshold = 60 Me.PdfViewer.ViewerBackgroundColor = System.Drawing.Color.FromArgb(CType(CType(229, Byte), Integer), CType(CType(229, Byte), Integer), CType(CType(229, Byte), Integer)) ' - 'WebBrowser - ' - Me.WebBrowser.Dock = System.Windows.Forms.DockStyle.Fill - Me.WebBrowser.Location = New System.Drawing.Point(0, 0) - Me.WebBrowser.MinimumSize = New System.Drawing.Size(20, 20) - Me.WebBrowser.Name = "WebBrowser" - Me.WebBrowser.Size = New System.Drawing.Size(844, 655) - Me.WebBrowser.TabIndex = 1 - ' 'Button3 ' Me.Button3.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -671,6 +631,45 @@ Partial Class frmSendungAnhangImport Me.pnlSendung.Size = New System.Drawing.Size(243, 860) Me.pnlSendung.TabIndex = 0 ' + 'UsrCntlSendungAnhangElement1 + ' + Me.UsrCntlSendungAnhangElement1.ACTIVE = False + Me.UsrCntlSendungAnhangElement1.BackColor = System.Drawing.Color.White + Me.UsrCntlSendungAnhangElement1.FILE_ANHID = Nothing + Me.UsrCntlSendungAnhangElement1.FILE_DOCID = Nothing + Me.UsrCntlSendungAnhangElement1.FILE_NAME = "False" + Me.UsrCntlSendungAnhangElement1.FILE_PAGES = Nothing + Me.UsrCntlSendungAnhangElement1.FILE_PATH = Nothing + Me.UsrCntlSendungAnhangElement1.FILE_TYPE = Nothing + Me.UsrCntlSendungAnhangElement1.Location = New System.Drawing.Point(3, 3) + Me.UsrCntlSendungAnhangElement1.Name = "UsrCntlSendungAnhangElement1" + Me.UsrCntlSendungAnhangElement1.Size = New System.Drawing.Size(130, 64) + Me.UsrCntlSendungAnhangElement1.TabIndex = 0 + ' + 'UsrCntlSendungAnhangElement2 + ' + Me.UsrCntlSendungAnhangElement2.ACTIVE = False + Me.UsrCntlSendungAnhangElement2.BackColor = System.Drawing.Color.White + Me.UsrCntlSendungAnhangElement2.FILE_ANHID = Nothing + Me.UsrCntlSendungAnhangElement2.FILE_DOCID = Nothing + Me.UsrCntlSendungAnhangElement2.FILE_NAME = "False" + Me.UsrCntlSendungAnhangElement2.FILE_PAGES = Nothing + Me.UsrCntlSendungAnhangElement2.FILE_PATH = Nothing + Me.UsrCntlSendungAnhangElement2.FILE_TYPE = Nothing + Me.UsrCntlSendungAnhangElement2.Location = New System.Drawing.Point(3, 73) + Me.UsrCntlSendungAnhangElement2.Name = "UsrCntlSendungAnhangElement2" + Me.UsrCntlSendungAnhangElement2.Size = New System.Drawing.Size(130, 64) + Me.UsrCntlSendungAnhangElement2.TabIndex = 1 + ' + 'WebBrowser + ' + Me.WebBrowser.Dock = System.Windows.Forms.DockStyle.Fill + Me.WebBrowser.Location = New System.Drawing.Point(0, 0) + Me.WebBrowser.MinimumSize = New System.Drawing.Size(20, 20) + Me.WebBrowser.Name = "WebBrowser" + Me.WebBrowser.Size = New System.Drawing.Size(844, 655) + Me.WebBrowser.TabIndex = 1 + ' 'frmSendungAnhangImport ' Me.AllowDrop = True diff --git a/Aviso/Anhänge/frmSendungAnhangImport.vb b/Aviso/Anhänge/frmSendungAnhangImport.vb index e45fe8b..6cf7faf 100644 --- a/Aviso/Anhänge/frmSendungAnhangImport.vb +++ b/Aviso/Anhänge/frmSendungAnhangImport.vb @@ -3,6 +3,9 @@ 'Imports iTextSharp.text Imports System.IO Imports Spire.Pdf +Imports Spire.Pdf.Conversion +Imports Spire.Pdf.Conversion.Compression +Imports Spire.Pdf.Exporting Imports VERAG_PROG_ALLGEMEIN 'Imports GrapeCity.Documents.Pdf @@ -115,6 +118,11 @@ Public Class frmSendungAnhangImport initFlpANH_LIST() End Sub + AddHandler USRCNTL.ME_COMPRESS, Sub(docId, anhId) + compressElement(docId, anhId) + initFlpANH_LIST() + End Sub + AddHandler USRCNTL.KeyDown, Sub(ob As Object, ev As KeyEventArgs) If ev.KeyCode = Keys.Delete Then deleteActiveElement(getAcitvePnl()) @@ -645,11 +653,11 @@ Public Class frmSendungAnhangImport Public Function ExtractPdfPages_NEW(ByVal SourceFile As String, ByVal TargetFile As String, pagesToExtract As List(Of Integer)) As Boolean 'ITEXTSHARP Try - Dim impPage As itextsharp.text.pdf.PdfImportedPage = Nothing - Dim Reader As New itextsharp.text.pdf.PdfReader(SourceFile) + Dim impPage As iTextSharp.text.pdf.PdfImportedPage = Nothing + Dim Reader As New iTextSharp.text.pdf.PdfReader(SourceFile) If Not TargetFile.ToLower.EndsWith(".pdf") Then TargetFile = TargetFile & ".pdf" - Dim srcDoc As New itextsharp.text.Document() 'Reader.GetPageSizeWithRotation(0)) - Dim PdfCopyProvider As New itextsharp.text.pdf.PdfCopy(srcDoc, New System.IO.FileStream(TargetFile, System.IO.FileMode.Create)) + Dim srcDoc As New iTextSharp.text.Document() 'Reader.GetPageSizeWithRotation(0)) + Dim PdfCopyProvider As New iTextSharp.text.pdf.PdfCopy(srcDoc, New System.IO.FileStream(TargetFile, System.IO.FileMode.Create)) PdfCopyProvider.SetFullCompression() srcDoc.Open() For Each p In pagesToExtract @@ -660,7 +668,7 @@ Public Class frmSendungAnhangImport End If impPage = PdfCopyProvider.GetImportedPage(Reader, p) ' ----- Ermitteln der Seitenauflösung und setzen für die neue Seite - PdfCopyProvider.SetPageSize(New itextsharp.text.Rectangle(0.0F, 0.0F, impPage.Width, impPage.Height, Reader.GetPageRotation(p))) + PdfCopyProvider.SetPageSize(New iTextSharp.text.Rectangle(0.0F, 0.0F, impPage.Width, impPage.Height, Reader.GetPageRotation(p))) ' ----- PDF Seite in das neue Dokument einfügen PdfCopyProvider.AddPage(impPage) @@ -896,7 +904,7 @@ Public Class frmSendungAnhangImport Try PagesLeft = 0 - Dim r As itextsharp.text.pdf.PdfReader = New itextsharp.text.pdf.PdfReader(sourceFile) + Dim r As iTextSharp.text.pdf.PdfReader = New iTextSharp.text.pdf.PdfReader(sourceFile) Dim pagesToKeep As New List(Of Integer) For p = 1 To r.NumberOfPages Dim del = False @@ -918,9 +926,9 @@ Public Class frmSendungAnhangImport Using fs As FileStream = New FileStream(destinationFile, FileMode.Create, FileAccess.Write, FileShare.None) - Using doc As itextsharp.text.Document = New itextsharp.text.Document() + Using doc As iTextSharp.text.Document = New iTextSharp.text.Document() - Dim w As itextsharp.text.pdf.PdfWriter = itextsharp.text.pdf.PdfWriter.GetInstance(doc, fs) + Dim w As iTextSharp.text.pdf.PdfWriter = iTextSharp.text.pdf.PdfWriter.GetInstance(doc, fs) doc.Open() For Each page As Integer In pagesToKeep doc.NewPage() @@ -1046,6 +1054,100 @@ Public Class frmSendungAnhangImport Return False End Function + Shared Function compressElement(FILE_DOCID, FILE_ANHID, Optional showMessage = True) As Boolean + + If Not showMessage OrElse vbYes = MsgBox("Möchten Sie das Element komprimieren? Durch Minderung der Datenqualität gehen Informationen eventuell verloren.", vbYesNoCancel) Then + Try + + Dim DS As New VERAG_PROG_ALLGEMEIN.cDATENSERVER(FILE_DOCID) + + 'Load a PDF document while initializing the PdfCompressor object + Dim compressor As Spire.Pdf.Conversion.Compression.PdfCompressor = New Spire.Pdf.Conversion.Compression.PdfCompressor(DS.GET_TOP1_PATH) + 'Get text compression options + Dim textCompression As TextCompressionOptions = compressor.Options.TextCompressionOptions + 'Compress fonts + textCompression.CompressFonts = True + 'Unembed fonts + textCompression.UnembedFonts = True + 'Get image compression options + Dim imageCompression As ImageCompressionOptions = compressor.Options.ImageCompressionOptions + 'Set the compressed image quality + imageCompression.ImageQuality = ImageQuality.High + + 'Resize images + imageCompression.ResizeImages = True + 'Compress images + imageCompression.CompressImage = True + 'Save the compressed document to file + compressor.CompressToFile(DS.GET_TOP1_PATH) + + 'Load the pdf document + Dim doc As New PdfDocument() + + doc.LoadFromFile(DS.GET_TOP1_PATH) + 'Compress the content in document + CompressContent(doc) + + 'Compress the images in document + CompressImage(doc) + + 'Save the document + doc.SaveToFile(DS.GET_TOP1_PATH) + + 'View the pdf document + PDFDocumentViewer(DS.GET_TOP1_PATH) + + 'Dim Convert = New PdfGrayConverter("C:\Users\DEVELOPER1\Desktop\CompressDocument_result2.pdf") + 'Convert.ToGrayPdf("C:\Users\DEVELOPER1\Desktop\CompressDocument_result3.pdf") + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Fehler QuickScan") + End Try + End If + Return False + End Function + Private Shared Sub CompressContent(ByVal doc As PdfDocument) + 'Disable the incremental update + doc.FileInfo.IncrementalUpdate = False + + 'Set the compression level to best + doc.CompressionLevel = PdfCompressionLevel.Best + End Sub + + Private Shared Sub CompressImage(ByVal doc As PdfDocument) + Try + 'Disable the incremental update + doc.FileInfo.IncrementalUpdate = False + + 'Traverse all pages + For Each page As PdfPageBase In doc.Pages + If page IsNot Nothing Then + + + + + + If page.ImagesInfo IsNot Nothing Then + For Each info As PdfImageInfo In page.ImagesInfo + page.TryCompressImage(info.Index) + Next info + End If + End If + Next page + + Catch ex As Exception + VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name,, "Fehler QuickScan") + End Try + End Sub + Private Shared Sub PDFDocumentViewer(ByVal fileName As String) + Try + Process.Start(fileName) + Catch + End Try + End Sub + + + Private Sub frmSendungAnhangImport_Load(sender As Object, e As EventArgs) Handles Me.Load Me.Height = Screen.PrimaryScreen.WorkingArea.Height @@ -1226,6 +1328,7 @@ Public Class frmSendungAnhangImport If pnl Is Nothing OrElse pnl Is flpnlSendungen Then flpnlSendungen.Controls.AddRange(ListToAdd_flpnlSendungen.ToArray) If pnl Is Nothing OrElse pnl Is flpnlAviso Then flpnlAviso.Controls.AddRange(ListToAdd_flpnlAviso.ToArray) + 'If act Is Nothing Then initLocationViewer("", "PDF") End Sub @@ -1239,6 +1342,7 @@ Public Class frmSendungAnhangImport USRCNTL.FILE_NAME = a.anh_Name USRCNTL.FILE_TYPE = a.anh_Typ + USRCNTL.FILE_SIZE = a.anh_size.ToString("N0") & " KB" USRCNTL.FILE_ANHID = a.anh_id USRCNTL.FILE_DOCID = a.anh_docId @@ -1326,7 +1430,7 @@ Public Class frmSendungAnhangImport End Try End Sub - Sub addUsrcnlToPnl(TMP_Path, dicId, anhId, Optional filename = "", Optional Typ = "") + Sub addUsrcnlToPnl(TMP_Path, dicId, anhId, Optional filename = "", Optional Typ = "", Optional Size = "") Dim USRCNTL As New usrCntlSendungAnhangElement Dim fi As New FileInfo(TMP_Path) @@ -1339,6 +1443,7 @@ Public Class frmSendungAnhangImport USRCNTL.FILE_ANHID = anhId USRCNTL.FILE_TYPE = Typ + USRCNTL.FILE_SIZE = Size initElement(USRCNTL) flpnlAviso.Controls.Add(USRCNTL) diff --git a/Aviso/Anhänge/usrCntlSendungAnhangElement.Designer.vb b/Aviso/Anhänge/usrCntlSendungAnhangElement.Designer.vb index c193ac7..174ec7d 100644 --- a/Aviso/Anhänge/usrCntlSendungAnhangElement.Designer.vb +++ b/Aviso/Anhänge/usrCntlSendungAnhangElement.Designer.vb @@ -27,9 +27,11 @@ Partial Class usrCntlSendungAnhangElement Me.cntxt = New System.Windows.Forms.ContextMenuStrip(Me.components) Me.UmbenennenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.LöschenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() - Me.lbl = New System.Windows.Forms.Label() Me.AnhängeVerschiebenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() Me.PDFsZusammenführenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.KomprimierenToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem() + Me.lbl = New System.Windows.Forms.Label() + Me.lblSize = New System.Windows.Forms.Label() CType(Me.pic, System.ComponentModel.ISupportInitialize).BeginInit() Me.cntxt.SuspendLayout() Me.SuspendLayout() @@ -49,39 +51,27 @@ Partial Class usrCntlSendungAnhangElement ' 'cntxt ' - Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UmbenennenToolStripMenuItem, Me.LöschenToolStripMenuItem, Me.AnhängeVerschiebenToolStripMenuItem, Me.PDFsZusammenführenToolStripMenuItem}) + Me.cntxt.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.UmbenennenToolStripMenuItem, Me.LöschenToolStripMenuItem, Me.AnhängeVerschiebenToolStripMenuItem, Me.PDFsZusammenführenToolStripMenuItem, Me.KomprimierenToolStripMenuItem}) Me.cntxt.Name = "cntxt" Me.cntxt.Size = New System.Drawing.Size(206, 114) ' 'UmbenennenToolStripMenuItem ' Me.UmbenennenToolStripMenuItem.Name = "UmbenennenToolStripMenuItem" - Me.UmbenennenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.UmbenennenToolStripMenuItem.Size = New System.Drawing.Size(205, 22) Me.UmbenennenToolStripMenuItem.Text = "Umbenennen" ' 'LöschenToolStripMenuItem ' Me.LöschenToolStripMenuItem.Image = Global.AVISO.My.Resources.Resources.del Me.LöschenToolStripMenuItem.Name = "LöschenToolStripMenuItem" - Me.LöschenToolStripMenuItem.Size = New System.Drawing.Size(180, 22) + Me.LöschenToolStripMenuItem.Size = New System.Drawing.Size(205, 22) Me.LöschenToolStripMenuItem.Text = "Löschen" ' - 'lbl - ' - Me.lbl.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ - Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) - Me.lbl.ContextMenuStrip = Me.cntxt - Me.lbl.Location = New System.Drawing.Point(36, 0) - Me.lbl.Name = "lbl" - Me.lbl.Size = New System.Drawing.Size(140, 27) - Me.lbl.TabIndex = 1 - Me.lbl.Text = "NAME" - Me.lbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft - ' 'AnhängeVerschiebenToolStripMenuItem ' Me.AnhängeVerschiebenToolStripMenuItem.Name = "AnhängeVerschiebenToolStripMenuItem" - Me.AnhängeVerschiebenToolStripMenuItem.Size = New System.Drawing.Size(197, 22) + Me.AnhängeVerschiebenToolStripMenuItem.Size = New System.Drawing.Size(205, 22) Me.AnhängeVerschiebenToolStripMenuItem.Text = "Anhänge verschieben..." ' 'PDFsZusammenführenToolStripMenuItem @@ -91,12 +81,44 @@ Partial Class usrCntlSendungAnhangElement Me.PDFsZusammenführenToolStripMenuItem.Size = New System.Drawing.Size(205, 22) Me.PDFsZusammenführenToolStripMenuItem.Text = "PDFs zusammenführen..." ' + 'KomprimierenToolStripMenuItem + ' + Me.KomprimierenToolStripMenuItem.Name = "KomprimierenToolStripMenuItem" + Me.KomprimierenToolStripMenuItem.Size = New System.Drawing.Size(205, 22) + Me.KomprimierenToolStripMenuItem.Text = "Komprimieren" + ' + 'lbl + ' + Me.lbl.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lbl.ContextMenuStrip = Me.cntxt + Me.lbl.Location = New System.Drawing.Point(36, 0) + Me.lbl.Name = "lbl" + Me.lbl.Size = New System.Drawing.Size(140, 24) + Me.lbl.TabIndex = 1 + Me.lbl.Text = "NAME asd asdasd" & Global.Microsoft.VisualBasic.ChrW(13) & Global.Microsoft.VisualBasic.ChrW(10) & "asdasdasd" + Me.lbl.TextAlign = System.Drawing.ContentAlignment.MiddleLeft + ' + 'lblSize + ' + Me.lblSize.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _ + Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) + Me.lblSize.ContextMenuStrip = Me.cntxt + Me.lblSize.Font = New System.Drawing.Font("Microsoft Sans Serif", 6.5!) + Me.lblSize.Location = New System.Drawing.Point(136, 18) + Me.lblSize.Name = "lblSize" + Me.lblSize.Size = New System.Drawing.Size(44, 10) + Me.lblSize.TabIndex = 2 + Me.lblSize.Text = "1.500 KB" + Me.lblSize.TextAlign = System.Drawing.ContentAlignment.MiddleRight + ' 'usrCntlSendungAnhangElement ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.BackColor = System.Drawing.Color.White Me.ContextMenuStrip = Me.cntxt + Me.Controls.Add(Me.lblSize) Me.Controls.Add(Me.lbl) Me.Controls.Add(Me.pic) Me.Name = "usrCntlSendungAnhangElement" @@ -114,4 +136,6 @@ Partial Class usrCntlSendungAnhangElement Friend WithEvents LöschenToolStripMenuItem As ToolStripMenuItem Friend WithEvents AnhängeVerschiebenToolStripMenuItem As ToolStripMenuItem Friend WithEvents PDFsZusammenführenToolStripMenuItem As ToolStripMenuItem + Friend WithEvents KomprimierenToolStripMenuItem As ToolStripMenuItem + Friend WithEvents lblSize As Label End Class diff --git a/Aviso/Anhänge/usrCntlSendungAnhangElement.vb b/Aviso/Anhänge/usrCntlSendungAnhangElement.vb index 2c02e57..0625b8e 100644 --- a/Aviso/Anhänge/usrCntlSendungAnhangElement.vb +++ b/Aviso/Anhänge/usrCntlSendungAnhangElement.vb @@ -16,6 +16,7 @@ Public Class usrCntlSendungAnhangElement Public Event ME_CLICK(STRG_PRESSED) Public Event ME_DELETE(FILE_DOCID, FILE_ANHID) + Public Event ME_COMPRESS(FILE_DOCID, FILE_ANHID) 'Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged @@ -24,6 +25,7 @@ Public Class usrCntlSendungAnhangElement ' RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(info)) 'End Sub + Private ACTIVE_Value As Boolean = False Public Property ACTIVE As Boolean Get @@ -87,6 +89,23 @@ Public Class usrCntlSendungAnhangElement End Set End Property + + + Private FILE_SIZE_Value As String = False + Public Property FILE_SIZE As String + Get + Return Me.FILE_SIZE_Value + End Get + + Set(ByVal value As String) + If Not (value = FILE_SIZE) Then + Me.FILE_SIZE_Value = value + Me.lblSize.Text = value + ' NotifyPropertyChanged("FILE_NAME") + End If + End Set + End Property + 'Private Sub pic_Click(sender As Object, e As EventArgs) Handles pic.Click, lbl.Click, Me.Click ' RaiseEvent ME_CLICK(My.Computer.Keyboard.CtrlKeyDown) 'End Sub @@ -165,4 +184,14 @@ Public Class usrCntlSendungAnhangElement MsgBox(ex.Message & ex.StackTrace) End Try End Sub + + Private Sub usrCntlSendungAnhangElement_Load(sender As Object, e As EventArgs) Handles Me.Load + If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("ADMINFUNCTIONS", "SDL") Then + KomprimierenToolStripMenuItem.Visible = True + End If + End Sub + + Private Sub KomprimierenToolStripMenuItem_Click(sender As Object, e As EventArgs) Handles KomprimierenToolStripMenuItem.Click + RaiseEvent ME_COMPRESS(FILE_DOCID, FILE_ANHID) + End Sub End Class diff --git a/Aviso/App.config b/Aviso/App.config index 63ffc81..a1e778d 100644 --- a/Aviso/App.config +++ b/Aviso/App.config @@ -1,15 +1,15 @@ - + -
+
- + - + @@ -21,55 +21,55 @@ 200, 200 - + - + - + - - + + - - + + - - + + - - - + + + - - - + + + - - + + - - + + - - + + diff --git a/Aviso/Aviso.vbproj b/Aviso/Aviso.vbproj index 93bef05..45a256c 100644 --- a/Aviso/Aviso.vbproj +++ b/Aviso/Aviso.vbproj @@ -17,7 +17,7 @@ AVISO 512 WindowsForms - v4.7 + v4.8 false @@ -282,17 +282,12 @@ ..\..\..\dll\NumericBox.dll - - False - ..\..\..\dll\Spire.PDF\2023\Spire.License.dll + + ..\..\..\dll\Spire.PDF\2024\Spire.Pdf.dll - + False - ..\..\..\dll\Spire.PDF\2023\Spire.Pdf.dll - - - False - ..\..\..\dll\Spire.PDF\2023\Spire.PdfViewer.Forms.dll + ..\..\..\dll\Spire.PDF\2024\Spire.PdfViewer.Forms.dll @@ -1621,6 +1616,7 @@ + Always @@ -1636,7 +1632,6 @@ Always - diff --git a/Aviso/My Project/Application.Designer.vb b/Aviso/My Project/Application.Designer.vb index 0d143a4..f763796 100644 --- a/Aviso/My Project/Application.Designer.vb +++ b/Aviso/My Project/Application.Designer.vb @@ -34,5 +34,11 @@ Namespace My Protected Overrides Sub OnCreateMainForm() Me.MainForm = Global.AVISO.frmLogin End Sub + + _ + Protected Overrides Function OnInitialize(ByVal commandLineArgs As System.Collections.ObjectModel.ReadOnlyCollection(Of String)) As Boolean + Me.MinimumSplashScreenDisplayTime = 0 + Return MyBase.OnInitialize(commandLineArgs) + End Function End Class End Namespace diff --git a/Aviso/My Project/Resources.Designer.vb b/Aviso/My Project/Resources.Designer.vb index 4ee09de..024e189 100644 --- a/Aviso/My Project/Resources.Designer.vb +++ b/Aviso/My Project/Resources.Designer.vb @@ -958,6 +958,16 @@ Namespace My.Resources End Get End Property + ''' + ''' Sucht eine lokalisierte Zeichenfolge, die <?xml version="1.0" encoding="utf-8" standalone="yes"?> + '''<License Key="PeQezZrFLTMrIgEAK1BoHk0gh6gdmwDKMvN6ITlC5j6D/r6sSq/TXAl5H/H/P/NvV74UnH1KUt0Cy0ef1LzPpvmqxVTsiTYA2eB3CX21oTggkxa3qP/UOJ42Kk8rwgVqchV9RJj9SlZb/zzhfN3nB4NR9rfoiwRDoE45ECcmsCO948+auxqRrc1ikuFDIM2j2YpwzoFxw3QCtLNAjhWhA8Ly7HUCNbtibu6rOnuePVThtmVNfQeTuagFSCDovxIJzlvFggZaQXI7zh3PEChu65zP7VZoJyxzfagJv5JItQCrX8BP+5YgKe6B7NBzUFGl1RqcucKn+MAQypgXrRXQY4UAWfQ4g9QTN2JTpaHZfgg22sGGV+cccDJmekfUPGfBOzlnzedJelMNWDVNBw7prh8vTdNRsOTJoFYDbh82UwRNkXethAElaJ9apM [Rest der Zeichenfolge wurde abgeschnitten]"; ähnelt. + ''' + Public ReadOnly Property license_elic() As String + Get + Return ResourceManager.GetString("license_elic", resourceCulture) + End Get + End Property + ''' ''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap. ''' diff --git a/Aviso/My Project/Resources.resx b/Aviso/My Project/Resources.resx index 297f136..47cd934 100644 --- a/Aviso/My Project/Resources.resx +++ b/Aviso/My Project/Resources.resx @@ -691,4 +691,7 @@ ..\Resources\memories5.png;System.Drawing.Bitmap, System.Drawing, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a + + ..\Resources\license.elic.xml;System.String, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;Windows-1252 + \ No newline at end of file diff --git a/Aviso/My Project/Settings.Designer.vb b/Aviso/My Project/Settings.Designer.vb index 936f759..c2375c0 100644 --- a/Aviso/My Project/Settings.Designer.vb +++ b/Aviso/My Project/Settings.Designer.vb @@ -15,7 +15,7 @@ Option Explicit On Namespace My _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase diff --git a/Aviso/My Project/license.elic.xml b/Aviso/My Project/license.elic.xml index fb5cc36..9cc4e50 100644 --- a/Aviso/My Project/license.elic.xml +++ b/Aviso/My Project/license.elic.xml @@ -1,24 +1,27 @@ - - + + + B081D0F5-EF94-42F2-B287-4812D84164CE Runtime VERAG Spedition AG al@verag.ag VERAG Spedition AG - 2022-07-12T00:00:00Z - 2023-07-12T00:00:00Z + 2024-08-31T00:00:00Z + 2025-08-31T00:00:00Z - Spire.PDFViewer for Forms - 7.1 + Spire.PDF Pro Edition + 10.7 + Developer Subscription 1 1 - Spire.PDF Pro Edition - 8.7 + Spire.PDFViewer for Forms + 7.12 + Developer Subscription 1 1 @@ -29,4 +32,4 @@ sales@e-iceblue.com http://www.e-iceblue.com - \ No newline at end of file + diff --git a/Aviso/Resources/license.elic.xml b/Aviso/Resources/license.elic.xml index fb5cc36..9cc4e50 100644 --- a/Aviso/Resources/license.elic.xml +++ b/Aviso/Resources/license.elic.xml @@ -1,24 +1,27 @@ - - + + + B081D0F5-EF94-42F2-B287-4812D84164CE Runtime VERAG Spedition AG al@verag.ag VERAG Spedition AG - 2022-07-12T00:00:00Z - 2023-07-12T00:00:00Z + 2024-08-31T00:00:00Z + 2025-08-31T00:00:00Z - Spire.PDFViewer for Forms - 7.1 + Spire.PDF Pro Edition + 10.7 + Developer Subscription 1 1 - Spire.PDF Pro Edition - 8.7 + Spire.PDFViewer for Forms + 7.12 + Developer Subscription 1 1 @@ -29,4 +32,4 @@ sales@e-iceblue.com http://www.e-iceblue.com - \ No newline at end of file + diff --git a/Aviso/frmLogin.vb b/Aviso/frmLogin.vb index 65ccac0..f15c3bf 100644 --- a/Aviso/frmLogin.vb +++ b/Aviso/frmLogin.vb @@ -62,6 +62,8 @@ Public Class frmLogin lblVersion.ContextMenuStrip = ctxUpdate If Application.ProductVersion.StartsWith("0") Then lblVersion.Text += " BETA" + VERAG_PROG_ALLGEMEIN.cProgramFunctions.spireLoadLicense() + Dim pfadDatei As String = Application.StartupPath & "\Standort.txt" firma = "VERAG" diff --git a/Aviso/packages.config b/Aviso/packages.config index 002632e..8ab584f 100644 --- a/Aviso/packages.config +++ b/Aviso/packages.config @@ -7,7 +7,7 @@ - + @@ -28,5 +28,5 @@ - + \ No newline at end of file diff --git a/Gemeinsames/App.config b/Gemeinsames/App.config index 5f70bbd..a86c646 100644 --- a/Gemeinsames/App.config +++ b/Gemeinsames/App.config @@ -1,6 +1,6 @@ - + diff --git a/Gemeinsames/Gemeinsames.vbproj b/Gemeinsames/Gemeinsames.vbproj index 458d258..63794a4 100644 --- a/Gemeinsames/Gemeinsames.vbproj +++ b/Gemeinsames/Gemeinsames.vbproj @@ -14,7 +14,7 @@ Gemeinsames 512 Windows - v4.7 + v4.8 false @@ -160,6 +160,7 @@ True Application.myapp + True True diff --git a/Gemeinsames/My Project/Settings.Designer.vb b/Gemeinsames/My Project/Settings.Designer.vb index 1fd9fbb..173d452 100644 --- a/Gemeinsames/My Project/Settings.Designer.vb +++ b/Gemeinsames/My Project/Settings.Designer.vb @@ -15,7 +15,7 @@ Option Explicit On Namespace My _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase From b1ba5c9700904ebc80532bd21b6af6bae6b45a5d Mon Sep 17 00:00:00 2001 From: Andreas Luxbauer Date: Fri, 6 Sep 2024 14:55:56 +0200 Subject: [PATCH 3/3] Vermerke (AAS) --- Aviso/My Project/AssemblyInfo.vb | 4 +- Aviso/usrcntlAktDetails.Designer.vb | 202 ++++++++++++++-------------- Aviso/usrcntlAktDetails.vb | 107 ++++++++------- 3 files changed, 161 insertions(+), 152 deletions(-) diff --git a/Aviso/My Project/AssemblyInfo.vb b/Aviso/My Project/AssemblyInfo.vb index c483ad8..254a862 100644 --- a/Aviso/My Project/AssemblyInfo.vb +++ b/Aviso/My Project/AssemblyInfo.vb @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' übernehmen, indem Sie "*" eingeben: ' - - + + diff --git a/Aviso/usrcntlAktDetails.Designer.vb b/Aviso/usrcntlAktDetails.Designer.vb index bc0d264..833bb70 100644 --- a/Aviso/usrcntlAktDetails.Designer.vb +++ b/Aviso/usrcntlAktDetails.Designer.vb @@ -23,17 +23,17 @@ Partial Class usrcntlAktDetails _ Private Sub InitializeComponent() Me.components = New System.ComponentModel.Container() - Dim DataGridViewCellStyle11 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle12 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle13 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle14 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle15 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + 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() + Dim DataGridViewCellStyle4 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle5 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(usrcntlAktDetails)) - Dim DataGridViewCellStyle16 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle17 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle18 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle19 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() - Dim DataGridViewCellStyle20 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle6 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle7 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle8 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle9 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() + Dim DataGridViewCellStyle10 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle() Me.pnlDetailsRechts = New System.Windows.Forms.Panel() Me.Panel3 = New System.Windows.Forms.Panel() Me.SplitContainer = New System.Windows.Forms.SplitContainer() @@ -65,6 +65,8 @@ Partial Class usrcntlAktDetails Me.btnQuckScan = New System.Windows.Forms.Button() Me.picArrowDown = New System.Windows.Forms.PictureBox() Me.Panel4 = New System.Windows.Forms.Panel() + Me.cbxLZDeFisk = New VERAG_PROG_ALLGEMEIN.MyCheckbox(Me.components) + Me.cbxLZT1 = New VERAG_PROG_ALLGEMEIN.MyCheckbox(Me.components) Me.Button2 = New System.Windows.Forms.Button() Me.cbxVPSplit = New System.Windows.Forms.CheckBox() Me.btnLZDruckDIGITAL = New System.Windows.Forms.Button() @@ -80,7 +82,6 @@ Partial Class usrcntlAktDetails Me.btnDipoListeEmail = New System.Windows.Forms.Button() Me.btnDispohaft = New System.Windows.Forms.Button() Me.cbxLZRg = New VERAG_PROG_ALLGEMEIN.MyCheckbox(Me.components) - Me.cbxLZT1 = New VERAG_PROG_ALLGEMEIN.MyCheckbox(Me.components) Me.Button18 = New System.Windows.Forms.Button() Me.gridVermerke = New System.Windows.Forms.DataGridView() Me.pnlVermerkeTop = New System.Windows.Forms.Panel() @@ -174,7 +175,6 @@ Partial Class usrcntlAktDetails Me.btnÄndern = New System.Windows.Forms.Button() Me.btnTV = New System.Windows.Forms.Button() Me.Button10 = New System.Windows.Forms.Button() - Me.cbxLZDeFisk = New VERAG_PROG_ALLGEMEIN.MyCheckbox(Me.components) Me.pnlDetailsRechts.SuspendLayout() Me.Panel3.SuspendLayout() CType(Me.SplitContainer, System.ComponentModel.ISupportInitialize).BeginInit() @@ -605,46 +605,46 @@ Partial Class usrcntlAktDetails Me.dgvSendungen.AllowUserToAddRows = False Me.dgvSendungen.AllowUserToDeleteRows = False Me.dgvSendungen.AllowUserToResizeRows = False - DataGridViewCellStyle11.BackColor = System.Drawing.Color.Azure - DataGridViewCellStyle11.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvSendungen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle11 + DataGridViewCellStyle1.BackColor = System.Drawing.Color.Azure + DataGridViewCellStyle1.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvSendungen.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle1 Me.dgvSendungen.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle12.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle12.BackColor = System.Drawing.Color.LightBlue - DataGridViewCellStyle12.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle12.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle12.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle12.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle12.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvSendungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle12 + DataGridViewCellStyle2.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle2.BackColor = System.Drawing.Color.LightBlue + DataGridViewCellStyle2.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle2.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle2.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle2.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle2.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvSendungen.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle2 Me.dgvSendungen.ColumnHeadersHeight = 34 Me.dgvSendungen.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing - DataGridViewCellStyle13.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle13.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle13.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle13.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle13.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle13.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle13.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.dgvSendungen.DefaultCellStyle = DataGridViewCellStyle13 + DataGridViewCellStyle3.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle3.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle3.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle3.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle3.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle3.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.dgvSendungen.DefaultCellStyle = DataGridViewCellStyle3 Me.dgvSendungen.Dock = System.Windows.Forms.DockStyle.Fill Me.dgvSendungen.Location = New System.Drawing.Point(0, 0) Me.dgvSendungen.MultiSelect = False Me.dgvSendungen.Name = "dgvSendungen" Me.dgvSendungen.ReadOnly = True - DataGridViewCellStyle14.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle14.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle14.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle14.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle14.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle14.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle14.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvSendungen.RowHeadersDefaultCellStyle = DataGridViewCellStyle14 + DataGridViewCellStyle4.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle4.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle4.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle4.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle4.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle4.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle4.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvSendungen.RowHeadersDefaultCellStyle = DataGridViewCellStyle4 Me.dgvSendungen.RowHeadersVisible = False Me.dgvSendungen.RowHeadersWidth = 62 Me.dgvSendungen.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing - DataGridViewCellStyle15.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.dgvSendungen.RowsDefaultCellStyle = DataGridViewCellStyle15 + DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.dgvSendungen.RowsDefaultCellStyle = DataGridViewCellStyle5 Me.dgvSendungen.RowTemplate.Height = 20 Me.dgvSendungen.RowTemplate.ReadOnly = True Me.dgvSendungen.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.[False] @@ -722,6 +722,35 @@ Partial Class usrcntlAktDetails Me.Panel4.TabIndex = 102 Me.Panel4.Visible = False ' + 'cbxLZDeFisk + ' + Me.cbxLZDeFisk._value = "" + Me.cbxLZDeFisk.AutoSize = True + Me.cbxLZDeFisk.Checked_value = False + Me.cbxLZDeFisk.CheckedValue = False + Me.cbxLZDeFisk.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!) + Me.cbxLZDeFisk.Location = New System.Drawing.Point(205, 93) + Me.cbxLZDeFisk.Name = "cbxLZDeFisk" + Me.cbxLZDeFisk.Size = New System.Drawing.Size(62, 17) + Me.cbxLZDeFisk.TabIndex = 118 + Me.cbxLZDeFisk.Text = "DE Fisk" + Me.cbxLZDeFisk.UseVisualStyleBackColor = True + ' + 'cbxLZT1 + ' + Me.cbxLZT1._value = "" + Me.cbxLZT1.AutoSize = True + Me.cbxLZT1.Checked_value = False + Me.cbxLZT1.CheckedValue = False + Me.cbxLZT1.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!) + Me.cbxLZT1.Location = New System.Drawing.Point(172, 93) + Me.cbxLZT1.Name = "cbxLZT1" + Me.cbxLZT1.Size = New System.Drawing.Size(37, 17) + Me.cbxLZT1.TabIndex = 114 + Me.cbxLZT1.Text = "T1" + Me.cbxLZT1.UseVisualStyleBackColor = True + Me.cbxLZT1.Visible = False + ' 'Button2 ' Me.Button2.BackColor = System.Drawing.Color.White @@ -948,21 +977,6 @@ Partial Class usrcntlAktDetails Me.cbxLZRg.Text = "RG" Me.cbxLZRg.UseVisualStyleBackColor = True ' - 'cbxLZT1 - ' - Me.cbxLZT1._value = "" - Me.cbxLZT1.AutoSize = True - Me.cbxLZT1.Checked_value = False - Me.cbxLZT1.CheckedValue = False - Me.cbxLZT1.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!) - Me.cbxLZT1.Location = New System.Drawing.Point(172, 93) - Me.cbxLZT1.Name = "cbxLZT1" - Me.cbxLZT1.Size = New System.Drawing.Size(37, 17) - Me.cbxLZT1.TabIndex = 114 - Me.cbxLZT1.Text = "T1" - Me.cbxLZT1.UseVisualStyleBackColor = True - Me.cbxLZT1.Visible = False - ' 'Button18 ' Me.Button18.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles) @@ -983,46 +997,46 @@ Partial Class usrcntlAktDetails Me.gridVermerke.AllowUserToAddRows = False Me.gridVermerke.AllowUserToDeleteRows = False Me.gridVermerke.AllowUserToResizeRows = False - DataGridViewCellStyle16.BackColor = System.Drawing.Color.Azure - DataGridViewCellStyle16.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gridVermerke.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle16 + DataGridViewCellStyle6.BackColor = System.Drawing.Color.Azure + DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gridVermerke.AlternatingRowsDefaultCellStyle = DataGridViewCellStyle6 Me.gridVermerke.BackgroundColor = System.Drawing.Color.White - DataGridViewCellStyle17.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle17.BackColor = System.Drawing.Color.LightBlue - DataGridViewCellStyle17.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle17.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle17.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle17.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle17.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gridVermerke.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle17 + DataGridViewCellStyle7.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle7.BackColor = System.Drawing.Color.LightBlue + DataGridViewCellStyle7.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle7.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle7.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle7.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle7.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gridVermerke.ColumnHeadersDefaultCellStyle = DataGridViewCellStyle7 Me.gridVermerke.ColumnHeadersHeight = 34 Me.gridVermerke.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.DisableResizing - DataGridViewCellStyle18.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle18.BackColor = System.Drawing.SystemColors.Window - DataGridViewCellStyle18.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle18.ForeColor = System.Drawing.SystemColors.ControlText - DataGridViewCellStyle18.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle18.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle18.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] - Me.gridVermerke.DefaultCellStyle = DataGridViewCellStyle18 + DataGridViewCellStyle8.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle8.BackColor = System.Drawing.SystemColors.Window + DataGridViewCellStyle8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle8.ForeColor = System.Drawing.SystemColors.ControlText + DataGridViewCellStyle8.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle8.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle8.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] + Me.gridVermerke.DefaultCellStyle = DataGridViewCellStyle8 Me.gridVermerke.Dock = System.Windows.Forms.DockStyle.Fill Me.gridVermerke.Location = New System.Drawing.Point(0, 30) Me.gridVermerke.MultiSelect = False Me.gridVermerke.Name = "gridVermerke" Me.gridVermerke.ReadOnly = True - DataGridViewCellStyle19.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft - DataGridViewCellStyle19.BackColor = System.Drawing.SystemColors.Control - DataGridViewCellStyle19.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) - DataGridViewCellStyle19.ForeColor = System.Drawing.SystemColors.WindowText - DataGridViewCellStyle19.SelectionBackColor = System.Drawing.SystemColors.Highlight - DataGridViewCellStyle19.SelectionForeColor = System.Drawing.SystemColors.HighlightText - DataGridViewCellStyle19.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gridVermerke.RowHeadersDefaultCellStyle = DataGridViewCellStyle19 + DataGridViewCellStyle9.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft + DataGridViewCellStyle9.BackColor = System.Drawing.SystemColors.Control + DataGridViewCellStyle9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) + DataGridViewCellStyle9.ForeColor = System.Drawing.SystemColors.WindowText + DataGridViewCellStyle9.SelectionBackColor = System.Drawing.SystemColors.Highlight + DataGridViewCellStyle9.SelectionForeColor = System.Drawing.SystemColors.HighlightText + DataGridViewCellStyle9.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gridVermerke.RowHeadersDefaultCellStyle = DataGridViewCellStyle9 Me.gridVermerke.RowHeadersVisible = False Me.gridVermerke.RowHeadersWidth = 62 Me.gridVermerke.RowHeadersWidthSizeMode = System.Windows.Forms.DataGridViewRowHeadersWidthSizeMode.DisableResizing - DataGridViewCellStyle20.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] - Me.gridVermerke.RowsDefaultCellStyle = DataGridViewCellStyle20 + DataGridViewCellStyle10.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] + Me.gridVermerke.RowsDefaultCellStyle = DataGridViewCellStyle10 Me.gridVermerke.RowTemplate.Height = 20 Me.gridVermerke.RowTemplate.ReadOnly = True Me.gridVermerke.RowTemplate.Resizable = System.Windows.Forms.DataGridViewTriState.[False] @@ -1985,7 +1999,7 @@ Partial Class usrcntlAktDetails Me.conMenuVermerke.ImageScalingSize = New System.Drawing.Size(24, 24) Me.conMenuVermerke.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.conVermerkEntgLöschen, Me.HervorhebenToolStripMenuItem, Me.ToolUeberweisungsBeleg, Me.toolVkReminder, Me.MitarbeiterAnzeigenToolStripMenuItem, Me.conVermerkLöschenNew}) Me.conMenuVermerke.Name = "conMenuVermerke" - Me.conMenuVermerke.Size = New System.Drawing.Size(252, 184) + Me.conMenuVermerke.Size = New System.Drawing.Size(252, 206) ' 'conVermerkEntgLöschen ' @@ -2013,7 +2027,7 @@ Partial Class usrcntlAktDetails Me.toolVkReminder.Image = Global.AVISO.My.Resources.Resources.urgent Me.toolVkReminder.Name = "toolVkReminder" Me.toolVkReminder.Size = New System.Drawing.Size(251, 30) - Me.toolVkReminder.Text = "VK: Reminder geschickt" + Me.toolVkReminder.Text = "Reminder geschickt" Me.toolVkReminder.Visible = False ' 'MitarbeiterAnzeigenToolStripMenuItem @@ -2245,20 +2259,6 @@ Partial Class usrcntlAktDetails Me.Button10.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button10.UseVisualStyleBackColor = False ' - 'cbxLZDeFisk - ' - Me.cbxLZDeFisk._value = "" - Me.cbxLZDeFisk.AutoSize = True - Me.cbxLZDeFisk.Checked_value = False - Me.cbxLZDeFisk.CheckedValue = False - Me.cbxLZDeFisk.Font = New System.Drawing.Font("Microsoft Sans Serif", 7.0!) - Me.cbxLZDeFisk.Location = New System.Drawing.Point(205, 93) - Me.cbxLZDeFisk.Name = "cbxLZDeFisk" - Me.cbxLZDeFisk.Size = New System.Drawing.Size(62, 17) - Me.cbxLZDeFisk.TabIndex = 118 - Me.cbxLZDeFisk.Text = "DE Fisk" - Me.cbxLZDeFisk.UseVisualStyleBackColor = True - ' 'usrcntlAktDetails ' Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None diff --git a/Aviso/usrcntlAktDetails.vb b/Aviso/usrcntlAktDetails.vb index 0653ee5..2a76335 100644 --- a/Aviso/usrcntlAktDetails.vb +++ b/Aviso/usrcntlAktDetails.vb @@ -443,6 +443,7 @@ Public Class usrcntlAktDetails .Columns("Datum").Width = 125 '110 .Columns("Datum").HeaderText = "Datum" .Columns("Datum").DefaultCellStyle.Format = "dd.MM. HH:mm (ddd)" + .Columns("DatumValue").Visible = False .Columns("Hinweis_Vermerk_Anzeige").MinimumWidth = 150 @@ -868,10 +869,10 @@ Public Class usrcntlAktDetails End Sub Public Shared vermerkehSQL As String = " SELECT TOP 1000 [VermerkID],[AvisoID], [SendungID],[VermerkeCode], [Datum],[MitarbeiterId],tblSendungen.tblSnd_PosUnterNr,Hervorheben,Geloescht," & - " CASE WHEN VermerkeCode IS NULL OR VermerkeCode IN (13,25,28,29,30,35,46,47,94,101,102) THEN Hinweis_Vermerk ELSE VermerkeCodes.Bezeichnung END as [Hinweis_Vermerk_Anzeige],[Hinweis_Vermerk], tblSendungen.tblSnd_Empfaenger ,[Mitarbeiter],VorauskasseId,SMSId,VermerkIDAufgehoben" & + " CASE WHEN VermerkeCode IS NULL OR VermerkeCode IN (13,25,28,29,30,35,46,47,94,78,101,102) THEN Hinweis_Vermerk ELSE VermerkeCodes.Bezeichnung END as [Hinweis_Vermerk_Anzeige],[Hinweis_Vermerk], tblSendungen.tblSnd_Empfaenger ,[Mitarbeiter],VorauskasseId,SMSId,VermerkIDAufgehoben, Datum as DatumValue" & " FROM [Vermerke] LEFT JOIN VermerkeCodes ON [VermerkeCode]=VermerkeCodes.VermerkCodeId " & " LEFT JOIN tblSendungen ON [SendungID]=tblSendungen.tblSnd_SendungID " & - " WHERE AvisoID = [[AvisoId]] [[sendwhere]] " & + " WHERE AvisoID = [[AvisoId]] [[sendwhere]] AND HintergrundVermerk =0 " & " order by /*VermerkArt ASC,tblSnd_PosUnterNr,*/Datum DESC " Private Sub Vermerke_anzeigen2(Optional rowindex As Integer = -1) If Not loaded Then Exit Sub @@ -1335,37 +1336,37 @@ Public Class usrcntlAktDetails Select Case CInt(r.Cells("VermerkeCode").Value) Case 1 - If Not existCodeInGridVermerke(gridvermerke, 2, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 2, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Auftrag erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Auftrag erhalten' einzutragen." End If Case 3 - If Not existCodeInGridVermerke(gridvermerke, 4, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 4, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Rechnung erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Rechnung erhalten' einzutragen." End If Case 5 - If Not existCodeInGridVermerke(gridvermerke, 6, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 6, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "LS erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'LS erhalten' einzutragen." End If Case 7 - If Not existCodeInGridVermerke(gridvermerke, 8, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 8, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "ATR erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'ATR erhalten' einzutragen." End If Case 9 - If Not existCodeInGridVermerke(gridvermerke, 10, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 10, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Vollmacht erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Vollmacht erhalten' einzutragen." End If Case 11 - If Not existCodeInGridVermerke(gridvermerke, 12, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 12, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "CMR erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'CMR erhalten' einzutragen." End If Case 90 - If Not existCodeInGridVermerke(gridvermerke, 93, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 93, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Packliste erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Packliste erhalten' einzutragen." End If @@ -1385,32 +1386,32 @@ Public Class usrcntlAktDetails End If End If Case 17 - If Not existCodeInGridVermerke(gridvermerke, 18) Then + If Not existCodeInGridVermerke(r, gridvermerke, 18) Then optionCell.Value = "DE-ZOLL fertig" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'DE-ZOLL fertig' einzutragen." End If Case 19 - If Not existCodeInGridVermerke(gridvermerke, 20) Then + If Not existCodeInGridVermerke(r, gridvermerke, 20) Then optionCell.Value = "AT-ZOLL fertig" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'AT-ZOLL fertig' einzutragen." End If Case 25 - If Not existCodeInGridVermerke(gridvermerke, 30, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 30, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Dokument erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Dokument erhalten' einzutragen." End If Case 31 - If Not existCodeInGridVermerke(gridvermerke, 32, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 32, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Vorbereitung abgeschlossen" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Vorbereitung abgeschlossen' einzutragen." End If Case 33 - If Not existCodeInGridVermerke(gridvermerke, 34, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 34, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "ATA-Nr. erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'ATA-Nr. erhalten' einzutragen." End If Case 36 - If Not existCodeInGridVermerke(gridvermerke, 37, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 37, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Kontaktdaten erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Kontaktdaten erhalten' einzutragen." End If @@ -1447,46 +1448,46 @@ Public Class usrcntlAktDetails End Select End If Case 53 - If Not existCodeInGridVermerke(gridvermerke, 54, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 54, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Ü-Dok erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Ü-Dok erhalten' einzutragen." End If Case 55 - If Not existCodeInGridVermerke(gridvermerke, 56, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 56, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Rg-Best. erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Rg-Best. erhalten' einzutragen." End If Case 57 - If Not existCodeInGridVermerke(gridvermerke, 58, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 58, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Dispoliste erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Dispoliste erhalten' einzutragen." End If Case 74 - If Not existCodeInGridVermerke(gridvermerke, 75, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 75, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Frachtkosten erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Frachtkosten erhalten' einzutragen." End If Case 76 - If Not existCodeInGridVermerke(gridvermerke, 77, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 77, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Absend.best. erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Absenderbestätigung erhalten' einzutragen." End If Case 96 - If Not existCodeInGridVermerke(gridvermerke, 97, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 97, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "T1 Bestätigung erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'T1 Bestätigung erhalten' einzutragen." End If Case 80 - If Not existCodeInGridVermerke(gridvermerke, 81, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 81, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "ATB-Nr. erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'ATB-Nr. erhalten' einzutragen." End If Case 82 - If Not existCodeInGridVermerke(gridvermerke, 83) Then + If Not existCodeInGridVermerke(r, gridvermerke, 83) Then optionCell.Value = "DE-ZOLL fertig" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'DE-ZOLL (DIGITAL) fertig' einzutragen." End If @@ -1499,17 +1500,17 @@ Public Class usrcntlAktDetails optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Sonstiger Grund erledigt' einzutragen." End If Case 103 - If Not existCodeInGridVermerke(gridvermerke, 104, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 104, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Gewicht/Packstücke erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Gewicht/Packstücke erhalten' einzutragen." End If Case 105 - If Not existCodeInGridVermerke(gridvermerke, 106, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 106, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Zolltarifnummer erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Zolltarifnummer erhalten' einzutragen." End If Case 107 - If Not existCodeInGridVermerke(gridvermerke, 108, CStr(r.Cells("Hinweis_Vermerk").Value)) Then + If Not existCodeInGridVermerke(r, gridvermerke, 108, CStr(r.Cells("Hinweis_Vermerk").Value)) Then optionCell.Value = "Kostenbestätigung erhalten" optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk 'Kostenbestätigung erhalten' einzutragen." End If @@ -1547,28 +1548,33 @@ Public Class usrcntlAktDetails End Select End Sub - Shared Function existCodeInGridVermerke(gridVermerke As DataGridView, code As Integer, Optional text As String = "") As Boolean - - For Each r As DataGridViewRow In gridVermerke.Rows - If r.Cells("Geloescht").Value = False Then - If DirectCast(r.Cells("VermerkeCode"), DataGridViewTextBoxCell).Value.ToString = CStr(code) Then - Select Case code - Case 59 - Return True - Case 2, 4, 6, 8, 10, 12, 14, 30, 37, 34 - If text = "" Or DirectCast(r.Cells("Hinweis_Vermerk"), DataGridViewTextBoxCell).Value.ToString.Replace("erhalten", "angefordert") = text Then - Return True - End If - Case 32 - If DirectCast(r.Cells("Hinweis_Vermerk"), DataGridViewTextBoxCell).Value.ToString.Replace("Vorbereitung abgeschlossen", "in Vorbereitung") = text Then - Return True - End If - Case Else - Return True - End Select - End If + Shared Function existCodeInGridVermerke(row As DataGridViewRow, gridVermerke As DataGridView, code As Integer, Optional text As String = "") As Boolean + If row.Cells("Datum").Value >= "09.09.2024" Then + If row.Cells("VermerkIDAufgehoben").Value Is DBNull.Value Then + Return False End If - Next + Else + For Each r As DataGridViewRow In gridVermerke.Rows + If r.Cells("Geloescht").Value = False Then + If DirectCast(r.Cells("VermerkeCode"), DataGridViewTextBoxCell).Value.ToString = CStr(code) Then + Select Case code + Case 59 + Return True + Case 2, 4, 6, 8, 10, 12, 14, 30, 37, 34 + If text = "" Or DirectCast(r.Cells("Hinweis_Vermerk"), DataGridViewTextBoxCell).Value.ToString.Replace("erhalten", "angefordert") = text Then + Return True + End If + Case 32 + If DirectCast(r.Cells("Hinweis_Vermerk"), DataGridViewTextBoxCell).Value.ToString.Replace("Vorbereitung abgeschlossen", "in Vorbereitung") = text Then + Return True + End If + Case Else + Return True + End Select + End If + End If + Next + End If Return False End Function @@ -1764,7 +1770,8 @@ Public Class usrcntlAktDetails conMenuVermerke.Show(Cursor.Position) ToolUeberweisungsBeleg.Visible = (gridVermerke.SelectedRows(0).Cells("VermerkeCode").Value = "13") - toolVkReminder.Visible = (gridVermerke.SelectedRows(0).Cells("VermerkeCode").Value = "13") + toolVkReminder.Visible = True '(gridVermerke.SelectedRows(0).Cells("VermerkeCode").Value = "13") + ' toolVkReminder.Visible = (gridVermerke.SelectedRows(0).Cells("VermerkIDAufgehoben").Value Is DBNull.Value) End If Case 3 @@ -3667,8 +3674,10 @@ Public Class usrcntlAktDetails Dim AvisoId_Tmp = gridVermerke.SelectedRows(0).Cells("AvisoId").Value Dim SendungID_Tmp = gridVermerke.SelectedRows(0).Cells("SendungID").Value + If sender Is toolVkReminder Then - AvisoStatusFunctions.insertSendungsVermerk(SendungID_Tmp, AvisoId_Tmp, "VK: Reminder geschickt", 78,, gridVermerke.SelectedRows(0).Cells("VorauskasseId").Value) + Dim VermerkTxt = gridVermerke.SelectedRows(0).Cells("Hinweis_Vermerk").Value + AvisoStatusFunctions.insertSendungsVermerk(SendungID_Tmp, AvisoId_Tmp, "REMINDER: " & VermerkTxt, 78,, gridVermerke.SelectedRows(0).Cells("VorauskasseId").Value) ElseIf sender Is ToolUeberweisungsBeleg Then AvisoStatusFunctions.insertSendungsVermerk(SendungID_Tmp, AvisoId_Tmp, "VK: Überweisungsbeleg erhalten.", 79,, gridVermerke.SelectedRows(0).Cells("VorauskasseId").Value) End If