From 2d80c9371080533943198993c62c716fd2e5eb0f Mon Sep 17 00:00:00 2001 From: "d.breimaier" Date: Mon, 30 Mar 2026 11:02:06 +0200 Subject: [PATCH] Aktweiterleitung WO, etc. --- .../Benachrichtigung/frmAvisoWeiterleiten.vb | 11 ++++++-- Aviso/usrcntlAktDetails.vb | 25 ++++++++++++++++++- 2 files changed, 33 insertions(+), 3 deletions(-) diff --git a/Aviso/Benachrichtigung/frmAvisoWeiterleiten.vb b/Aviso/Benachrichtigung/frmAvisoWeiterleiten.vb index 4138c2f..afc388d 100644 --- a/Aviso/Benachrichtigung/frmAvisoWeiterleiten.vb +++ b/Aviso/Benachrichtigung/frmAvisoWeiterleiten.vb @@ -330,8 +330,15 @@ Public Class frmAvisoWeiterleiten Next End If ElseIf sender Is Button2 Then - addBtn(flpFirma, "W", "FO_WIHD", "KÖRFEZ 61", True, "VERAG") - addBtn(flpFirma, "W", "WO_MERIS", "MERIS", True, "VERAG") + + + Dim dt As DataTable = SQL.loadDgvBySql("SELECT grz_Grenzstelle, grz_Bezeichnung, grz_Firma FROM tblGrenzstelle WHERE grz_FreigabeWeb = 1 and grz_Firma is not null order by grz_Grenzstelle", "AVISO") + If dt IsNot Nothing Then + For Each t In dt.Rows + addBtn(flpFirma, "W", t("grz_Grenzstelle"), t("grz_Bezeichnung"), True, t("grz_Firma")) + Next + End If + End If diff --git a/Aviso/usrcntlAktDetails.vb b/Aviso/usrcntlAktDetails.vb index 71b9fde..84cab1a 100644 --- a/Aviso/usrcntlAktDetails.vb +++ b/Aviso/usrcntlAktDetails.vb @@ -962,6 +962,7 @@ Public Class usrcntlAktDetails If Not IsDBNull(row.Cells("anh_markiert").Value) Then If row.Cells("anh_markiert").Value Then row.DefaultCellStyle.BackColor = Color.Yellow End If + Next End With @@ -1339,8 +1340,13 @@ Public Class usrcntlAktDetails If Not existCodeInGridVermerke_VK(gridvermerke, r.Cells("VorauskasseId").Value) Then optionCell.Value = paarBez optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk '" & paarBez & "' einzutragen." + + If Not existCodeInGridVermerke_UeberweisungsbelegErhalten(gridvermerke, r.Cells("VorauskasseId").Value) Then + r.DefaultCellStyle.BackColor = Color.Yellow 'gelb markiert, nur wenn Überweisungsbeleg noch nicht erhalten! + End If + End If - Else + Else If Not existCodeInGridVermerke_VK_OLD(gridvermerke, r.Cells("SendungID").Value) Then optionCell.Value = paarBez optionCell.ToolTipText = "Klicken Sie hier, um den Vermerk '" & paarBez & "' einzutragen." @@ -1444,6 +1450,23 @@ Public Class usrcntlAktDetails Return False End Function + Shared Function existCodeInGridVermerke_UeberweisungsbelegErhalten(gridVermerke As DataGridView, VorauskasseId As Object) As Boolean + + For Each r As DataGridViewRow In gridVermerke.Rows + If r.Cells("Geloescht").Value = False Then + Select Case If(DirectCast(r.Cells("VermerkeCode"), DataGridViewTextBoxCell).Value.ToString, "") + Case 79 + If DirectCast(r.Cells("VorauskasseId"), DataGridViewTextBoxCell).Value.ToString = CStr(VorauskasseId) Then + Return True + End If + End Select + End If + Next + Return False + End Function + + + Shared Function existCodeInGridVermerke_VK_OLD(gridVermerke As DataGridView, SendungID As Object) As Boolean