firmenuebersicht, fakt, automailversand, etc.

This commit is contained in:
2026-08-11 14:35:51 +02:00
parent ba1c3e19b7
commit ac6e4b5717
9 changed files with 319 additions and 210 deletions

View File

@@ -830,7 +830,7 @@ Public Class cAutomailversand
Next Next
'3--> Zoll-Anhänge aus SPED-BUCH '3--> Zoll-Anhänge aus SPED-BUCH
If SPEDBUCH IsNot Nothing Then If SPEDBUCH IsNot Nothing AndAlso RECHNUNG.Firma_ID <> 19 Then
Dim ZOLL = IIf(SPEDBUCH.DokumentId_Mitteilung IsNot Nothing, "AT", "DE") Dim ZOLL = IIf(SPEDBUCH.DokumentId_Mitteilung IsNot Nothing, "AT", "DE")
@@ -942,7 +942,7 @@ Public Class cAutomailversand
Dim FilialenNr = IIf(Not IsDBNull(r.Item("FilialenNr")) AndAlso IsNumeric(r.Item("FilialenNr")), CInt(r.Item("FilialenNr")), 0) Dim FilialenNr = IIf(Not IsDBNull(r.Item("FilialenNr")) AndAlso IsNumeric(r.Item("FilialenNr")), CInt(r.Item("FilialenNr")), 0)
Dim FIRMA_ID = IIf(Not IsDBNull(r.Item("Firma_ID")) AndAlso IsNumeric(r.Item("Firma_ID")), CInt(r.Item("Firma_ID")), 0) Dim FIRMA_ID = IIf(Not IsDBNull(r.Item("Firma_ID")) AndAlso IsNumeric(r.Item("Firma_ID")), CInt(r.Item("Firma_ID")), 0)
If SPEDBUCH_TEMP IsNot Nothing Then If SPEDBUCH_TEMP IsNot Nothing AndAlso FIRMA_ID <> 19 Then
Dim ZOLL = IIf(SPEDBUCH_TEMP.DokumentId_Mitteilung IsNot Nothing, "AT", "DE") Dim ZOLL = IIf(SPEDBUCH_TEMP.DokumentId_Mitteilung IsNot Nothing, "AT", "DE")
@@ -1414,7 +1414,17 @@ Public Class cAutomailversand
End Function End Function
Private Function setAccountToSend(FIRMA_ID) As String Private Function setAccountToSend(FIRMA_ID As Integer) As String
Dim tmpFirma = New VERAG_PROG_ALLGEMEIN.cFirmen(FIRMA_ID)
If tmpFirma IsNot Nothing AndAlso tmpFirma.Firma_E_Mail_Fakturierung IsNot Nothing AndAlso tmpFirma.Firma_E_Mail_Fakturierung <> "" Then
Return tmpFirma.Firma_E_Mail_Fakturierung
End If
'FALLBACK!
Dim accountToSend = "rechnungsversand@verag.ag" 'default Dim accountToSend = "rechnungsversand@verag.ag" 'default
Select Case FIRMA_ID Select Case FIRMA_ID

View File

@@ -3736,7 +3736,6 @@ Public Class cFakturierung
imgTag = "<img width=""250"" height=""50"" src=""data:image/jpeg;base64," & base64 & """ />" imgTag = "<img width=""250"" height=""50"" src=""data:image/jpeg;base64," & base64 & """ />"
Else Else

View File

@@ -1024,6 +1024,7 @@ Public Class frmFaktSammelRgDrucken
Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click Private Sub Button7_Click(sender As Object, e As EventArgs) Handles Button7.Click
If MyDatagridview1.SelectedRows.Count > 0 Then If MyDatagridview1.SelectedRows.Count > 0 Then
' If Not IsNumeric(getSelectionKdNr_Simple) Then MsgBox("Es muss eine eindeutige KundenNr ausgewählt werden!") : Exit Sub ' If Not IsNumeric(getSelectionKdNr_Simple) Then MsgBox("Es muss eine eindeutige KundenNr ausgewählt werden!") : Exit Sub

View File

