Compare commits

...

12 Commits

Author SHA1 Message Date
7f35fecfa2 MS Mailhandling und Update Service 2024-03-20 13:34:36 +01:00
45ca73af35 Merge branch 'master' of http://dd-vmp07-com04:3000/AppStd/ResulHandlerMSSQL 2024-03-20 10:48:28 +01:00
48f9673472 MS Mail Handling und Manual Run 2024-03-20 10:48:16 +01:00
Jonathan Jenne
a70f006bb1 fix 2023-10-12 08:43:02 +02:00
Jonathan Jenne
36e2d97b20 fix 2023-10-11 15:08:24 +02:00
Jonathan Jenne
6add3760bd fix 2023-10-11 15:07:13 +02:00
Jonathan Jenne
2a76d515cb fix session 2023-10-11 15:05:08 +02:00
Jonathan Jenne
52c3939ad6 Merge branch 'recovered' 2023-10-11 15:00:28 +02:00
Jonathan Jenne
268e4d595e WIP on master: 820d09d update nlog to 5.0.5, .net to 4.6.2 2023-10-11 14:50:23 +02:00
Jonathan Jenne
10f417eb7c index on master: 820d09d update nlog to 5.0.5, .net to 4.6.2 2023-10-11 14:50:23 +02:00
Jonathan Jenne
90868864ab untracked files on master: 820d09d update nlog to 5.0.5, .net to 4.6.2 2023-10-11 14:50:23 +02:00
e2389321ce MS Update MEssaging 2023-10-11 14:48:29 +02:00
13 changed files with 655 additions and 615 deletions

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.9.0.0")>
<Assembly: AssemblyFileVersion("2.9.0.0")>
<Assembly: AssemblyVersion("3.0.0.0")>
<Assembly: AssemblyFileVersion("3.0.0.0")>

View File

@@ -703,7 +703,7 @@ Public Class clsDateiverarbeitung
Logger.Debug("indexvalue read is: '" & wdIndexwert & "'")
Try
Dim oConvertDT As DateTime
If DateTime.TryParse(wdIndexwert, oConvertDT) Then
If DateTime.TryParse(wdIndexwert.ToString, oConvertDT) Then
Logger.Debug("indexvalue is datetime - converting to date")
Dim myDate As Date = wdIndexwert
wdIndexwert = Format(myDate, "yyyy-MM-dd")

View File

@@ -1,5 +1,6 @@
Imports DigitalData.Modules.Logging
Imports DigitalData.Modules.Messaging
Imports DigitalData.Modules.Messaging.Mail
Public Class clsJob_Work
Dim Logger As Logger
@@ -56,7 +57,8 @@ Public Class clsJob_Work
If Attachment_Filename <> String.Empty Then
oAttMt.Add(Attachment_Filename)
End If
If _mail.ConnectToServer(oMAILSMTP, oMAIL_PORT, oMAIL_USER, oPWPlain, oMAIL_AUTH_TYPE) = True Then
Dim oSession = _mail.Connect(oMAILSMTP, oMAIL_PORT, oMAIL_USER, oPWPlain, oMAIL_AUTH_TYPE)
If oSession.Connected = True Then
Logger.Info($"MAIL: Connection to {oMAILSMTP} successfull!")
If _mail.SendMail(oSendto, oMAILFROM, Email_subject, Email_Body, Now, oAttMt, 0) = True Then
Return True

File diff suppressed because it is too large Load Diff

View File

@@ -167,7 +167,7 @@ Public Class DDWDResultHandler
_PROFIL_ID = CInt(DR.Item("GUID"))
_profil = New clsProfil(MyLogger, _PROFIL_ID)
'Und nun das Profil durchlaufen
Dim initresult = _profil.Init(_PROFIL_ID)
Dim initresult = _profil.Init(_PROFIL_ID, False)
If initresult = True Then
'##### Profildurchlauf ########
_profil.Profil_Durchlauf(False)

View File

@@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' übernehmen, indem Sie "*" eingeben:
' <Assembly: AssemblyVersion("1.0.*")>
<Assembly: AssemblyVersion("2.3.0.0")>
<Assembly: AssemblyFileVersion("2.3.0.0")>
<Assembly: AssemblyVersion("2.4.0.0")>
<Assembly: AssemblyFileVersion("2.4.0.0")>

View File

@@ -8,7 +8,8 @@
<section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=6.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
</configSections>
<connectionStrings>
<add name="ResultHandler_Konfig.My.MySettings.SQLSERVER_CS" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd" providerName="System.Data.SqlClient" />
<add name="ResultHandler_Konfig.My.MySettings.SQLSERVER_CS" connectionString="Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd"
providerName="System.Data.SqlClient" />
</connectionStrings>
<startup>
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" />

View File

