Essensbestellungen Umbaut, Syska GU-Export für AMBAR -> VERAG, Speditionsbucharchiv
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
|
||||
Imports System.Web.UI.WebControls.Expressions
|
||||
Imports com.sun.org.apache.xpath.internal.functions
|
||||
Imports VERAG_PROG_ALLGEMEIN
|
||||
|
||||
@@ -21,8 +22,19 @@ Public Class frmEssensbestellungen
|
||||
|
||||
PictureBox5.Visible = True
|
||||
|
||||
Dim list As New List(Of MyListItem)
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Kebap", "Kebap"))
|
||||
list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Dürüm", "Dürüm"))
|
||||
'list.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("", ""))
|
||||
|
||||
cbxMenu.fillWithSQL("SELECT Distinct Top 50 (REPLACE(MenuTitel,'Wochenkarte ','')) + ' - ' + Convert(varchar, Year(MenuDateVon)), MenuDateVon from tblEBMenu order by MenuDateVon desc", True, "AVISO", True) '/ where MenuDateVon >= GETDATE()
|
||||
|
||||
cbxAlt_montag.Items.AddRange(list.ToArray())
|
||||
cbxAlt_dienstag.Items.AddRange(list.ToArray())
|
||||
cbxAlt_mittwoch.Items.AddRange(list.ToArray())
|
||||
cbxAlt_donnerstag.Items.AddRange(list.ToArray())
|
||||
cbxAlt_freitag.Items.AddRange(list.ToArray())
|
||||
|
||||
txtMA.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
|
||||
txtAbteilung.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG
|
||||
loadDGVBestellungen()
|
||||
@@ -54,8 +66,8 @@ Public Class frmEssensbestellungen
|
||||
setWarning(False)
|
||||
ElseIf rbMenuAlt_montag.Checked Then
|
||||
|
||||
If txtAlt_montag.Text.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_montag = txtAlt_montag.Text.ToString
|
||||
If cbxAlt_montag._value.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_montag = cbxAlt_montag._value 'txtAlt_montag.Text.ToString
|
||||
setWarning(False)
|
||||
Else
|
||||
setWarning(True)
|
||||
@@ -75,8 +87,8 @@ Public Class frmEssensbestellungen
|
||||
essen.eb_dienstag = menu
|
||||
setWarning(False)
|
||||
ElseIf rbMenuAlt_dienstag.Checked Then
|
||||
If txtAlt_dienstag.Text.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_dienstag = txtAlt_dienstag.Text.ToString
|
||||
If cbxAlt_dienstag._value.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_dienstag = cbxAlt_dienstag._value 'txtAlt_dienstag.Text.ToString
|
||||
setWarning(False)
|
||||
Else
|
||||
setWarning(True)
|
||||
@@ -95,8 +107,8 @@ Public Class frmEssensbestellungen
|
||||
essen.eb_mittwoch = menu
|
||||
setWarning(False)
|
||||
ElseIf rbMenuAlt_mittwoch.Checked Then
|
||||
If txtAlt_mittwoch.Text.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_mittwoch = txtAlt_mittwoch.Text.ToString
|
||||
If cbxAlt_mittwoch._value.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_mittwoch = cbxAlt_mittwoch._value 'txtAlt_mittwoch.Text.ToString
|
||||
setWarning(False)
|
||||
Else
|
||||
setWarning(True)
|
||||
@@ -115,8 +127,8 @@ Public Class frmEssensbestellungen
|
||||
essen.eb_donnerstag = menu
|
||||
setWarning(False)
|
||||
ElseIf rbMenuAlt_donnerstag.Checked Then
|
||||
If txtAlt_donnerstag.Text.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_donnerstag = txtAlt_donnerstag.Text.ToString
|
||||
If cbxAlt_donnerstag._value.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_donnerstag = cbxAlt_donnerstag._value 'txtAlt_donnerstag.Text.ToString
|
||||
setWarning(False)
|
||||
Else
|
||||
setWarning(True)
|
||||
@@ -135,8 +147,8 @@ Public Class frmEssensbestellungen
|
||||
essen.eb_freitag = menu
|
||||
setWarning(False)
|
||||
ElseIf rbMenuAlt_freitag.Checked Then
|
||||
If txtAlt_freitag.Text.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_freitag = txtAlt_freitag.Text.ToString
|
||||
If cbxAlt_freitag._value.ToString.Replace(" ", "") <> "" Then
|
||||
essen.eb_freitag = cbxAlt_freitag._value 'txtAlt_freitag.Text.ToString
|
||||
setWarning(False)
|
||||
Else
|
||||
setWarning(True)
|
||||
@@ -211,35 +223,45 @@ Public Class frmEssensbestellungen
|
||||
Private Sub rbaLaCarte_CheckedChanged(sender As Object, e As EventArgs) Handles rbMenuAlt_montag.CheckedChanged, rbMenuAlt_dienstag.CheckedChanged, rbMenuAlt_donnerstag.CheckedChanged, rbMenuAlt_mittwoch.CheckedChanged, rbMenuAlt_freitag.CheckedChanged
|
||||
|
||||
If rbMenuAlt_montag.Checked Then
|
||||
txtAlt_montag.Visible = True
|
||||
'txtAlt_montag.Visible = True
|
||||
cbxAlt_montag.Visible = True
|
||||
Else
|
||||
txtAlt_montag.Visible = False
|
||||
cbxAlt_montag.Visible = False
|
||||
'txtAlt_montag.Visible = False
|
||||
End If
|
||||
|
||||
If rbMenuAlt_dienstag.Checked Then
|
||||
txtAlt_dienstag.Visible = True
|
||||
cbxAlt_dienstag.Visible = True
|
||||
'txtAlt_dienstag.Visible = True
|
||||
Else
|
||||
|
||||
txtAlt_dienstag.Visible = False
|
||||
cbxAlt_dienstag.Visible = False
|
||||
'txtAlt_dienstag.Visible = False
|
||||
End If
|
||||
|
||||
If rbMenuAlt_mittwoch.Checked Then
|
||||
txtAlt_mittwoch.Visible = True
|
||||
cbxAlt_mittwoch.Visible = True
|
||||
'txtAlt_mittwoch.Visible = True
|
||||
Else
|
||||
txtAlt_mittwoch.Visible = False
|
||||
cbxAlt_mittwoch.Visible = False
|
||||
'txtAlt_mittwoch.Visible = False
|
||||
End If
|
||||
|
||||
|
||||
If rbMenuAlt_donnerstag.Checked Then
|
||||
txtAlt_donnerstag.Visible = True
|
||||
cbxAlt_donnerstag.Visible = True
|
||||
'txtAlt_donnerstag.Visible = True
|
||||
Else
|
||||
txtAlt_donnerstag.Visible = False
|
||||
cbxAlt_donnerstag.Visible = False
|
||||
'txtAlt_donnerstag.Visible = False
|
||||
End If
|
||||
|
||||
If rbMenuAlt_freitag.Checked Then
|
||||
txtAlt_freitag.Visible = True
|
||||
cbxAlt_freitag.Visible = True
|
||||
'txtAlt_freitag.Visible = True
|
||||
Else
|
||||
txtAlt_freitag.Visible = False
|
||||
cbxAlt_freitag.Visible = False
|
||||
'txtAlt_freitag.Visible = False
|
||||
End If
|
||||
countChecks()
|
||||
End Sub
|
||||
@@ -273,7 +295,7 @@ Public Class frmEssensbestellungen
|
||||
End If
|
||||
|
||||
Else
|
||||
rbMenu_dienstag.Enabled = False
|
||||
rbMenu_dienstag.Enabled = False
|
||||
rbMenuAlt_dienstag.Enabled = False
|
||||
txtAlt_dienstag.Text = ""
|
||||
End If
|
||||
@@ -288,7 +310,7 @@ Public Class frmEssensbestellungen
|
||||
End If
|
||||
|
||||
Else
|
||||
rbMenu_mittwoch.Enabled = False
|
||||
rbMenu_mittwoch.Enabled = False
|
||||
rbMenuAlt_mittwoch.Enabled = False
|
||||
txtAlt_mittwoch.Text = ""
|
||||
End If
|
||||
@@ -304,7 +326,7 @@ Public Class frmEssensbestellungen
|
||||
End If
|
||||
|
||||
Else
|
||||
rbMenu_donnerstag.Enabled = False
|
||||
rbMenu_donnerstag.Enabled = False
|
||||
rbMenuAlt_donnerstag.Enabled = False
|
||||
txtAlt_donnerstag.Text = ""
|
||||
End If
|
||||
@@ -319,7 +341,7 @@ Public Class frmEssensbestellungen
|
||||
End If
|
||||
|
||||
Else
|
||||
rbMenu__freitag.Enabled = False
|
||||
rbMenu__freitag.Enabled = False
|
||||
rbMenuAlt_freitag.Enabled = False
|
||||
txtAlt_freitag.Text = ""
|
||||
End If
|
||||
@@ -411,8 +433,12 @@ Public Class frmEssensbestellungen
|
||||
|
||||
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
|
||||
@@ -425,6 +451,16 @@ Public Class frmEssensbestellungen
|
||||
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
|
||||
@@ -432,7 +468,17 @@ Public Class frmEssensbestellungen
|
||||
|
||||
txtAnzahlMenu.Text = countMenus.ToString()
|
||||
txtAnzahlLaCart.Text = countlaCarte.ToString
|
||||
txtPreis.Text = (CDbl(countlaCarte) + CDbl(countMenus)) * preisProMahlzeit 'IIf(bestellung.eb_storniert, preisProMahlzeit * 0, preisProMahlzeit * 1)
|
||||
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
|
||||
@@ -505,19 +551,27 @@ Public Class frmEssensbestellungen
|
||||
rbMenu_montag.Checked = True
|
||||
Else
|
||||
rbMenuAlt_montag.Checked = True
|
||||
If currentEssen.eb_montag IsNot Nothing Then txtAlt_montag.Text = currentEssen.eb_montag.ToString
|
||||
If currentEssen.eb_montag IsNot Nothing Then cbxAlt_montag.changeItem(currentEssen.eb_montag.ToString)
|
||||
If cbxAlt_montag.SelectedValue = Nothing Then
|
||||
cbxAlt_montag.Text = currentEssen.eb_montag.ToString
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
cb_montag.Checked = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If currentEssen.eb_dienstag IsNot Nothing Then
|
||||
cb_dienstag.Checked = True
|
||||
If currentEssen.eb_dienstag.ToString = menu Then
|
||||
rbMenu_dienstag.Checked = True
|
||||
Else
|
||||
rbMenuAlt_dienstag.Checked = True
|
||||
If currentEssen.eb_dienstag IsNot Nothing Then txtAlt_dienstag.Text = currentEssen.eb_dienstag.ToString
|
||||
If currentEssen.eb_dienstag IsNot Nothing Then cbxAlt_dienstag.changeItem(currentEssen.eb_dienstag.ToString)
|
||||
If cbxAlt_dienstag.SelectedValue = Nothing Then
|
||||
cbxAlt_dienstag.Text = currentEssen.eb_dienstag.ToString
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
cb_dienstag.Checked = False
|
||||
@@ -530,32 +584,43 @@ Public Class frmEssensbestellungen
|
||||
rbMenu_mittwoch.Checked = True
|
||||
Else
|
||||
rbMenuAlt_mittwoch.Checked = True
|
||||
If currentEssen.eb_mittwoch IsNot Nothing Then txtAlt_mittwoch.Text = currentEssen.eb_mittwoch.ToString
|
||||
If currentEssen.eb_mittwoch IsNot Nothing Then cbxAlt_mittwoch.changeItem(currentEssen.eb_mittwoch.ToString)
|
||||
If cbxAlt_mittwoch.SelectedValue = Nothing Then
|
||||
cbxAlt_mittwoch.Text = currentEssen.eb_mittwoch.ToString
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
cb_mittwoch.Checked = False
|
||||
End If
|
||||
|
||||
|
||||
If currentEssen.eb_donnerstag IsNot Nothing Then
|
||||
cbdonnerstag.Checked = True
|
||||
If currentEssen.eb_donnerstag.ToString = menu Then
|
||||
rbMenu_donnerstag.Checked = True
|
||||
Else
|
||||
rbMenuAlt_donnerstag.Checked = True
|
||||
If currentEssen.eb_donnerstag IsNot Nothing Then txtAlt_donnerstag.Text = currentEssen.eb_donnerstag.ToString
|
||||
If currentEssen.eb_donnerstag IsNot Nothing Then cbxAlt_donnerstag.changeItem(currentEssen.eb_donnerstag.ToString)
|
||||
If cbxAlt_donnerstag.SelectedValue = Nothing Then
|
||||
cbxAlt_donnerstag.Text = currentEssen.eb_donnerstag.ToString
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
cbdonnerstag.Checked = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If currentEssen.eb_freitag IsNot Nothing Then
|
||||
cb_freitag.Checked = True
|
||||
If currentEssen.eb_freitag.ToString = menu Then
|
||||
rbMenu__freitag.Checked = True
|
||||
Else
|
||||
rbMenuAlt_freitag.Checked = True
|
||||
If currentEssen.eb_freitag IsNot Nothing Then txtAlt_freitag.Text = currentEssen.eb_freitag.ToString
|
||||
If currentEssen.eb_freitag IsNot Nothing Then cbxAlt_freitag.changeItem(currentEssen.eb_freitag.ToString)
|
||||
If cbxAlt_freitag.SelectedValue = Nothing Then
|
||||
cbxAlt_freitag.Text = currentEssen.eb_freitag.ToString
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
cb_freitag.Checked = False
|
||||
@@ -645,6 +710,11 @@ Public Class frmEssensbestellungen
|
||||
Process.Start(webAddress)
|
||||
End Sub
|
||||
|
||||
Private Sub cbxAlt_freitag_SelectedIndexChanged(sender As Object, e As EventArgs) Handles cbxAlt_montag.SelectedValueChanged, cbxAlt_dienstag.SelectedValueChanged, cbxAlt_mittwoch.SelectedValueChanged, cbxAlt_donnerstag.SelectedValueChanged, cbxAlt_freitag.SelectedValueChanged, cbxAlt_montag.TextChanged, cbxAlt_dienstag.TextChanged, cbxAlt_mittwoch.TextChanged, cbxAlt_donnerstag.TextChanged, cbxAlt_freitag.TextChanged
|
||||
countChecks()
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
|
||||
cbxMenu.changeItem("")
|
||||
End Sub
|
||||
|
||||
Reference in New Issue
Block a user