ATLAS 9.1 AES 3.0; NCTS div.
This commit is contained in:
@@ -314,6 +314,33 @@ Public Class cBrgDb
|
||||
End Function
|
||||
|
||||
|
||||
Public Function loadDgvBySqlFromBrgKtoDAKOSY004(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable
|
||||
Dim sql As String = "SELECT ncts_MRN, ([nctsGRT_AmountToBeCovered]), ncts_dyaAnmID, ncts_Declarationtype ncts_ArtAnmeldung,ncts_Declarationtype,nctsGRT_GRN nctsSA_GRN,nctsGRT_GRN"
|
||||
sql &= " from tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId"
|
||||
sql &= " where ncts_Status between '" & statusVon & "' and '" & statusBis & "' AND [nctsGRT_GRN]='" & buergschaft & "' " & where
|
||||
'MsgBox(sql)
|
||||
While True 'Endlosschleife; wird verlassen durch Return oder Application.Exit()
|
||||
Try
|
||||
Dim myTable = New DataTable()
|
||||
Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
Dim dr As SqlDataReader = cmd.ExecuteReader()
|
||||
myTable.Load(dr)
|
||||
dr.Close()
|
||||
End Using
|
||||
conn.Close()
|
||||
End Using
|
||||
Return myTable 'While Schleife wird hier verlassen
|
||||
Catch ex As Exception
|
||||
Dim antwort As MsgBoxResult = MsgBox(ex.Message, CType(MsgBoxStyle.RetryCancel + MsgBoxStyle.Exclamation, MsgBoxStyle),
|
||||
"Problem in Function 'loadDgvBySqlZOLARIS'")
|
||||
End Try
|
||||
End While
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function loadDgvBySqlFromBrgKtoDAKOSYDetails(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable
|
||||
Dim sql As String = "SELECT ncts_MRN,ncts_Status,(nctsSA_AbgabenBetrag), ncts_dyaAnmID, ncts_ArtAnmeldung,nctsSA_GRN,ncts_Empfaenger_eori,ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter"
|
||||
@@ -342,6 +369,33 @@ Public Class cBrgDb
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Function loadDgvBySqlFromBrgKtoDAKOSYDetails004(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable
|
||||
Dim sql As String = "SELECT ncts_MRN,ncts_Status,[nctsGRT_AmountToBeCovered]nctsSA_AbgabenBetrag,[nctsGRT_AmountToBeCovered], ncts_dyaAnmID, ncts_Declarationtype ncts_ArtAnmeldung,ncts_ArtAnmeldung,[nctsGRT_GRN] nctsSA_GRN,ncts_Consignee_IdentificationNumber ncts_Empfaenger_eori,ncts_Consignee_SubsidiaryNumber ncts_Empfaenger_NLNR,ncts_Empfaenger_Name,ncts_Bearbeiter"
|
||||
sql &= " ,[ncts_ObjectName],[ncts_Trans_DatumZeit] as Transaktionsdatum,[ncts_dyaArt],[ncts_ANR],[ncts_MRN],[ncts_ObjectAlias],ncts_GrossMass ncts_GesamtRohmasse,0 As ncts_GesamtAnzahlPackstuecke "
|
||||
sql &= " from tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId"
|
||||
sql &= " where ncts_Status between '" & statusVon & "' and '" & statusBis & "' AND nctsSA_GRN='" & buergschaft & "' " & where
|
||||
'MsgBox(sql)
|
||||
While True 'Endlosschleife; wird verlassen durch Return oder Application.Exit()
|
||||
Try
|
||||
Dim myTable = New DataTable()
|
||||
Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
Dim dr As SqlDataReader = cmd.ExecuteReader()
|
||||
myTable.Load(dr)
|
||||
dr.Close()
|
||||
End Using
|
||||
conn.Close()
|
||||
End Using
|
||||
Return myTable 'While Schleife wird hier verlassen
|
||||
Catch ex As Exception
|
||||
Dim antwort As MsgBoxResult = MsgBox(ex.Message, CType(MsgBoxStyle.RetryCancel + MsgBoxStyle.Exclamation, MsgBoxStyle),
|
||||
"Problem in Function 'loadDgvBySqlZOLARIS'")
|
||||
End Try
|
||||
End While
|
||||
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
Public Function loadDgvBySqlFromBrgKt_NCTS_TR_Details(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As DataTable
|
||||
@@ -542,8 +596,9 @@ Public Class cBrgDb
|
||||
Dim tmp_sub As String = 0 'getBrgSumFromFMZOLL_Zabis_SUBEN(datumVon, datumBis, statusVon, statusBis, buergschaft, where)
|
||||
Dim tmp_sbg As String = 0 ' getBrgSumFromFMZOLL_Zabis_SALZBURG(datumVon, datumBis, statusVon, statusBis, buergschaft, where)
|
||||
Dim tmp_DY As String = getBrgSumFrom_DAKOSY(datumVon, datumBis, statusVon, statusBis, buergschaft, where)
|
||||
Dim tmp_DY004 As String = getBrgSumFrom_DAKOSY_NCTS004(datumVon, datumBis, statusVon, statusBis, buergschaft, where)
|
||||
'Dim tmp_nctsTR As String = getBrgSumFrom_NCTS_TR(datumVon, datumBis, statusVon, statusBis, buergschaft, where)
|
||||
Return CDbl(tmp_sub) + CDbl(tmp_sbg) + CDbl(tmp_DY) ' + CDbl(tmp_nctsTR)
|
||||
Return CDbl(tmp_sub) + CDbl(tmp_sbg) + CDbl(tmp_DY) + CDbl(tmp_DY004) ' + CDbl(tmp_nctsTR)
|
||||
|
||||
End Function
|
||||
|
||||
@@ -628,6 +683,39 @@ Public Class cBrgDb
|
||||
End Function
|
||||
|
||||
|
||||
Public Function getBrgSumFrom_DAKOSY_NCTS004(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As String
|
||||
'Return Nothing
|
||||
|
||||
Dim sql As String = "SELECT sum([nctsGRT_AmountToBeCovered])"
|
||||
sql &= " from tblDakosy_NCTSOut004_Guarantee inner join [tblDakosy_NCTSOut004] on ncts_Id = nctsGRT_NctsId"
|
||||
sql &= " where ncts_Trans_DatumZeit BETWEEN '" & datumVon.ToShortDateString & " 00:00:00' AND '" & datumBis.ToShortDateString & " 23:23:59' AND ncts_Status BETWEEN '" & statusVon & "' AND '" & statusBis & "' AND [nctsGRT_GRN] = '" & buergschaft & "' " & where
|
||||
'MsgBox(sql)
|
||||
Dim dr As SqlDataReader
|
||||
Dim daten As New List(Of cBuergschaft)
|
||||
Using conn As SqlConnection = VERAG_PROG_ALLGEMEIN.SQL.GetNewOpenConnectionFMZOLL()
|
||||
Using cmd As New SqlCommand(sql, conn)
|
||||
dr = cmd.ExecuteReader()
|
||||
Try
|
||||
Dim cnt As Integer = 0
|
||||
If dr.Read Then
|
||||
If Not dr.GetValue(0) Is DBNull.Value Then
|
||||
' MsgBox(dr.GetValue(0))
|
||||
Return dr.GetValue(0)
|
||||
|
||||
End If
|
||||
End If
|
||||
Return "0"
|
||||
Catch ex As Exception
|
||||
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Datenbankfehler")
|
||||
Finally
|
||||
dr.Close()
|
||||
End Try
|
||||
End Using
|
||||
End Using
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
|
||||
Public Function getBrgSumFrom_NCTS_TR(ByVal datumVon As DateTime, ByVal datumBis As DateTime, ByVal statusVon As String, ByVal statusBis As String, ByVal buergschaft As String, Optional where As String = "") As String
|
||||
'Return Nothing
|
||||
Dim sql As String = "SELECT sum(nctsSA_AbgabenBetrag)"
|
||||
|
||||
Reference in New Issue
Block a user