VBD Versand TC, Mail sender

This commit is contained in:
2025-10-02 09:08:44 +02:00
parent e85eaa7bfb
commit 600a5fb8f7
9 changed files with 97 additions and 34 deletions

View File

@@ -53,6 +53,7 @@ Module Mail
'PARAM = "UID_OPS_SYSKA_ABGLEICH" 'PARAM = "UID_OPS_SYSKA_ABGLEICH"
'PARAM = "JAHRESABRECHNUNG AG-ZS" 'PARAM = "JAHRESABRECHNUNG AG-ZS"
' PARAM = "UID_OPS_SYSKA_ABGLEICH"
'------------------------------------------------------------------------------------ '------------------------------------------------------------------------------------

View File

@@ -119,6 +119,12 @@
<None Include="App.config" /> <None Include="App.config" />
<None Include="Resources\Auswertung_divers.xlsx" /> <None Include="Resources\Auswertung_divers.xlsx" />
<None Include="Resources\Detailauswertung_divers.xlsx" /> <None Include="Resources\Detailauswertung_divers.xlsx" />
<None Include="Resources\MDM_AI_Verguetung.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\MDM_IT_Verguetung.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None>
<None Include="Resources\MDM_ZOLL_Verguetung.xlsx"> <None Include="Resources\MDM_ZOLL_Verguetung.xlsx">
<CopyToOutputDirectory>Always</CopyToOutputDirectory> <CopyToOutputDirectory>Always</CopyToOutputDirectory>
</None> </None>

Binary file not shown.

Binary file not shown.

View File

@@ -469,7 +469,9 @@ Public Class frmMitarbDetails
Dim newMid As Integer = 0 Dim newMid As Integer = 0
If txtVname.Text = "" And txtNname.Text = "" Then MsgBox("Bitte geben Sie einen Namen ein!") : Exit Sub If txtVname.Text = "" And txtNname.Text = "" Then MsgBox("Bitte geben Sie einen Namen ein!") : Exit Sub
If USRPARAM_Bind IsNot Nothing Then
USRPARAM_Bind.updateBinding() USRPARAM_Bind.updateBinding()
End If
getMitarbeiter() getMitarbeiter()

View File

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

View File

