AuditFlow, OpenSnd_SendToAviso

This commit is contained in:
2025-09-03 14:21:50 +02:00
parent 21a1236ca5
commit 9513240844
18 changed files with 1755 additions and 1195 deletions

View File

@@ -93,9 +93,10 @@ Public Class cAuditFlow_Pruefobjekte
"ELSE " &
"BEGIN " & getInsertCmd() & " END " &
"COMMIT TRAN "
' MsgBox(sqlstr)
Return SQL.doSQLVarList(sqlstr, "ADMIN", , list)
Catch ex As Exception
' MsgBox(ex.Message)
VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name)
Return False
End Try

View File

@@ -13,6 +13,7 @@ Public Class cAuditFlow_Pruefungen
Public Property wartPruef_Erledigung_BestaetigtMaName As String
Public Property wartPruef_Erledigung_Bemerkung As String
Public Property wartPruef_Anhaenge_daId As Nullable(Of Integer)
Public Property wartPruef_Anhaenge_Count As Integer
Public Property wartPruef_Bemerkung As String
Public Property wartPruef_MailErinnerung_Gesendet As Boolean = False
@@ -49,6 +50,7 @@ Public Class cAuditFlow_Pruefungen
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPruef_Erledigung_BestaetigtMaName", wartPruef_Erledigung_BestaetigtMaName))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPruef_Erledigung_Bemerkung", wartPruef_Erledigung_Bemerkung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPruef_Anhaenge_daId", wartPruef_Anhaenge_daId))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPruef_Anhaenge_Count", wartPruef_Anhaenge_Count))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPruef_Bemerkung", wartPruef_Bemerkung))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPruef_MailErinnerung_Gesendet", wartPruef_MailErinnerung_Gesendet))

View File

