Kundenuebersicht, interne Mailbenachrichtigungen, Creditsafe-Mails, etc.

This commit is contained in:
2026-04-17 17:00:51 +02:00
parent f4ec30d1eb
commit 67d410a556
6 changed files with 39 additions and 23 deletions

View File

@@ -3,6 +3,7 @@ Imports System.Globalization
Imports System.IO
Imports SDL.EORI
Imports VERAG_PROG_ALLGEMEIN
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
Public Class usrCntlKundenuebersicht
'Implements INotifyPropertyChanged
@@ -3059,7 +3060,7 @@ Public Class usrCntlKundenuebersicht
If cs.checkDateOfLastRequest(company) < lastChecked Then
Dim a As MsgBoxResult = MsgBox("Seit der letzen Abfrage (" & lastChecked.ToShortDateString & ") wurde bei Creditsafe keine Änderung gemacht!" & vbNewLine & "Trotzdem Creditreport-Daten aktualisieren?", vbYesNo)
Dim a As MsgBoxResult = MsgBox("Seit der letzten Abfrage (" & lastChecked.ToShortDateString & ") wurde bei Creditsafe keine Änderung gemacht!" & vbNewLine & "Trotzdem Creditreport-Daten aktualisieren?", vbYesNo)
If a = vbYes Then
setCreditsafereportEntry(cs, company, True) 'doppelte Abfragen mitprotokollieren
@@ -3392,8 +3393,13 @@ Public Class usrCntlKundenuebersicht
setCreditSafeEntry(company, pdfObject, kdNr, forecedReqest, beforeRequestCount, afterRequestCount, limit, country)
End If
If beforeRequestCount > (limit - 100) AndAlso beforeRequestCount < (limit - 96) Then 'Benachrichtigung
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag; d.breimaier@verag.ag", "Creditsafe-Limit", "ACHTUNG, das Creditsafe-Limit für " & country & " ist fast erreicht!" & vbNewLine & vbNewLine & "Limit: " & limit & " , aktuelle Stand: " & afterRequestCount & vbNewLine & vbNewLine & "*Automatic generated e-mail*",,,,,)
If beforeRequestCount >= (limit - 20) AndAlso beforeRequestCount <= limit Then 'Benachrichtigung
Dim empfanegerMail As String = ""
empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("Creditsafe-Limit")
If empfanegerMail <> "" Then
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(empfanegerMail, "Creditsafe-Limit", "ACHTUNG, das Creditsafe-Limit für " & country & " ist fast erreicht! <br><br> Limit: " & limit & " , aktuelle Stand: " & afterRequestCount & " <br><br>*Automatic generated e-mail*",, True,,,)
End If
End If

View File