@@ -33,7 +33,8 @@ Partial Class frmMain
Me.TableAdapterManager1 = New ADMIN.DataSetBerechtigungenTableAdapters.TableAdapterManager() Me.TableAdapterManager1 = New ADMIN.DataSetBerechtigungenTableAdapters.TableAdapterManager()
Me.pnlMain = New System.Windows.Forms.Panel() Me.pnlMain = New System.Windows.Forms.Panel()
Me.Panel3 = New System.Windows.Forms.Panel() Me.Panel3 = New System.Windows.Forms.Panel()
Me.Button2 = New System.Windows.Forms.Button() Me.lblVersion = New System.Windows.Forms.Label()
Me.btnAuditFlow = New System.Windows.Forms.Button()
Me.btnMailroutine = New System.Windows.Forms.Button() Me.btnMailroutine = New System.Windows.Forms.Button()
Me.btnAPIZugang = New System.Windows.Forms.Button() Me.btnAPIZugang = New System.Windows.Forms.Button()
Me.btnDatenarchiv = New System.Windows.Forms.Button() Me.btnDatenarchiv = New System.Windows.Forms.Button()
@@ -50,7 +51,6 @@ Partial Class frmMain
Me.btnMitarbeiter = New System.Windows.Forms.Button() Me.btnMitarbeiter = New System.Windows.Forms.Button()
Me.Panel2 = New System.Windows.Forms.Panel() Me.Panel2 = New System.Windows.Forms.Panel()
Me.PictureBox1 = New System.Windows.Forms.PictureBox() Me.PictureBox1 = New System.Windows.Forms.PictureBox()
Me.lblVersion = New System.Windows.Forms.Label()
Me.Panel3.SuspendLayout() Me.Panel3.SuspendLayout()
Me.Panel2.SuspendLayout() Me.Panel2.SuspendLayout()
CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -112,7 +112,7 @@ Partial Class frmMain
' '
Me.Panel3.BackColor = System.Drawing.Color.White Me.Panel3.BackColor = System.Drawing.Color.White
Me.Panel3.Controls.Add(Me.lblVersion) Me.Panel3.Controls.Add(Me.lblVersion)
Me.Panel3.Controls.Add(Me.Button2) Me.Panel3.Controls.Add(Me.btnAuditFlow)
Me.Panel3.Controls.Add(Me.btnMailroutine) Me.Panel3.Controls.Add(Me.btnMailroutine)
Me.Panel3.Controls.Add(Me.btnAPIZugang) Me.Panel3.Controls.Add(Me.btnAPIZugang)
Me.Panel3.Controls.Add(Me.btnDatenarchiv) Me.Panel3.Controls.Add(Me.btnDatenarchiv)
@@ -133,17 +133,29 @@ Partial Class frmMain
Me.Panel3.Size = New System.Drawing.Size(137, 801) Me.Panel3.Size = New System.Drawing.Size(137, 801)
Me.Panel3.TabIndex = 32 Me.Panel3.TabIndex = 32
' '
'Button2 'lblVersion
' '
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat Me.lblVersion.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleRight Me.lblVersion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Button2.Location = New System.Drawing.Point(12, 243) Me.lblVersion.ForeColor = System.Drawing.Color.Black
Me.Button2.Name = "Button2" Me.lblVersion.Location = New System.Drawing.Point(38, 751)
Me.Button2.Size = New System.Drawing.Size(94, 33) Me.lblVersion.Name = "lblVersion"
Me.Button2.TabIndex = 44 Me.lblVersion.Size = New System.Drawing.Size(68, 13)
Me.Button2.Text = "AuditFlow" Me.lblVersion.TabIndex = 45
Me.Button2.TextAlign = System.Drawing.ContentAlignment.MiddleLeft Me.lblVersion.Text = "V1.0.0.0"
Me.Button2.UseVisualStyleBackColor = True Me.lblVersion.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'btnAuditFlow
'
Me.btnAuditFlow.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnAuditFlow.ImageAlign = System.Drawing.ContentAlignment.MiddleRight
Me.btnAuditFlow.Location = New System.Drawing.Point(12, 243)
Me.btnAuditFlow.Name = "btnAuditFlow"
Me.btnAuditFlow.Size = New System.Drawing.Size(94, 33)
Me.btnAuditFlow.TabIndex = 44
Me.btnAuditFlow.Text = "AuditFlow"
Me.btnAuditFlow.TextAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnAuditFlow.UseVisualStyleBackColor = True
' '
'btnMailroutine 'btnMailroutine
' '
@@ -330,18 +342,6 @@ Partial Class frmMain
Me.PictureBox1.TabIndex = 31 Me.PictureBox1.TabIndex = 31
Me.PictureBox1.TabStop = False Me.PictureBox1.TabStop = False
' '
'lblVersion
'
Me.lblVersion.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.lblVersion.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblVersion.ForeColor = System.Drawing.Color.Black
Me.lblVersion.Location = New System.Drawing.Point(38, 751)
Me.lblVersion.Name = "lblVersion"
Me.lblVersion.Size = New System.Drawing.Size(68, 13)
Me.lblVersion.TabIndex = 45
Me.lblVersion.Text = "V1.0.0.0"
Me.lblVersion.TextAlign = System.Drawing.ContentAlignment.TopRight
'
'frmMain 'frmMain
' '
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)
@@ -387,6 +387,6 @@ Partial Class frmMain
Friend WithEvents btnDatenarchiv As Button Friend WithEvents btnDatenarchiv As Button
Friend WithEvents btnAPIZugang As Button Friend WithEvents btnAPIZugang As Button
Friend WithEvents btnMailroutine As Button Friend WithEvents btnMailroutine As Button
Friend WithEvents Button2 As Button Friend WithEvents btnAuditFlow As Button
Friend WithEvents lblVersion As Label Friend WithEvents lblVersion As Label
End Class End Class

View File