@@ -1,8 +1,4 @@
Imports GrapeCity.DataVisualization.Chart Public Class frmLogin
Imports VERAG_PROG_ALLGEMEIN
Imports VERAG_PROG_ALLGEMEIN.TESTJSON
Public Class frmLogin
Public ConnStrInfo As String Public ConnStrInfo As String
Public ConnStr As String Public ConnStr As String
@@ -163,7 +159,7 @@ Public Class frmLogin
Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click Private Sub PictureBox2_Click(sender As Object, e As EventArgs) Handles PictureBox2.Click
Me.Close() Me.Close()
@@ -179,7 +175,7 @@ Public Class frmLogin
If Environment.MachineName = "H6CCWP3" Then If Environment.MachineName = "H6CCWP3" Then
If MsgBox("Autologin?", vbYesNoCancel) = MsgBoxResult.Yes Then If MsgBox("Autologin?", vbYesNoCancel) = MsgBoxResult.Yes Then
txtUser.Text = "daniel" txtUser.Text = "daniel_mdm"
txtPwd.Text = "debug" txtPwd.Text = "debug"
btnLogin.PerformClick() btnLogin.PerformClick()
End If End If
@@ -205,9 +201,9 @@ Public Class frmLogin
'DEV FMZOLL 'DEV FMZOLL
If TESTSYSTEM Then If TESTSYSTEM Then
' cGlobal.ConnStrFMZOLL = VERAG_PROG_ALLGEMEIN.My.MySettings.Default.FMZOLLConnectionString ' cGlobal.ConnStrFMZOLL = VERAG_PROG_ALLGEMEIN.My.MySettings.Default.FMZOLLConnectionString
lblTESTSYSTEM.Visible = True lblTestsystem.Visible = True
Else Else
lblTESTSYSTEM.Visible = False lblTestsystem.Visible = False
End If End If
VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = TESTSYSTEM VERAG_PROG_ALLGEMEIN.cAllgemein.TESTSYSTEM = TESTSYSTEM
@@ -238,16 +234,16 @@ Public Class frmLogin
ElseIf e.Modifiers = Keys.Control And e.KeyCode = Keys.G Then ElseIf e.Modifiers = Keys.Control And e.KeyCode = Keys.G Then
VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED = Not VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED = Not VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED
VERAG_PROG_ALLGEMEIN.cAllgemein.FMZOLL_SERVER = "[SQLGUIDE01.verag.ost.dmn]" VERAG_PROG_ALLGEMEIN.cAllgemein.FMZOLL_SERVER = "[SQLGUIDE01.verag.ost.dmn]"
If VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED Then If VERAG_PROG_ALLGEMEIN.cAllgemein.SQLGUIDE01_USED Then
Panel1.BackColor = Color.Red Panel1.BackColor = Color.Red
Panel1.ForeColor = Color.White Panel1.ForeColor = Color.White
Else Else
Panel1.BackColor = Color.White Panel1.BackColor = Color.White
Panel1.ForeColor = Color.FromArgb(0, 54, 128) Panel1.ForeColor = Color.FromArgb(0, 54, 128)
End If
e.Handled = True
End If End If
e.Handled = True
End If
End Sub End Sub

View File

@@ -1130,7 +1130,7 @@ Public Class usrcntlFakturierung
Dim destPath = DS.GET_TOP1_PATH Dim destPath = DS.GET_TOP1_PATH
If RECHNUNG IsNot Nothing Then If RECHNUNG IsNot Nothing Then
RECHNUNG.ANHAENGE.Clear() 'RECHNUNG.ANHAENGE.Clear()
Dim ANH As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangAnhaenge Dim ANH As New VERAG_PROG_ALLGEMEIN.cRechnungsausgangAnhaenge
ANH.dsId = CInt(DS.da_id) ANH.dsId = CInt(DS.da_id)
ANH.Bezeichnung = DS.da_name ANH.Bezeichnung = DS.da_name

View File

