Sendungsdetails, ATBGestellung

This commit is contained in:
2024-11-04 13:47:45 +01:00
parent 82cd82243a
commit 6793b30c23
8 changed files with 848 additions and 648 deletions

View File

@@ -1,9 +1,16 @@
Public Class usrCntlSND_ATBGestellung
Imports VERAG_PROG_ALLGEMEIN
Public Class usrCntlSND_ATBGestellung
Dim _SendungsId As Object
Public firmaId As Integer
'Public NCTS_GA As VERAG_PROG_ALLGEMEIN.cNCTSGestellungsadressen
Sub New(SendungsId)
_SendungsId = SendungsId
' Dieser Aufruf ist für den Designer erforderlich.
InitializeComponent()
@@ -12,6 +19,90 @@
End Sub
Private Sub btnGesSicherheit_Click(sender As Object, e As EventArgs) Handles btnGesSicherheit.Click
If txtATBT1.Text <> "" Then
Dim SND As New cSendungen(_SendungsId)
Dim Standort = ""
Select Case SND.FilialenNr
Case 4803, 4809
Standort = "VERAG AG" : firmaId = 1
Case 5601
Standort = "Unisped GmbH" : firmaId = 21
Case 5701
Standort = "AMBAR" : firmaId = 24
Case 4810,
Standort = "VERAG GmbH" : firmaId = 1
Case 5103
Standort = "VERAG CS" : firmaId = 11
Case 5501
Standort = "IMEX" : firmaId = 20
End Select
Dim GesSichRef = New VERAG_PROG_ALLGEMEIN.cAufschubKonten(Standort)
If GesSichRef Is Nothing Then
Exit Sub
End If
Dim SQL As New 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
With frm
.currentGesSichRef = GesSichRef
.gessicherheitID = gsid
.Standort = Standort
.FilialNummer = SND.FilialenNr
.Abfertigungsnummer = SND.AbfertigungsNr
.firmaId = firmaId
End With
AddHandler frm.FormClosing, Function()
GesSichRef.CalcSaldo()
Me.BringToFront()
End Function
frm.Show()
Else
With frm
.currentGesSichRef = GesSichRef
.Standort = Standort
.datum = Date.Now
.Neu = True
.FilialNummer = SND.FilialenNr
.Abfertigungsnummer = SND.AbfertigungsNr
.firmaId = firmaId
End With
AddHandler frm.FormClosing, Function()
GesSichRef.CalcSaldo()
Me.BringToFront()
End Function
frm.Show(Me)
End If
End If
End Sub
'Public Sub setValues()