@@ -35,6 +35,9 @@ Partial Class frmAuditFlow
Me.SplitContainer1 = New System.Windows.Forms.SplitContainer()
Me.dgvPruefungsobjekte = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnloptions = New System.Windows.Forms.Panel()
Me.lblAbDat = New System.Windows.Forms.Label()
Me.txtWartungFaelligkeitAbDat = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label9 = New System.Windows.Forms.Label()
Me.MyTextBox2 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.Button2 = New System.Windows.Forms.Button()
@@ -55,6 +58,7 @@ Partial Class frmAuditFlow
Me.MyTextBox1 = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.dgvPruefungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components)
Me.pnl = New System.Windows.Forms.Panel()
Me.btnSuche = New System.Windows.Forms.Button()
Me.CheckBox1 = New System.Windows.Forms.CheckBox()
Me.Label8 = New System.Windows.Forms.Label()
Me.txtAbfertDat = New VERAG_PROG_ALLGEMEIN.MyTextBox()
@@ -72,10 +76,6 @@ Partial Class frmAuditFlow
Me.DateTimePicker2 = New System.Windows.Forms.DateTimePicker()
Me.Label13 = New System.Windows.Forms.Label()
Me.DateTimePicker1 = New System.Windows.Forms.DateTimePicker()
Me.btnSuche = New System.Windows.Forms.Button()
Me.Button1 = New System.Windows.Forms.Button()
Me.lblAbDat = New System.Windows.Forms.Label()
Me.txtWartungFaelligkeitAbDat = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.cntxtOptionen.SuspendLayout()
Me.pnlTop.SuspendLayout()
CType(Me.SplitContainer1, System.ComponentModel.ISupportInitialize).BeginInit()
@@ -156,7 +156,6 @@ Partial Class frmAuditFlow
Me.SplitContainer1.Panel2.Controls.Add(Me.Panel3)
Me.SplitContainer1.Panel2.Controls.Add(Me.dgvPruefungen)
Me.SplitContainer1.Panel2.Controls.Add(Me.pnl)
Me.SplitContainer1.Panel2.Controls.Add(Me.btnSuche)
Me.SplitContainer1.Size = New System.Drawing.Size(1586, 636)
Me.SplitContainer1.SplitterDistance = 960
Me.SplitContainer1.TabIndex = 38
@@ -199,6 +198,55 @@ Partial Class frmAuditFlow
Me.pnloptions.Size = New System.Drawing.Size(960, 80)
Me.pnloptions.TabIndex = 9
'
'lblAbDat
'
Me.lblAbDat.AutoSize = True
Me.lblAbDat.Location = New System.Drawing.Point(613, 55)
Me.lblAbDat.Name = "lblAbDat"
Me.lblAbDat.Size = New System.Drawing.Size(56, 13)
Me.lblAbDat.TabIndex = 142
Me.lblAbDat.Text = "ab Datum:"
'
'txtWartungFaelligkeitAbDat
'
Me.txtWartungFaelligkeitAbDat._DateTimeOnly = False
Me.txtWartungFaelligkeitAbDat._numbersOnly = False
Me.txtWartungFaelligkeitAbDat._numbersOnlyKommastellen = ""
Me.txtWartungFaelligkeitAbDat._numbersOnlyTrennzeichen = True
Me.txtWartungFaelligkeitAbDat._Prozent = False
Me.txtWartungFaelligkeitAbDat._ShortDateNew = True
Me.txtWartungFaelligkeitAbDat._ShortDateOnly = False
Me.txtWartungFaelligkeitAbDat._TimeOnly = False
Me.txtWartungFaelligkeitAbDat._TimeOnly_Seconds = False
Me.txtWartungFaelligkeitAbDat._value = ""
Me.txtWartungFaelligkeitAbDat._Waehrung = False
Me.txtWartungFaelligkeitAbDat._WaehrungZeichen = True
Me.txtWartungFaelligkeitAbDat.ForeColor = System.Drawing.Color.Red
Me.txtWartungFaelligkeitAbDat.Location = New System.Drawing.Point(675, 52)
Me.txtWartungFaelligkeitAbDat.MaxLength = 10
Me.txtWartungFaelligkeitAbDat.MaxLineLength = -1
Me.txtWartungFaelligkeitAbDat.MaxLines_Warning = ""
Me.txtWartungFaelligkeitAbDat.MaxLines_Warning_Label = Nothing
Me.txtWartungFaelligkeitAbDat.Name = "txtWartungFaelligkeitAbDat"
Me.txtWartungFaelligkeitAbDat.Size = New System.Drawing.Size(101, 20)
Me.txtWartungFaelligkeitAbDat.TabIndex = 143
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.zeiterfassung_s
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(583, 7)
Me.Button1.Margin = New System.Windows.Forms.Padding(0)
Me.Button1.Name = "Button1"
Me.Button1.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
Me.Button1.Size = New System.Drawing.Size(193, 45)
Me.Button1.TabIndex = 9
Me.Button1.Text = "Fälligkeiten berechnen"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'Label9
'
Me.Label9.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
@@ -395,6 +443,7 @@ Partial Class frmAuditFlow
Me.Button9.Text = "Neu"
Me.Button9.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button9.UseVisualStyleBackColor = True
Me.Button9.Visible = False
'
'Button11
'
@@ -406,6 +455,7 @@ Partial Class frmAuditFlow
Me.Button11.Size = New System.Drawing.Size(41, 34)
Me.Button11.TabIndex = 7
Me.Button11.UseVisualStyleBackColor = True
Me.Button11.Visible = False
'
'Button12
'
@@ -420,6 +470,7 @@ Partial Class frmAuditFlow
Me.Button12.Size = New System.Drawing.Size(41, 34)
Me.Button12.TabIndex = 8
Me.Button12.UseVisualStyleBackColor = True
Me.Button12.Visible = False
'
'Label3
'
@@ -485,6 +536,7 @@ Partial Class frmAuditFlow
'
Me.pnl.BackColor = System.Drawing.Color.WhiteSmoke
Me.pnl.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle
Me.pnl.Controls.Add(Me.btnSuche)
Me.pnl.Controls.Add(Me.CheckBox1)
Me.pnl.Controls.Add(Me.Label8)
Me.pnl.Controls.Add(Me.txtAbfertDat)
@@ -508,14 +560,30 @@ Partial Class frmAuditFlow
Me.pnl.Size = New System.Drawing.Size(622, 106)
Me.pnl.TabIndex = 4
'
'btnSuche
'
Me.btnSuche.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnSuche.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSuche.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSuche.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnSuche.Location = New System.Drawing.Point(455, 37)
Me.btnSuche.Name = "btnSuche"
Me.btnSuche.Size = New System.Drawing.Size(162, 45)
Me.btnSuche.TabIndex = 22
Me.btnSuche.Text = "Suche starten"
Me.btnSuche.UseVisualStyleBackColor = True
'
'CheckBox1
'
Me.CheckBox1.AutoSize = True
Me.CheckBox1.Checked = True
Me.CheckBox1.CheckState = System.Windows.Forms.CheckState.Indeterminate
Me.CheckBox1.Location = New System.Drawing.Point(328, 11)
Me.CheckBox1.Name = "CheckBox1"
Me.CheckBox1.Size = New System.Drawing.Size(155, 17)
Me.CheckBox1.TabIndex = 35
Me.CheckBox1.Text = "Erledigte Einträge anzeigen"
Me.CheckBox1.ThreeState = True
Me.CheckBox1.UseVisualStyleBackColor = True
'
'Label8
@@ -750,68 +818,6 @@ Partial Class frmAuditFlow
Me.DateTimePicker1.Size = New System.Drawing.Size(115, 20)
Me.DateTimePicker1.TabIndex = 10
'
'btnSuche
'
Me.btnSuche.Anchor = CType((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
Me.btnSuche.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.btnSuche.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.btnSuche.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.btnSuche.Location = New System.Drawing.Point(166, 70)
Me.btnSuche.Name = "btnSuche"
Me.btnSuche.Size = New System.Drawing.Size(162, 52)
Me.btnSuche.TabIndex = 22
Me.btnSuche.Text = "Suche starten"
Me.btnSuche.UseVisualStyleBackColor = True
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.zeiterfassung_s
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(583, 7)
Me.Button1.Margin = New System.Windows.Forms.Padding(0)
Me.Button1.Name = "Button1"
Me.Button1.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
Me.Button1.Size = New System.Drawing.Size(193, 45)
Me.Button1.TabIndex = 9
Me.Button1.Text = "Fälligkeiten berechnen"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = True
'
'lblAbDat
'
Me.lblAbDat.AutoSize = True
Me.lblAbDat.Location = New System.Drawing.Point(613, 55)
Me.lblAbDat.Name = "lblAbDat"
Me.lblAbDat.Size = New System.Drawing.Size(56, 13)
Me.lblAbDat.TabIndex = 142
Me.lblAbDat.Text = "ab Datum:"
'
'txtWartungFaelligkeitAbDat
'
Me.txtWartungFaelligkeitAbDat._DateTimeOnly = False
Me.txtWartungFaelligkeitAbDat._numbersOnly = False
Me.txtWartungFaelligkeitAbDat._numbersOnlyKommastellen = ""
Me.txtWartungFaelligkeitAbDat._numbersOnlyTrennzeichen = True
Me.txtWartungFaelligkeitAbDat._Prozent = False
Me.txtWartungFaelligkeitAbDat._ShortDateNew = True
Me.txtWartungFaelligkeitAbDat._ShortDateOnly = False
Me.txtWartungFaelligkeitAbDat._TimeOnly = False
Me.txtWartungFaelligkeitAbDat._TimeOnly_Seconds = False
Me.txtWartungFaelligkeitAbDat._value = ""
Me.txtWartungFaelligkeitAbDat._Waehrung = False
Me.txtWartungFaelligkeitAbDat._WaehrungZeichen = True
Me.txtWartungFaelligkeitAbDat.ForeColor = System.Drawing.Color.Red
Me.txtWartungFaelligkeitAbDat.Location = New System.Drawing.Point(675, 52)
Me.txtWartungFaelligkeitAbDat.MaxLength = 10
Me.txtWartungFaelligkeitAbDat.MaxLineLength = -1
Me.txtWartungFaelligkeitAbDat.MaxLines_Warning = ""
Me.txtWartungFaelligkeitAbDat.MaxLines_Warning_Label = Nothing
Me.txtWartungFaelligkeitAbDat.Name = "txtWartungFaelligkeitAbDat"
Me.txtWartungFaelligkeitAbDat.Size = New System.Drawing.Size(101, 20)
Me.txtWartungFaelligkeitAbDat.TabIndex = 143
'
'frmAuditFlow
'
Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!)

View File

@@ -13,8 +13,8 @@ Public Class frmAuditFlow
Private Sub frmAuditFlow_Load(sender As Object, e As EventArgs) Handles Me.Load
txtWartungFaelligkeitAbDat._value = Now.ToShortDateString
txtAbfertDat.Text = Now.AddMonths(-6).ToShortDateString 'CDate("01." & Now.ToString("MM.yyyy")).AddMonths(-1).ToShortDateString
txtAbfertDatBis.Text = Now.ToShortDateString
txtAbfertDat.Text = Now.AddMonths(-2).ToShortDateString 'CDate("01." & Now.ToString("MM.yyyy")).AddMonths(-1).ToShortDateString
txtAbfertDatBis.Text = Now.AddMonths(1).ToShortDateString 'Now.ToShortDateString
btnMonat.Text = MONAT.ToString("MMMM")
btnJahr.Text = JAHR.Year
@@ -159,16 +159,15 @@ Public Class frmAuditFlow
If cboKategorie._value <> "" Then sqlstr &= " AND wartPO_Kategorie LIKE @wartPO_Kategorie "
Return sqlstr
End Function
Function getListPruefungsobjekte() As List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
Dim list As New List(Of VERAG_PROG_ALLGEMEIN.SQLVariable)
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Firma", cboFirma._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Niederlasung", cboNL._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_StandortId", cboStandort._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("wartPO_Kategorie", cboKategorie._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DatVon", txtAbfertDat._value))
list.Add(New VERAG_PROG_ALLGEMEIN.SQLVariable("DatBis", txtAbfertDatBis._value))
Return list
@@ -226,21 +225,43 @@ Public Class frmAuditFlow
If txtAbfertDat.Text <> "" Then
If txtAbfertDatBis.Text <> "" Then
sqlstr &= " AND ([sms_Datum] BETWEEN @DatVon AND @DatBis ) "
sqlstr &= " AND ([wartPruef_Faelligkeitsdatum] BETWEEN @DatVon AND @DatBis ) "
Else
sqlstr &= " AND ([sms_Datum] BETWEEN @DatVon AND @DatVon ) "
sqlstr &= " AND ([wartPruef_Faelligkeitsdatum] BETWEEN @DatVon AND @DatVon ) "
End If
End If
If CheckBox1.CheckState = CheckState.Checked Then
sqlstr &= " AND [wartPruef_Erledigung]=1 "
ElseIf CheckBox1.CheckState = CheckState.Unchecked Then
sqlstr &= " AND [wartPruef_Erledigung]=0 "
Else
sqlstr &= " "
End If
Return sqlstr
End Function
Private Sub dgvPruefungen_CellDoubleClick(sender As Object, e As DataGridViewCellEventArgs) Handles dgvPruefungen.CellDoubleClick
' Falls Kopfzeile doppelt geklickt wird -> ignorieren
If e.RowIndex < 0 Then Exit Sub
' ID der ausgewählten Zeile holen (Spalte "wartPO_Id")
Dim wartPruef_wartPOId As Integer = CInt(dgvPruefungen.Rows(e.RowIndex).Cells("wartPruef_wartPOId").Value)
Dim wartPruef_Id As Integer = CInt(dgvPruefungen.Rows(e.RowIndex).Cells("wartPruef_Id").Value)
' Hier deine Funktion oder Logik aufrufen
' Beispiel:
Dim f As New frmAuditFlow_Pruefungen(wartPruef_wartPOId, wartPruef_Id)
f.ShowDialog(Me)
dgvPruefungen.RELOAD()
setDGVOptionsPruefungen()
End Sub
'-------------------------------------------------------------------
Private Sub btnSuche_Click(sender As Object, e As EventArgs) Handles btnSuche.Click
loadDGVPuefungen()
End Sub
@@ -249,8 +270,8 @@ Public Class frmAuditFlow
Try
With dgvPruefungen
.Rows.Clear()
If .SelectedRows.Count = 0 Then
.Columns.Clear()
If dgvPruefungsobjekte.SelectedRows.Count = 0 Then
Exit Sub
End If
@@ -262,14 +283,14 @@ Public Class frmAuditFlow
Dim sqlstr As String = ""
' MsgBox(VERAG_PROG_ALLGEMEIN.cAllgemein.ERR_OP_GLOBAL)
sqlstr &= "SELECT TOP (1000) [wartPruef_Id] ,[wartPruef_Faelligkeitsdatum],[wartPruef_Erledigung],[wartPruef_Erledigung_Datum],[wartPruef_Erledigung_BestaetigtMaId],[wartPruef_Erledigung_BestaetigtMaName]
,[wartPruef_Erledigung_Bemerkung],[wartPruef_Anhaenge_daId],[wartPruef_Bemerkung],[wartPruef_MailErinnerung_Gesendet] ,[wartPruef_MailErinnerung_GesendetAn],[wartPruef_MailErinnerung_GesendetAm]
FROM [tblAuditFlow_Pruefungen] WHERE [wartPruef_wartPOId]='" & wartPO_Id & "' WHERE 1=1 "
sqlstr &= "SELECT TOP (1000) [wartPruef_Id],wartPruef_wartPOId ,[wartPruef_Faelligkeitsdatum],[wartPruef_Erledigung],[wartPruef_Erledigung_Datum],[wartPruef_Erledigung_BestaetigtMaName]
,wartPruef_Erledigung_Bemerkung,case when [wartPruef_Anhaenge_Count] >0 then 'Ja' else 'Nein' end as [Anhaenge]
FROM [tblAuditFlow_Pruefungen] WHERE [wartPruef_wartPOId]='" & wartPO_Id & "' "
' .DataSource = myTable
' MsgBox(sqlstr & getWherePruefungsobjekte() & " order by wartPO_Firma ,wartPO_Niederlasung, wartPO_StandortId")
.SET_SQL(sqlstr & getWherePruefungen() & " order by wartPO_Firma ,wartPO_Niederlasung, wartSt_Standort ", "ADMIN", getListPruefungsobjekte)
'MsgBox(sqlstr & getWherePruefungen() & " order by wartPruef_Faelligkeitsdatum ")
.SET_SQL(sqlstr & getWherePruefungen() & " order by wartPruef_Faelligkeitsdatum ", "ADMIN", getListPruefungsobjekte)
.LOAD()
setDGVOptionsPruefungen()
End With
@@ -291,41 +312,28 @@ Public Class frmAuditFlow
.MultiSelect = False
.Columns("wartPruef_Id").Visible = False
.Columns("wartPruef_wartPOId").Visible = False
.Columns("wartPruef_Faelligkeitsdatum").MinimumWidth = 100
.Columns("wartPruef_Faelligkeitsdatum").Width = 90
.Columns("wartPruef_Faelligkeitsdatum").HeaderText = "Fälligkeitsdatum"
.Columns("wartPruef_Faelligkeitsdatum").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("wartPruef_Erledigung").Width = 60
.Columns("wartPruef_Erledigung").HeaderText = "Erledigung"
.Columns("wartPO_Kategorie").Width = 100
.Columns("wartPO_Kategorie").HeaderText = "Kategorie"
.Columns("wartPruef_Erledigung_Datum").Width = 90
.Columns("wartPruef_Erledigung_Datum").HeaderText = "Erl.Dat"
.Columns("wartPO_Firma").Width = 80
.Columns("wartPO_Firma").HeaderText = "Firma"
.Columns("wartPruef_Erledigung_BestaetigtMaName").Width = 100
.Columns("wartPruef_Erledigung_BestaetigtMaName").HeaderText = "Erl.MA"
.Columns("wartPO_Niederlasung").Width = 50
.Columns("wartPO_Niederlasung").HeaderText = "NL"
.Columns("wartPO_Standort").Width = 100
.Columns("wartPO_Standort").HeaderText = "Standort"
.Columns("wartPO_IntervallTyp").Width = 100
.Columns("wartPO_IntervallTyp").HeaderText = "Intervall"
.Columns("wartPO_IntervallWert").Width = 60
.Columns("wartPO_IntervallWert").HeaderText = "Int.-Wert"
.Columns("wartPO_Erinnerung_VorlaufInTagen").Width = 60
.Columns("wartPO_Erinnerung_VorlaufInTagen").HeaderText = "Vorl.Tage"
.Columns("wartPO_zustaendigIntern_Name").Width = 120
.Columns("wartPO_zustaendigIntern_Name").HeaderText = "Mitarbeiter"
.Columns("wartPO_Aktiv").Width = 50
.Columns("wartPO_Aktiv").HeaderText = "Aktiv"
.Columns("wartPruef_Erledigung_Bemerkung").Width = 60
.Columns("wartPruef_Erledigung_Bemerkung").HeaderText = "Erl.Bemerkung."
.Columns("wartPruef_Erledigung_Bemerkung").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill
.Columns("Anhaenge").Width = 60
.Columns("Anhaenge").HeaderText = "Anh."
' lblErgebnis.Text = "Ergebnise: " & .RowCount
@@ -420,7 +428,26 @@ Public Class frmAuditFlow
DateTimePicker1.Value = ("01." & Now.Month & "." & Now.Year)
DateTimePicker2.Value = Now
End Select
btnSuche.PerformClick()
loadDGVPuefungen()
End Sub
Private Sub txtAbfertDat_TextChanged(sender As Object, e As EventArgs) Handles txtAbfertDat.Leave
If sender.Text <> "" AndAlso IsDate(sender.Text) Then
DateTimePicker1.Value = CDate(sender.text)
End If
End Sub
Private Sub txtAbfertDatBis_TextChanged(sender As Object, e As EventArgs) Handles txtAbfertDatBis.Leave
If sender.Text <> "" AndAlso IsDate(sender.Text) Then
DateTimePicker2.Value = CDate(sender.text)
End If
End Sub
Private Sub DateTimePicker1_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker1.ValueChanged
txtAbfertDat._value = CDate(sender.value).ToShortDateString
End Sub
Private Sub DateTimePicker2_ValueChanged(sender As Object, e As EventArgs) Handles DateTimePicker2.ValueChanged
txtAbfertDatBis._value = CDate(sender.value).ToShortDateString
End Sub
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
@@ -439,4 +466,16 @@ Public Class frmAuditFlow
loadDGVPuefungen()
End Sub
Private Sub CheckBox1_CheckedChanged(sender As Object, e As EventArgs) Handles CheckBox1.CheckStateChanged
loadDGVPuefungen()
End Sub
Private Sub dgvPruefungsobjekte_SelectionChanged(sender As Object, e As EventArgs) Handles dgvPruefungsobjekte.SelectionChanged
If dgvPruefungsobjekte.SelectedRows.Count > 0 Then
loadDGVPuefungen()
Else
dgvPruefungen.Columns.Clear()
End If
End Sub
End Class

