Compare commits

..

5 Commits

Author SHA1 Message Date
2075e5e5f7 Zollern, etc. 2026-05-06 11:32:14 +02:00
da8c599ec3 gesamtsicherheiten, Ref, Mail, etc. 2026-04-09 13:01:47 +02:00
0a66718faa Merge branch 'master' of https://git.it.verag.ag/edv/VERAGAddIn 2026-03-26 08:28:45 +01:00
719b1bf562 fix 2026-03-26 08:28:42 +01:00
5faf41f513 neue Logik für DFDS 2026-03-26 08:16:29 +01:00
4 changed files with 117 additions and 81 deletions

View File

@@ -36,7 +36,7 @@
<PublishUrl>\\ftps.verag.ag\g\FTP\Programme\VeragAddin\</PublishUrl> <PublishUrl>\\ftps.verag.ag\g\FTP\Programme\VeragAddin\</PublishUrl>
<InstallUrl>http://ftps.verag.ag/VERAGAddin/</InstallUrl> <InstallUrl>http://ftps.verag.ag/VERAGAddin/</InstallUrl>
<TargetCulture>de</TargetCulture> <TargetCulture>de</TargetCulture>
<ApplicationVersion>1.0.1.138</ApplicationVersion> <ApplicationVersion>1.0.1.140</ApplicationVersion>
<AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision> <AutoIncrementApplicationRevision>true</AutoIncrementApplicationRevision>
<UpdateEnabled>true</UpdateEnabled> <UpdateEnabled>true</UpdateEnabled>
<UpdateInterval>0</UpdateInterval> <UpdateInterval>0</UpdateInterval>
@@ -392,10 +392,11 @@
<SignManifests>true</SignManifests> <SignManifests>true</SignManifests>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ManifestKeyFile>AL20231110.pfx</ManifestKeyFile> <ManifestKeyFile>
</ManifestKeyFile>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<ManifestCertificateThumbprint>75156A186435E8542612CE6E7E26CA9FCE0A5BAF</ManifestCertificateThumbprint> <ManifestCertificateThumbprint>D21E170FE10FFCC8532FBDEFB75A35DB90661CC0</ManifestCertificateThumbprint>
</PropertyGroup> </PropertyGroup>
<PropertyGroup> <PropertyGroup>
<SignAssembly>false</SignAssembly> <SignAssembly>false</SignAssembly>

View File

@@ -60,12 +60,32 @@
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" /> <assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.2.0.0" newVersion="4.2.0.0" /> <bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly> <dependentAssembly>
<assemblyIdentity name="Spire.PdfViewer.Forms" publicKeyToken="663f351905198cb3" culture="neutral" /> <assemblyIdentity name="Spire.PdfViewer.Forms" publicKeyToken="663f351905198cb3" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-4.9.5.3046" newVersion="4.9.5.3046" /> <bindingRedirect oldVersion="0.0.0.0-4.9.5.3046" newVersion="4.9.5.3046" />
</dependentAssembly> </dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="Microsoft.Bcl.AsyncInterfaces" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="itext.kernel" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.1.11.0" newVersion="7.1.11.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="itext.layout" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.1.11.0" newVersion="7.1.11.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="itext.io" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.1.11.0" newVersion="7.1.11.0" />
</dependentAssembly>
<dependentAssembly>
<assemblyIdentity name="itext.forms" publicKeyToken="8354ae6d2174ddca" culture="neutral" />
<bindingRedirect oldVersion="0.0.0.0-7.1.11.0" newVersion="7.1.11.0" />
</dependentAssembly>
</assemblyBinding> </assemblyBinding>
</runtime> </runtime>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration> <startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" /></startup></configuration>

View File