@@ -15,7 +15,7 @@ Option Explicit On
Namespace My
<Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.3.0.0"), _
Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "17.5.0.0"), _
Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _
Partial Friend NotInheritable Class MySettings
Inherits Global.System.Configuration.ApplicationSettingsBase
@@ -54,17 +54,6 @@ Namespace My
End Get
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
"rity Info=True;User ID=sa;Password=dd")> _
Public ReadOnly Property SQLSERVER_CS() As String
Get
Return CType(Me("SQLSERVER_CS"),String)
End Get
End Property
<Global.System.Configuration.UserScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.DefaultSettingValueAttribute("")> _
@@ -100,6 +89,17 @@ Namespace My
Me("Debug_Active") = value
End Set
End Property
<Global.System.Configuration.ApplicationScopedSettingAttribute(), _
Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _
Global.System.Configuration.SpecialSettingAttribute(Global.System.Configuration.SpecialSetting.ConnectionString), _
Global.System.Configuration.DefaultSettingValueAttribute("Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Secu"& _
"rity Info=True;User ID=sa;Password=dd")> _
Public ReadOnly Property SQLSERVER_CS() As String
Get
Return CType(Me("SQLSERVER_CS"),String)
End Get
End Property
End Class
End Namespace

View File

@@ -2,14 +2,6 @@
<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)" GeneratedClassNamespace="My" GeneratedClassName="MySettings" UseMySettingsClassName="true">
<Profiles />
<Settings>
<Setting Name="SQLSERVER_CS" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"&gt;
&lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
</Setting>
<Setting Name="BNSAPI_HOST" Type="System.String" Scope="User">
<Value Profile="(Default)" />
</Setting>
@@ -19,5 +11,13 @@
<Setting Name="Debug_Active" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="SQLSERVER_CS" Type="(Connection string)" Scope="Application">
<DesignTimeValue Profile="(Default)">&lt;?xml version="1.0" encoding="utf-16"?&gt;
&lt;SerializableConnectionString xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"&gt;
&lt;ConnectionString&gt;Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd&lt;/ConnectionString&gt;
&lt;ProviderName&gt;System.Data.SqlClient&lt;/ProviderName&gt;
&lt;/SerializableConnectionString&gt;</DesignTimeValue>
<Value Profile="(Default)">Data Source=SDD-VMP04-SQL17\DD_DEVELOP01;Initial Catalog=DD_ECM_TEST;Persist Security Info=True;User ID=sa;Password=dd</Value>
</Setting>
</Settings>
</SettingsFile>

View File

@@ -4,6 +4,7 @@ Imports DigitalData.Modules.Messaging
Imports DD_WMResulthandler
Imports System.Net.Mail
Imports System.Net
Imports DigitalData.Modules.Messaging.Mail
Public Class frmMain
Private _windream As clsWindream_allgemein
@@ -732,7 +733,7 @@ Public Class frmMain
For Each DR As DataRow In DT.Rows
clsCURRENT._PROFIL_ID = CInt(DR.Item("GUID"))
'Und nun das Profil durchlaufen
Dim initresult = _profil.Init(clsCURRENT._PROFIL_ID)
Dim initresult = _profil.Init(clsCURRENT._PROFIL_ID, True)
If initresult = True Then
_profil.Profil_Durchlauf(True)
ElseIf initresult = False Then
@@ -911,26 +912,27 @@ Public Class frmMain
End Sub
Private Sub btnsendtestmail_Click(sender As Object, e As EventArgs) Handles btnsendtestmail.Click
' Dim _ss2email As New Email(MyLogger)
Dim llmail As New MailSender(MyLogger)
Dim oSender As New MailSender(MyLogger)
If txtTestmailTo.Text <> String.Empty Then
My.Settings.Save()
Dim wrapper As New clsEncryption("!35452didalog=")
Dim PWPlain = wrapper.DecryptData(EMAIL_PWTextBox.Text)
If llmail.ConnectToServer(EMAIL_SMTPTextBox.Text, PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text) = True Then
Dim oSession = oSender.Connect(EMAIL_SMTPTextBox.Text, PORTTextBox.Text, EMAIL_USERTextBox.Text, PWPlain, AUTH_TYPEComboBox.Text)
If oSession.Connected = True Then
Dim oSendto As New List(Of String)
oSendto.Add(txtTestmailTo.Text)
Dim oAttMt As New List(Of String)
If txtAttachment.Text <> String.Empty Then
oAttMt.Add(txtAttachment.Text)
End If
If llmail.SendMail(oSendto, EMAIL_FROMTextBox.Text, "Testmail from GUI WMResultHandler", "TEST", Now, oAttMt, 1) = True Then
If oSender.SendMail(oSendto, EMAIL_FROMTextBox.Text, "Testmail from GUI WMResultHandler", "TEST", Now, oAttMt, 1) = True Then
MsgBox("Email has been sent successfully.", MsgBoxStyle.Information)
Else
MsgBox("Could not send the testmail. Please check the log.", MsgBoxStyle.Exclamation)
End If
llmail.DisconnectFromServer()
oSender.Disconnect()
Else
MsgBox("Could not connect to server. Please check the log.", MsgBoxStyle.Exclamation)