View File

@@ -26,12 +26,8 @@ Partial Class frmAuditFlow_Pruefungen
Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(frmAuditFlow_Pruefungen))
Me.pnlTop = New System.Windows.Forms.Panel()
Me.Label4 = New System.Windows.Forms.Label()
Me.cboKategorie = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Label1 = New System.Windows.Forms.Label()
Me.Label7 = New System.Windows.Forms.Label()
Me.cboStandort = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboFirma = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.cboNL = New VERAG_PROG_ALLGEMEIN.MyComboBox()
Me.Label5 = New System.Windows.Forms.Label()
Me.Label6 = New System.Windows.Forms.Label()
Me.Label2 = New System.Windows.Forms.Label()
@@ -44,13 +40,19 @@ Partial Class frmAuditFlow_Pruefungen
Me.Panel1 = New System.Windows.Forms.Panel()
Me.Label15 = New System.Windows.Forms.Label()
Me.Panel2 = New System.Windows.Forms.Panel()
Me.lblErledigt = New System.Windows.Forms.Label()
Me.Button1 = New System.Windows.Forms.Button()
Me.Label9 = New System.Windows.Forms.Label()
Me.RichTextBox1 = New System.Windows.Forms.RichTextBox()
Me.CheckBox2 = New System.Windows.Forms.CheckBox()
Me.rtbErledigtBemerkung = New System.Windows.Forms.RichTextBox()
Me.cbxErledigt = New System.Windows.Forms.CheckBox()
Me.Label10 = New System.Windows.Forms.Label()
Me.Button2 = New System.Windows.Forms.Button()
Me.UsrcntlPDFScanList1 = New VERAG_PROG_ALLGEMEIN.usrcntlPDFScanList()
Me.Label11 = New System.Windows.Forms.Label()
Me.txtFirma = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtNL = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtStandort = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.txtKategorie = New VERAG_PROG_ALLGEMEIN.MyTextBox()
Me.pnlTop.SuspendLayout()
Me.Panel1.SuspendLayout()
Me.Panel2.SuspendLayout()
@@ -77,25 +79,9 @@ Partial Class frmAuditFlow_Pruefungen
Me.Label4.TabIndex = 0
Me.Label4.Text = "AuditFlow Prüfung"
'
'cboKategorie
'
Me.cboKategorie._allowedValuesFreiText = Nothing
Me.cboKategorie._allowFreiText = False
Me.cboKategorie._value = ""
Me.cboKategorie.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cboKategorie.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.cboKategorie.Enabled = False
Me.cboKategorie.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cboKategorie.FormattingEnabled = True
Me.cboKategorie.Location = New System.Drawing.Point(403, 125)
Me.cboKategorie.Name = "cboKategorie"
Me.cboKategorie.Size = New System.Drawing.Size(143, 24)
Me.cboKategorie.TabIndex = 38
'
'Label1
'
Me.Label1.AutoSize = True
Me.Label1.Enabled = False
Me.Label1.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label1.Location = New System.Drawing.Point(315, 130)
Me.Label1.Name = "Label1"
@@ -106,7 +92,6 @@ Partial Class frmAuditFlow_Pruefungen
'Label7
'
Me.Label7.AutoSize = True
Me.Label7.Enabled = False
Me.Label7.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label7.Location = New System.Drawing.Point(13, 130)
Me.Label7.Name = "Label7"
@@ -114,55 +99,9 @@ Partial Class frmAuditFlow_Pruefungen
Me.Label7.TabIndex = 36
Me.Label7.Text = "Standort:"
'
'cboStandort
'
Me.cboStandort._allowedValuesFreiText = Nothing
Me.cboStandort._allowFreiText = False
Me.cboStandort._value = ""
Me.cboStandort.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cboStandort.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.cboStandort.Enabled = False
Me.cboStandort.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cboStandort.FormattingEnabled = True
Me.cboStandort.Location = New System.Drawing.Point(123, 125)
Me.cboStandort.Name = "cboStandort"
Me.cboStandort.Size = New System.Drawing.Size(143, 24)
Me.cboStandort.TabIndex = 35
'
'cboFirma
'
Me.cboFirma._allowedValuesFreiText = Nothing
Me.cboFirma._allowFreiText = False
Me.cboFirma._value = ""
Me.cboFirma.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cboFirma.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.cboFirma.Enabled = False
Me.cboFirma.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cboFirma.FormattingEnabled = True
Me.cboFirma.Location = New System.Drawing.Point(123, 68)
Me.cboFirma.Name = "cboFirma"
Me.cboFirma.Size = New System.Drawing.Size(143, 24)
Me.cboFirma.TabIndex = 34
'
'cboNL
'
Me.cboNL._allowedValuesFreiText = Nothing
Me.cboNL._allowFreiText = False
Me.cboNL._value = ""
Me.cboNL.AutoCompleteMode = System.Windows.Forms.AutoCompleteMode.SuggestAppend
Me.cboNL.AutoCompleteSource = System.Windows.Forms.AutoCompleteSource.ListItems
Me.cboNL.Enabled = False
Me.cboNL.Font = New System.Drawing.Font("Microsoft Sans Serif", 10.0!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.cboNL.FormattingEnabled = True
Me.cboNL.Location = New System.Drawing.Point(123, 94)
Me.cboNL.Name = "cboNL"
Me.cboNL.Size = New System.Drawing.Size(143, 24)
Me.cboNL.TabIndex = 33
'
'Label5
'
Me.Label5.AutoSize = True
Me.Label5.Enabled = False
Me.Label5.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label5.Location = New System.Drawing.Point(13, 73)
Me.Label5.Name = "Label5"
@@ -173,7 +112,6 @@ Partial Class frmAuditFlow_Pruefungen
'Label6
'
Me.Label6.AutoSize = True
Me.Label6.Enabled = False
Me.Label6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label6.Location = New System.Drawing.Point(13, 99)
Me.Label6.Name = "Label6"
@@ -184,7 +122,6 @@ Partial Class frmAuditFlow_Pruefungen
'Label2
'
Me.Label2.AutoSize = True
Me.Label2.Enabled = False
Me.Label2.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label2.Location = New System.Drawing.Point(14, 205)
Me.Label2.Name = "Label2"
@@ -195,7 +132,6 @@ Partial Class frmAuditFlow_Pruefungen
'Label3
'
Me.Label3.AutoSize = True
Me.Label3.Enabled = False
Me.Label3.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.Label3.Location = New System.Drawing.Point(14, 231)
Me.Label3.Name = "Label3"
@@ -217,7 +153,7 @@ Partial Class frmAuditFlow_Pruefungen
Me.txtBezeichnung._value = ""
Me.txtBezeichnung._Waehrung = False
Me.txtBezeichnung._WaehrungZeichen = True
Me.txtBezeichnung.Enabled = False
Me.txtBezeichnung.BackColor = System.Drawing.Color.White
Me.txtBezeichnung.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtBezeichnung.ForeColor = System.Drawing.Color.Black
Me.txtBezeichnung.Location = New System.Drawing.Point(123, 197)
@@ -226,6 +162,7 @@ Partial Class frmAuditFlow_Pruefungen
Me.txtBezeichnung.MaxLines_Warning_Label = Nothing
Me.txtBezeichnung.Multiline = True
Me.txtBezeichnung.Name = "txtBezeichnung"
Me.txtBezeichnung.ReadOnly = True
Me.txtBezeichnung.Size = New System.Drawing.Size(436, 28)
Me.txtBezeichnung.TabIndex = 43
'
@@ -243,7 +180,7 @@ Partial Class frmAuditFlow_Pruefungen
Me.txtKennung._value = ""
Me.txtKennung._Waehrung = False
Me.txtKennung._WaehrungZeichen = True
Me.txtKennung.Enabled = False
Me.txtKennung.BackColor = System.Drawing.Color.White
Me.txtKennung.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtKennung.ForeColor = System.Drawing.Color.Black
Me.txtKennung.Location = New System.Drawing.Point(123, 231)
@@ -252,6 +189,7 @@ Partial Class frmAuditFlow_Pruefungen
Me.txtKennung.MaxLines_Warning_Label = Nothing
Me.txtKennung.Multiline = True
Me.txtKennung.Name = "txtKennung"
Me.txtKennung.ReadOnly = True
Me.txtKennung.Size = New System.Drawing.Size(436, 28)
Me.txtKennung.TabIndex = 44
'
@@ -273,7 +211,6 @@ Partial Class frmAuditFlow_Pruefungen
'Label8
'
Me.Label8.AutoSize = True
Me.Label8.Enabled = False
Me.Label8.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!)
Me.Label8.Location = New System.Drawing.Point(14, 282)
Me.Label8.Name = "Label8"
@@ -329,43 +266,74 @@ Partial Class frmAuditFlow_Pruefungen
'Panel2
'
Me.Panel2.BackColor = System.Drawing.Color.PapayaWhip
Me.Panel2.Controls.Add(Me.lblErledigt)
Me.Panel2.Controls.Add(Me.Button1)
Me.Panel2.Controls.Add(Me.Label9)
Me.Panel2.Controls.Add(Me.RichTextBox1)
Me.Panel2.Controls.Add(Me.CheckBox2)
Me.Panel2.Controls.Add(Me.rtbErledigtBemerkung)
Me.Panel2.Controls.Add(Me.cbxErledigt)
Me.Panel2.Controls.Add(Me.Label10)
Me.Panel2.Location = New System.Drawing.Point(0, 407)
Me.Panel2.Name = "Panel2"
Me.Panel2.Size = New System.Drawing.Size(566, 266)
Me.Panel2.TabIndex = 62
'
'lblErledigt
'
Me.lblErledigt.AutoSize = True
Me.lblErledigt.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.lblErledigt.Location = New System.Drawing.Point(252, 50)
Me.lblErledigt.Name = "lblErledigt"
Me.lblErledigt.Size = New System.Drawing.Size(83, 13)
Me.lblErledigt.TabIndex = 62
Me.lblErledigt.Text = "Erledigt von -"
'
'Button1
'
Me.Button1.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left), System.Windows.Forms.AnchorStyles)
Me.Button1.BackColor = System.Drawing.Color.White
Me.Button1.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button1.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.Button1.Image = Global.VERAG_PROG_ALLGEMEIN.My.Resources.Resources.abgeklaertAktiv
Me.Button1.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button1.Location = New System.Drawing.Point(255, 2)
Me.Button1.Margin = New System.Windows.Forms.Padding(0)
Me.Button1.Name = "Button1"
Me.Button1.Padding = New System.Windows.Forms.Padding(0, 0, 10, 0)
Me.Button1.Size = New System.Drawing.Size(304, 45)
Me.Button1.TabIndex = 71
Me.Button1.Text = "Ich bestätige hiermit die Erledigung"
Me.Button1.TextAlign = System.Drawing.ContentAlignment.MiddleRight
Me.Button1.UseVisualStyleBackColor = False
'
'Label9
'
Me.Label9.AutoSize = True
Me.Label9.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
Me.Label9.Location = New System.Drawing.Point(14, 53)
Me.Label9.Location = New System.Drawing.Point(14, 66)
Me.Label9.Name = "Label9"
Me.Label9.Size = New System.Drawing.Size(64, 13)
Me.Label9.TabIndex = 70
Me.Label9.Text = "Bemerkung:"
'
'RichTextBox1
'rtbErledigtBemerkung
'
Me.RichTextBox1.Location = New System.Drawing.Point(123, 50)
Me.RichTextBox1.Name = "RichTextBox1"
Me.RichTextBox1.Size = New System.Drawing.Size(436, 197)
Me.RichTextBox1.TabIndex = 69
Me.RichTextBox1.Text = ""
Me.rtbErledigtBemerkung.Location = New System.Drawing.Point(123, 66)
Me.rtbErledigtBemerkung.Name = "rtbErledigtBemerkung"
Me.rtbErledigtBemerkung.Size = New System.Drawing.Size(436, 181)
Me.rtbErledigtBemerkung.TabIndex = 69
Me.rtbErledigtBemerkung.Text = ""
'
'CheckBox2
'cbxErledigt
'
Me.CheckBox2.AutoSize = True
Me.CheckBox2.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
Me.CheckBox2.Location = New System.Drawing.Point(123, 19)
Me.CheckBox2.Name = "CheckBox2"
Me.CheckBox2.Size = New System.Drawing.Size(118, 24)
Me.CheckBox2.TabIndex = 68
Me.CheckBox2.Text = "ERLEDIGT"
Me.CheckBox2.UseVisualStyleBackColor = True
Me.cbxErledigt.AutoSize = True
Me.cbxErledigt.Enabled = False
Me.cbxErledigt.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!, System.Drawing.FontStyle.Bold)
Me.cbxErledigt.Location = New System.Drawing.Point(123, 19)
Me.cbxErledigt.Name = "cbxErledigt"
Me.cbxErledigt.Size = New System.Drawing.Size(118, 24)
Me.cbxErledigt.TabIndex = 68
Me.cbxErledigt.Text = "ERLEDIGT"
Me.cbxErledigt.UseVisualStyleBackColor = True
'
'Label10
'
@@ -383,7 +351,7 @@ Partial Class frmAuditFlow_Pruefungen
Me.Button2.FlatStyle = System.Windows.Forms.FlatStyle.Flat
Me.Button2.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.Button2.ImageAlign = System.Drawing.ContentAlignment.MiddleLeft
Me.Button2.Location = New System.Drawing.Point(416, 786)
Me.Button2.Location = New System.Drawing.Point(416, 775)
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)
@@ -409,7 +377,7 @@ Partial Class frmAuditFlow_Pruefungen
Me.UsrcntlPDFScanList1.Location = New System.Drawing.Point(123, 686)
Me.UsrcntlPDFScanList1.Margin = New System.Windows.Forms.Padding(0)
Me.UsrcntlPDFScanList1.Name = "UsrcntlPDFScanList1"
Me.UsrcntlPDFScanList1.Size = New System.Drawing.Size(275, 145)
Me.UsrcntlPDFScanList1.Size = New System.Drawing.Size(275, 134)
Me.UsrcntlPDFScanList1.TabIndex = 64
'
'Label11
@@ -422,12 +390,124 @@ Partial Class frmAuditFlow_Pruefungen
Me.Label11.TabIndex = 71
Me.Label11.Text = "Anhänge:"
'
'txtFirma
'
Me.txtFirma._DateTimeOnly = False
Me.txtFirma._numbersOnly = False
Me.txtFirma._numbersOnlyKommastellen = ""
Me.txtFirma._numbersOnlyTrennzeichen = True
Me.txtFirma._Prozent = False
Me.txtFirma._ShortDateNew = False
Me.txtFirma._ShortDateOnly = False
Me.txtFirma._TimeOnly = False
Me.txtFirma._TimeOnly_Seconds = False
Me.txtFirma._value = ""
Me.txtFirma._Waehrung = False
Me.txtFirma._WaehrungZeichen = True
Me.txtFirma.BackColor = System.Drawing.Color.White
Me.txtFirma.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtFirma.ForeColor = System.Drawing.Color.Black
Me.txtFirma.Location = New System.Drawing.Point(123, 65)
Me.txtFirma.MaxLineLength = -1
Me.txtFirma.MaxLines_Warning = ""
Me.txtFirma.MaxLines_Warning_Label = Nothing
Me.txtFirma.Multiline = True
Me.txtFirma.Name = "txtFirma"
Me.txtFirma.ReadOnly = True
Me.txtFirma.Size = New System.Drawing.Size(143, 28)
Me.txtFirma.TabIndex = 72
'
'txtNL
'
Me.txtNL._DateTimeOnly = False
Me.txtNL._numbersOnly = False
Me.txtNL._numbersOnlyKommastellen = ""
Me.txtNL._numbersOnlyTrennzeichen = True
Me.txtNL._Prozent = False
Me.txtNL._ShortDateNew = False
Me.txtNL._ShortDateOnly = False
Me.txtNL._TimeOnly = False
Me.txtNL._TimeOnly_Seconds = False
Me.txtNL._value = ""
Me.txtNL._Waehrung = False
Me.txtNL._WaehrungZeichen = True
Me.txtNL.BackColor = System.Drawing.Color.White
Me.txtNL.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtNL.ForeColor = System.Drawing.Color.Black
Me.txtNL.Location = New System.Drawing.Point(123, 91)
Me.txtNL.MaxLineLength = -1
Me.txtNL.MaxLines_Warning = ""
Me.txtNL.MaxLines_Warning_Label = Nothing
Me.txtNL.Multiline = True
Me.txtNL.Name = "txtNL"
Me.txtNL.ReadOnly = True
Me.txtNL.Size = New System.Drawing.Size(143, 28)
Me.txtNL.TabIndex = 73
'
'txtStandort
'
Me.txtStandort._DateTimeOnly = False
Me.txtStandort._numbersOnly = False
Me.txtStandort._numbersOnlyKommastellen = ""
Me.txtStandort._numbersOnlyTrennzeichen = True
Me.txtStandort._Prozent = False
Me.txtStandort._ShortDateNew = False
Me.txtStandort._ShortDateOnly = False
Me.txtStandort._TimeOnly = False
Me.txtStandort._TimeOnly_Seconds = False
Me.txtStandort._value = ""
Me.txtStandort._Waehrung = False
Me.txtStandort._WaehrungZeichen = True
Me.txtStandort.BackColor = System.Drawing.Color.White
Me.txtStandort.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtStandort.ForeColor = System.Drawing.Color.Black
Me.txtStandort.Location = New System.Drawing.Point(123, 122)
Me.txtStandort.MaxLineLength = -1
Me.txtStandort.MaxLines_Warning = ""
Me.txtStandort.MaxLines_Warning_Label = Nothing
Me.txtStandort.Multiline = True
Me.txtStandort.Name = "txtStandort"
Me.txtStandort.ReadOnly = True
Me.txtStandort.Size = New System.Drawing.Size(143, 28)
Me.txtStandort.TabIndex = 74
'
'txtKategorie
'
Me.txtKategorie._DateTimeOnly = False
Me.txtKategorie._numbersOnly = False
Me.txtKategorie._numbersOnlyKommastellen = ""
Me.txtKategorie._numbersOnlyTrennzeichen = True
Me.txtKategorie._Prozent = False
Me.txtKategorie._ShortDateNew = False
Me.txtKategorie._ShortDateOnly = False
Me.txtKategorie._TimeOnly = False
Me.txtKategorie._TimeOnly_Seconds = False
Me.txtKategorie._value = ""
Me.txtKategorie._Waehrung = False
Me.txtKategorie._WaehrungZeichen = True
Me.txtKategorie.BackColor = System.Drawing.Color.White
Me.txtKategorie.Font = New System.Drawing.Font("Microsoft Sans Serif", 12.0!)
Me.txtKategorie.ForeColor = System.Drawing.Color.Black
Me.txtKategorie.Location = New System.Drawing.Point(403, 121)
Me.txtKategorie.MaxLineLength = -1
Me.txtKategorie.MaxLines_Warning = ""
Me.txtKategorie.MaxLines_Warning_Label = Nothing
Me.txtKategorie.Multiline = True
Me.txtKategorie.Name = "txtKategorie"
Me.txtKategorie.ReadOnly = True
Me.txtKategorie.Size = New System.Drawing.Size(156, 28)
Me.txtKategorie.TabIndex = 75
'
'frmAuditFlow_Pruefungen
'
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(580, 845)
Me.Controls.Add(Me.txtKategorie)
Me.Controls.Add(Me.txtStandort)
Me.Controls.Add(Me.txtNL)
Me.Controls.Add(Me.txtFirma)
Me.Controls.Add(Me.Label11)
Me.Controls.Add(Me.UsrcntlPDFScanList1)
Me.Controls.Add(Me.Button2)
@@ -437,12 +517,8 @@ Partial Class frmAuditFlow_Pruefungen
Me.Controls.Add(Me.txtBezeichnung)
Me.Controls.Add(Me.Label3)
Me.Controls.Add(Me.Label2)
Me.Controls.Add(Me.cboKategorie)
Me.Controls.Add(Me.Label1)
Me.Controls.Add(Me.Label7)
Me.Controls.Add(Me.cboStandort)
Me.Controls.Add(Me.cboFirma)
Me.Controls.Add(Me.cboNL)
Me.Controls.Add(Me.Label5)
Me.Controls.Add(Me.Label6)
Me.Controls.Add(Me.pnlTop)
@@ -464,12 +540,8 @@ Partial Class frmAuditFlow_Pruefungen
End Sub
Friend WithEvents pnlTop As Windows.Forms.Panel
Friend WithEvents cboKategorie As MyComboBox
Friend WithEvents Label1 As Windows.Forms.Label
Friend WithEvents Label7 As Windows.Forms.Label
Friend WithEvents cboStandort As MyComboBox
Friend WithEvents cboFirma As MyComboBox
Friend WithEvents cboNL As MyComboBox
Friend WithEvents Label5 As Windows.Forms.Label
Friend WithEvents Label6 As Windows.Forms.Label
Friend WithEvents Label2 As Windows.Forms.Label
@@ -485,9 +557,15 @@ Partial Class frmAuditFlow_Pruefungen
Friend WithEvents Button2 As Windows.Forms.Button
Friend WithEvents Label4 As Windows.Forms.Label
Friend WithEvents Label9 As Windows.Forms.Label
Friend WithEvents RichTextBox1 As Windows.Forms.RichTextBox
Friend WithEvents CheckBox2 As Windows.Forms.CheckBox
Friend WithEvents rtbErledigtBemerkung As Windows.Forms.RichTextBox
Friend WithEvents cbxErledigt As Windows.Forms.CheckBox
Friend WithEvents Label10 As Windows.Forms.Label
Friend WithEvents UsrcntlPDFScanList1 As usrcntlPDFScanList
Friend WithEvents Label11 As Windows.Forms.Label
Friend WithEvents txtFirma As MyTextBox
Friend WithEvents txtNL As MyTextBox
Friend WithEvents txtStandort As MyTextBox
Friend WithEvents txtKategorie As MyTextBox
Friend WithEvents Button1 As Windows.Forms.Button
Friend WithEvents lblErledigt As Windows.Forms.Label
End Class