@@ -28,16 +28,27 @@ Public Class frmMain
btnSchulungen.Enabled = False btnSchulungen.Enabled = False
btnDienstplan.Enabled = False btnDienstplan.Enabled = False
Button1.Enabled = False Button1.Enabled = False
btnAuditFlow.Enabled = False
btnHomepage.Enabled = False btnHomepage.Enabled = False
Button6.Enabled = False Button6.Enabled = False
btnAPIZugang.Enabled = False
btnAPI.Enabled = False btnAPI.Enabled = False
btnFehler.Enabled = False btnFehler.Enabled = False
btnDatenarchiv.Enabled = False
btnMailroutine.Enabled = False
lblVersion.Text = "V " & Application.ProductVersion 'My.Resources.Version2 lblVersion.Text = "V " & Application.ProductVersion 'My.Resources.Version2
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("frmDienstplan", Me) Then Dim uniqueberechtigungDP = True
btnDienstplan.Enabled = True If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AUDITFLOW", "ADMIN") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("AUDITFLOW", "SDL") Then
btnDienstplan.PerformClick() btnAuditFlow.Enabled = True
uniqueberechtigungDP = False
End If End If
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("SCHULUNG", "ADMIN") Or VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("SCHULUNG", "SDL") Then
btnSchulungen.Enabled = True
uniqueberechtigungDP = False
End If
' Me.berechtigung = VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG("ADMINFUNCTIONS", 1) ' Me.berechtigung = VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG("ADMINFUNCTIONS", 1)
' If Me.berechtigung = 99 Then Me.Close() : Exit Sub ' If Me.berechtigung = 99 Then Me.Close() : Exit Sub
@@ -46,14 +57,23 @@ Public Class frmMain
btnMitarbeiter.Enabled = True btnMitarbeiter.Enabled = True
btnProgramme.Enabled = True btnProgramme.Enabled = True
btnSchulungen.Enabled = True btnSchulungen.Enabled = True
btnMailroutine.Enabled = True
btnDienstplan.Enabled = True btnDienstplan.Enabled = True
Button1.Enabled = True Button1.Enabled = True
btnAuditFlow.Enabled = True
btnAPIZugang.Enabled = True
btnAPI.Enabled = True btnAPI.Enabled = True
btnFehler.Enabled = True btnFehler.Enabled = True
btnHomepage.Enabled = True btnHomepage.Enabled = True
Button6.Enabled = True Button6.Enabled = True
btnDatenarchiv.Enabled = True
uniqueberechtigungDP = False
End If End If
If VERAG_PROG_ALLGEMEIN.cBerechtignunen.CHECK_BERECHTIGUNG_bool("frmDienstplan", Me) Then
btnDienstplan.Enabled = True
If uniqueberechtigungDP Then btnDienstplan.PerformClick()
End If
' If frmLogin.USRBER >= 5 Then ' If frmLogin.USRBER >= 5 Then
'btnDienstplan.Enabled = True 'btnDienstplan.Enabled = True
' End If ' End If
@@ -238,7 +258,7 @@ Public Class frmMain
button_Click(sender) button_Click(sender)
End Sub End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click Private Sub Button2_Click(sender As Object, e As EventArgs) Handles btnAuditFlow.Click
Dim f As New frmAuditFlow Dim f As New frmAuditFlow
f.Show(Me) f.Show(Me)
End Sub End Sub

View File

@@ -1029,6 +1029,40 @@ Public Class frmStartOptions
End Sub End Sub
Sub doMailZollbelegTC(pfad As String, art As String, tc_id As Integer)
Try
Dim DY As New TELOTEC_Worker.cTelotec_Anmeldung(tc_id)
If DY.telanm_SendungsId IsNot Nothing AndAlso CInt(DY.telanm_SendungsId) > 0 Then
doMailZollbeleg(pfad, art, DY.telanm_SendungsId, DY.telanm_BezugsNr)
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL)
End Try
End Sub
Sub doMailZollbelegTC(pfad As String, art As String, TC As TELOTEC_Worker.cTelotec_Anmeldung)
Try
If TC IsNot Nothing Then
If TC.telanm_SendungsId IsNot Nothing AndAlso CInt(TC.telanm_SendungsId) > 0 Then
doMailZollbeleg(pfad, art, TC.telanm_SendungsId, TC.telanm_BezugsNr)
End If
End If
Catch ex As Exception
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodBase.GetCurrentMethod.Name, VERAG_PROG_ALLGEMEIN.ERROR_OP.MAIL)
End Try
End Sub
Sub doMailZollbeleg(pfad, art, dy_SendungsId, BezugsNr) Sub doMailZollbeleg(pfad, art, dy_SendungsId, BezugsNr)
@@ -6215,7 +6249,7 @@ weiter:
SQL.doSQL("UPDATE [tblTelotec_Anmeldung] SET [telanm_VBD_dsId]='" & DS.da_id & "' where telanm_CRN='" & TELO_ANM.Refs_CRN & "'", "FMZOLL") SQL.doSQL("UPDATE [tblTelotec_Anmeldung] SET [telanm_VBD_dsId]='" & DS.da_id & "' where telanm_CRN='" & TELO_ANM.Refs_CRN & "'", "FMZOLL")
SQL.doSQL("UPDATE Speditionsbuch SET DokumentId_VBD='" & DS.da_id & "' where AtlasBezNrNCTS='" & TELO_ANM.Refs_LRN.ToString.Trim & "' AND DokumentId_VBD is null", "FMZOLL") 'Falls Spedbuch schon zuvor generiert wurde! SQL.doSQL("UPDATE Speditionsbuch SET DokumentId_VBD='" & DS.da_id & "' where AtlasBezNrNCTS='" & TELO_ANM.Refs_LRN.ToString.Trim & "' AND DokumentId_VBD is null", "FMZOLL") 'Falls Spedbuch schon zuvor generiert wurde!
If ZB_Versand Then If ZB_Versand Then
If DateDiff(DateInterval.Hour, TELO_ANM.dec_CreateDate, Now) < 24 Then frmStartOptions.doMailZollbeleg(DS.GET_TOP1_PATH, "VBD", TELO_ANM.telanm_id) If DateDiff(DateInterval.Hour, TELO_ANM.dec_CreateDate, Now) < 24 Then frmStartOptions.doMailZollbelegTC(DS.GET_TOP1_PATH, "VBD", TELO_ANM)
End If End If
End If End If
End If End If