@@ -22,13 +22,14 @@ Partial Class frminterneEmailBenachrichtigungen
'Das Bearbeiten mit dem Code-Editor ist nicht möglich.
<System.Diagnostics.DebuggerStepThrough()>
Private Sub InitializeComponent()
Me.components = New System.ComponentModel.Container()
Dim DataGridViewCellStyle1 As System.Windows.Forms.DataGridViewCellStyle = New System.Windows.Forms.DataGridViewCellStyle()
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frminterneEmailBenachrichtigungen))
Me.AbgeholtToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.cntxtOptionen = New System.Windows.Forms.ContextMenuStrip()
Me.cntxtOptionen = New System.Windows.Forms.ContextMenuStrip(Me.components)
Me.StornoToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem()
Me.Panel1 = New System.Windows.Forms.Panel()
Me.dgvBenachrichtigungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview()
Me.dgvBenachrichtigungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnloptions = New System.Windows.Forms.Panel()
Me.Label9 = New System.Windows.Forms.Label()
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -76,7 +77,7 @@ Partial Class frminterneEmailBenachrichtigungen
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(1237, 779)
Me.Panel1.Size = New System.Drawing.Size(1429, 779)
Me.Panel1.TabIndex = 4
'
'dgvBenachrichtigungen
@@ -99,7 +100,7 @@ Partial Class frminterneEmailBenachrichtigungen
Me.dgvBenachrichtigungen.Location = New System.Drawing.Point(0, 115)
Me.dgvBenachrichtigungen.Name = "dgvBenachrichtigungen"
Me.dgvBenachrichtigungen.RowHeadersVisible = False
Me.dgvBenachrichtigungen.Size = New System.Drawing.Size(1237, 604)
Me.dgvBenachrichtigungen.Size = New System.Drawing.Size(1429, 604)
Me.dgvBenachrichtigungen.TabIndex = 10
'
'pnloptions
@@ -111,14 +112,14 @@ Partial Class frminterneEmailBenachrichtigungen
Me.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnloptions.Location = New System.Drawing.Point(0, 719)
Me.pnloptions.Name = "pnloptions"
Me.pnloptions.Size = New System.Drawing.Size(1237, 60)
Me.pnloptions.Size = New System.Drawing.Size(1429, 60)
Me.pnloptions.TabIndex = 12
'
'Label9
'
Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.Label9.AutoSize = True
Me.Label9.Location = New System.Drawing.Point(1145, 16)
Me.Label9.Location = New System.Drawing.Point(1337, 16)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(30, 13)
Me.Label9.TabIndex = 7
@@ -141,7 +142,7 @@ Partial Class frminterneEmailBenachrichtigungen
Me.MyTextBox2.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.MyTextBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.MyTextBox2.ForeColor = System.Drawing.Color.Black
Me.MyTextBox2.Location = New System.Drawing.Point(1177, 13)
Me.MyTextBox2.Location = New System.Drawing.Point(1369, 13)
Me.MyTextBox2.MaxLineLength = -1
Me.MyTextBox2.MaxLines_Warning = ""
Me.MyTextBox2.MaxLines_Warning_Label = Nothing
@@ -178,7 +179,7 @@ Partial Class frminterneEmailBenachrichtigungen
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel2.Location = New System.Drawing.Point(0, 0)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(1237, 115)
Me.Panel2.Size = New System.Drawing.Size(1429, 115)
Me.Panel2.TabIndex = 11
'
'cboKategorie
@@ -238,7 +239,7 @@ Partial Class frminterneEmailBenachrichtigungen
Me.pnlTop.Dock = System.Windows.Forms.DockStyle.Top
Me.pnlTop.Location = New System.Drawing.Point(0, 0)
Me.pnlTop.Name = "pnlTop"
Me.pnlTop.Size = New System.Drawing.Size(1237, 41)
Me.pnlTop.Size = New System.Drawing.Size(1429, 41)
Me.pnlTop.TabIndex = 6
'
'Label4
@@ -257,7 +258,7 @@ Partial Class frminterneEmailBenachrichtigungen
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(1237, 779)
Me.ClientSize = New System.Drawing.Size(1429, 779)
Me.Controls.Add(Me.pnlTop)
Me.Controls.Add(Me.Panel1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)

View File

