neu
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
Imports System.Data.SqlClient
|
||||
Imports System.Reflection
|
||||
|
||||
Public Class cVERAG_in_shippment
|
||||
Public Class cVERAG_in_shippmentWHST '????????
|
||||
|
||||
Property in_sh_id As Object = Nothing ' INT Not NULL,
|
||||
Property in_sh_AvisoId As Object = Nothing ' INT NULL,
|
||||
@@ -9,6 +9,7 @@ Public Class cVERAG_in_shippment
|
||||
Property in_sh_Erstellung As Object = Nothing ' DATETIME Default (getdate()) Not NULL,
|
||||
Property in_sh_firma As Object = Nothing ' VARCHAR(10) NULL,
|
||||
Property in_sh_niederlassung As Object = Nothing ' VARCHAR(10) NULL,
|
||||
|
||||
'Property MsgType As Object = Nothing ' VARCHAR(10) NULL,
|
||||
'Property dec_ProzessArt As Object = Nothing ' VARCHAR(4) Not NULL,
|
||||
'Property dec_Anmelde_ID As Object = Nothing ' INT NULL,
|
||||
@@ -122,6 +123,7 @@ Public Class cVERAG_in_shippment
|
||||
Property CtrlRslt_DLimit As Object = Nothing ' NCTS_GEstellung
|
||||
|
||||
|
||||
Property DOCUMENTS As New List(Of cVERAG_in_shipment_Document)
|
||||
Property POSITIONSDATEN As New List(Of cVERAG_in_shippment_Position)
|
||||
'Property SICHERHEIT As New List(Of cVERAG_in_shippment_Sicherheit)
|
||||
Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL
|
||||
@@ -160,6 +162,7 @@ Public Class cVERAG_in_shippment
|
||||
in_sh_id = SQL.doSQLVarListID(in_sh_id, sqlstr, "FMZOLL", , list)
|
||||
If in_sh_id > 0 And saveAll Then
|
||||
SAVE_Positionsdaten()
|
||||
SAVE_Documents()
|
||||
' SAVE_Sicherheit()
|
||||
End If
|
||||
Return in_sh_id > 0
|
||||
@@ -173,6 +176,7 @@ Public Class cVERAG_in_shippment
|
||||
Try
|
||||
If loadALL Then
|
||||
POSITIONSDATEN.Clear()
|
||||
DOCUMENTS.Clear()
|
||||
' SICHERHEIT.Clear()
|
||||
End If
|
||||
Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
@@ -192,6 +196,7 @@ Public Class cVERAG_in_shippment
|
||||
Next
|
||||
If loadALL Then
|
||||
LOAD_Positionsdaten()
|
||||
LOAD_Documents()
|
||||
' LOAD_Sicherheit()
|
||||
End If
|
||||
End If
|
||||
@@ -354,6 +359,33 @@ Public Class cVERAG_in_shippment
|
||||
MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
End Try
|
||||
End Sub
|
||||
Public Sub LOAD_Documents()
|
||||
'Try
|
||||
' DOCUMENTS.Clear()
|
||||
' Using conn As SqlConnection = SQL.GetNewOpenConnectionFMZOLL()
|
||||
' Using cmd As New SqlCommand("SELECT * FROM tblTR_Shipment_Document WHERE shTrDoc_ShTrId=@in_sh_id ", conn)
|
||||
' cmd.Parameters.AddWithValue("@in_sh_id", Me.in_sh_id)
|
||||
' Dim dr = cmd.ExecuteReader()
|
||||
' While dr.Read
|
||||
' Dim l As New cVERAG_in_shipment_Document
|
||||
' For Each i In l.getParameterList()
|
||||
' Dim propInfo As PropertyInfo = l.GetType.GetProperty(i.Scalarvariable)
|
||||
' If dr.Item(i.Text) Is DBNull.Value Then
|
||||
' propInfo.SetValue(l, Nothing)
|
||||
' Else
|
||||
' propInfo.SetValue(l, dr.Item(i.Text))
|
||||
' End If
|
||||
' Next
|
||||
' DOCUMENTS.Add(l)
|
||||
' End While
|
||||
' dr.Close()
|
||||
' End Using
|
||||
' End Using
|
||||
'Catch ex As Exception
|
||||
' MsgBox("Fehler in der Funktion '" & System.Reflection.MethodInfo.GetCurrentMethod.Name & "'" & vbNewLine & vbNewLine & ex.Message & vbNewLine & vbNewLine & ex.StackTrace)
|
||||
'End Try
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
Function DELETE_Packstücke() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
@@ -366,6 +398,11 @@ Public Class cVERAG_in_shippment
|
||||
Return SQL.doSQL(sqlstr, "FMZOLL")
|
||||
End Function
|
||||
|
||||
Function DELETE_Documents() As Boolean 'obj As Object, tablename As String, where As String) As Boolean
|
||||
Dim sqlstr = " DELETE FROM [tblTR_Shipment_Document] WHERE shTrDoc_ShTrId =" & Me.in_sh_id & " "
|
||||
Return SQL.doSQL(sqlstr, "FMZOLL")
|
||||
End Function
|
||||
|
||||
|
||||
Public Function SAVE_Positionsdaten() As Boolean
|
||||
'Zuserst alle OffertenPos von dem Offert löschen
|
||||
@@ -388,11 +425,28 @@ Public Class cVERAG_in_shippment
|
||||
Return True
|
||||
End Function
|
||||
|
||||
Public Function SAVE_Documents() As Boolean
|
||||
' 'Zuserst alle OffertenPos von dem Offert löschen
|
||||
' If DELETE_Documents() Then 'And DELETE_PositionsdatenUnterlagen() And DELETE_PositionsdatenVerbrauchssteuer() Then
|
||||
' 'jetzt die Standartofferten einfügen
|
||||
' For Each p In DOCUMENTS
|
||||
' p.shTrDoc_ShTrId = in_sh_id
|
||||
' If p.INSERT() Then
|
||||
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
' Next
|
||||
' Else
|
||||
' Return False
|
||||
' End If
|
||||
|
||||
' Return True
|
||||
End Function
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
|
||||
Public Class cVERAG_in_shippment_Position
|
||||
|
||||
Property in_pos_id As Integer
|
||||
Reference in New Issue
Block a user