Essensbestellungen
This commit is contained in:
@@ -202,10 +202,15 @@ Public Class UsrCntlessensbestellungen
|
||||
|
||||
Private Sub countChecks()
|
||||
|
||||
|
||||
Dim countMenus As Integer
|
||||
Dim countlaCarte As Integer
|
||||
Dim countKebab As Integer
|
||||
|
||||
countMenus = 0
|
||||
countlaCarte = 0
|
||||
countKebab = 0
|
||||
|
||||
For Each gb As Control In MyPanel1.Controls
|
||||
If TypeOf gb Is GroupBox Then
|
||||
For Each c As Control In gb.Controls
|
||||
@@ -218,6 +223,16 @@ Public Class UsrCntlessensbestellungen
|
||||
If c.Text.ToLower.StartsWith(alacarte.ToLower) AndAlso TypeOf c Is VERAG_PROG_ALLGEMEIN.MyRadioButton AndAlso (c.Enabled = True Or outdated = True And MyPanel1.Enabled = False) Then
|
||||
Dim rb As VERAG_PROG_ALLGEMEIN.MyRadioButton = c
|
||||
If rb.Checked Then countlaCarte = countlaCarte + 1
|
||||
|
||||
End If
|
||||
|
||||
If TypeOf c Is VERAG_PROG_ALLGEMEIN.MyComboBox AndAlso (c.Enabled = True Or outdated = True And MyPanel1.Enabled = False) Then
|
||||
Dim cbx As VERAG_PROG_ALLGEMEIN.MyComboBox = c
|
||||
If cbx.Visible = True AndAlso cbx.SelectedItem IsNot Nothing Then
|
||||
|
||||
countKebab = countKebab + 1
|
||||
countlaCarte = countlaCarte - 1
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
@@ -225,7 +240,17 @@ Public Class UsrCntlessensbestellungen
|
||||
|
||||
txtAnzahlMenu.Text = countMenus.ToString()
|
||||
txtAnzahlLaCart.Text = countlaCarte.ToString
|
||||
txtPreis.Text = (CDbl(countlaCarte) + CDbl(countMenus)) * preisProMahlzeit
|
||||
txtAnzahlKeb.Text = countKebab.ToString
|
||||
|
||||
If CDate(dt.Rows(0).Item("MenuDateVon")).ToString("dd.MM.yyyy") >= DateTime.Parse("01/06/2024") Then
|
||||
|
||||
txtPreis.Text = (CDbl(countKebab) + CDbl(countMenus)) * 3 + CDbl(countlaCarte) * 5
|
||||
Else
|
||||
|
||||
txtPreis.Text = (CDbl(countlaCarte) + CDbl(countMenus) + CDbl(countKebab)) * preisProMahlzeit
|
||||
End If
|
||||
|
||||
'IIf(bestellung.eb_storniert, preisProMahlzeit * 0, preisProMahlzeit * 1)
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user