@@ -40,7 +40,7 @@ Public Class frminterneEmailBenachrichtigungen
Dim sqlstr As String = ""
sqlstr &= " SELECT e.mb_id,e.mb_aktiv,e.mb_object,STRING_AGG(m.mit_email, ', ') AS Emails,STRING_AGG(m.mit_nname, ', ') as Mitarbeiter,COUNT(DISTINCT m.mit_email) AS Anzahl,e.mb_firmaID,ISNULL(f.Firma_Bez,'ALLE') AS Firma_Bez
sqlstr &= " SELECT e.mb_id,e.mb_aktiv,e.mb_object,e.mb_beschreibung,STRING_AGG(m.mit_email, ', ') AS Emails,STRING_AGG(m.mit_nname, ', ') as Mitarbeiter,COUNT(DISTINCT m.mit_email) AS Anzahl,e.mb_firmaID,ISNULL(f.Firma_Bez,'ALLE') AS Firma_Bez
FROM [tblEMailbenachrichtigungen] e
LEFT JOIN [VERAG].[dbo].[tblFirma] f ON e.mb_firmaID = f.Firma_ID
@@ -52,7 +52,7 @@ Public Class frminterneEmailBenachrichtigungen
With dgvBenachrichtigungen
.SET_SQL(sqlstr & getWherePruefungsobjekte() & " GROUP BY e.mb_id,e.mb_aktiv,e.mb_object,e.mb_firmaID,f.Firma_Bez ORDER BY mb_object,f.Firma_Bez ", "ADMIN", getListBenachrichtigungen)
.SET_SQL(sqlstr & getWherePruefungsobjekte() & " GROUP BY e.mb_id,e.mb_aktiv,e.mb_object,mb_beschreibung,e.mb_firmaID,f.Firma_Bez ORDER BY mb_object,f.Firma_Bez ", "ADMIN", getListBenachrichtigungen)
.LOAD()
showDGVPruefungsobjekte()
End With
@@ -82,8 +82,13 @@ Public Class frminterneEmailBenachrichtigungen
.Columns("Mitarbeiter").MinimumWidth = 100
.Columns("Mitarbeiter").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("mb_beschreibung").MinimumWidth = 100
.Columns("mb_beschreibung").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("mb_beschreibung").HeaderText = "Info"
.Columns("Emails").MinimumWidth = 100
.Columns("Emails").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("Emails").HeaderText = "EMail an"
.Columns("Anzahl").Width = 50
.Columns("Anzahl").HeaderText = "# Empf."

View File

@@ -863,14 +863,14 @@ Public Class cCreditSafeAPI
Dim empfanegerMail = ""
For Each firmRowTemp As DataRow In dtFirmen.Rows
Select Case firmRowTemp("Firma")
Case "VERAG" : empfanegerMail = "as@verag.ag"
Case "IMEX" : empfanegerMail = "Viktoria.Leirich@imex-group.at"
'Case "AMBAR" : empfanegerMail = "Buchhaltung@ambarlog.com"
'Case "UNISPED" : empfanegerMail = "sabine.muehlboeck@unisped.at"
Select Case firma
Case "VERAG" : empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("Creditsafe", 1)
Case "IMEX" : empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("Creditsafe", 20)
Case "AMBAR" : empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("Creditsafe", 24)
Case "UNISPED" : empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("Creditsafe", 21)
End Select
If VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM Then empfanegerMail = "d.breimaier@verag.ag"
If empfanegerMail <> "" Then VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(empfanegerMail, IIf(VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM, "TEST-", "") & "CREDITSAFE " & KUNDE.KundenNr & " (" & firmRowTemp("Firma") & ")", "Änderungen der Creditsafe-Daten von Kunden " & KUNDE.KundenNr & " " & ADR.Ordnungsbegriff & Mailtext.ToString & "<br><br>" & "*Automatic generated e-mail*",,,,, "d.breimaier@verag.ag")
Next
Mailtext = ""

View File

@@ -556,7 +556,12 @@ Public Class cVERAG_CustomsDeclarations
"<br/><p><b>VERAG CBAM Compliance Services</b></p>" &
"</body></html>"
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "CBAM WARNUNG - " & Me.za_MRN, bodyHtml, "cbam@verag.ag")
Dim empfanegerMail As String = ""
empfanegerMail = cMitarbeiter.GetEMailRecipientForEmailNotification("CBAM-WARNUNG")
If empfanegerMail <> "" Then
VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail(empfanegerMail, "CBAM WARNUNG - " & Me.za_MRN, bodyHtml, "cbam@verag.ag")
End If
'VERAG_PROG_ALLGEMEIN.cProgramFunctions.sendMail("al@verag.ag", "CBAM WARNUNG",
' "CBAM-Warnmeldung bei Zollanmeldung " & Me.za_MRN & vbNewLine &

View File

@@ -8,7 +8,6 @@ Imports System.Text
Imports System.Windows.Forms
Imports ClosedXML.Excel
Imports GrapeCity.ActiveReports
Imports GrapeCity.ActiveReports.Core.Document.Drawing.Gc
Imports GrapeCity.ActiveReports.SectionReportModel
Imports GrapeCity.Documents.Imaging
Imports Microsoft.Office.Interop