This commit is contained in:
2024-02-21 08:04:33 +01:00
parent eb291ea140
commit 7874423adc
5 changed files with 60 additions and 51 deletions

View File

@@ -49,6 +49,7 @@ Public Class VERAGRibbon
Try
MsgBox("User: " & System.Security.Principal.WindowsIdentity.GetCurrent().Name & vbNewLine & "Version: " & Assembly.GetExecutingAssembly().GetName().Version.ToString & vbNewLine & "System: " & IIf(cAllgemein.TESTSYSTEM, "TEST", "PRODUKTIV"))
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
@@ -118,7 +119,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & vbNewLine & ex.InnerException.ToString, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
@@ -186,7 +187,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
@@ -221,7 +222,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End If
End If
@@ -240,7 +241,7 @@ Public Class AVISO_Mail_Functions
End If
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
@@ -263,7 +264,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
Shared Function initFirmaUser() As Boolean
@@ -290,23 +291,23 @@ Public Class AVISO_Mail_Functions
End If
End If
Catch ex As Exception
' MsgBox(ex.Message & ex.StackTrace)
' VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
If Not LOGIN_OK Then
LOGIN_OK = ADMIN.checkLogin("MAIL_USER", "VERAG_MAIL_USER_2017", VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA)
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return LOGIN_OK
End Function
Shared Sub NewAviso_Hauptfenster()
VERAG_PROG_ALLGEMEIN.DATENVERVER_OPTIONS.clearTMPPath("OutlookAttach")
Try
Dim explorer As Outlook.Explorer = Globals.ThisAddIn.Application.ActiveExplorer
Dim selection As Outlook.Selection = explorer.Selection
If selection.Count > 0 Then
@@ -317,8 +318,9 @@ Public Class AVISO_Mail_Functions
End If
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
@@ -335,7 +337,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Sub
@@ -349,12 +351,13 @@ Public Class AVISO_Mail_Functions
End Function
Shared Sub NewAviso(mailItem As Outlook.MailItem)
Dim ATTACHMENTS_LIST As New List(Of String)
Dim ATTACHMENTS_LIST As New List(Of String)
Dim KundenNr = -1
Dim EingangsDatum As Date = CDate("01.01.1990")
If mailItem IsNot Nothing Then
Try
'MsgBox(mailItem.To)
@@ -371,7 +374,7 @@ Public Class AVISO_Mail_Functions
End If
KundenNr = VERAG_PROG_ALLGEMEIN.cKundenKontakte.getKdNrFromMailAdress(senderMail, False) ' false, wenn mehrere Niederlassungen von Frimen im KdStamm vorhanden... falsche KdNr...
KundenNr = cKundenKontakte.getKdNrFromMailAdress(senderMail, False) ' false, wenn mehrere Niederlassungen von Frimen im KdStamm vorhanden... falsche KdNr...
If isMail_EKOL(mailItem) Then
If vbYes = MsgBox("EKOL-Anhänge laden?", vbYesNoCancel) Then getATT_EKOL(mailItem, ATTACHMENTS_LIST)
@@ -386,7 +389,7 @@ Public Class AVISO_Mail_Functions
loadAttachment(mailItem, ATTACHMENTS_LIST)
VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID = 0
cGlobal.Aktive_ID = 0
Dim mainForm As New AVISO.frmEintragAviso
mainForm.ATT = ATTACHMENTS_LIST
If KundenNr > 0 Then
@@ -402,14 +405,14 @@ Public Class AVISO_Mail_Functions
mainForm.ShowDialog()
ATTACHMENTS_LIST = mainForm.ATT
If VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID > 0 Then
If cGlobal.Aktive_ID > 0 Then
saveAttachment(ATTACHMENTS_LIST, VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID, -1, art, "")
saveMail(mailItem, VERAG_PROG_ALLGEMEIN.cGlobal.Aktive_ID,, False)
saveAttachment(ATTACHMENTS_LIST, cGlobal.Aktive_ID, -1, art, "")
saveMail(mailItem, cGlobal.Aktive_ID,, False)
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Finally
Try
@@ -424,7 +427,7 @@ Public Class AVISO_Mail_Functions
'End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace & ex.InnerException.ToString, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Try
@@ -551,7 +554,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
End Function
Public Shared Function GetTempFilePathWithExtension(ByVal extension As String) As String
@@ -568,7 +571,7 @@ Public Class AVISO_Mail_Functions
Return mailItem.HTMLBody.ToString.Contains(srch)
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
@@ -580,7 +583,7 @@ Public Class AVISO_Mail_Functions
Return mailItem.HTMLBody.ToString.Contains(srch)
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return False
End Function
@@ -625,7 +628,7 @@ Public Class AVISO_Mail_Functions
INFO = getEKOL_Var(html, "Route :")
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ATT
End Function
@@ -711,7 +714,7 @@ Public Class AVISO_Mail_Functions
'INFO = getEKOL_Var(html, "Route :")
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
End Try
Return ATT
End Function
@@ -758,7 +761,7 @@ Public Class AVISO_Mail_Functions
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Finally
If mailItem IsNot Nothing Then
Marshal.ReleaseComObject(mailItem)
@@ -787,7 +790,7 @@ Public Class AVISO_Mail_Functions
System.IO.File.Delete(strTmpPath)
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Finally
If mailItem IsNot Nothing Then
Marshal.ReleaseComObject(mailItem)