ATBGestellung

This commit is contained in:
2024-11-04 14:10:44 +01:00
parent 094a408267
commit a1eff7cc76

View File

@@ -54,8 +54,6 @@ Public Class usrCntlSND_ATBGestellung
If txtATBT1.Text <> "" Then
Dim SND As New cSendungen(_SendungsId)
Dim Standort = ""
Select Case SND.FilialenNr
@@ -84,24 +82,27 @@ Public Class usrCntlSND_ATBGestellung
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
Dim gsid As Integer = 0
Dim SQLString As String = "Select top (1) gs_gsNr from [tblGesamtsicherheit] where [gs_ATBNr] = '" & txtATBT1.Text & "' or ([gs_filialenNr] = '" & SND.FilialenNr & "' and [gs_abfertigungsNr] = " & SND.AbfertigungsNr & " ) or gs_avisoId = '" & SND.tblSnd_AvisoID & "' "
Dim dt As New DataTable
dt = SQL.loadDgvBySql(SQLString, "AVISO", 100, True)
If dt.Rows.Count > 0 Then
gsid = dt.Rows(0).Item("gs_gsNr")
End If
Dim frm As New frmGesamtsicherheitenNEU
If gsid > 0 Then
Dim gessicherheit As New cSicherheiten(gsid)
With frm
.currentGesSichRef = GesSichRef
.gessicherheitID = gsid
.gessicherheitID = gessicherheit.gs_gsId
.Standort = Standort
.FilialNummer = SND.FilialenNr
.Abfertigungsnummer = SND.AbfertigungsNr
.FilialNummer = gessicherheit.gs_filialenNr
.Abfertigungsnummer = gessicherheit.gs_abfertigungsnr
.warenortID = gessicherheit.gs_warenort
.LKWKZ = gessicherheit.gs_LKWKZ
.firmaId = firmaId
End With