@@ -29,6 +29,17 @@ Partial Class frmFirmenuebersicht
Me.pnloptions = New System.Windows.Forms.Panel() Me.pnloptions = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button() Me.Button2 = New System.Windows.Forms.Button()
Me.Panel2 = New System.Windows.Forms.Panel() Me.Panel2 = New System.Windows.Forms.Panel()
Me.lblMail2 = New System.Windows.Forms.Label()
Me.lblMail1 = New System.Windows.Forms.Label()
Me.lblBic2 = New System.Windows.Forms.Label()
Me.lblIban2 = New System.Windows.Forms.Label()
Me.lblBank2 = New System.Windows.Forms.Label()
Me.lblBic1 = New System.Windows.Forms.Label()
Me.lblIban1 = New System.Windows.Forms.Label()
Me.lblBank1 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.lblFirma = New System.Windows.Forms.Label()
Me.PictureBox2 = New System.Windows.Forms.PictureBox() Me.PictureBox2 = New System.Windows.Forms.PictureBox()
Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.pbLogoMail = New System.Windows.Forms.PictureBox() Me.pbLogoMail = New System.Windows.Forms.PictureBox()
@@ -38,18 +49,9 @@ Partial Class frmFirmenuebersicht
Me.Label5 = New System.Windows.Forms.Label() Me.Label5 = New System.Windows.Forms.Label()
Me.pnlTop = New System.Windows.Forms.Panel() Me.pnlTop = New System.Windows.Forms.Panel()
Me.Label4 = New System.Windows.Forms.Label() Me.Label4 = New System.Windows.Forms.Label()
Me.lblFirma = New System.Windows.Forms.Label()
Me.Label3 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.lblBank1 = New System.Windows.Forms.Label()
Me.lblIban1 = New System.Windows.Forms.Label()
Me.lblBic1 = New System.Windows.Forms.Label()
Me.lblBic2 = New System.Windows.Forms.Label()
Me.lblIban2 = New System.Windows.Forms.Label()
Me.lblBank2 = New System.Windows.Forms.Label()
Me.lblMail1 = New System.Windows.Forms.Label()
Me.lblMail2 = New System.Windows.Forms.Label()
Me.dgvFirmen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) Me.dgvFirmen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.dgvEmailSettings = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.Label7 = New System.Windows.Forms.Label()
Me.Panel1.SuspendLayout() Me.Panel1.SuspendLayout()
Me.pnloptions.SuspendLayout() Me.pnloptions.SuspendLayout()
Me.Panel2.SuspendLayout() Me.Panel2.SuspendLayout()
@@ -59,6 +61,7 @@ Partial Class frmFirmenuebersicht
CType(Me.pbLogo, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.pbLogo, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlTop.SuspendLayout() Me.pnlTop.SuspendLayout()
CType(Me.dgvFirmen, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvFirmen, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvEmailSettings, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout() Me.SuspendLayout()
' '
'Panel1 'Panel1
@@ -69,17 +72,19 @@ Partial Class frmFirmenuebersicht
Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill Me.Panel1.Dock = System.Windows.Forms.DockStyle.Fill
Me.Panel1.Location = New System.Drawing.Point(0, 0) Me.Panel1.Location = New System.Drawing.Point(0, 0)
Me.Panel1.Name = "Panel1" Me.Panel1.Name = "Panel1"
Me.Panel1.Size = New System.Drawing.Size(1429, 779) Me.Panel1.Size = New System.Drawing.Size(1503, 789)
Me.Panel1.TabIndex = 4 Me.Panel1.TabIndex = 4
' '
'pnloptions 'pnloptions
' '
Me.pnloptions.BackColor = System.Drawing.Color.WhiteSmoke Me.pnloptions.BackColor = System.Drawing.Color.WhiteSmoke
Me.pnloptions.Controls.Add(Me.Label7)
Me.pnloptions.Controls.Add(Me.dgvEmailSettings)
Me.pnloptions.Controls.Add(Me.Button2) Me.pnloptions.Controls.Add(Me.Button2)
Me.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom Me.pnloptions.Dock = System.Windows.Forms.DockStyle.Bottom
Me.pnloptions.Location = New System.Drawing.Point(0, 719) Me.pnloptions.Location = New System.Drawing.Point(0, 632)
Me.pnloptions.Name = "pnloptions" Me.pnloptions.Name = "pnloptions"
Me.pnloptions.Size = New System.Drawing.Size(1429, 60) Me.pnloptions.Size = New System.Drawing.Size(1503, 157)
Me.pnloptions.TabIndex = 12 Me.pnloptions.TabIndex = 12
' '
'Button2 'Button2
@@ -88,7 +93,7 @@ Partial Class frmFirmenuebersicht
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.plus Me.Button2.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.plus
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(9, 6) Me.Button2.Location = New System.Drawing.Point(9, 109)
Me.Button2.Margin = New System.Windows.Forms.Padding(0) Me.Button2.Margin = New System.Windows.Forms.Padding(0)
Me.Button2.Name = "Button2" Me.Button2.Name = "Button2"
Me.Button2.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0) Me.Button2.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
@@ -123,9 +128,119 @@ Partial Class frmFirmenuebersicht
Me.Panel2.Dock = System.Windows.Forms.DockStyle.Top Me.Panel2.Dock = System.Windows.Forms.DockStyle.Top
Me.Panel2.Location = New System.Drawing.Point(0, 0) Me.Panel2.Location = New System.Drawing.Point(0, 0)
Me.Panel2.Name = "Panel2" Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(1429, 118) Me.Panel2.Size = New System.Drawing.Size(1503, 118)
Me.Panel2.TabIndex = 11 Me.Panel2.TabIndex = 11
' '
'lblMail2
'
Me.lblMail2.AutoSize = True
Me.lblMail2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMail2.Location = New System.Drawing.Point(724, 95)
Me.lblMail2.Name = "lblMail2"
Me.lblMail2.Size = New System.Drawing.Size(10, 13)
Me.lblMail2.TabIndex = 40
Me.lblMail2.Text = "-"
'
'lblMail1
'
Me.lblMail1.AutoSize = True
Me.lblMail1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMail1.Location = New System.Drawing.Point(724, 77)
Me.lblMail1.Name = "lblMail1"
Me.lblMail1.Size = New System.Drawing.Size(10, 13)
Me.lblMail1.TabIndex = 39
Me.lblMail1.Text = "-"
'
'lblBic2
'
Me.lblBic2.AutoSize = True
Me.lblBic2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBic2.Location = New System.Drawing.Point(523, 95)
Me.lblBic2.Name = "lblBic2"
Me.lblBic2.Size = New System.Drawing.Size(10, 13)
Me.lblBic2.TabIndex = 38
Me.lblBic2.Text = "-"
'
'lblIban2
'
Me.lblIban2.AutoSize = True
Me.lblIban2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblIban2.Location = New System.Drawing.Point(523, 79)
Me.lblIban2.Name = "lblIban2"
Me.lblIban2.Size = New System.Drawing.Size(10, 13)
Me.lblIban2.TabIndex = 37
Me.lblIban2.Text = "-"
'
'lblBank2
'
Me.lblBank2.AutoSize = True
Me.lblBank2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBank2.Location = New System.Drawing.Point(523, 66)
Me.lblBank2.Name = "lblBank2"
Me.lblBank2.Size = New System.Drawing.Size(10, 13)
Me.lblBank2.TabIndex = 36
Me.lblBank2.Text = "-"
'
'lblBic1
'
Me.lblBic1.AutoSize = True
Me.lblBic1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBic1.Location = New System.Drawing.Point(283, 95)
Me.lblBic1.Name = "lblBic1"
Me.lblBic1.Size = New System.Drawing.Size(10, 13)
Me.lblBic1.TabIndex = 35
Me.lblBic1.Text = "-"
'
'lblIban1
'
Me.lblIban1.AutoSize = True
Me.lblIban1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblIban1.Location = New System.Drawing.Point(283, 79)
Me.lblIban1.Name = "lblIban1"
Me.lblIban1.Size = New System.Drawing.Size(10, 13)
Me.lblIban1.TabIndex = 34
Me.lblIban1.Text = "-"
'
'lblBank1
'
Me.lblBank1.AutoSize = True
Me.lblBank1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBank1.Location = New System.Drawing.Point(283, 66)
Me.lblBank1.Name = "lblBank1"
Me.lblBank1.Size = New System.Drawing.Size(10, 13)
Me.lblBank1.TabIndex = 33
Me.lblBank1.Text = "-"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.Location = New System.Drawing.Point(724, 53)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(47, 13)
Me.Label6.TabIndex = 32
Me.Label6.Text = "Emails:"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(283, 53)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(117, 13)
Me.Label3.TabIndex = 31
Me.Label3.Text = "Bankverbindungen:"
'
'lblFirma
'
Me.lblFirma.AutoSize = True
Me.lblFirma.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblFirma.Location = New System.Drawing.Point(11, 77)
Me.lblFirma.Name = "lblFirma"
Me.lblFirma.Size = New System.Drawing.Size(11, 13)
Me.lblFirma.TabIndex = 30
Me.lblFirma.Text = "-"
'
'PictureBox2 'PictureBox2
' '
Me.PictureBox2.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.stift Me.PictureBox2.BackgroundImage = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.stift
@@ -199,7 +314,7 @@ Partial Class frmFirmenuebersicht
Me.pnlTop.Dock = System.Windows.Forms.DockStyle.Top Me.pnlTop.Dock = System.Windows.Forms.DockStyle.Top
Me.pnlTop.Location = New System.Drawing.Point(0, 0) Me.pnlTop.Location = New System.Drawing.Point(0, 0)
Me.pnlTop.Name = "pnlTop" Me.pnlTop.Name = "pnlTop"
Me.pnlTop.Size = New System.Drawing.Size(1429, 41) Me.pnlTop.Size = New System.Drawing.Size(1503, 41)
Me.pnlTop.TabIndex = 6 Me.pnlTop.TabIndex = 6
' '
'Label4 'Label4
@@ -213,116 +328,6 @@ Partial Class frmFirmenuebersicht
Me.Label4.TabIndex = 0 Me.Label4.TabIndex = 0
Me.Label4.Text = "Firmenübersicht" Me.Label4.Text = "Firmenübersicht"
' '
'lblFirma
'
Me.lblFirma.AutoSize = True
Me.lblFirma.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblFirma.Location = New System.Drawing.Point(11, 77)
Me.lblFirma.Name = "lblFirma"
Me.lblFirma.Size = New System.Drawing.Size(11, 13)
Me.lblFirma.TabIndex = 30
Me.lblFirma.Text = "-"
'
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label3.Location = New System.Drawing.Point(283, 53)
Me.Label3.Name = "Label3"
Me.Label3.Size = New System.Drawing.Size(117, 13)
Me.Label3.TabIndex = 31
Me.Label3.Text = "Bankverbindungen:"
'
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.Location = New System.Drawing.Point(724, 53)
Me.Label6.Name = "Label6"
Me.Label6.Size = New System.Drawing.Size(47, 13)
Me.Label6.TabIndex = 32
Me.Label6.Text = "Emails:"
'
'lblBank1
'
Me.lblBank1.AutoSize = True
Me.lblBank1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBank1.Location = New System.Drawing.Point(283, 66)
Me.lblBank1.Name = "lblBank1"
Me.lblBank1.Size = New System.Drawing.Size(10, 13)
Me.lblBank1.TabIndex = 33
Me.lblBank1.Text = "-"
'
'lblIban1
'
Me.lblIban1.AutoSize = True
Me.lblIban1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblIban1.Location = New System.Drawing.Point(283, 79)
Me.lblIban1.Name = "lblIban1"
Me.lblIban1.Size = New System.Drawing.Size(10, 13)
Me.lblIban1.TabIndex = 34
Me.lblIban1.Text = "-"
'
'lblBic1
'
Me.lblBic1.AutoSize = True
Me.lblBic1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBic1.Location = New System.Drawing.Point(283, 95)
Me.lblBic1.Name = "lblBic1"
Me.lblBic1.Size = New System.Drawing.Size(10, 13)
Me.lblBic1.TabIndex = 35
Me.lblBic1.Text = "-"
'
'lblBic2
'
Me.lblBic2.AutoSize = True
Me.lblBic2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBic2.Location = New System.Drawing.Point(523, 95)
Me.lblBic2.Name = "lblBic2"
Me.lblBic2.Size = New System.Drawing.Size(10, 13)
Me.lblBic2.TabIndex = 38
Me.lblBic2.Text = "-"
'
'lblIban2
'
Me.lblIban2.AutoSize = True
Me.lblIban2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblIban2.Location = New System.Drawing.Point(523, 79)
Me.lblIban2.Name = "lblIban2"
Me.lblIban2.Size = New System.Drawing.Size(10, 13)
Me.lblIban2.TabIndex = 37
Me.lblIban2.Text = "-"
'
'lblBank2
'
Me.lblBank2.AutoSize = True
Me.lblBank2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblBank2.Location = New System.Drawing.Point(523, 66)
Me.lblBank2.Name = "lblBank2"
Me.lblBank2.Size = New System.Drawing.Size(10, 13)
Me.lblBank2.TabIndex = 36
Me.lblBank2.Text = "-"
'
'lblMail1
'
Me.lblMail1.AutoSize = True
Me.lblMail1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMail1.Location = New System.Drawing.Point(724, 77)
Me.lblMail1.Name = "lblMail1"
Me.lblMail1.Size = New System.Drawing.Size(10, 13)
Me.lblMail1.TabIndex = 39
Me.lblMail1.Text = "-"
'
'lblMail2
'
Me.lblMail2.AutoSize = True
Me.lblMail2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblMail2.Location = New System.Drawing.Point(724, 95)
Me.lblMail2.Name = "lblMail2"
Me.lblMail2.Size = New System.Drawing.Size(10, 13)
Me.lblMail2.TabIndex = 40
Me.lblMail2.Text = "-"
'
'dgvFirmen 'dgvFirmen
' '
Me.dgvFirmen.AKTUALISIERUNGS_INTERVALL = -1 Me.dgvFirmen.AKTUALISIERUNGS_INTERVALL = -1
@@ -343,15 +348,39 @@ Partial Class frmFirmenuebersicht
Me.dgvFirmen.Location = New System.Drawing.Point(0, 118) Me.dgvFirmen.Location = New System.Drawing.Point(0, 118)
Me.dgvFirmen.Name = "dgvFirmen" Me.dgvFirmen.Name = "dgvFirmen"
Me.dgvFirmen.RowHeadersVisible = False Me.dgvFirmen.RowHeadersVisible = False
Me.dgvFirmen.Size = New System.Drawing.Size(1429, 601) Me.dgvFirmen.Size = New System.Drawing.Size(1503, 514)
Me.dgvFirmen.TabIndex = 10 Me.dgvFirmen.TabIndex = 10
' '
'dgvEmailSettings
'
Me.dgvEmailSettings.AKTUALISIERUNGS_INTERVALL = -1
Me.dgvEmailSettings.AllowUserToAddRows = False
Me.dgvEmailSettings.AllowUserToDeleteRows = False
Me.dgvEmailSettings.ColumnHeadersHeightSizeMode = System.Windows.Forms.DataGridViewColumnHeadersHeightSizeMode.AutoSize
Me.dgvEmailSettings.Location = New System.Drawing.Point(1071, 27)
Me.dgvEmailSettings.Name = "dgvEmailSettings"
Me.dgvEmailSettings.ReadOnly = True
Me.dgvEmailSettings.RowHeadersVisible = False
Me.dgvEmailSettings.ShowEditingIcon = False
Me.dgvEmailSettings.Size = New System.Drawing.Size(429, 127)
Me.dgvEmailSettings.TabIndex = 2
'
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.Location = New System.Drawing.Point(1068, 11)
Me.Label7.Name = "Label7"
Me.Label7.Size = New System.Drawing.Size(174, 13)
Me.Label7.TabIndex = 41
Me.Label7.Text = "Mail-Exchange-Einstellungen:"
'
'frmFirmenuebersicht 'frmFirmenuebersicht
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font
Me.BackColor = System.Drawing.Color.White Me.BackColor = System.Drawing.Color.White
Me.ClientSize = New System.Drawing.Size(1429, 779) Me.ClientSize = New System.Drawing.Size(1503, 789)
Me.Controls.Add(Me.pnlTop) Me.Controls.Add(Me.pnlTop)
Me.Controls.Add(Me.Panel1) Me.Controls.Add(Me.Panel1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon) Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
@@ -360,6 +389,7 @@ Partial Class frmFirmenuebersicht
Me.Text = "Firmenübersicht" Me.Text = "Firmenübersicht"
Me.Panel1.ResumeLayout(False) Me.Panel1.ResumeLayout(False)
Me.pnloptions.ResumeLayout(False) Me.pnloptions.ResumeLayout(False)
Me.pnloptions.PerformLayout()
Me.Panel2.ResumeLayout(False) Me.Panel2.ResumeLayout(False)
Me.Panel2.PerformLayout() Me.Panel2.PerformLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
@@ -369,6 +399,7 @@ Partial Class frmFirmenuebersicht
Me.pnlTop.ResumeLayout(False) Me.pnlTop.ResumeLayout(False)
Me.pnlTop.PerformLayout() Me.pnlTop.PerformLayout()
CType(Me.dgvFirmen, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvFirmen, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.dgvEmailSettings, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False) Me.ResumeLayout(False)
End Sub End Sub
@@ -397,4 +428,6 @@ Partial Class frmFirmenuebersicht
Friend WithEvents lblBank2 As Windows.Forms.Label Friend WithEvents lblBank2 As Windows.Forms.Label
Friend WithEvents lblBic1 As Windows.Forms.Label Friend WithEvents lblBic1 As Windows.Forms.Label
Friend WithEvents lblIban1 As Windows.Forms.Label Friend WithEvents lblIban1 As Windows.Forms.Label
Friend WithEvents dgvEmailSettings As MyDatagridview
Friend WithEvents Label7 As Windows.Forms.Label
End Class End Class

View File

@@ -6,6 +6,7 @@ Imports System.Windows.Forms
Public Class frmFirmenuebersicht Public Class frmFirmenuebersicht
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim dt As DataTable
Private Sub frminterneEmailBenachrichtigungen_Load(sender As Object, e As EventArgs) Handles Me.Load Private Sub frminterneEmailBenachrichtigungen_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -25,15 +26,19 @@ Public Class frmFirmenuebersicht
Dim sqlstr As String = "" Dim sqlstr As String = ""
sqlstr &= " Select [Firma_ID] ,[Firma_Bez],[Firma_Straße],[Firma_PLZ],[Firma_Ort],[Firma_LandKz] as Land,[Firma_Telefon],[Firma_Telefax],Replace([Firma_UID],'UID: ', '') as Firma_UID ,Replace([Firma_EORI],'EORI: ', '') as Firma_EORI, sqlstr &= " Select [Firma_ID] ,[Firma_Bez],[Firma_Straße],[Firma_PLZ],[Firma_Ort],[Firma_LandKz] as Land,replace([Firma_Telefon],'Tel. ','') as Firma_Telefon ,replace([Firma_Telefax],'Fax ','') as Firma_Telefax ,Replace([Firma_UID],'UID: ', '') as Firma_UID ,Replace([Firma_EORI],'EORI: ', '') as Firma_EORI,
[Firma_Bankverbindung1],Replace([Firma_IBAN1],'IBAN: ', '') as Firma_IBAN1, Replace([Firma_BIC1],'BIC: ', '') as Firma_BIC1,[Firma_Bankverbindung2],[Firma_IBAN2],[Firma_BIC2],[Firma_E-Mail], [Firma_Bankverbindung1],Replace([Firma_IBAN1],'IBAN: ', '') as Firma_IBAN1, Replace([Firma_BIC1],'BIC: ', '') as Firma_BIC1,[Firma_Bankverbindung2],[Firma_IBAN2],[Firma_BIC2],[Firma_E-Mail],
[Firma_Webadresse],[Firmengruppe],[Firma_Warenort],[Firma_E_Mail_Mahnungen],[Firma_Steuernummer] ,Replace([Firma_Firmenbuch],'Firmenbuch: ', '') as Firma_Firmenbuch,[Firma_Logo],[Firma_Logo_Erweitert] from tblFirma " [Firma_Webadresse],[Firmengruppe],[Firma_Warenort],[Firma_E_Mail_Mahnungen],[Firma_E_Mail_Fakturierung],[Firma_Steuernummer] ,Replace([Firma_Firmenbuch],'Firmenbuch: ', '') as Firma_Firmenbuch,[Firma_Logo],[Firma_Logo_Erweitert] from tblFirma "
Dim sqlstr_Mailsettings As String = " select mail_username as 'user',mail_password as PW, mail_host as Host, mail_port as Port,mail_kindOfMail, mail_firmaID from tblMailSettings"
dt = SQL.loadDgvBySql(sqlstr_Mailsettings, "ADMIN")
With dgvFirmen With dgvFirmen
.SET_SQL(sqlstr, "FMZOLL") .SET_SQL(sqlstr, "FMZOLL")
.LOAD() .LOAD()
showDGVPruefungsobjekte() showDGVPruefungsobjekte(dt)
End With End With
Catch ex As Exception Catch ex As Exception
@@ -41,7 +46,7 @@ Public Class frmFirmenuebersicht
End Try End Try
Me.Cursor = Cursors.Default Me.Cursor = Cursors.Default
End Sub End Sub
Sub showDGVPruefungsobjekte() Sub showDGVPruefungsobjekte(dt As DataTable)
With dgvFirmen With dgvFirmen
@@ -61,8 +66,9 @@ Public Class frmFirmenuebersicht
.Columns("Firma_Bankverbindung2").Visible = False .Columns("Firma_Bankverbindung2").Visible = False
.Columns("Firma_BIC2").Visible = False .Columns("Firma_BIC2").Visible = False
.Columns("Firma_IBAN2").Visible = False .Columns("Firma_IBAN2").Visible = False
.Columns("Firma_E-Mail").Visible = False '.Columns("Firma_E-Mail").Visible = False
.Columns("Firma_E_Mail_Mahnungen").Visible = False .Columns("Firma_E_Mail_Mahnungen").Visible = False
.Columns("Firma_E_Mail_Fakturierung").Visible = False
.Columns("Firma_ID").Width = 30 .Columns("Firma_ID").Width = 30
.Columns("Firma_Warenort").Width = 60 .Columns("Firma_Warenort").Width = 60
@@ -70,12 +76,43 @@ Public Class frmFirmenuebersicht
.Columns("Land").Width = 40 .Columns("Land").Width = 40
.Columns("Firma_Bez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill .Columns("Firma_Bez").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
If Not dgvFirmen.Columns.Contains("EmailEinstellungen") Then
Dim col As New DataGridViewCheckBoxColumn()
col.Name = "EmailEinstellungen"
col.HeaderText = "E-Mail-Settings"
col.ReadOnly = True
dgvFirmen.Columns.Add(col)
End If
For Each col As DataGridViewColumn In dgvFirmen.Columns For Each col As DataGridViewColumn In dgvFirmen.Columns
col.HeaderText = col.HeaderText.Replace("Firma_", "") col.HeaderText = col.HeaderText.Replace("Firma_", "")
Next Next
Dim mailFirmaIds As New HashSet(Of Integer)
For Each row As DataRow In dt.Rows
If Not IsDBNull(row("mail_firmaId")) Then
mailFirmaIds.Add(CInt(row("mail_firmaId")))
End If
Next
For Each r As DataGridViewRow In dgvFirmen.Rows
If r.IsNewRow Then Continue For
If r.Cells("Firma_ID").Value Is Nothing OrElse IsDBNull(r.Cells("Firma_ID").Value) Then Continue For
Dim firmaId As Integer = CInt(r.Cells("Firma_ID").Value)
r.Cells("EmailEinstellungen").Value = mailFirmaIds.Contains(firmaId)
Next
End With End With
End Sub End Sub
@@ -103,10 +140,25 @@ Public Class frmFirmenuebersicht
lblBic2.Text = If(IsDBNull(dgvFirmen.SelectedRows(0).Cells("Firma_BIC2").Value) OrElse dgvFirmen.SelectedRows(0).Cells("Firma_BIC2").Value Is Nothing, "", dgvFirmen.SelectedRows(0).Cells("Firma_BIC2").Value.ToString()) lblBic2.Text = If(IsDBNull(dgvFirmen.SelectedRows(0).Cells("Firma_BIC2").Value) OrElse dgvFirmen.SelectedRows(0).Cells("Firma_BIC2").Value Is Nothing, "", dgvFirmen.SelectedRows(0).Cells("Firma_BIC2").Value.ToString())
lblMail1.Text = If(IsDBNull(dgvFirmen.SelectedRows(0).Cells("Firma_E-Mail").Value) OrElse dgvFirmen.SelectedRows(0).Cells("Firma_E-Mail").Value Is Nothing, "-", dgvFirmen.SelectedRows(0).Cells("Firma_E-Mail").Value.ToString()) lblMail1.Text = If(IsDBNull(dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Fakturierung").Value) OrElse dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Fakturierung").Value Is Nothing, "-", dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Fakturierung").Value.ToString()) & " (Fakturierung)"
lblMail2.Text = If(IsDBNull(dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Mahnungen").Value) OrElse dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Mahnungen").Value Is Nothing, "-", dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Mahnungen").Value.ToString()) & " (Mahnungen)" lblMail2.Text = If(IsDBNull(dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Mahnungen").Value) OrElse dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Mahnungen").Value Is Nothing, "-", dgvFirmen.SelectedRows(0).Cells("Firma_E_Mail_Mahnungen").Value.ToString()) & " (Mahnungen)"
Dim firmaID = dgvFirmen.SelectedRows(0).Cells("Firma_ID").Value
If firmaID IsNot Nothing AndAlso IsNumeric(firmaID) Then
Dim rows() As DataRow = dt.Select("mail_firmaID = " & firmaID.ToString())
If rows.Length > 0 Then
dgvEmailSettings.DataSource = rows.CopyToDataTable()
dgvEmailSettings.Columns("mail_firmaID").Visible = False
Else
dgvEmailSettings.DataSource = Nothing
End If
End If
End If End If

View File

@@ -32,6 +32,7 @@ Public Class cFirmen
Property Firmengruppe As Object = Nothing Property Firmengruppe As Object = Nothing
Property Firma_PLZ As Object = Nothing Property Firma_PLZ As Object = Nothing
Property Firma_Logo_Erweitert As Object = Nothing Property Firma_Logo_Erweitert As Object = Nothing
Property Firma_E_Mail_Fakturierung As Object = Nothing
Dim SQL As New SQL Dim SQL As New SQL
@@ -76,6 +77,7 @@ Public Class cFirmen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_Steuernummer", Firma_Steuernummer)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_Steuernummer", Firma_Steuernummer))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_PLZ", Firma_PLZ)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_PLZ", Firma_PLZ))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_Logo_Erweitert", Firma_Logo_Erweitert)) list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_Logo_Erweitert", Firma_Logo_Erweitert))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("Firma_E_Mail_Fakturierung", Firma_E_Mail_Fakturierung))
Return list Return list

