new
This commit is contained in:
@@ -25,7 +25,7 @@ Public Class cProgramFunctions
|
||||
Try
|
||||
Dim BRG As New cBrgDb
|
||||
Dim brg_AT As String = "05AT510000G000FP7"
|
||||
Dim brg_DE As String = "05DE0000000009345"
|
||||
Dim brg_DE As String = "05DE0000000009345" 'ALT _ NICHT MEHR IN VERWENDUNG
|
||||
Dim brg_DE_NEU As String = "17DE0000000071678"
|
||||
|
||||
' BRG.getBrgFromFMZOLL(datEinlesenVon.Value.ToShortDateString, datEinlesenBis.Value.ToShortDateString, "50", "60","05AT510000G000FP7")
|
||||
@@ -36,23 +36,27 @@ Public Class cProgramFunctions
|
||||
' Dim datvon As Date = datEinlesenVon.Value
|
||||
' MsgBox(datvon.ToShortDateString & " - " & datbis.ToShortDateString)
|
||||
While datvon <= datbis
|
||||
' MsgBox(datvon.ToShortDateString)
|
||||
Dim AtWoche_atlas As String = BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_AT)
|
||||
AtWoche_atlas += BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_AT) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
AtWoche_atlas += BRG.getBrgSumFrom_NCTS_TR(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_AT) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
Dim DeWoche As String = BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE)
|
||||
'DeWoche += BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE)
|
||||
Dim De2Woche As String = BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE_NEU)
|
||||
De2Woche += BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE_NEU) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
De2Woche += BRG.getBrgSumFrom_NCTS_TR(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE_NEU) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
' MsgBox(datvon.ToShortDateString)
|
||||
Dim AtWoche_atlas As Double = 0 'BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_AT)
|
||||
AtWoche_atlas += BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_AT) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
AtWoche_atlas += BRG.getBrgSumFrom_NCTS_TR(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_AT) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
' Dim DeWoche As String = BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_DE)
|
||||
'DeWoche += BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_DE)
|
||||
Dim De2Woche As Double = 0 'BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_DE_NEU)
|
||||
De2Woche += BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_DE_NEU) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
De2Woche += BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_DE_NEU) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
De2Woche += BRG.getBrgSumFrom_NCTS_TR(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_DE_NEU) ' DATEN AUS DAKOSY/ZODIAK EINLESEN
|
||||
|
||||
|
||||
' MsgBox(BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE_NEU))
|
||||
' Dim test As Double = BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_DE_NEU)
|
||||
' MsgBox(BRG.getBrgSumFromFMZOLL_Zodiak(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_DE_NEU))
|
||||
' Dim test As Double = BRG.getBrgSumFromFMZOLL_Zabis(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_DE_NEU)
|
||||
|
||||
|
||||
Dim AtWoche_zolaris As String = BRG.getBrgSumFromFMZOLL_Zolaris(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_AT)
|
||||
AtWoche_zolaris += BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.ToShortDateString, datbis.ToShortDateString, "50", "60", brg_AT) ' DATEN AUS TELOTEC EINLESEN
|
||||
Dim AtWoche_zolaris As Double = 0
|
||||
AtWoche_zolaris += BRG.getBrgSumFromFMZOLL_Zolaris(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_AT)
|
||||
AtWoche_zolaris += BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.ToShortDateString, datvon.ToShortDateString, "50", "60", brg_AT) ' DATEN AUS TELOTEC EINLESEN
|
||||
' MsgBox("getBrgSumFromFMZOLL_Zolaris: " & BRG.getBrgSumFromFMZOLL_Zolaris(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_AT))
|
||||
' MsgBox("getBrgSumFromFMZOLL_TELOTEC: " & BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.ToShortDateString, datbisWo.ToShortDateString, "50", "60", brg_AT))
|
||||
|
||||
'UPDATE
|
||||
Dim buergschaft As cBuergschaft
|
||||
@@ -66,33 +70,33 @@ Public Class cProgramFunctions
|
||||
' buergschaft.brg_at_tag_zolaris = ""
|
||||
buergschaft.brg_at_woche_atlas = StrIntValue(toDec(AtWoche_atlas))
|
||||
buergschaft.brg_at_woche_zolaris = StrIntValue(toDec(AtWoche_zolaris))
|
||||
' buergschaft.brg_de_tag_atlas = ""
|
||||
buergschaft.brg_de_woche_atlas = StrIntValue(toDec(DeWoche))
|
||||
buergschaft.brg_de_tag_atlas = ""
|
||||
buergschaft.brg_de_woche_atlas = "" 'StrIntValue(toDec(DeWoche))
|
||||
buergschaft.brg_de2_woche_atlas = StrIntValue(toDec(De2Woche))
|
||||
|
||||
' buergschaft.brg_at_tag = ""
|
||||
buergschaft.brg_at_woche = StrIntValue(toDec(buergschaft.brg_at_woche_atlas) + toDec(buergschaft.brg_at_woche_zolaris))
|
||||
|
||||
|
||||
|
||||
If datvon.ToShortDateString = Now.ToShortDateString Then
|
||||
buergschaft.brg_de2_tag_atlas =
|
||||
BRG.getBrgSumFromFMZOLL_Zabis(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU) +
|
||||
BRG.getBrgSumFromFMZOLL_Zodiak(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU) +
|
||||
BRG.getBrgSumFrom_NCTS_TR(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU)
|
||||
buergschaft.brg_de2_tag_atlas = 0 + 'BRG.getBrgSumFromFMZOLL_Zabis(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU) +
|
||||
BRG.getBrgSumFromFMZOLL_Zodiak(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU) +
|
||||
BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU) +
|
||||
BRG.getBrgSumFrom_NCTS_TR(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE_NEU)
|
||||
|
||||
buergschaft.brg_de_tag_atlas = BRG.getBrgSumFromFMZOLL_Zabis(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE)
|
||||
buergschaft.brg_at_tag_atlas =
|
||||
BRG.getBrgSumFromFMZOLL_Zabis(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT) +
|
||||
BRG.getBrgSumFromFMZOLL_Zodiak(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT) +
|
||||
BRG.getBrgSumFrom_NCTS_TR(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT)
|
||||
'buergschaft.brg_de_tag_atlas = BRG.getBrgSumFromFMZOLL_Zabis(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_DE)
|
||||
buergschaft.brg_at_tag_atlas = 0 + ' BRG.getBrgSumFromFMZOLL_Zabis(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT) +
|
||||
BRG.getBrgSumFromFMZOLL_Zodiak(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT) +
|
||||
BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT) +
|
||||
BRG.getBrgSumFrom_NCTS_TR(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT)
|
||||
|
||||
Dim AtTag_zolaris As Double = BRG.getBrgSumFromFMZOLL_Zolaris(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT, " AND DatumBestimmungErreicht IS NULL ")
|
||||
AtTag_zolaris += BRG.getBrgSumFromFMZOLL_TELOTEC(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT) ' DATEN AUS TELOTEC EINLESEN
|
||||
|
||||
buergschaft.brg_at_tag_zolaris = BRG.getBrgSumFromFMZOLL_Zolaris(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT, " AND DatumBestimmungErreicht IS NULL ")
|
||||
buergschaft.brg_at_tag = StrIntValue(toDec(buergschaft.brg_at_tag_atlas) + toDec(buergschaft.brg_at_tag_zolaris))
|
||||
buergschaft.brg_at_tag_zolaris = AtTag_zolaris 'BRG.getBrgSumFromFMZOLL_Zolaris(datvon.AddMonths(-3).ToShortDateString, datvon.ToShortDateString, "50", "50", brg_AT, " AND DatumBestimmungErreicht IS NULL ")
|
||||
buergschaft.brg_at_tag = StrIntValue(toDec(buergschaft.brg_at_tag_atlas) + toDec(AtTag_zolaris))
|
||||
End If
|
||||
buergschaft.brg_de_tag = buergschaft.brg_de_tag_atlas
|
||||
buergschaft.brg_de_woche = buergschaft.brg_de_woche_atlas
|
||||
' buergschaft.brg_de_tag = "" 'buergschaft.brg_de_tag_atlas
|
||||
' buergschaft.brg_de_woche = buergschaft.brg_de_woche_atlas
|
||||
|
||||
buergschaft.brg_de2_tag = buergschaft.brg_de2_tag_atlas
|
||||
buergschaft.brg_de2_woche = buergschaft.brg_de2_woche_atlas
|
||||
@@ -125,7 +129,9 @@ Public Class cProgramFunctions
|
||||
|
||||
Private Function toDec(ByVal s As Object) As Decimal
|
||||
Try
|
||||
If s = "" Then Return 0
|
||||
If s Is Nothing Then Return 0
|
||||
If s.ToString = "" Then Return 0
|
||||
|
||||
Return CDec(s)
|
||||
Catch ex As System.Exception
|
||||
Return 0
|
||||
|
||||
@@ -156,9 +156,9 @@ Public Class cBrgDb
|
||||
|
||||
|
||||
|
||||
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
|
||||
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 Double
|
||||
'Return Nothing
|
||||
Dim sql As String = "SELECT sum(nctsSA_AbgabenBetrag)"
|
||||
Dim sql As String = "SELECT isnull(sum(cast(nctsSA_AbgabenBetrag as float)),0)"
|
||||
sql &= " from tblNCTS_TR_Sicherheitsangaben inner join [tblNCTS_TR] on ncts_Id = nctsSA_NctsId"
|
||||
sql &= " where [ncts_Eroeffnung] BETWEEN '" & datumVon.ToShortDateString & " 00:00:00' AND '" & datumBis.ToShortDateString & " 23:23:59' AND ncts_Status BETWEEN '" & statusVon & "' AND '" & statusBis & "' AND nctsSA_GRN = '" & buergschaft & "' " & where
|
||||
'MsgBox(sql)
|
||||
@@ -176,7 +176,7 @@ Public Class cBrgDb
|
||||
|
||||
End If
|
||||
End If
|
||||
Return "0"
|
||||
Return 0
|
||||
Catch ex As Exception
|
||||
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Datenbankfehler")
|
||||
Finally
|
||||
@@ -184,7 +184,7 @@ Public Class cBrgDb
|
||||
End Try
|
||||
End Using
|
||||
End Using
|
||||
Return Nothing
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Public Function getBrgSumFromFMZOLL_Zabis(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 Double
|
||||
@@ -206,7 +206,7 @@ Public Class cBrgDb
|
||||
Return dr.GetValue(0)
|
||||
End If
|
||||
End If
|
||||
Return ""
|
||||
Return 0
|
||||
Catch ex As Exception
|
||||
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Datenbankfehler")
|
||||
Finally
|
||||
@@ -214,7 +214,7 @@ Public Class cBrgDb
|
||||
End Try
|
||||
End Using
|
||||
End Using
|
||||
Return Nothing
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
Public Function getBrgSumFromFMZOLL_Zodiak(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 Double
|
||||
@@ -240,7 +240,7 @@ Public Class cBrgDb
|
||||
Return dr.GetValue(0)
|
||||
End If
|
||||
End If
|
||||
Return ""
|
||||
Return 0
|
||||
Catch ex As Exception
|
||||
MsgBox(System.Reflection.MethodInfo.GetCurrentMethod.Name & ": Fehler mit der Datenbankverbindung:" & vbCrLf & vbCrLf & ex.Message, vbExclamation, "Datenbankfehler")
|
||||
Finally
|
||||
@@ -248,7 +248,7 @@ Public Class cBrgDb
|
||||
End Try
|
||||
End Using
|
||||
End Using
|
||||
Return Nothing
|
||||
Return 0
|
||||
End Function
|
||||
|
||||
|
||||
@@ -256,11 +256,11 @@ Public Class cBrgDb
|
||||
|
||||
' Dim sql As String = "SELECT ISNULL(SUM(veoerz_sicbtg),0) " &
|
||||
' " FROM tblZabis_Atlas_NCTS WHERE ( veoant_andat BETWEEN '" & datumVon & "' AND '" & datumBis & "') AND ( veoant_stat BETWEEN '" & statusVon & "' AND '" & statusBis & "') AND veoerz_sicbsc = '" & buergschaft & "' " & where
|
||||
Dim sql As String = " SELECT ISNULL(sum(GVal),0)
|
||||
Dim sql As String = " SELECT ISNULL(sum(cast(GVal as float)),0)
|
||||
from [tblTelotec_Sicherheit] inner join [tblTelotec_Anmeldung] on telanm_id = telgrt_telanmId
|
||||
where dec_CreateDate BETWEEN '" & datumVon & "' AND '" & datumBis & "' AND telanm_Status BETWEEN '" & statusVon & "' AND '" & statusBis & "' AND GRN = '" & buergschaft & "' AND [telnam_aktuellsteNachricht]=1 " & where
|
||||
where dec_CreateDate BETWEEN '" & datumVon.ToShortDateString & " 00:00:000' AND '" & datumBis.ToShortDateString & " 23:59:59' AND telanm_Status BETWEEN '" & statusVon & "' AND '" & statusBis & "' AND GRN = '" & buergschaft & "' AND [telnam_aktuellsteNachricht]=1 " & where
|
||||
|
||||
' MsgBox(sql)
|
||||
' MsgBox(sql)
|
||||
' Dim daten As New List(Of cEntry)
|
||||
Dim dr As SqlDataReader
|
||||
Dim daten As New List(Of cBuergschaft)
|
||||
@@ -336,7 +336,7 @@ Public Class cBrgDb
|
||||
Return Nothing
|
||||
End Function
|
||||
|
||||
Public Function getBrgSumFromFMZOLL_Zolaris(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
|
||||
Public Function getBrgSumFromFMZOLL_Zolaris(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 Double
|
||||
|
||||
Dim sql As String = "SELECT ISNULL(SUM(GarantieWert),0) " &
|
||||
" FROM tblZolaris_EZoll_NCTS WHERE ( AnmeldungsDatum BETWEEN '" & datumVon & "' AND '" & datumBis & "') AND GRN = '" & buergschaft & "' " & where
|
||||
|
||||
Reference in New Issue
Block a user