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

@@ -29,6 +29,17 @@ Partial Class frmFirmenuebersicht
Me.pnloptions = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button()
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.PictureBox1 = 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.pnlTop = New System.Windows.Forms.Panel()
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.dgvEmailSettings = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.Label7 = New System.Windows.Forms.Label()
Me.Panel1.SuspendLayout()
Me.pnloptions.SuspendLayout()
Me.Panel2.SuspendLayout()
@@ -59,6 +61,7 @@ Partial Class frmFirmenuebersicht
CType(Me.pbLogo, System.ComponentModel.ISupportInitialize).BeginInit()
Me.pnlTop.SuspendLayout()
CType(Me.dgvFirmen, System.ComponentModel.ISupportInitialize).BeginInit()
CType(Me.dgvEmailSettings, System.ComponentModel.ISupportInitialize).BeginInit()
Me.SuspendLayout()
'
'Panel1
@@ -69,17 +72,19 @@ Partial Class frmFirmenuebersicht
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(1429, 779)
Me.Panel1.Size = New System.Drawing.Size(1503, 789)
Me.Panel1.TabIndex = 4
'
'pnloptions
'
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.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.Size = New System.Drawing.Size(1429, 60)
Me.pnloptions.Size = New System.Drawing.Size(1503, 157)
Me.pnloptions.TabIndex = 12
'
'Button2
@@ -88,7 +93,7 @@ Partial Class frmFirmenuebersicht
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.plus
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.Name = "Button2"
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.Location = New System.Drawing.Point(0, 0)
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
'
'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
'
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.Location = New System.Drawing.Point(0, 0)
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
'
'Label4
@@ -213,116 +328,6 @@ Partial Class frmFirmenuebersicht
Me.Label4.TabIndex = 0
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
'
Me.dgvFirmen.AKTUALISIERUNGS_INTERVALL = -1
@@ -343,15 +348,39 @@ Partial Class frmFirmenuebersicht
Me.dgvFirmen.Location = New System.Drawing.Point(0, 118)
Me.dgvFirmen.Name = "dgvFirmen"
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
'
'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
'
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(1429, 779)
Me.ClientSize = New System.Drawing.Size(1503, 789)
Me.Controls.Add(Me.pnlTop)
Me.Controls.Add(Me.Panel1)
Me.Icon = CType(resources.GetObject("$this.Icon"), System.Drawing.Icon)
@@ -360,6 +389,7 @@ Partial Class frmFirmenuebersicht
Me.Text = "Firmenübersicht"
Me.Panel1.ResumeLayout(False)
Me.pnloptions.ResumeLayout(False)
Me.pnloptions.PerformLayout()
Me.Panel2.ResumeLayout(False)
Me.Panel2.PerformLayout()
CType(Me.PictureBox2, System.ComponentModel.ISupportInitialize).EndInit()
@@ -369,6 +399,7 @@ Partial Class frmFirmenuebersicht
Me.pnlTop.ResumeLayout(False)
Me.pnlTop.PerformLayout()
CType(Me.dgvFirmen, System.ComponentModel.ISupportInitialize).EndInit()
CType(Me.dgvEmailSettings, System.ComponentModel.ISupportInitialize).EndInit()
Me.ResumeLayout(False)
End Sub
@@ -397,4 +428,6 @@ Partial Class frmFirmenuebersicht
Friend WithEvents lblBank2 As Windows.Forms.Label
Friend WithEvents lblBic1 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

View File

@@ -6,6 +6,7 @@ Imports System.Windows.Forms
Public Class frmFirmenuebersicht
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
@@ -25,15 +26,19 @@ Public Class frmFirmenuebersicht
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_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
.SET_SQL(sqlstr, "FMZOLL")
.LOAD()
showDGVPruefungsobjekte()
showDGVPruefungsobjekte(dt)
End With
Catch ex As Exception
@@ -41,7 +46,7 @@ Public Class frmFirmenuebersicht
End Try
Me.Cursor = Cursors.Default
End Sub
Sub showDGVPruefungsobjekte()
Sub showDGVPruefungsobjekte(dt As DataTable)
With dgvFirmen
@@ -61,8 +66,9 @@ Public Class frmFirmenuebersicht
.Columns("Firma_Bankverbindung2").Visible = False
.Columns("Firma_BIC2").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_Fakturierung").Visible = False
.Columns("Firma_ID").Width = 30
.Columns("Firma_Warenort").Width = 60
@@ -70,12 +76,43 @@ Public Class frmFirmenuebersicht
.Columns("Land").Width = 40
.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
col.HeaderText = col.HeaderText.Replace("Firma_", "")
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 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())
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)"
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

View File

@@ -32,6 +32,7 @@ Public Class cFirmen
Property Firmengruppe As Object = Nothing
Property Firma_PLZ As Object = Nothing
Property Firma_Logo_Erweitert As Object = Nothing
Property Firma_E_Mail_Fakturierung As Object = Nothing
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_PLZ", Firma_PLZ))
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

View File

@@ -8,6 +8,7 @@ Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Windows.Forms
Imports ClosedXML.Excel
Imports com.sun.xml.internal.rngom
Imports GrapeCity.ActiveReports
Imports GrapeCity.ActiveReports.SectionReportModel
Imports GrapeCity.Documents.Imaging
@@ -886,65 +887,80 @@ BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, [Control], New Object(
Dim myCredentials As New System.Net.NetworkCredential
Msg.IsBodyHtml = True
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")
'text = text.replace("import@ambarlog.de", "office@ambarlog.com")
eMailfrom = "export@ambarlog.de"
Case Else
Dim sqlWHere = ""
' myCredentials.UserName = "import@ambarlog.com"
'myCredentials.UserName = "import@ambarlog.de"
'myCredentials.Password = "Meh062020"
'mySmtpsvr.Host = "smtp.office365.com"
'mySmtpsvr.Port = 587
'mySmtpsvr.EnableSsl = True
If VERAG_PROG_ALLGEMEIN.cAllgemein.FIRMA_ID = 24 Then
Select Case art
Case "3", "4" 'Export
sqlWHere = " AND mail_kindOfMail = 'EXP'"
Case Else
sqlWHere = " AND mail_kindOfMail = 'IMP'"
End Select
End If
myCredentials.UserName = "import@ambarlog.de"
myCredentials.Password = "Meh062020"
mySmtpsvr.Host = "owa.verag.ag"
mySmtpsvr.Port = 587
' mySmtpsvr.EnableSsl = True
' eMailfrom = "import@ambarlog.com"
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
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
Dim dt = SQL.loadDgvBySql(sqlstr_Mailsettings, "ADMIN")
If dt.Rows.Count = 1 Then
myCredentials.UserName = If(IsDBNull(dt.Rows(0)("mail_username")), "", Convert.ToString(dt.Rows(0)("mail_username")))
myCredentials.Password = If(IsDBNull(dt.Rows(0)("mail_password")), "", Convert.ToString(dt.Rows(0)("mail_password")))
mySmtpsvr.Host = If(IsDBNull(dt.Rows(0)("mail_host")), "", Convert.ToString(dt.Rows(0)("mail_host")))
mySmtpsvr.Port = If(IsDBNull(dt.Rows(0)("mail_port")), 0, Convert.ToInt32(dt.Rows(0)("mail_port")))
End If
If String.IsNullOrWhiteSpace(myCredentials.UserName) OrElse String.IsNullOrWhiteSpace(myCredentials.Password) OrElse String.IsNullOrWhiteSpace(mySmtpsvr.Host) OrElse mySmtpsvr.Port <= 0 Then
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.Credentials = myCredentials
Try