@@ -44,9 +44,6 @@
Me.components = New System.ComponentModel.Container() Me.components = New System.ComponentModel.Container()
Me.Tab1 = Me.Factory.CreateRibbonTab Me.Tab1 = Me.Factory.CreateRibbonTab
Me.Group1 = Me.Factory.CreateRibbonGroup Me.Group1 = Me.Factory.CreateRibbonGroup
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.btnInfo = Me.Factory.CreateRibbonButton
Me.btnUnsichtbar = Me.Factory.CreateRibbonButton
Me.btnAVISOUnleashed = Me.Factory.CreateRibbonButton Me.btnAVISOUnleashed = Me.Factory.CreateRibbonButton
Me.Button1 = Me.Factory.CreateRibbonButton Me.Button1 = Me.Factory.CreateRibbonButton
Me.btnAvisoMail2 = Me.Factory.CreateRibbonButton Me.btnAvisoMail2 = Me.Factory.CreateRibbonButton
@@ -54,6 +51,9 @@
Me.btnVollmachten = Me.Factory.CreateRibbonButton Me.btnVollmachten = Me.Factory.CreateRibbonButton
Me.btnVertraege = Me.Factory.CreateRibbonButton Me.btnVertraege = Me.Factory.CreateRibbonButton
Me.btnGestellungsgarantien = Me.Factory.CreateRibbonButton Me.btnGestellungsgarantien = Me.Factory.CreateRibbonButton
Me.btnInfo = Me.Factory.CreateRibbonButton
Me.btnUnsichtbar = Me.Factory.CreateRibbonButton
Me.NotifyIcon1 = New System.Windows.Forms.NotifyIcon(Me.components)
Me.Tab1.SuspendLayout() Me.Tab1.SuspendLayout()
Me.Group1.SuspendLayout() Me.Group1.SuspendLayout()
Me.SuspendLayout() Me.SuspendLayout()
@@ -76,22 +76,6 @@
Me.Group1.Label = "AVISO" Me.Group1.Label = "AVISO"
Me.Group1.Name = "Group1" Me.Group1.Name = "Group1"
' '
'NotifyIcon1
'
Me.NotifyIcon1.Text = "NotifyIcon1"
Me.NotifyIcon1.Visible = True
'
'btnInfo
'
Me.btnInfo.Label = "?"
Me.btnInfo.Name = "btnInfo"
'
'btnUnsichtbar
'
Me.btnUnsichtbar.Label = "i"
Me.btnUnsichtbar.Name = "btnUnsichtbar"
Me.btnUnsichtbar.Visible = False
'
'btnAVISOUnleashed 'btnAVISOUnleashed
' '
Me.btnAVISOUnleashed.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge Me.btnAVISOUnleashed.ControlSize = Microsoft.Office.Core.RibbonControlSize.RibbonControlSizeLarge
@@ -145,6 +129,22 @@
Me.btnGestellungsgarantien.Name = "btnGestellungsgarantien" Me.btnGestellungsgarantien.Name = "btnGestellungsgarantien"
Me.btnGestellungsgarantien.ShowImage = True Me.btnGestellungsgarantien.ShowImage = True
' '
'btnInfo
'
Me.btnInfo.Label = "?"
Me.btnInfo.Name = "btnInfo"
'
'btnUnsichtbar
'
Me.btnUnsichtbar.Label = "i"
Me.btnUnsichtbar.Name = "btnUnsichtbar"
Me.btnUnsichtbar.Visible = False
'
'NotifyIcon1
'
Me.NotifyIcon1.Text = "NotifyIcon1"
Me.NotifyIcon1.Visible = True
'
'rbnMailItem 'rbnMailItem
' '
Me.Name = "rbnMailItem" Me.Name = "rbnMailItem"

View File