View File

@@ -1,11 +1,13 @@
Imports System.Windows.Forms
Imports com.sun.org.apache.xml.internal.security.keys.content
Imports com.sun.org.apache.xpath.internal.operations
Imports javax.xml.bind.annotation
Public Class frmAuditFlow_Pruefungen
Dim AF_PO As cAuditFlow_Pruefobjekte = Nothing
Dim AF_PRUEF As cAuditFlow_Pruefungen = Nothing
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Sub New()
@@ -52,22 +54,26 @@ Public Class frmAuditFlow_Pruefungen
Return True
End Function
Sub getValues()
AF_PO.wartPO_Firma = cboFirma._value
AF_PO.wartPO_Niederlasung = cboNL._value
AF_PO.wartPO_StandortId = cboStandort._value
AF_PO.wartPO_Kategorie = cboKategorie._value
AF_PO.wartPO_Bezeichnung = txtBezeichnung.Text
AF_PO.wartPO_Kennung = txtKennung.Text
AF_PO.wartPO_zustaendigIntern_MaId = cboMA._value
AF_PO.wartPO_zustaendigIntern_Name = cboMA.Text
' AF_PO.wartPO_startdatum = datVon._value
AF_PRUEF.wartPruef_Faelligkeitsdatum = datVon._value
AF_PRUEF.wartPruef_Erledigung_Bemerkung = rtbErledigtBemerkung.Text
AF_PRUEF.wartPruef_Erledigung = cbxErledigt.Checked
If AF_PRUEF.wartPruef_Erledigung Then
If ErledigtMAId > 0 Then AF_PRUEF.wartPruef_Erledigung_BestaetigtMaId = ErledigtMAId
If ErledigtMA <> "" Then AF_PRUEF.wartPruef_Erledigung_BestaetigtMaName = ErledigtMA
If ErledigtTstmp IsNot Nothing Then AF_PRUEF.wartPruef_Erledigung_Datum = CDate(ErledigtTstmp)
Else
AF_PRUEF.wartPruef_Erledigung_BestaetigtMaId = Nothing
AF_PRUEF.wartPruef_Erledigung_BestaetigtMaName = Nothing
AF_PRUEF.wartPruef_Erledigung_Datum = Nothing
End If
AF_PRUEF.wartPruef_Anhaenge_daId = UsrcntlPDFScanList1.get_DA_ID()
AF_PRUEF.wartPruef_Anhaenge_Count = UsrcntlPDFScanList1.MyListBox1.Items.Count
End Sub
@@ -75,20 +81,36 @@ Public Class frmAuditFlow_Pruefungen
Sub setValues()
datVon._value = AF_PRUEF.wartPruef_Faelligkeitsdatum
cbxErledigt.Checked = AF_PRUEF.wartPruef_Erledigung
rtbErledigtBemerkung.Text = AF_PRUEF.wartPruef_Erledigung_Bemerkung
lblErledigt.Text = "Erledigt von: -"
If AF_PRUEF.wartPruef_Erledigung Then
lblErledigt.Text = "Erledigt von: " & AF_PRUEF.wartPruef_Erledigung_BestaetigtMaName & " am " & If(AF_PRUEF.wartPruef_Erledigung_Datum IsNot Nothing, AF_PRUEF.wartPruef_Erledigung_Datum.Value.ToString("dd.MM.yyyy"), "-")
End If
txtFirma.Text = If(AF_PO.wartPO_Firma, "")
txtNL.Text = If(AF_PO.wartPO_Niederlasung, "")
txtStandort.Text = SQL.DLookup("[wartSt_Standort]", "tblAuditFlow_Standorte", "[wartSt_Id]='" & AF_PO.wartPO_StandortId & "'", "ADMIN", "")
txtKategorie.Text = If(AF_PO.wartPO_Kategorie, "")
cboMA.changeItem(If(AF_PO.wartPO_zustaendigIntern_MaId, ""))
txtBezeichnung.Text = AF_PO.wartPO_Bezeichnung
txtKennung.Text = AF_PO.wartPO_Kennung
End Sub
Private Sub frmAuditFlow_Pruefungsojekt_Load(sender As Object, e As EventArgs) Handles Me.Load
cboKategorie.Items.Clear()
cboKategorie.fillWithSQL("SELECT wartK_Kategorie,[wartK_KategorieBezeichnung] FROM [tblAuditFlow_Kategorien] order by wartK_KategorieBezeichnung", False, "ADMIN", True)
cboNL.Items.Clear()
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
cboNL.SelectedItem = 0
cboFirma.Items.Clear()
cboFirma.fillWithSQL("SELECT distinct(Firma) FROM [Filialen] order by Firma", False, "FMZOLL", True)
cboFirma.changeItem(cAllgemein.FIRMA)
If AF_PRUEF IsNot Nothing Then
If AF_PRUEF.wartPruef_Anhaenge_daId IsNot Nothing AndAlso AF_PRUEF.wartPruef_Anhaenge_daId > 0 Then
UsrcntlPDFScanList1.INIT_daId(AF_PRUEF.wartPruef_Anhaenge_daId)
Else
UsrcntlPDFScanList1.INIT(-1, "AUDITFLOW_Pruefungen", AF_PRUEF.wartPruef_Id, "") ' neue DA ID
End If
End If
cboMA.fillWithSQL("SELECT [mit_id],[mit_vname] + ' '+ [mit_nname] as Name " &
@@ -101,31 +123,47 @@ Public Class frmAuditFlow_Pruefungen
setValues()
End If
End Sub
Private Sub cboFirma_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboFirma.SelectedIndexChanged
cboNL.Items.Clear()
cboNL.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
If cboFirma._value <> "" Then
cboNL.fillWithSQL("SELECT nl_kuerzel,nl_bezeichnung FROM [tblNiederlassungen] where [nl_firma]='" & cboFirma._value & "' order by nl_bezeichnung", False, "ADMIN", False)
End If
End Sub
Private Sub cboNL_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cboNL.SelectedIndexChanged
cboStandort.Items.Clear()
cboStandort.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
If cboFirma._value <> "" AndAlso cboNL._value <> "" Then
cboStandort.fillWithSQL("SELECT [wartSt_Id],[wartSt_Standort] FROM [tblAuditFlow_Standorte] where [wartSt_Aktiv]=1 and [wartSt_Firma]='" & cboFirma._value & "' AND [wartSt_Niederlasung]='" & cboNL._value & "' order by wartSt_Standort", False, "ADMIN", True)
End If
End Sub
Private Sub frmAuditFlow_Pruefungsojekt_Shown(sender As Object, e As EventArgs) Handles Me.Shown
End Sub
Dim allowChangeErledigt As Boolean = False
Dim ErledigtMAId As Integer = -1
Dim ErledigtMA As String = ""
Dim ErledigtTstmp As Object = Nothing
Private Sub cbxErledigt_CheckedChanged(sender As Object, e As EventArgs) Handles cbxErledigt.CheckedChanged
'If Not allowChangeErledigt Then
' If Not cbxErledigt.Checked Then
' ' Klick rückgängig machen ' Keine bestätigung mit klick -> Ich bestätige... - Button
' cbxErledigt.Checked = False
' End If
'End If
If Not cbxErledigt.Checked Then
lblErledigt.Text = "Erledigt von: -"
cbxErledigt.Enabled = False
Else
cbxErledigt.Enabled = True
End If
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
If vbYes = MsgBox("Sind Sie sicher, dass Sie die Prüfung bestätigen möchten?", vbYesNoCancel) Then
allowChangeErledigt = True
cbxErledigt.Checked = True
ErledigtMAId = VERAG_PROG_ALLGEMEIN.cAllgemein.USRID
ErledigtMA = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
ErledigtTstmp = Now
lblErledigt.Text = "Erledigt von: " & ErledigtMA & " am " & CDate(ErledigtTstmp).ToString("dd.MM.yyyy")
allowChangeErledigt = False
End If
End Sub
End Class

View File

@@ -36,7 +36,7 @@ Public Class frmAuditFlow_Pruefungsojekt
End If
End If
Catch ex As Exception
MsgBox(ex.Message)
MsgBox(ex.Message & ex.StackTrace)
End Try
End If
End Sub
@@ -50,10 +50,11 @@ Public Class frmAuditFlow_Pruefungsojekt
If AF_PO.SAVE Then
Me.Close()
End If
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
Me.Cursor = Cursors.Default
End Sub
@@ -72,7 +73,9 @@ Public Class frmAuditFlow_Pruefungsojekt
Return True
End Function
Sub getValues()
AF_PO.wartPO_Firma = cboFirma._value
Try
AF_PO.wartPO_Firma = cboFirma._value
AF_PO.wartPO_Niederlasung = cboNL._value
AF_PO.wartPO_StandortId = cboStandort._value
AF_PO.wartPO_Kategorie = cboKategorie._value
@@ -86,9 +89,13 @@ Public Class frmAuditFlow_Pruefungsojekt
AF_PO.wartPO_zustaendigIntern_Name = cboMA.Text
AF_PO.wartPO_startdatum = datVon._value
AF_PO.wartPO_enddatum = datBis._value
If datBis._value <> "" Then
AF_PO.wartPO_enddatum = datBis._value
Else
AF_PO.wartPO_enddatum = Nothing
End If
AF_PO.wartPO_Erinnerung_VorlaufInTagen = txtErinnerungVorlaubInTagen.Text
AF_PO.wartPO_Erinnerung_VorlaufInTagen = txtErinnerungVorlaubInTagen.Text
AF_PO.wartPO_Aktiv = CheckBox1.Checked
If cboMA._value <> "" Then
@@ -98,8 +105,9 @@ Public Class frmAuditFlow_Pruefungsojekt
End If
Catch ex As Exception
MsgBox(ex.Message & ex.StackTrace)
End Try
End Sub

View File

@@ -94,6 +94,14 @@ Public Class usrcntlPDFScanList
' initPdf()
' End If
' End Sub
Public Function get_DA_ID() As Integer
If DS IsNot Nothing AndAlso DS.hasITEMS Then
If DS.da_id IsNot Nothing Then
Return DS.da_id
End If
End If
Return -1
End Function
Public Sub initPdf()
MyListBox1.Items.Clear()

View File

@@ -964,7 +964,7 @@ Public Class SQL
'NOT Working--------------------------------------------
Try
' MsgBox(sql)
' MsgBox(sql)
Using cmd As New SqlCommand(sql, conn)
If list IsNot Nothing Then
For Each i In list
@@ -977,7 +977,7 @@ Public Class SQL
conn.Close()
Return True
Catch ex As Exception
' MsgBox("ERR!")
' MsgBox("ERR!")
If showErr Then VERAG_PROG_ALLGEMEIN.cErrorHandler.ERR(ex.Message, ex.StackTrace, System.Reflection.MethodInfo.GetCurrentMethod.Name, , , , , sql)
End Try
Return False

View File

@@ -0,0 +1,55 @@
Imports System.Reflection
Imports System.Windows.Forms
Public Module cUI_Performance
Public Sub EnableDoubleBuffer(ctrl As Control)
SetOptimizedStyles(ctrl)
' DataGridView separat (DoubleBuffered ist protected)
Dim dgv = TryCast(ctrl, DataGridView)
If dgv IsNot Nothing Then SetDoubleBufferedDgv(dgv)
For Each child As Control In ctrl.Controls
EnableDoubleBuffer(child)
Next
End Sub
Private Sub SetOptimizedStyles(c As Control)
' SetStyle (protected) per Reflection setzen
Dim miSetStyle = c.GetType().GetMethod("SetStyle", BindingFlags.Instance Or BindingFlags.NonPublic)
If miSetStyle IsNot Nothing Then
Dim styles = ControlStyles.AllPaintingInWmPaint Or ControlStyles.UserPaint Or ControlStyles.OptimizedDoubleBuffer
miSetStyle.Invoke(c, New Object() {styles, True})
End If
' UpdateStyles (protected) per Reflection aufrufen (optional)
Dim miUpdate = c.GetType().GetMethod("UpdateStyles", BindingFlags.Instance Or BindingFlags.NonPublic)
If miUpdate IsNot Nothing Then
miUpdate.Invoke(c, Nothing)
Else
' Fallback: neu zeichnen
c.Invalidate(True)
End If
End Sub
Private Sub SetDoubleBufferedDgv(dgv As DataGridView)
Dim pi = GetType(DataGridView).GetProperty("DoubleBuffered", BindingFlags.Instance Or BindingFlags.NonPublic)
If pi IsNot Nothing Then pi.SetValue(dgv, True, Nothing)
End Sub
' WM_SETREDRAW: Zeichnung temporär an/aus
<Runtime.InteropServices.DllImport("user32.dll")>
Private Function SendMessage(hWnd As IntPtr, msg As Integer, wParam As IntPtr, lParam As IntPtr) As IntPtr
End Function
Private Const WM_SETREDRAW As Integer = &HB
Public Sub SuspendPainting(c As Control)
If c.IsHandleCreated Then SendMessage(c.Handle, WM_SETREDRAW, IntPtr.Zero, IntPtr.Zero)
End Sub
Public Sub ResumePainting(c As Control, Optional invalidate As Boolean = True)
If c.IsHandleCreated Then
SendMessage(c.Handle, WM_SETREDRAW, CType(1, IntPtr), IntPtr.Zero)
If invalidate Then c.Invalidate(True)
End If
End Sub
End Module

View File

@@ -60,6 +60,16 @@ Namespace My.Resources
End Set
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>
Friend ReadOnly Property abgeklaertAktiv() As System.Drawing.Bitmap
Get
Dim obj As Object = ResourceManager.GetObject("abgeklaertAktiv", resourceCulture)
Return CType(obj,System.Drawing.Bitmap)
End Get
End Property
'''<summary>
''' Sucht eine lokalisierte Ressource vom Typ System.Drawing.Bitmap.
'''</summary>

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

View File

@@ -1,204 +1,217 @@

' Requires NuGet:
' Requires NuGet:
' - Confluent.Kafka
' - Newtonsoft.Json
' Target framework: .NET Framework 4.8 oder .NET 6/8 (passt beides)
Imports System.Data.SqlClient
Imports System.Threading
Imports System.Threading.Tasks
Imports Confluent.Kafka
Imports Newtonsoft.Json
Imports System.Threading.Tasks
Imports Confluent.Kafka
Imports Newtonsoft.Json
Namespace Verag.Udm
''' <summary>
''' UDM-Record inkl. Beispielbefüllung und Kafka-Producer.
''' Datenschema gemäß bereitgestellter JSON-Struktur. :contentReference[oaicite:1]{index=1}
''' </summary>
Public Class cATEZ_Greenpulse_KafkaDecs
'========================
'== Kafka: Konfiguration (Klassenebene)
'========================
Public Shared BootstrapServers As String = "192.168.85.250:8888" 'http://192.168.85.250:8888
Public Shared TopicName As String = "greenpulse.declarationdata.v1"
' Falls SASL/TLS benötigt:
Public Shared UseSasl As Boolean = False
Public Shared SaslUsername As String = ""
Public Shared SaslPassword As String = ""
Public Shared SecurityProtocolSetting As SecurityProtocol = SecurityProtocol.Plaintext
Public Shared SaslMechanismSetting As SaslMechanism = SaslMechanism.Plain
''' <summary>
''' UDM-Record inkl. Beispielbefüllung und Kafka-Producer.
''' Datenschema gemäß bereitgestellter JSON-Struktur. :contentReference[oaicite:1]{index=1}
''' </summary>
Public Class cATEZ_Greenpulse_KafkaDecs
'========================
'== Datenobjekte lt. UDM-Schema
'========================
'========================
'== Kafka: Konfiguration (Klassenebene)
'========================
Public Shared BootstrapServers As String = "192.168.85.250:9092" 'http://192.168.85.250:8888
Public Shared TopicName As String = "greenpulse.declarationdata.v1"
' Falls SASL/TLS benötigt:
Public Shared UseSasl As Boolean = False
Public Shared SaslUsername As String = ""
Public Shared SaslPassword As String = ""
Public Shared SecurityProtocolSetting As SecurityProtocol = SecurityProtocol.Plaintext
Public Shared SaslMechanismSetting As SaslMechanism = SaslMechanism.Plain
<JsonProperty("declaration")>
Public Property Declaration As DeclarationNode
<JsonProperty("parties")>
Public Property Parties As PartiesNode
Private Const KEY_VERSION As String = "v1"
Private Const SEP_PIPE As Char = "|"c
<JsonProperty("commercial")>
Public Property Commercial As CommercialNode
<JsonProperty("exporterDetails")>
Public Property ExporterDetails As ExporterDetailsNode
'========================
'== Unique-Key-Ermittlung
'========================
Public Shared Function GetUniqueKey_Pipe(country As String, system As String, mrn As String) As String
Dim c = (country).ToUpperInvariant()
Dim s = (system).ToUpperInvariant()
Dim m = (mrn).ToUpperInvariant()
Return String.Join(SEP_PIPE, New String() {KEY_VERSION, c, s, m})
End Function
<JsonProperty("importerDetails")>
Public Property ImporterDetails As ImporterDetailsNode
'========================
'== Datenobjekte lt. UDM-Schema
'========================
'--- declaration ---
Public Class DeclarationNode
<JsonProperty("declarationsourceId")>
Public Property DeclarationSourceId As String
<JsonProperty("declaration")>
Public Property Declaration As DeclarationNode
<JsonProperty("declarationNo")>
Public Property DeclarationNo As String
<JsonProperty("parties")>
Public Property Parties As PartiesNode
<JsonProperty("declarationDate")>
Public Property DeclarationDate As String
<JsonProperty("commercial")>
Public Property Commercial As CommercialNode
<JsonProperty("requestedProcedure")>
Public Property RequestedProcedure As String
<JsonProperty("exporterDetails")>
Public Property ExporterDetails As ExporterDetailsNode
<JsonProperty("previousProcedure")>
Public Property PreviousProcedure As String
<JsonProperty("importerDetails")>
Public Property ImporterDetails As ImporterDetailsNode
<JsonProperty("goods")>
Public Property Goods As List(Of GoodItem)
End Class
'--- declaration ---
Public Class DeclarationNode
<JsonProperty("declarationsourceId")>
Public Property DeclarationSourceId As String
Public Class GoodItem
<JsonProperty("commodityCode")>
Public Property CommodityCode As String
<JsonProperty("declarationNo")>
Public Property DeclarationNo As String
<JsonProperty("originCountryCode")>
Public Property OriginCountryCode As String
<JsonProperty("declarationDate")>
Public Property DeclarationDate As String
<JsonProperty("netMass")>
Public Property NetMass As String
<JsonProperty("requestedProcedure")>
Public Property RequestedProcedure As String
<JsonProperty("typeOfMeasurementUnit")>
Public Property TypeOfMeasurementUnit As String
<JsonProperty("previousProcedure")>
Public Property PreviousProcedure As String
<JsonProperty("specialProcedures")>
Public Property SpecialProcedures As SpecialProceduresNode
End Class
<JsonProperty("goods")>
Public Property Goods As List(Of GoodItem)
End Class
Public Class SpecialProceduresNode
<JsonProperty("memberStateAutharization")>
Public Property MemberStateAutharization As String
Public Class GoodItem
<JsonProperty("commodityCode")>
Public Property CommodityCode As String
<JsonProperty("dischargeBillWaiver")>
Public Property DischargeBillWaiver As String
<JsonProperty("originCountryCode")>
Public Property OriginCountryCode As String
<JsonProperty("authorisation")>
Public Property Authorisation As String
<JsonProperty("netMass")>
Public Property NetMass As String
<JsonProperty("startTime")>
Public Property StartTime As String
<JsonProperty("typeOfMeasurementUnit")>
Public Property TypeOfMeasurementUnit As String
<JsonProperty("endTime")>
Public Property EndTime As String
<JsonProperty("specialProcedures")>
Public Property SpecialProcedures As SpecialProceduresNode
End Class
<JsonProperty("deadline")>
Public Property Deadline As String
End Class
Public Class SpecialProceduresNode
<JsonProperty("memberStateAutharization")>
Public Property MemberStateAutharization As String
'--- parties ---
Public Class PartiesNode
<JsonProperty("importerIdentificationNumber")>
Public Property ImporterIdentificationNumber As String
<JsonProperty("dischargeBillWaiver")>
Public Property DischargeBillWaiver As String
<JsonProperty("exporterIdentificationNumber")>
Public Property ExporterIdentificationNumber As String
<JsonProperty("authorisation")>
Public Property Authorisation As String
<JsonProperty("reportingDeclarantEORINumber")>
Public Property ReportingDeclarantEORINumber As String
<JsonProperty("startTime")>
Public Property StartTime As String
<JsonProperty("typeOfRepresentation")>
Public Property TypeOfRepresentation As String
End Class
<JsonProperty("endTime")>
Public Property EndTime As String
'--- commercial ---
Public Class CommercialNode
<JsonProperty("invoiceNumbers")>
Public Property InvoiceNumbers As String
<JsonProperty("deadline")>
Public Property Deadline As String
End Class
<JsonProperty("invoiceDate")>
Public Property InvoiceDate As String
End Class
'--- parties ---
Public Class PartiesNode
<JsonProperty("importerIdentificationNumber")>
Public Property ImporterIdentificationNumber As String
'--- exporterDetails ---
Public Class ExporterDetailsNode
<JsonProperty("exporterTitle")>
Public Property ExporterTitle As String
<JsonProperty("exporterIdentificationNumber")>
Public Property ExporterIdentificationNumber As String
<JsonProperty("exporterEmail")>
Public Property ExporterEmail As String
<JsonProperty("reportingDeclarantEORINumber")>
Public Property ReportingDeclarantEORINumber As String
<JsonProperty("exporterPhone")>
Public Property ExporterPhone As String
End Class
<JsonProperty("typeOfRepresentation")>
Public Property TypeOfRepresentation As String
End Class
'--- importerDetails ---
Public Class ImporterDetailsNode
<JsonProperty("importerTitle")>
Public Property ImporterTitle As String
'--- commercial ---
Public Class CommercialNode
<JsonProperty("invoiceNumbers")>
Public Property InvoiceNumbers As String
<JsonProperty("importerEmail")>
Public Property ImporterEmail As String
<JsonProperty("invoiceDate")>
Public Property InvoiceDate As String
End Class
<JsonProperty("importerPhone")>
Public Property ImporterPhone As String
'--- exporterDetails ---
Public Class ExporterDetailsNode
<JsonProperty("exporterTitle")>
Public Property ExporterTitle As String
<JsonProperty("importerCountryCodeOrMemberState")>
Public Property ImporterCountryCodeOrMemberState As String
<JsonProperty("exporterEmail")>
Public Property ExporterEmail As String
<JsonProperty("importerSubdivision")>
Public Property ImporterSubdivision As String
<JsonProperty("exporterPhone")>
Public Property ExporterPhone As String
End Class
<JsonProperty("importerCity")>
Public Property ImporterCity As String
'--- importerDetails ---
Public Class ImporterDetailsNode
<JsonProperty("importerTitle")>
Public Property ImporterTitle As String
<JsonProperty("importerStreet")>
Public Property ImporterStreet As String
<JsonProperty("importerEmail")>
Public Property ImporterEmail As String
<JsonProperty("importerStreetAdditional")>
Public Property ImporterStreetAdditional As String
<JsonProperty("importerPhone")>
Public Property ImporterPhone As String
<JsonProperty("importerAddressNumber")>
Public Property ImporterAddressNumber As String
<JsonProperty("importerCountryCodeOrMemberState")>
Public Property ImporterCountryCodeOrMemberState As String
<JsonProperty("importerPostCode")>
Public Property ImporterPostCode As String
<JsonProperty("importerSubdivision")>
Public Property ImporterSubdivision As String
<JsonProperty("importerPoBox")>
Public Property ImporterPoBox As String
<JsonProperty("importerCity")>
Public Property ImporterCity As String
<JsonProperty("importerCoordinateLongitudeX")>
Public Property ImporterCoordinateLongitudeX As String
<JsonProperty("importerStreet")>
Public Property ImporterStreet As String
<JsonProperty("importerCoordinateLatitudeY")>
Public Property ImporterCoordinateLatitudeY As String
End Class
<JsonProperty("importerStreetAdditional")>
Public Property ImporterStreetAdditional As String
'========================
'== Serialisierung
'========================
Public Function ToJson(Optional pretty As Boolean = True) As String
Dim format = If(pretty, Formatting.Indented, Formatting.None)
Return JsonConvert.SerializeObject(Me, format)
End Function
<JsonProperty("importerAddressNumber")>
Public Property ImporterAddressNumber As String
'========================
'== Beispielbefüllung
'========================
Public Shared Function BuildDemo() As cATEZ_Greenpulse_KafkaDecs
Return New cATEZ_Greenpulse_KafkaDecs() With {
<JsonProperty("importerPostCode")>
Public Property ImporterPostCode As String
<JsonProperty("importerPoBox")>
Public Property ImporterPoBox As String
<JsonProperty("importerCoordinateLongitudeX")>
Public Property ImporterCoordinateLongitudeX As String
<JsonProperty("importerCoordinateLatitudeY")>
Public Property ImporterCoordinateLatitudeY As String
End Class
'========================
'== Serialisierung
'========================
Public Function ToJson(Optional pretty As Boolean = True) As String
Dim format = If(pretty, Formatting.Indented, Formatting.None)
Return JsonConvert.SerializeObject(Me, format)
End Function
'========================
'== Beispielbefüllung
'========================
Public Shared Function BuildDemo() As cATEZ_Greenpulse_KafkaDecs
Return New cATEZ_Greenpulse_KafkaDecs() With {
.Declaration = New DeclarationNode() With {
.DeclarationSourceId = "xx123",
.DeclarationNo = "24AT000000INL0JD01",
@@ -253,59 +266,242 @@ Namespace Verag.Udm
.ImporterCoordinateLatitudeY = "28.9662187"
}
}
End Function
End Function
'========================
'== Unique-Key-Ermittlung (leer gelassen später definieren)
'========================
Public Shared Function GetUniqueKey(ByVal record As cATEZ_Greenpulse_KafkaDecs) As String
' TODO: Hier Logik zur Schlüsselbildung implementieren (z.B. declarationsourceId + declarationNo)
Return ""
End Function
'========================
'== Kafka: Insert/Update (per Message-Key)
'========================
Public Shared Async Function InsertOrUpdateToKafkaAsync(ByVal record As cATEZ_Greenpulse_KafkaDecs,
Optional ct As CancellationToken = Nothing) As Task(Of DeliveryResult(Of String, String))
'========================
'== Kafka: Insert/Update (per Message-Key)
'========================
Public Shared Function InsertOrUpdateToKafkaSync(rec As cATEZ_Greenpulse_KafkaDecs, unique_KEY As String, Optional waitMs As Integer = 30000) As DeliveryResult(Of String, String)
Dim cfg As New ProducerConfig() With {
.BootstrapServers = BootstrapServers,
.Acks = Acks.All,
.EnableIdempotence = True,
.MessageTimeoutMs = 30000
}
Dim cfg As New ProducerConfig With {
.BootstrapServers = BootstrapServers,
.EnableIdempotence = True,
.Acks = Acks.All,
.MaxInFlight = 5,
.MessageTimeoutMs = Math.Max(waitMs, 60000),
.RequestTimeoutMs = 30000,
.EnableDeliveryReports = True,
.AllowAutoCreateTopics = True
}
If UseSasl Then
cfg.SecurityProtocol = SecurityProtocolSetting
cfg.SaslMechanism = SaslMechanismSetting
cfg.SaslUsername = SaslUsername
cfg.SaslPassword = SaslPassword
' Optional: cfg.SslCaLocation = "path\to\ca.pem"
Using producer = New ProducerBuilder(Of String, String)(cfg).Build()
Dim key = unique_KEY ' GetUniqueKey(rec)
Dim msg = New Message(Of String, String) With {.Key = key, .Value = rec.ToJson(False)}
Dim done As New Threading.ManualResetEventSlim(False)
Dim lastReport As DeliveryResult(Of String, String) = Nothing
Dim prodEx As ProduceException(Of String, String) = Nothing
producer.Produce(TopicName, msg,
Sub(r)
lastReport = r
done.Set()
End Sub)
' Warten wir gezielt auf den Delivery-Callback:
If Not done.Wait(waitMs) Then
' Producer ggf. noch auslaufen lassen
producer.Flush(TimeSpan.FromSeconds(5))
Throw New TimeoutException($"DeliveryCallback nach {waitMs} ms nicht eingetroffen.")
End If
Dim key As String = GetUniqueKey(record) ' bleibt leer bis du definierst
Dim payload As String = record.ToJson(False)
' Fehler im Report?
' (Bei neueren Clients ist r.Error nur in der Exception; bei älteren ggf. r.Status prüfen.)
If lastReport Is Nothing Then
Throw New TimeoutException("DeliveryResult leer.")
End If
If lastReport.Status <> PersistenceStatus.Persisted Then
Throw New Exception($"Sende-Status: {lastReport.Status} @ {lastReport.TopicPartitionOffset}")
End If
Using producer As IProducer(Of String, String) = New ProducerBuilder(Of String, String)(cfg).Build()
Dim msg As New Message(Of String, String) With {
.key = key,
.Value = payload
}
Dim result = Await producer.ProduceAsync(TopicName, msg, ct)
' Flush ist bei Await ProduceAsync nicht zwingend nötig, hier dennoch zur Sicherheit:
producer.Flush(TimeSpan.FromSeconds(5))
Return result
Return lastReport
End Using
End Function
'========================
'== Sync-Wrapper (falls bevorzugt)
'========================
'Public Shared Function InsertOrUpdateToKafka(rec As cATEZ_Greenpulse_KafkaDecs) _
'As DeliveryResult(Of String, String)
' Return InsertOrUpdateToKafkaAsync(rec).GetAwaiter().GetResult()
'End Function
End Class
Public Class cATEZ_Greenpulse_KafkaDecsBuilder_DAKOSY
Public Shared Function BuildByMrn(mrn As String) As cATEZ_Greenpulse_KafkaDecs
Using con As SqlConnection = SQL.GetNewOpenConnectionAVISO()
'con.Open()
' Alle Zeilen zur MRN laden (Kopf + Positionen). Kopfinfo ist je Zeile dupliziert.
Dim sql As String = "
SELECT
*
FROM [tbl_DY_Zollmeldungen_Import]
WHERE [Registriernummer_MRN] = @mrn
ORDER BY cast([PositionNo] as int) , cast([Positionen] as int) , [Id];
"
Dim dt As New DataTable()
Using cmd As New SqlCommand(sql, con)
cmd.Parameters.AddWithValue("@mrn", mrn)
Using da As New SqlDataAdapter(cmd)
da.Fill(dt)
End Using
End Using
End Function
'========================
'== Sync-Wrapper (falls bevorzugt)
'========================
Public Shared Function InsertOrUpdateToKafka(ByVal record As cATEZ_Greenpulse_KafkaDecs) As DeliveryResult(Of String, String)
Return InsertOrUpdateToKafkaAsync(record).GetAwaiter().GetResult()
End Function
If dt.Rows.Count = 0 Then
Throw New InvalidOperationException("Keine Daten zur angegebenen MRN gefunden: " & mrn)
End If
End Class
' 1) Kopf aus der ersten Zeile ableiten
Dim head = dt.Rows(0)
End Namespace
Dim obj As New cATEZ_Greenpulse_KafkaDecs() With {
.Declaration = New cATEZ_Greenpulse_KafkaDecs.DeclarationNode() With {
.DeclarationSourceId = SafeStr(head("Bezugsnummer_LRN")),
.DeclarationNo = SafeStr(head("Registriernummer_MRN")),
.DeclarationDate = FirstNonEmptyDateStr(head, {"Annahmedatum", "Überlassungsdatum"}),
.RequestedProcedure = SafeStr(head("Verfahren")),
.PreviousProcedure = SafeStr(head("Verfahren2")),
.Goods = New List(Of cATEZ_Greenpulse_KafkaDecs.GoodItem)()
},
.Parties = New cATEZ_Greenpulse_KafkaDecs.PartiesNode() With {
.ImporterIdentificationNumber = FirstNonEmptyStr(head, {"Empfänger_CN_EORI", "UST_ID_Einführer"}),
.ExporterIdentificationNumber = SafeStr(head("Versender_CZ_EORI")),
.ReportingDeclarantEORINumber = SafeStr(head("Anmelder_DT_EORI")),
.TypeOfRepresentation = SafeStr(head("Art_der_Vertretung"))
},
.Commercial = New cATEZ_Greenpulse_KafkaDecs.CommercialNode(),
.ExporterDetails = New cATEZ_Greenpulse_KafkaDecs.ExporterDetailsNode() With {
.ExporterTitle = SafeStr(head("CZ_Name")),
.ExporterEmail = "",
.ExporterPhone = ""
},
.ImporterDetails = New cATEZ_Greenpulse_KafkaDecs.ImporterDetailsNode() With {
.ImporterTitle = SafeStr(head("CN_Name")),
.ImporterEmail = "",
.ImporterPhone = "",
.ImporterCountryCodeOrMemberState = SafeStr(head("CN_Ländercode")),
.ImporterSubdivision = "",
.ImporterCity = "",
.ImporterStreet = "",
.ImporterStreetAdditional = "",
.ImporterAddressNumber = "",
.ImporterPostCode = "",
.ImporterPoBox = "",
.ImporterCoordinateLongitudeX = "",
.ImporterCoordinateLatitudeY = ""
}
}
' 2) Commercial (Rechnung) aus Unterlagen N380, falls vorhanden
Dim invRow As DataRow = dt.AsEnumerable() _
.Where(Function(r) SafeStr(r("Unterlagenart")).Equals("N380", StringComparison.OrdinalIgnoreCase) _
AndAlso Not String.IsNullOrWhiteSpace(SafeStr(r("Unterlagennummer")))) _
.OrderBy(Function(r) SafeInt(r("Id"))) _
.Cast(Of DataRow)() _
.DefaultIfEmpty(Nothing) _
.FirstOrDefault()
If invRow IsNot Nothing Then
obj.Commercial.InvoiceNumbers = SafeStr(invRow("Unterlagennummer"))
obj.Commercial.InvoiceDate = SafeDateStr(invRow("Unterlagendatum"))
Else
obj.Commercial.InvoiceNumbers = ""
obj.Commercial.InvoiceDate = ""
End If
' 3) Goods je Positionszeile
For Each row As DataRow In dt.Rows
Dim commodity As String = SafeStr(row("Warentarifnummer"))
Dim hasPositionData As Boolean =
Not String.IsNullOrWhiteSpace(commodity) OrElse
Not IsNullOrEmpty(row("PositionNo")) OrElse
Not IsNullOrEmpty(row("Positionen"))
If hasPositionData Then
Dim origin As String = FirstNonEmptyStr(row, {"Ursprung", "Präferenzursprungsland"})
Dim netMass As String = FirstNonEmptyStr(row, {"Eigenmasse"})
Dim unit As String = FirstNonEmptyStr(row, {"Eigenmasseeinheit", "Maßeinheit"})
Dim gi As New cATEZ_Greenpulse_KafkaDecs.GoodItem() With {
.CommodityCode = commodity,
.OriginCountryCode = origin,
.NetMass = netMass,
.TypeOfMeasurementUnit = unit,
.SpecialProcedures = New cATEZ_Greenpulse_KafkaDecs.SpecialProceduresNode() With {
.MemberStateAutharization = SafeStr(row("DT_Ländercode")), ' Annahme: Anmelder-Land
.DischargeBillWaiver = "", ' kein Feld vorhanden
.Authorisation = SafeStr(row("Bewilligungsnummer")),
.StartTime = "",
.EndTime = "",
.Deadline = ""
}
}
obj.Declaration.Goods.Add(gi)
End If
Next
Return obj
End Using
End Function
Public Shared Function BuildJsonByMrn(mrn As String, Optional pretty As Boolean = True) As String
Dim o = BuildByMrn(mrn)
Return o.ToJson(pretty)
End Function
'---------------------------
' Helper
'---------------------------
Private Shared Function SafeStr(value As Object) As String
If value Is Nothing OrElse Convert.IsDBNull(value) Then Return ""
Return Convert.ToString(value).Trim()
End Function
Private Shared Function SafeDateStr(value As Object) As String
If value Is Nothing OrElse Convert.IsDBNull(value) Then Return ""
Dim dt As DateTime
If DateTime.TryParse(Convert.ToString(value), dt) Then
Return dt.ToString("yyyy-MM-dd")
End If
Return ""
End Function
Private Shared Function FirstNonEmptyStr(row As DataRow, fields As IEnumerable(Of String)) As String
For Each f In fields
If row.Table.Columns.Contains(f) Then
Dim s = SafeStr(row(f))
If Not String.IsNullOrWhiteSpace(s) Then Return s
End If
Next
Return ""
End Function
Private Shared Function FirstNonEmptyDateStr(row As DataRow, fields As IEnumerable(Of String)) As String
For Each f In fields
If row.Table.Columns.Contains(f) Then
Dim s = SafeDateStr(row(f))
If Not String.IsNullOrWhiteSpace(s) Then Return s
End If
Next
Return ""
End Function
Private Shared Function SafeInt(value As Object) As Integer
If value Is Nothing OrElse Convert.IsDBNull(value) Then Return Integer.MaxValue
Dim i As Integer
If Integer.TryParse(Convert.ToString(value), i) Then Return i
Return Integer.MaxValue
End Function
Private Shared Function IsNullOrEmpty(value As Object) As Boolean
If value Is Nothing OrElse Convert.IsDBNull(value) Then Return True
Return String.IsNullOrWhiteSpace(Convert.ToString(value))
End Function
End Class

View File

@@ -147,6 +147,7 @@
<Reference Include="System.DirectoryServices" />
<Reference Include="System.Drawing" />
<Reference Include="System.EnterpriseServices" />
<Reference Include="System.Management" />
<Reference Include="System.Runtime.Serialization" />
<Reference Include="System.ServiceModel" />
<Reference Include="System.Web" />
@@ -385,12 +386,14 @@
<Compile Include="AuditFlow\Classes\cAuditFlow.vb" />
<Compile Include="AuditFlow\Classes\cAuditFlow_Pruefobjekte.vb" />
<Compile Include="AuditFlow\Classes\cAuditFlow_Pruefungen.vb" />
<Compile Include="Classes\cUI_Performance.vb" />
<Compile Include="frmDatumsabfrage.Designer.vb">
<DependentUpon>frmDatumsabfrage.vb</DependentUpon>
</Compile>
<Compile Include="frmDatumsabfrage.vb">
<SubType>Form</SubType>
</Compile>
<Compile Include="Schnittstellen\ATEZ\GREENPULSE\cATEZ_Greenpulse_KafkaDecs.vb" />
<Compile Include="Schnittstellen\ATEZ\RELAYHUB\cRelayHub.vb" />
<Compile Include="Schnittstellen\ATEZ\RELAYHUB\cRelayHubToken.vb" />
<Compile Include="Schnittstellen\BZST\cBZST_UID_XML.vb" />
@@ -1423,6 +1426,9 @@
<None Include="Resources\people.png" />
</ItemGroup>
<ItemGroup>
<PackageReference Include="Confluent.Kafka">
<Version>2.11.1</Version>
</PackageReference>
<PackageReference Include="esendex-dotnet-sdk">
<Version>3.8.0</Version>
</PackageReference>
@@ -1593,6 +1599,7 @@
<ItemGroup>
<Content Include="My Project\licensePDFPro.elic.xml" />
<Content Include="My Project\licensePDFViewer.elic.xml" />
<None Include="Resources\abgeklaertAktiv.jpg" />
<None Include="Resources\save.png" />
</ItemGroup>
<ItemGroup>

View File

@@ -2,10 +2,12 @@
Imports System.IO
Imports System.Net.Mail
Imports System.Reflection
Imports System.Runtime.InteropServices
Imports System.Text
Imports System.Windows.Forms
Imports ClosedXML.Excel
Imports Microsoft.Office.Interop
Imports System.IO.Pipes
Imports ThoughtWorks.QRCode.Codec
Public Class cProgramFunctions
@@ -853,6 +855,113 @@ BindingFlags.Instance Or BindingFlags.NonPublic, Nothing, [Control], New Object(
Return barcode
End Function
Shared Sub SendMessageToAviso(Mssage)
' AVISO.exe anhand des Namens finden
Dim processName As String = "AVISO" ' Name des zu prüfenden Prozesses
Dim currentUser As String = Environment.UserName ' Aktuell angemeldeter Benutzer
' Alle Prozesse abrufen
Dim processes = Process.GetProcessesByName(processName)
' Prozesse des aktuellen Benutzers filtern
Dim userProcesses = processes.Where(Function(p) VERAG_PROG_ALLGEMEIN.cProgramFunctions.IsProcessOwnedByUser(p, currentUser))
If processes.Length > 0 Then
For Each Prz In processes
' Ermitteln der Prozess-ID des ersten Prozesses
Dim targetProcess As Process = Prz
Dim processId As Integer = targetProcess.Id
' Nachricht an den Listener von AVISO senden
If VERAG_PROG_ALLGEMEIN.cProgramFunctions.SendMessageToprocessId(processId, Mssage) Then
Exit For
End If
Next
Else
Console.WriteLine("AVISO ist nicht aktiv.")
End If
End Sub
Shared Function SendMessageToprocessId(processId As Integer, message As String) As Boolean
' Named Pipe verwenden
Dim pipeName As String = $"AVISO_{processId}"
Try
Using client = New NamedPipeClientStream(".", pipeName, PipeDirection.Out)
client.Connect(3000) ' Timeout von 3 Sekunden
Using writer = New StreamWriter(client, Encoding.UTF8)
writer.AutoFlush = True
writer.WriteLine(message)
'MsgBox(message)
bringToFront(processId)
' Application.Exit() #-> Nicht beenden!
Return True
End Using
End Using
Catch ex As Exception
Console.WriteLine("Fehler beim Senden der Nachricht: " & ex.Message)
MsgBox("Fehler beim Senden der Nachricht: " & ex.Message & ex.StackTrace)
End Try
Return False
End Function
' Hilfsmethode: Überprüft, ob ein Prozess einem Benutzer gehört
Shared Function IsProcessOwnedByUser(proc As Process, userName As String) As Boolean
Try
Dim query As String = $"SELECT * FROM Win32_Process WHERE ProcessId = {proc.Id}"
Using searcher As New System.Management.ManagementObjectSearcher(query)
For Each obj As System.Management.ManagementObject In searcher.Get()
Dim outParams() As Object = {Nothing, Nothing}
obj.InvokeMethod("GetOwner", outParams)
If outParams(0) IsNot Nothing AndAlso outParams(0).ToString().Equals(userName, StringComparison.OrdinalIgnoreCase) Then
Return True
End If
Next
End Using
Catch ex As Exception
' Fehler behandeln, z. B. wenn der Prozess nicht zugreifbar ist
End Try
Return False
End Function
<DllImport("user32.dll")>
Private Shared Function ShowWindow(hWnd As IntPtr, nCmdShow As Integer) As Boolean
End Function
Private Shared Function IsIconic(hWnd As IntPtr) As Boolean
End Function
Private Shared Function SetForegroundWindow(hWnd As IntPtr) As Boolean
End Function
Private Const SW_SHOWNOACTIVATE As Integer = 4
Private Const SW_RESTORE As Integer = 9
Shared Sub bringToFront(processId)
' Prozess finden und in den Vordergrund bringen
Try
Dim process = System.Diagnostics.Process.GetProcessById(processId)
If process IsNot Nothing Then
Dim hWnd As IntPtr = process.MainWindowHandle
If hWnd <> IntPtr.Zero Then
' Wenn minimiert, wiederherstellen
If IsIconic(hWnd) Then
ShowWindow(hWnd, SW_RESTORE)
End If
' Fenster in den Vordergrund bringenh
If Not SetForegroundWindow(hWnd) Then
Throw New Exception("Fenster konnte nicht in den Vordergrund gebracht werden.")
End If
Else
Console.WriteLine("Hauptfensterhandle ist nicht verfügbar.")
End If
Else
Console.WriteLine($"Prozess mit ID {processId} nicht gefunden.")
End If
Catch ex As Exception
Console.WriteLine("Fehler beim Senden der Nachricht oder beim Bringen in den Vordergrund: " & ex.Message)
End Try
End Sub
End Class