This commit is contained in:
2020-06-22 13:32:28 +02:00
parent 3d67139c09
commit 2d85480c4c
25 changed files with 30373 additions and 2360 deletions

View File

@@ -890,6 +890,11 @@ Public Class usrctlBuergschaft
End Sub
Private Sub Button9_Click(sender As Object, e As EventArgs) Handles Button9.Click
'doJahresauswertung_KEWILL
doJahresauswertung_DAKOSY()
End Sub
Sub doJahresauswertung_KEWILL()
Me.Cursor = Cursors.WaitCursor
Try
Dim cBrgYear As New List(Of cBrgYear)
@@ -910,7 +915,7 @@ Public Class usrctlBuergschaft
b.kw = kw
Dim andstr_zabis As String = ""
Dim andstr_zolaris As String = ""
Dim bzol As Boolean = True
Dim bzab As Boolean = True
@@ -958,6 +963,7 @@ Public Class usrctlBuergschaft
If cboSystemAuswertungJahrWo.Text <> "ZOLARIS" And bzab Then b.de_atlas = toDbl(BRG.getBrgSumFromFMZOLL_Zabis(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_DE, andstr_zabis))
If cboSystemAuswertungJahrWo.Text <> "ATLAS" And bzol Then b.at_zolaris = BRG.getBrgSumFromFMZOLL_Zolaris(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_AT, andstr_zolaris)
If cboSystemAuswertungJahrWo.Text <> "ZOLARIS" And bzab Then b.de2_atlas = toDbl(BRG.getBrgSumFromFMZOLL_Zabis(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_DE_NEU, andstr_zabis))
' b.at_zolaris = CDbl(0)
cBrgYear.Add(b)
@@ -975,6 +981,96 @@ Public Class usrctlBuergschaft
Me.Cursor = Cursors.Default
End Sub
Sub doJahresauswertung_DAKOSY()
Me.Cursor = Cursors.WaitCursor
Try
Dim cBrgYear As New List(Of cBrgYear)
Dim estr As String = ""
Dim estrText As String = ""
Dim zol_estr As String = ""
Dim zol_estrText As String = ""
If ComboBox2.Text = "" Then
MsgBox("Bitte Jahr auswählen!")
Me.Cursor = Cursors.Default
Exit Sub
End If
Dim year As Integer = ComboBox2.Text
For kw As Integer = 1 To 53
Dim aktdat As Date = CalendarWeek(kw, year)
Dim b As New cBrgYear
b.kw = kw
Dim andstr_zabis As String = ""
Dim andstr_zolaris As String = ""
Dim bzol As Boolean = True
Dim bzab As Boolean = True
If cbxSUB.Checked Or cbxATILLA.Checked Or cbxSBG.Checked Or cbxWAI.Checked Or cbxDURMAZ.Checked Or cbxNKD.Checked Or cbxNEU.Checked Then
bzol = False
bzab = True
'andstr_zabis = " AND basman_nl IN ( "
andstr_zolaris = " AND OperatorId IN ( "
estr = ""
'estrText = ""
zol_estr = ""
zol_estrText = ""
'If cbxSUB.Checked Then estr &= " '" & cbxSUB.Text & "'," : estrText &= " 'SUB'," : bzab = True
'If cbxWAI.Checked Then estr &= " '" & cbxWAI.Text & "'," : estrText &= " 'WAI'," : bzab = True
'If cbxSBG.Checked Then estr &= " '" & cbxSBG.Text & "'," : estrText &= " 'SBG'," : bzab = True
'If cbxNEU.Checked Then estr &= " '" & cbxNEU.Text & "'," : estrText &= " 'NEU'," : bzab = True
'If cbxNKD.Checked Then estrText &= " 'NKD', "
'If cbxATILLA.Checked Then estr &= " 'SUW'," : estrText &= " 'ATILLA'," : bzab = True 'ATILLA
'If cbxDURMAZ.Checked Then estr &= " 'SUW'," : estrText &= " 'DURMAZ'," : bzab = True 'DURMAZ
'If estr.EndsWith(",") Then estr = estr.Substring(0, estr.Length - 1)
'If estrText.EndsWith(",") Then estrText = estrText.Substring(0, estrText.Length - 1)
' andstr_zabis &= estr & ") "
'If Not cbxATILLA.Checked = cbxDURMAZ.Checked Then
' If cbxATILLA.Checked Then andstr_zabis &= " AND ncts_ObjectName NOT LIKE 'DU%' " 'ATILLA
' If cbxDURMAZ.Checked Then andstr_zabis &= " AND ncts_ObjectName LIKE 'DU%' " 'DURMAZ
'End If
If cbxATILLA.Checked Then andstr_zabis &= " AND ncts_ObjectName LIKE '4801%' " 'ATILLA
If cbxDURMAZ.Checked Then andstr_zabis &= " AND ncts_ObjectName LIKE 'DU%' " 'DURMAZ
'ZOLARIS
If cbxSUB.Checked Then zol_estr &= " '1', '4'," : bzol = True
' If cbxWAI.Checked Then zol_estr &= " '4'," : bzol = True
If cbxSBG.Checked Then zol_estr &= " '2'," : bzol = True
If cbxNKD.Checked Then zol_estr &= " '3'," : bzol = True
If cbxATILLA.Checked Then zol_estr &= " '5', '6'," : bzol = True
If zol_estr.EndsWith(",") Then zol_estr = zol_estr.Substring(0, zol_estr.Length - 1)
andstr_zolaris &= zol_estr & ") "
' MsgBox(andstr_zabis & " - " & andstr_zolaris)
End If
' " AND veoant_beznr NOT LIKE 'DU%' AND basman_nl='SUW'
If cboSystemAuswertungJahrWo.Text <> "ZOLARIS" And bzab Then b.at__atlas = toDbl(BRG.getBrgSumFromFMZOLL_Zodiak(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_AT, andstr_zabis))
If cboSystemAuswertungJahrWo.Text <> "ZOLARIS" And bzab Then b.de_atlas = toDbl(BRG.getBrgSumFromFMZOLL_Zodiak(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_DE, andstr_zabis))
If cboSystemAuswertungJahrWo.Text <> "ATLAS" And bzol Then b.at_zolaris = BRG.getBrgSumFromFMZOLL_Zolaris(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_AT, andstr_zolaris)
If cboSystemAuswertungJahrWo.Text <> "ZOLARIS" And bzab Then b.de2_atlas = toDbl(BRG.getBrgSumFromFMZOLL_Zodiak(aktdat.ToShortDateString, aktdat.AddDays(6).ToShortDateString, "50", "60", brg_DE_NEU, andstr_zabis))
' b.at_zolaris = CDbl(0)
cBrgYear.Add(b)
Next
If cbxSplitATLASZOLARIS.Checked Then
genExcelYearSplitATLASEZOLL(cBrgYear, year, "AUSWERTUNG mit Einschränkung: " & estrText)
Else
genExcelYear(cBrgYear, year, "AUSWERTUNG mit Einschränkung: " & estrText)
End If
Catch ex As System.Exception
MsgBox("Problem beim Verarbeiten der Jahresauswertung!" & vbNewLine & ex.Message & ex.StackTrace)
'MsgBox(ex.StackTrace)
End Try
Me.Cursor = Cursors.Default
End Sub
Function toDbl(o) As Double
Try
If o.ToString <> "" Then