View File

@@ -8,6 +8,7 @@ Imports System.Runtime.InteropServices
Imports System.Text Imports System.Text
Imports System.Windows.Forms Imports System.Windows.Forms
Imports ClosedXML.Excel Imports ClosedXML.Excel
Imports com.sun.xml.internal.rngom
Imports GrapeCity.ActiveReports Imports GrapeCity.ActiveReports
Imports GrapeCity.ActiveReports.SectionReportModel Imports GrapeCity.ActiveReports.SectionReportModel
Imports GrapeCity.Documents.Imaging Imports GrapeCity.Documents.Imaging
@@ -886,65 +887,80 @@ BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, [Control], New Object(
Dim myCredentials As New System.Net.NetworkCredential Dim myCredentials As New System.Net.NetworkCredential
Msg.IsBodyHtml = True Msg.IsBodyHtml = True
Dim mySmtpsvr As New SmtpClient() Dim mySmtpsvr As New SmtpClient()
Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Case "IMEX"
myCredentials.UserName = "support@verag.ag"
myCredentials.Password = "$up0Rt2809!"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
Case "ATILLA"
myCredentials.UserName = "support@verag.ag"
myCredentials.Password = "$up0Rt2809!"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
Case "AMBAR"
Select Case art
Case "3", "4" 'Export
myCredentials.UserName = "export@ambarlog.de"
' myCredentials.Password = "Naq30716"
' myCredentials.UserName = "import@ambarlog.com"
myCredentials.Password = "Naq30716"
mySmtpsvr.Host = "owa.verag.ag" '"smtp.office365.com" -> office365 deaktiviert!
mySmtpsvr.Port = 587
'mySmtpsvr.EnableSsl = True
'text = text.replace("import@ambarlog.com", "office@ambarlog.com") Dim sqlWHere = ""
'text = text.replace("import@ambarlog.de", "office@ambarlog.com")
eMailfrom = "export@ambarlog.de"
Case Else
' myCredentials.UserName = "import@ambarlog.com" If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA_ID = 24 Then
'myCredentials.UserName = "import@ambarlog.de" Select Case art
'myCredentials.Password = "Meh062020" Case "3", "4" 'Export
'mySmtpsvr.Host = "smtp.office365.com" sqlWHere = " AND mail_kindOfMail = 'EXP'"
'mySmtpsvr.Port = 587 Case Else
'mySmtpsvr.EnableSsl = True sqlWHere = " AND mail_kindOfMail = 'IMP'"
End Select
End If
myCredentials.UserName = "import@ambarlog.de" Dim sqlstr_Mailsettings As String = " select mail_username ,mail_password , mail_host, mail_port , mail_firmaID from tblMailSettings where mail_firmaID = " & VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA_ID & sqlWHere
myCredentials.Password = "Meh062020" Dim dt = SQL.loadDgvBySql(sqlstr_Mailsettings, "ADMIN")
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587 If dt.Rows.Count = 1 Then
' mySmtpsvr.EnableSsl = True
' eMailfrom = "import@ambarlog.com" myCredentials.UserName = If(IsDBNull(dt.Rows(0)("mail_username")), "", Convert.ToString(dt.Rows(0)("mail_username")))
End Select
Case "UNISPED" myCredentials.Password = If(IsDBNull(dt.Rows(0)("mail_password")), "", Convert.ToString(dt.Rows(0)("mail_password")))
myCredentials.UserName = "no-reply@unisped.at"
myCredentials.Password = "GL5unisped!KNL3" mySmtpsvr.Host = If(IsDBNull(dt.Rows(0)("mail_host")), "", Convert.ToString(dt.Rows(0)("mail_host")))
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587 '25 '587 '25 mySmtpsvr.Port = If(IsDBNull(dt.Rows(0)("mail_port")), 0, Convert.ToInt32(dt.Rows(0)("mail_port")))
Case Else
myCredentials.UserName = "support@verag.ag" End If
myCredentials.Password = "$up0Rt2809!"
mySmtpsvr.Host = "owa.verag.ag" If String.IsNullOrWhiteSpace(myCredentials.UserName) OrElse String.IsNullOrWhiteSpace(myCredentials.Password) OrElse String.IsNullOrWhiteSpace(mySmtpsvr.Host) OrElse mySmtpsvr.Port <= 0 Then
mySmtpsvr.Port = 587 '25 '587 '25 Select Case VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA
Case "IMEX"
myCredentials.UserName = "support@verag.ag"
myCredentials.Password = "$up0Rt2809!"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
Case "ATILLA"
myCredentials.UserName = "support@verag.ag"
myCredentials.Password = "$up0Rt2809!"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
Case "AMBAR"
Select Case art
Case "3", "4" 'Export
myCredentials.UserName = "export@ambarlog.de"
myCredentials.Password = "Naq30716"
mySmtpsvr.Host = "owa.verag.ag" '"smtp.office365.com" -> office365 deaktiviert!
mySmtpsvr.Port = 587
eMailfrom = "export@ambarlog.de"
Case Else
myCredentials.UserName = "import@ambarlog.de"
myCredentials.Password = "Meh062020"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
End Select
Case "UNISPED"
myCredentials.UserName = "no-reply@unisped.at"
myCredentials.Password = "GL5unisped!KNL3"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587 '25 '587 '25
Case Else
myCredentials.UserName = "support@verag.ag"
myCredentials.Password = "$up0Rt2809!"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587 '25 '587 '25
End Select
End If
End Select
mySmtpsvr.UseDefaultCredentials = False mySmtpsvr.UseDefaultCredentials = False
mySmtpsvr.Credentials = myCredentials mySmtpsvr.Credentials = myCredentials
Try Try