Sonderzeichen bei Datenserverupload werden nun entfernt.

This commit is contained in:
2023-06-26 10:53:26 +02:00
parent 9252a2adc8
commit 03e5c95cc7
5 changed files with 35 additions and 9 deletions

View File

@@ -47,6 +47,7 @@ Partial Class frmAvisoAnfuegen
Me.dgvAviso = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.bttnSaveMail = New System.Windows.Forms.Button()
Me.btnSaveAttachments = New System.Windows.Forms.Button()
Me.Label4 = New System.Windows.Forms.Label()
CType(Me.dgvAnhaenge, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvSendungen, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvAviso, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -397,12 +398,24 @@ Partial Class frmAvisoAnfuegen
Me.btnSaveAttachments.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnSaveAttachments.UseVisualStyleBackColor = True
'
'Label4
'
Me.Label4.AutoSize = True
Me.Label4.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label4.ForeColor = System.Drawing.Color.Red
Me.Label4.Location = New System.Drawing.Point(530, 4)
Me.Label4.Name = "Label4"
Me.Label4.Size = New System.Drawing.Size(100, 20)
Me.Label4.TabIndex = 39
Me.Label4.Text = "Testsystem"
'
'frmAvisoAnfuegen
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(642, 797)
Me.Controls.Add(Me.Label4)
Me.Controls.Add(Me.dgvAnhaenge)
Me.Controls.Add(Me.cboArt)
Me.Controls.Add(Me.Label3)
@@ -461,4 +474,5 @@ Partial Class frmAvisoAnfuegen
Friend WithEvents columnName As Windows.Forms.DataGridViewTextBoxColumn
Friend WithEvents cbx As Windows.Forms.CheckBox
Friend WithEvents CheckBox1 As Windows.Forms.CheckBox
Friend WithEvents Label4 As Windows.Forms.Label
End Class

View File

@@ -20,6 +20,7 @@ Public Class frmAvisoAnfuegen
Private Sub frmAvisoAnfügen_Load(sender As Object, e As EventArgs) Handles Me.Load
txtBezeichnung.Text = Bezeichnung
txtSrchDat.Text = Now.AddMonths(-1).ToShortDateString
Label4.Visible = VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM
cboFiliale.fillWithSQL("SELECT FilialenNr, Grenzstelle FROM Filialen WHERE Fil_Status='A' ORDER BY FilialenNr ", True, "FMZOLL", True)
txtLKWNr.Focus()

View File

@@ -1,7 +1,7 @@
Partial Class rbnMailItem
Inherits Microsoft.Office.Tools.Ribbon.RibbonBase
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Public Sub New(ByVal container As System.ComponentModel.IContainer)
MyClass.New()
@@ -12,7 +12,7 @@
End Sub
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Public Sub New()
MyBase.New(Globals.Factory.GetRibbonFactory())
@@ -22,7 +22,7 @@
End Sub
'Die Komponente überschreibt den Löschvorgang zum Bereinigen der Komponentenliste.
<System.Diagnostics.DebuggerNonUserCode()> _
<System.Diagnostics.DebuggerNonUserCode()>
Protected Overrides Sub Dispose(ByVal disposing As Boolean)
Try
If disposing AndAlso components IsNot Nothing Then
@@ -39,7 +39,7 @@
'Hinweis: Die folgende Prozedur ist für den Komponenten-Designer erforderlich.
'Das Bearbeiten ist mit dem Komponenten-Designer möglich.
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()> _
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Me.Tab1 = Me.Factory.CreateRibbonTab

View File

@@ -13,7 +13,8 @@ Public Class rbnMailItem
Dim currentexplorer As Outlook.Explorer
Private Sub rbnMailItem_Load(ByVal sender As System.Object, ByVal e As RibbonUIEventArgs) Handles MyBase.Load
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
' VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = False
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = True
LOGIN_OK = AVISO_Mail_Functions.initFirmaUser()
currentexplorer = ThisAddIn.SharedExplorer

View File

@@ -12,6 +12,7 @@ Imports SDL
Imports System.Net
Imports System.Security.Policy
Imports System.Diagnostics.Eventing.Reader
Imports System.Runtime.InteropServices.ComTypes
Public Class VERAGRibbon
Dim LOGIN_OK = False
@@ -35,7 +36,8 @@ Public Class VERAGRibbon
Private Sub Ribbon1_Load(ByVal sender As System.Object, ByVal e As RibbonUIEventArgs) Handles MyBase.Load
cAllgemein.TESTSYSTEM = False
'cAllgemein.TESTSYSTEM = False
cAllgemein.TESTSYSTEM = True
LOGIN_OK = AVISO_Mail_Functions.initFirmaUser()
End Sub
@@ -138,6 +140,7 @@ Public Class AVISO_Mail_Functions
Dim strFileName As String = "E-Mail"
If mailItem.Subject IsNot Nothing AndAlso mailItem.Subject <> "" Then
strFileName = Left(Regex.Replace(mailItem.Subject, "[\/\\\:\?!€,&'\*\<\>\|""]", ""), 100).Replace("""", "").Replace(vbTab, " ") & ".msg"
strFileName = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(strFileName)
End If
'Dim strFileName As String = "Mail.msg"
Dim pdf_mail = ""
@@ -602,8 +605,10 @@ Public Class AVISO_Mail_Functions
Try
If AvisoId > 0 Then
' The full path will place the email in the user's temporary folder
If bezeichnung = "" Then bezeichnung = Left(Regex.Replace(mailItem.Subject, "[\/\\\:\?\*\<\>\|""]", ""), 100).Replace("""", "").Replace(vbTab, " ") & ".msg"
bezeichnung = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(bezeichnung)
Dim strTmpPath As String = System.IO.Path.GetTempPath() & bezeichnung & If(bezeichnung.EndsWith(".msg"), "", ".msg")
' Save the email to the user's temp folder and convert it to a .MSG
'Dim cnt = 0
@@ -623,6 +628,7 @@ Public Class AVISO_Mail_Functions
' Clean up the temporary .MSG file from the user's temporary folder
System.IO.File.Delete(strTmpPath)
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
Finally
@@ -636,9 +642,13 @@ Public Class AVISO_Mail_Functions
Try
If AvisoId > 0 Then
If bezeichnung = "" Then bezeichnung = Left(Regex.Replace(mailItem.Subject, "[\/\\\:\?\*\<\>\|""]", ""), 100).Replace("""", "").Replace(vbTab, " ") & ".msg"
Dim strTmpPath As String = System.IO.Path.GetTempPath() & bezeichnung & If(bezeichnung.EndsWith(".msg"), "", ".msg")
If bezeichnung = "" Then
bezeichnung = Left(Regex.Replace(mailItem.Subject, "[\/\\\:\?\*\<\>\|""]", ""), 100).Replace("""", "").Replace(vbTab, " ") & ".msg"
End If
bezeichnung = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(bezeichnung)
Dim strTmpPath As String = System.IO.Path.GetTempPath() & bezeichnung & If(bezeichnung.EndsWith(".msg"), "", ".msg")
mailItem.SaveAs(strTmpPath, Outlook.OlSaveAsType.olMSG)