@@ -745,36 +745,46 @@ Public Class AVISO_Mail_Functions
New DataColumn("Quantity"), New DataColumn("Quantity"),
New DataColumn("GrossWeight"), New DataColumn("GrossWeight"),
New DataColumn("OrderCustoms"), New DataColumn("OrderCustoms"),
New DataColumn("Address"),
New DataColumn("Code"),
New DataColumn("OperationType"), New DataColumn("OperationType"),
New DataColumn("Description"), New DataColumn("Links") ' store ALL links (doc + cmr)
New DataColumn("LinkText"), })
New DataColumn("LinkUrl")
})
Dim doc As New HtmlAgilityPack.HtmlDocument() Dim doc As New HtmlAgilityPack.HtmlDocument()
doc.LoadHtml(mailItem.HTMLBody) doc.LoadHtml(mailItem.HTMLBody)
Dim rows = doc.DocumentNode.SelectNodes("//tr[td]") Dim rows = doc.DocumentNode.SelectNodes("//tr")
If rows Is Nothing Then Return dt If rows Is Nothing Then Return dt
For Each row In rows For Each row In rows
Dim cells = row.SelectNodes("td") Dim cells = row.SelectNodes("td")
If cells Is Nothing OrElse cells.Count < 8 Then Continue For If cells Is Nothing Then Continue For
Dim linkNode = cells(7).SelectSingleNode(".//a") Dim recordText As String = Clean(cells(0).InnerText)
dt.Rows.Add( If Not IsNumeric(recordText) Then Continue For
Clean(cells(0).InnerText),
Clean(cells(1).InnerText), Dim linkNodes = row.SelectNodes(".//a")
Clean(cells(2).InnerText), Dim links As New List(Of String)
Clean(cells(3).InnerText),
Clean(cells(4).InnerText), If linkNodes IsNot Nothing Then
Clean(cells(5).InnerText), For Each ln In linkNodes
Clean(cells(6).InnerText), Dim href = ln.GetAttributeValue("href", "")
If(linkNode IsNot Nothing, Clean(linkNode.InnerText), ""), If href <> "" Then links.Add(href)
If(linkNode IsNot Nothing, linkNode.GetAttributeValue("href", ""), "") Next
) End If
Dim GetCell = Function(index As Integer) As String
If cells.Count > index Then
Return Clean(cells(index).InnerText)
End If
Return ""
End Function
dt.Rows.Add(recordText, GetCell(1), GetCell(2), GetCell(3), GetCell(4), GetCell(5), GetCell(6), GetCell(7), String.Join("|", links))
Next Next
@@ -783,53 +793,58 @@ Public Class AVISO_Mail_Functions
Dim sendungsNrOld As String = "" Dim sendungsNrOld As String = ""
Dim missingDocuments As String = "" Dim missingDocuments As String = ""
For Each r In dt.Rows For Each r As DataRow In dt.Rows
If r("LinkUrl") <> "" AndAlso r("LinkUrl").ToString.Contains("https://web01.ekoltransport.com.tr/dfdsdocumentservice/download/") Then Dim links = r("Links").ToString().Split("|"c)
Dim link As String = r("LinkUrl") For Each linkRaw In links
If link.EndsWith("%20") And link.Length > 3 Then If String.IsNullOrWhiteSpace(linkRaw) Then Continue For
link = link.Remove(link.Length - 3)
If linkRaw.Contains("dfdsdocumentservice/download") Or linkRaw.Contains("quadronet.dfds.com/link") Then
Dim link As String = linkRaw.Trim()
If link.EndsWith("%20") Then
link = link.Substring(0, link.Length - 3)
End If End If
Dim sendungsNr As String = r("Record") Dim sendungsNr As String = r("Record").ToString()
Dim descr As String = r("Consignee").ToString()
Dim Descr As String = r("Description") If descr <> "" Then
descr = descr.Replace(";", "_").Replace(".", "_").Replace(" ", "_")
If Descr <> "" Then descr = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(descr)
Descr = Descr.ToString.Replace(";", "_")
Descr = Descr.ToString.Replace(".", "_")
Descr = Descr.ToString.Replace(" ", "_")
Descr = VERAG_PROG_ALLGEMEIN.cDATENSERVER.replaceInvalidCahr(Descr)
End If End If
If sendungsNrOld <> "" AndAlso sendungsNrOld <> sendungsNr Then If sendungsNrOld <> "" AndAlso sendungsNrOld <> sendungsNr Then
counter = 1 counter = 1
End If End If
Dim file = VERAG_PROG_ALLGEMEIN.cFormularManager.getFile_FromURLStream(link, r("Record") & "_" & counter & "_" & IIf(Descr <> "", Descr, ""),, False) Dim filename As String = sendungsNr & "_" & counter &
If(descr <> "", "_" & descr, "")
Dim file = VERAG_PROG_ALLGEMEIN.cFormularManager.getFile_FromURLStream_NEW(link, filename,, False)
If IO.File.Exists(file) Then If IO.File.Exists(file) Then
ATT.Add(file) ATT.Add(file)
Else Else
If missingDocuments <> "" Then If missingDocuments <> "" Then
missingDocuments &= vbNewLine & r("Record") & "_" & counter & "_" & IIf(Descr <> "", Descr, "") missingDocuments &= vbNewLine & filename
Else Else
missingDocuments = "fehlende Dokumente: " & vbNewLine & r("Record") & "_" & counter & "_" & IIf(Descr <> "", Descr, "") missingDocuments = "fehlende Dokumente:" & vbNewLine & filename
End If End If
End If End If
counter += 1 counter += 1
sendungsNrOld = sendungsNr
sendungsNrOld = r("Record")
End If End If
Next Next
Next
If missingDocuments <> "" Then If missingDocuments <> "" Then
INFO = missingDocuments INFO = missingDocuments