diff --git a/Aviso/frmEssensbestellungen.Designer.vb b/Aviso/frmEssensbestellungen.Designer.vb index 43b1b1e..cf1a3fa 100644 --- a/Aviso/frmEssensbestellungen.Designer.vb +++ b/Aviso/frmEssensbestellungen.Designer.vb @@ -30,30 +30,35 @@ Partial Class frmEssensbestellungen Me.btnSave = New System.Windows.Forms.Button() Me.lblDatum = New System.Windows.Forms.Label() Me.GroupBox1 = New System.Windows.Forms.GroupBox() + Me.pbMontag = New System.Windows.Forms.PictureBox() Me.cbMontag = New System.Windows.Forms.CheckBox() Me.txtAltMo = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.rbMenoAltMo = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.rbMenuMo = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.GroupBox2 = New System.Windows.Forms.GroupBox() + Me.rbMenoAlt_Mo = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenu_Mo = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.Dienstag = New System.Windows.Forms.GroupBox() + Me.pbDienstag = New System.Windows.Forms.PictureBox() Me.cbDienstag = New System.Windows.Forms.CheckBox() Me.txtAltDi = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.rbMenuAltDi = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.rbMenuDi = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.GroupBox3 = New System.Windows.Forms.GroupBox() + Me.rbMenuAlt_Di = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenu_Di = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.Mittwoch = New System.Windows.Forms.GroupBox() + Me.pbMittwoch = New System.Windows.Forms.PictureBox() Me.cbMittwoch = New System.Windows.Forms.CheckBox() Me.txtAltMi = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.rbMenuAltMi = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.rbMenuMi = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenuAlt_Mi = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenu_Mi = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) Me.GroupBox4 = New System.Windows.Forms.GroupBox() + Me.pbDonnerstag = New System.Windows.Forms.PictureBox() Me.cbDonnerstag = New System.Windows.Forms.CheckBox() Me.txtAltDo = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.rbMenuAltDo = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.rbMenuDo = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenuAlt_Do = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenu_Do = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) Me.GroupBox5 = New System.Windows.Forms.GroupBox() + Me.pbFreitag = New System.Windows.Forms.PictureBox() Me.cbFreitag = New System.Windows.Forms.CheckBox() Me.txtAltFr = New VERAG_PROG_ALLGEMEIN.MyTextBox() - Me.rbMenuFrAlt = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) - Me.rbMenuFr = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenuAlt_Fr = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) + Me.rbMenu_Fr = New VERAG_PROG_ALLGEMEIN.MyRadioButton(Me.components) Me.lbl1 = New System.Windows.Forms.Label() Me.lbl2 = New System.Windows.Forms.Label() Me.txtAnzahlMenu = New System.Windows.Forms.Label() @@ -64,15 +69,27 @@ Partial Class frmEssensbestellungen Me.ToolTipInfoDo = New System.Windows.Forms.ToolTip(Me.components) Me.ToolTipInfoFr = New System.Windows.Forms.ToolTip(Me.components) Me.dgvBestellungen = New VERAG_PROG_ALLGEMEIN.MyDatagridview(Me.components) - Me.MyComboBox1 = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.cbxMenu = New VERAG_PROG_ALLGEMEIN.MyComboBox() Me.lblAbteilung = New System.Windows.Forms.Label() Me.lblGebaeude = New System.Windows.Forms.Label() + Me.MyPanel1 = New VERAG_PROG_ALLGEMEIN.MyPanel(Me.components) + Me.lblBestellungen = New System.Windows.Forms.Label() + Me.txtPreis = New System.Windows.Forms.Label() + Me.Label2 = New System.Windows.Forms.Label() + Me.cbxGebauede = New VERAG_PROG_ALLGEMEIN.MyComboBox() + Me.lblBestellungBis = New System.Windows.Forms.Label() Me.GroupBox1.SuspendLayout() - Me.GroupBox2.SuspendLayout() - Me.GroupBox3.SuspendLayout() + CType(Me.pbMontag, System.ComponentModel.ISupportInitialize).BeginInit() + Me.Dienstag.SuspendLayout() + CType(Me.pbDienstag, System.ComponentModel.ISupportInitialize).BeginInit() + Me.Mittwoch.SuspendLayout() + CType(Me.pbMittwoch, System.ComponentModel.ISupportInitialize).BeginInit() Me.GroupBox4.SuspendLayout() + CType(Me.pbDonnerstag, System.ComponentModel.ISupportInitialize).BeginInit() Me.GroupBox5.SuspendLayout() + CType(Me.pbFreitag, System.ComponentModel.ISupportInitialize).BeginInit() CType(Me.dgvBestellungen, System.ComponentModel.ISupportInitialize).BeginInit() + Me.MyPanel1.SuspendLayout() Me.SuspendLayout() ' 'lblWochenkarte @@ -86,7 +103,7 @@ Partial Class frmEssensbestellungen ' 'btnSave ' - Me.btnSave.Location = New System.Drawing.Point(565, 249) + Me.btnSave.Location = New System.Drawing.Point(305, 484) Me.btnSave.Name = "btnSave" Me.btnSave.Size = New System.Drawing.Size(75, 23) Me.btnSave.TabIndex = 10 @@ -104,17 +121,28 @@ Partial Class frmEssensbestellungen ' 'GroupBox1 ' + Me.GroupBox1.Controls.Add(Me.pbMontag) Me.GroupBox1.Controls.Add(Me.cbMontag) Me.GroupBox1.Controls.Add(Me.txtAltMo) - Me.GroupBox1.Controls.Add(Me.rbMenoAltMo) - Me.GroupBox1.Controls.Add(Me.rbMenuMo) - Me.GroupBox1.Location = New System.Drawing.Point(15, 67) + Me.GroupBox1.Controls.Add(Me.rbMenoAlt_Mo) + Me.GroupBox1.Controls.Add(Me.rbMenu_Mo) + Me.GroupBox1.Location = New System.Drawing.Point(6, 8) Me.GroupBox1.Name = "GroupBox1" Me.GroupBox1.Size = New System.Drawing.Size(200, 95) Me.GroupBox1.TabIndex = 12 Me.GroupBox1.TabStop = False Me.GroupBox1.Text = "Montag" ' + 'pbMontag + ' + Me.pbMontag.Image = Global.AVISO.My.Resources.Resources.documents + Me.pbMontag.Location = New System.Drawing.Point(61, 23) + Me.pbMontag.Name = "pbMontag" + Me.pbMontag.Size = New System.Drawing.Size(17, 13) + Me.pbMontag.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.pbMontag.TabIndex = 4 + Me.pbMontag.TabStop = False + ' 'cbMontag ' Me.cbMontag.AutoSize = True @@ -149,42 +177,53 @@ Partial Class frmEssensbestellungen Me.txtAltMo.TabIndex = 2 Me.txtAltMo.Visible = False ' - 'rbMenoAltMo + 'rbMenoAlt_Mo ' - Me.rbMenoAltMo.AutoSize = True - Me.rbMenoAltMo.GroupName = "GroupBox1" - Me.rbMenoAltMo.Location = New System.Drawing.Point(3, 42) - Me.rbMenoAltMo.Name = "rbMenoAltMo" - Me.rbMenoAltMo.Size = New System.Drawing.Size(70, 17) - Me.rbMenoAltMo.TabIndex = 1 - Me.rbMenoAltMo.TabStop = True - Me.rbMenoAltMo.Text = "A la carte" - Me.rbMenoAltMo.UseVisualStyleBackColor = True + Me.rbMenoAlt_Mo.AutoSize = True + Me.rbMenoAlt_Mo.GroupName = "GroupBox1" + Me.rbMenoAlt_Mo.Location = New System.Drawing.Point(3, 42) + Me.rbMenoAlt_Mo.Name = "rbMenoAlt_Mo" + Me.rbMenoAlt_Mo.Size = New System.Drawing.Size(70, 17) + Me.rbMenoAlt_Mo.TabIndex = 1 + Me.rbMenoAlt_Mo.TabStop = True + Me.rbMenoAlt_Mo.Text = "A la carte" + Me.rbMenoAlt_Mo.UseVisualStyleBackColor = True ' - 'rbMenuMo + 'rbMenu_Mo ' - Me.rbMenuMo.AutoSize = True - Me.rbMenuMo.GroupName = "GroupBox1" - Me.rbMenuMo.Location = New System.Drawing.Point(3, 19) - Me.rbMenuMo.Name = "rbMenuMo" - Me.rbMenuMo.Size = New System.Drawing.Size(52, 17) - Me.rbMenuMo.TabIndex = 0 - Me.rbMenuMo.TabStop = True - Me.rbMenuMo.Text = "Menü" - Me.rbMenuMo.UseVisualStyleBackColor = True + Me.rbMenu_Mo.AutoSize = True + Me.rbMenu_Mo.GroupName = "GroupBox1" + Me.rbMenu_Mo.Location = New System.Drawing.Point(3, 19) + Me.rbMenu_Mo.Name = "rbMenu_Mo" + Me.rbMenu_Mo.Size = New System.Drawing.Size(52, 17) + Me.rbMenu_Mo.TabIndex = 0 + Me.rbMenu_Mo.TabStop = True + Me.rbMenu_Mo.Text = "Menü" + Me.rbMenu_Mo.UseVisualStyleBackColor = True ' - 'GroupBox2 + 'Dienstag ' - Me.GroupBox2.Controls.Add(Me.cbDienstag) - Me.GroupBox2.Controls.Add(Me.txtAltDi) - Me.GroupBox2.Controls.Add(Me.rbMenuAltDi) - Me.GroupBox2.Controls.Add(Me.rbMenuDi) - Me.GroupBox2.Location = New System.Drawing.Point(234, 67) - Me.GroupBox2.Name = "GroupBox2" - Me.GroupBox2.Size = New System.Drawing.Size(200, 95) - Me.GroupBox2.TabIndex = 13 - Me.GroupBox2.TabStop = False - Me.GroupBox2.Text = "Dienstag" + Me.Dienstag.Controls.Add(Me.pbDienstag) + Me.Dienstag.Controls.Add(Me.cbDienstag) + Me.Dienstag.Controls.Add(Me.txtAltDi) + Me.Dienstag.Controls.Add(Me.rbMenuAlt_Di) + Me.Dienstag.Controls.Add(Me.rbMenu_Di) + Me.Dienstag.Location = New System.Drawing.Point(225, 8) + Me.Dienstag.Name = "Dienstag" + Me.Dienstag.Size = New System.Drawing.Size(200, 95) + Me.Dienstag.TabIndex = 13 + Me.Dienstag.TabStop = False + Me.Dienstag.Text = "Dienstag" + ' + 'pbDienstag + ' + Me.pbDienstag.Image = Global.AVISO.My.Resources.Resources.documents + Me.pbDienstag.Location = New System.Drawing.Point(61, 23) + Me.pbDienstag.Name = "pbDienstag" + Me.pbDienstag.Size = New System.Drawing.Size(17, 13) + Me.pbDienstag.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.pbDienstag.TabIndex = 5 + Me.pbDienstag.TabStop = False ' 'cbDienstag ' @@ -220,42 +259,53 @@ Partial Class frmEssensbestellungen Me.txtAltDi.TabIndex = 2 Me.txtAltDi.Visible = False ' - 'rbMenuAltDi + 'rbMenuAlt_Di ' - Me.rbMenuAltDi.AutoSize = True - Me.rbMenuAltDi.GroupName = Nothing - Me.rbMenuAltDi.Location = New System.Drawing.Point(3, 42) - Me.rbMenuAltDi.Name = "rbMenuAltDi" - Me.rbMenuAltDi.Size = New System.Drawing.Size(70, 17) - Me.rbMenuAltDi.TabIndex = 1 - Me.rbMenuAltDi.TabStop = True - Me.rbMenuAltDi.Text = "A la carte" - Me.rbMenuAltDi.UseVisualStyleBackColor = True + Me.rbMenuAlt_Di.AutoSize = True + Me.rbMenuAlt_Di.GroupName = "Dienstag" + Me.rbMenuAlt_Di.Location = New System.Drawing.Point(3, 42) + Me.rbMenuAlt_Di.Name = "rbMenuAlt_Di" + Me.rbMenuAlt_Di.Size = New System.Drawing.Size(70, 17) + Me.rbMenuAlt_Di.TabIndex = 1 + Me.rbMenuAlt_Di.TabStop = True + Me.rbMenuAlt_Di.Text = "A la carte" + Me.rbMenuAlt_Di.UseVisualStyleBackColor = True ' - 'rbMenuDi + 'rbMenu_Di ' - Me.rbMenuDi.AutoSize = True - Me.rbMenuDi.GroupName = Nothing - Me.rbMenuDi.Location = New System.Drawing.Point(3, 19) - Me.rbMenuDi.Name = "rbMenuDi" - Me.rbMenuDi.Size = New System.Drawing.Size(52, 17) - Me.rbMenuDi.TabIndex = 0 - Me.rbMenuDi.TabStop = True - Me.rbMenuDi.Text = "Menü" - Me.rbMenuDi.UseVisualStyleBackColor = True + Me.rbMenu_Di.AutoSize = True + Me.rbMenu_Di.GroupName = "Dienstag" + Me.rbMenu_Di.Location = New System.Drawing.Point(3, 19) + Me.rbMenu_Di.Name = "rbMenu_Di" + Me.rbMenu_Di.Size = New System.Drawing.Size(52, 17) + Me.rbMenu_Di.TabIndex = 0 + Me.rbMenu_Di.TabStop = True + Me.rbMenu_Di.Text = "Menü" + Me.rbMenu_Di.UseVisualStyleBackColor = True ' - 'GroupBox3 + 'Mittwoch ' - Me.GroupBox3.Controls.Add(Me.cbMittwoch) - Me.GroupBox3.Controls.Add(Me.txtAltMi) - Me.GroupBox3.Controls.Add(Me.rbMenuAltMi) - Me.GroupBox3.Controls.Add(Me.rbMenuMi) - Me.GroupBox3.Location = New System.Drawing.Point(440, 67) - Me.GroupBox3.Name = "GroupBox3" - Me.GroupBox3.Size = New System.Drawing.Size(200, 95) - Me.GroupBox3.TabIndex = 13 - Me.GroupBox3.TabStop = False - Me.GroupBox3.Text = "Mittwoch" + Me.Mittwoch.Controls.Add(Me.pbMittwoch) + Me.Mittwoch.Controls.Add(Me.cbMittwoch) + Me.Mittwoch.Controls.Add(Me.txtAltMi) + Me.Mittwoch.Controls.Add(Me.rbMenuAlt_Mi) + Me.Mittwoch.Controls.Add(Me.rbMenu_Mi) + Me.Mittwoch.Location = New System.Drawing.Point(431, 8) + Me.Mittwoch.Name = "Mittwoch" + Me.Mittwoch.Size = New System.Drawing.Size(200, 95) + Me.Mittwoch.TabIndex = 13 + Me.Mittwoch.TabStop = False + Me.Mittwoch.Text = "Mittwoch" + ' + 'pbMittwoch + ' + Me.pbMittwoch.Image = Global.AVISO.My.Resources.Resources.documents + Me.pbMittwoch.Location = New System.Drawing.Point(56, 23) + Me.pbMittwoch.Name = "pbMittwoch" + Me.pbMittwoch.Size = New System.Drawing.Size(17, 13) + Me.pbMittwoch.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.pbMittwoch.TabIndex = 6 + Me.pbMittwoch.TabStop = False ' 'cbMittwoch ' @@ -291,43 +341,54 @@ Partial Class frmEssensbestellungen Me.txtAltMi.TabIndex = 2 Me.txtAltMi.Visible = False ' - 'rbMenuAltMi + 'rbMenuAlt_Mi ' - Me.rbMenuAltMi.AutoSize = True - Me.rbMenuAltMi.GroupName = Nothing - Me.rbMenuAltMi.Location = New System.Drawing.Point(3, 42) - Me.rbMenuAltMi.Name = "rbMenuAltMi" - Me.rbMenuAltMi.Size = New System.Drawing.Size(70, 17) - Me.rbMenuAltMi.TabIndex = 1 - Me.rbMenuAltMi.TabStop = True - Me.rbMenuAltMi.Text = "A la carte" - Me.rbMenuAltMi.UseVisualStyleBackColor = True + Me.rbMenuAlt_Mi.AutoSize = True + Me.rbMenuAlt_Mi.GroupName = "Mittwoch" + Me.rbMenuAlt_Mi.Location = New System.Drawing.Point(3, 42) + Me.rbMenuAlt_Mi.Name = "rbMenuAlt_Mi" + Me.rbMenuAlt_Mi.Size = New System.Drawing.Size(70, 17) + Me.rbMenuAlt_Mi.TabIndex = 1 + Me.rbMenuAlt_Mi.TabStop = True + Me.rbMenuAlt_Mi.Text = "A la carte" + Me.rbMenuAlt_Mi.UseVisualStyleBackColor = True ' - 'rbMenuMi + 'rbMenu_Mi ' - Me.rbMenuMi.AutoSize = True - Me.rbMenuMi.GroupName = Nothing - Me.rbMenuMi.Location = New System.Drawing.Point(3, 19) - Me.rbMenuMi.Name = "rbMenuMi" - Me.rbMenuMi.Size = New System.Drawing.Size(52, 17) - Me.rbMenuMi.TabIndex = 0 - Me.rbMenuMi.TabStop = True - Me.rbMenuMi.Text = "Menü" - Me.rbMenuMi.UseVisualStyleBackColor = True + Me.rbMenu_Mi.AutoSize = True + Me.rbMenu_Mi.GroupName = "Mittwoch" + Me.rbMenu_Mi.Location = New System.Drawing.Point(3, 19) + Me.rbMenu_Mi.Name = "rbMenu_Mi" + Me.rbMenu_Mi.Size = New System.Drawing.Size(52, 17) + Me.rbMenu_Mi.TabIndex = 0 + Me.rbMenu_Mi.TabStop = True + Me.rbMenu_Mi.Text = "Menü" + Me.rbMenu_Mi.UseVisualStyleBackColor = True ' 'GroupBox4 ' + Me.GroupBox4.Controls.Add(Me.pbDonnerstag) Me.GroupBox4.Controls.Add(Me.cbDonnerstag) Me.GroupBox4.Controls.Add(Me.txtAltDo) - Me.GroupBox4.Controls.Add(Me.rbMenuAltDo) - Me.GroupBox4.Controls.Add(Me.rbMenuDo) - Me.GroupBox4.Location = New System.Drawing.Point(12, 168) + Me.GroupBox4.Controls.Add(Me.rbMenuAlt_Do) + Me.GroupBox4.Controls.Add(Me.rbMenu_Do) + Me.GroupBox4.Location = New System.Drawing.Point(3, 109) Me.GroupBox4.Name = "GroupBox4" Me.GroupBox4.Size = New System.Drawing.Size(200, 95) Me.GroupBox4.TabIndex = 13 Me.GroupBox4.TabStop = False Me.GroupBox4.Text = "Donnerstag" ' + 'pbDonnerstag + ' + Me.pbDonnerstag.Image = Global.AVISO.My.Resources.Resources.documents + Me.pbDonnerstag.Location = New System.Drawing.Point(56, 21) + Me.pbDonnerstag.Name = "pbDonnerstag" + Me.pbDonnerstag.Size = New System.Drawing.Size(17, 13) + Me.pbDonnerstag.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.pbDonnerstag.TabIndex = 7 + Me.pbDonnerstag.TabStop = False + ' 'cbDonnerstag ' Me.cbDonnerstag.AutoSize = True @@ -362,43 +423,54 @@ Partial Class frmEssensbestellungen Me.txtAltDo.TabIndex = 2 Me.txtAltDo.Visible = False ' - 'rbMenuAltDo + 'rbMenuAlt_Do ' - Me.rbMenuAltDo.AutoSize = True - Me.rbMenuAltDo.GroupName = Nothing - Me.rbMenuAltDo.Location = New System.Drawing.Point(3, 42) - Me.rbMenuAltDo.Name = "rbMenuAltDo" - Me.rbMenuAltDo.Size = New System.Drawing.Size(70, 17) - Me.rbMenuAltDo.TabIndex = 1 - Me.rbMenuAltDo.TabStop = True - Me.rbMenuAltDo.Text = "A la carte" - Me.rbMenuAltDo.UseVisualStyleBackColor = True + Me.rbMenuAlt_Do.AutoSize = True + Me.rbMenuAlt_Do.GroupName = "Donnerstag" + Me.rbMenuAlt_Do.Location = New System.Drawing.Point(3, 42) + Me.rbMenuAlt_Do.Name = "rbMenuAlt_Do" + Me.rbMenuAlt_Do.Size = New System.Drawing.Size(70, 17) + Me.rbMenuAlt_Do.TabIndex = 1 + Me.rbMenuAlt_Do.TabStop = True + Me.rbMenuAlt_Do.Text = "A la carte" + Me.rbMenuAlt_Do.UseVisualStyleBackColor = True ' - 'rbMenuDo + 'rbMenu_Do ' - Me.rbMenuDo.AutoSize = True - Me.rbMenuDo.GroupName = Nothing - Me.rbMenuDo.Location = New System.Drawing.Point(3, 19) - Me.rbMenuDo.Name = "rbMenuDo" - Me.rbMenuDo.Size = New System.Drawing.Size(52, 17) - Me.rbMenuDo.TabIndex = 0 - Me.rbMenuDo.TabStop = True - Me.rbMenuDo.Text = "Menü" - Me.rbMenuDo.UseVisualStyleBackColor = True + Me.rbMenu_Do.AutoSize = True + Me.rbMenu_Do.GroupName = "Donnerstag" + Me.rbMenu_Do.Location = New System.Drawing.Point(3, 19) + Me.rbMenu_Do.Name = "rbMenu_Do" + Me.rbMenu_Do.Size = New System.Drawing.Size(52, 17) + Me.rbMenu_Do.TabIndex = 0 + Me.rbMenu_Do.TabStop = True + Me.rbMenu_Do.Text = "Menü" + Me.rbMenu_Do.UseVisualStyleBackColor = True ' 'GroupBox5 ' + Me.GroupBox5.Controls.Add(Me.pbFreitag) Me.GroupBox5.Controls.Add(Me.cbFreitag) Me.GroupBox5.Controls.Add(Me.txtAltFr) - Me.GroupBox5.Controls.Add(Me.rbMenuFrAlt) - Me.GroupBox5.Controls.Add(Me.rbMenuFr) - Me.GroupBox5.Location = New System.Drawing.Point(234, 168) + Me.GroupBox5.Controls.Add(Me.rbMenuAlt_Fr) + Me.GroupBox5.Controls.Add(Me.rbMenu_Fr) + Me.GroupBox5.Location = New System.Drawing.Point(225, 109) Me.GroupBox5.Name = "GroupBox5" Me.GroupBox5.Size = New System.Drawing.Size(200, 95) Me.GroupBox5.TabIndex = 13 Me.GroupBox5.TabStop = False Me.GroupBox5.Text = "Freitag" ' + 'pbFreitag + ' + Me.pbFreitag.Image = Global.AVISO.My.Resources.Resources.documents + Me.pbFreitag.Location = New System.Drawing.Point(61, 23) + Me.pbFreitag.Name = "pbFreitag" + Me.pbFreitag.Size = New System.Drawing.Size(17, 13) + Me.pbFreitag.SizeMode = System.Windows.Forms.PictureBoxSizeMode.StretchImage + Me.pbFreitag.TabIndex = 8 + Me.pbFreitag.TabStop = False + ' 'cbFreitag ' Me.cbFreitag.AutoSize = True @@ -433,34 +505,34 @@ Partial Class frmEssensbestellungen Me.txtAltFr.TabIndex = 2 Me.txtAltFr.Visible = False ' - 'rbMenuFrAlt + 'rbMenuAlt_Fr ' - Me.rbMenuFrAlt.AutoSize = True - Me.rbMenuFrAlt.GroupName = Nothing - Me.rbMenuFrAlt.Location = New System.Drawing.Point(3, 42) - Me.rbMenuFrAlt.Name = "rbMenuFrAlt" - Me.rbMenuFrAlt.Size = New System.Drawing.Size(70, 17) - Me.rbMenuFrAlt.TabIndex = 1 - Me.rbMenuFrAlt.TabStop = True - Me.rbMenuFrAlt.Text = "A la carte" - Me.rbMenuFrAlt.UseVisualStyleBackColor = True + Me.rbMenuAlt_Fr.AutoSize = True + Me.rbMenuAlt_Fr.GroupName = "Freitag" + Me.rbMenuAlt_Fr.Location = New System.Drawing.Point(3, 42) + Me.rbMenuAlt_Fr.Name = "rbMenuAlt_Fr" + Me.rbMenuAlt_Fr.Size = New System.Drawing.Size(70, 17) + Me.rbMenuAlt_Fr.TabIndex = 1 + Me.rbMenuAlt_Fr.TabStop = True + Me.rbMenuAlt_Fr.Text = "A la carte" + Me.rbMenuAlt_Fr.UseVisualStyleBackColor = True ' - 'rbMenuFr + 'rbMenu_Fr ' - Me.rbMenuFr.AutoSize = True - Me.rbMenuFr.GroupName = Nothing - Me.rbMenuFr.Location = New System.Drawing.Point(3, 19) - Me.rbMenuFr.Name = "rbMenuFr" - Me.rbMenuFr.Size = New System.Drawing.Size(52, 17) - Me.rbMenuFr.TabIndex = 0 - Me.rbMenuFr.TabStop = True - Me.rbMenuFr.Text = "Menü" - Me.rbMenuFr.UseVisualStyleBackColor = True + Me.rbMenu_Fr.AutoSize = True + Me.rbMenu_Fr.GroupName = "Freitag" + Me.rbMenu_Fr.Location = New System.Drawing.Point(3, 19) + Me.rbMenu_Fr.Name = "rbMenu_Fr" + Me.rbMenu_Fr.Size = New System.Drawing.Size(52, 17) + Me.rbMenu_Fr.TabIndex = 0 + Me.rbMenu_Fr.TabStop = True + Me.rbMenu_Fr.Text = "Menü" + Me.rbMenu_Fr.UseVisualStyleBackColor = True ' 'lbl1 ' Me.lbl1.AutoSize = True - Me.lbl1.Location = New System.Drawing.Point(472, 187) + Me.lbl1.Location = New System.Drawing.Point(463, 128) Me.lbl1.Name = "lbl1" Me.lbl1.Size = New System.Drawing.Size(72, 13) Me.lbl1.TabIndex = 14 @@ -469,7 +541,7 @@ Partial Class frmEssensbestellungen 'lbl2 ' Me.lbl2.AutoSize = True - Me.lbl2.Location = New System.Drawing.Point(472, 214) + Me.lbl2.Location = New System.Drawing.Point(463, 155) Me.lbl2.Name = "lbl2" Me.lbl2.Size = New System.Drawing.Size(90, 13) Me.lbl2.TabIndex = 15 @@ -478,7 +550,7 @@ Partial Class frmEssensbestellungen 'txtAnzahlMenu ' Me.txtAnzahlMenu.AutoSize = True - Me.txtAnzahlMenu.Location = New System.Drawing.Point(562, 189) + Me.txtAnzahlMenu.Location = New System.Drawing.Point(553, 130) Me.txtAnzahlMenu.Name = "txtAnzahlMenu" Me.txtAnzahlMenu.Size = New System.Drawing.Size(13, 13) Me.txtAnzahlMenu.TabIndex = 16 @@ -487,7 +559,7 @@ Partial Class frmEssensbestellungen 'txtAnzahlLaCart ' Me.txtAnzahlLaCart.AutoSize = True - Me.txtAnzahlLaCart.Location = New System.Drawing.Point(562, 214) + Me.txtAnzahlLaCart.Location = New System.Drawing.Point(553, 155) Me.txtAnzahlLaCart.Name = "txtAnzahlLaCart" Me.txtAnzahlLaCart.Size = New System.Drawing.Size(13, 13) Me.txtAnzahlLaCart.TabIndex = 17 @@ -517,8 +589,9 @@ Partial Class frmEssensbestellungen DataGridViewCellStyle5.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle5.WrapMode = System.Windows.Forms.DataGridViewTriState.[False] Me.dgvBestellungen.DefaultCellStyle = DataGridViewCellStyle5 - Me.dgvBestellungen.Location = New System.Drawing.Point(12, 298) + Me.dgvBestellungen.Location = New System.Drawing.Point(12, 351) Me.dgvBestellungen.Name = "dgvBestellungen" + Me.dgvBestellungen.ReadOnly = True DataGridViewCellStyle6.Alignment = System.Windows.Forms.DataGridViewContentAlignment.MiddleLeft DataGridViewCellStyle6.BackColor = System.Drawing.SystemColors.Control DataGridViewCellStyle6.Font = New System.Drawing.Font("Microsoft Sans Serif", 8.25!, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, CType(0, Byte)) @@ -527,24 +600,26 @@ Partial Class frmEssensbestellungen DataGridViewCellStyle6.SelectionForeColor = System.Drawing.SystemColors.HighlightText DataGridViewCellStyle6.WrapMode = System.Windows.Forms.DataGridViewTriState.[True] Me.dgvBestellungen.RowHeadersDefaultCellStyle = DataGridViewCellStyle6 - Me.dgvBestellungen.Size = New System.Drawing.Size(528, 150) + Me.dgvBestellungen.SelectionMode = System.Windows.Forms.DataGridViewSelectionMode.FullRowSelect + Me.dgvBestellungen.ShowEditingIcon = False + Me.dgvBestellungen.Size = New System.Drawing.Size(663, 127) Me.dgvBestellungen.TabIndex = 2 ' - 'MyComboBox1 + 'cbxMenu ' - Me.MyComboBox1._allowedValuesFreiText = Nothing - Me.MyComboBox1._allowFreiText = False - Me.MyComboBox1._value = "" - Me.MyComboBox1.FormattingEnabled = True - Me.MyComboBox1.Location = New System.Drawing.Point(12, 30) - Me.MyComboBox1.Name = "MyComboBox1" - Me.MyComboBox1.Size = New System.Drawing.Size(95, 21) - Me.MyComboBox1.TabIndex = 0 + Me.cbxMenu._allowedValuesFreiText = Nothing + Me.cbxMenu._allowFreiText = False + Me.cbxMenu._value = "" + Me.cbxMenu.FormattingEnabled = True + Me.cbxMenu.Location = New System.Drawing.Point(12, 30) + Me.cbxMenu.Name = "cbxMenu" + Me.cbxMenu.Size = New System.Drawing.Size(95, 21) + Me.cbxMenu.TabIndex = 0 ' 'lblAbteilung ' Me.lblAbteilung.AutoSize = True - Me.lblAbteilung.Location = New System.Drawing.Point(472, 9) + Me.lblAbteilung.Location = New System.Drawing.Point(511, 9) Me.lblAbteilung.Name = "lblAbteilung" Me.lblAbteilung.Size = New System.Drawing.Size(54, 13) Me.lblAbteilung.TabIndex = 18 @@ -553,76 +628,143 @@ Partial Class frmEssensbestellungen 'lblGebaeude ' Me.lblGebaeude.AutoSize = True - Me.lblGebaeude.Location = New System.Drawing.Point(472, 30) + Me.lblGebaeude.Location = New System.Drawing.Point(511, 27) Me.lblGebaeude.Name = "lblGebaeude" Me.lblGebaeude.Size = New System.Drawing.Size(54, 13) Me.lblGebaeude.TabIndex = 19 Me.lblGebaeude.Text = "Gebäude:" ' + 'MyPanel1 + ' + Me.MyPanel1.Controls.Add(Me.txtPreis) + Me.MyPanel1.Controls.Add(Me.Label2) + Me.MyPanel1.Controls.Add(Me.Dienstag) + Me.MyPanel1.Controls.Add(Me.lbl1) + Me.MyPanel1.Controls.Add(Me.GroupBox1) + Me.MyPanel1.Controls.Add(Me.GroupBox5) + Me.MyPanel1.Controls.Add(Me.txtAnzahlLaCart) + Me.MyPanel1.Controls.Add(Me.lbl2) + Me.MyPanel1.Controls.Add(Me.Mittwoch) + Me.MyPanel1.Controls.Add(Me.GroupBox4) + Me.MyPanel1.Controls.Add(Me.txtAnzahlMenu) + Me.MyPanel1.Location = New System.Drawing.Point(12, 67) + Me.MyPanel1.Name = "MyPanel1" + Me.MyPanel1.Size = New System.Drawing.Size(667, 240) + Me.MyPanel1.TabIndex = 18 + ' + 'lblBestellungen + ' + Me.lblBestellungen.AutoSize = True + Me.lblBestellungen.Location = New System.Drawing.Point(9, 335) + Me.lblBestellungen.Name = "lblBestellungen" + Me.lblBestellungen.Size = New System.Drawing.Size(100, 13) + Me.lblBestellungen.TabIndex = 20 + Me.lblBestellungen.Text = "Meine Bestellungen" + ' + 'txtPreis + ' + Me.txtPreis.AutoSize = True + Me.txtPreis.Location = New System.Drawing.Point(553, 181) + Me.txtPreis.Name = "txtPreis" + Me.txtPreis.Size = New System.Drawing.Size(13, 13) + Me.txtPreis.TabIndex = 19 + Me.txtPreis.Text = "0" + ' + 'Label2 + ' + Me.Label2.AutoSize = True + Me.Label2.Location = New System.Drawing.Point(463, 181) + Me.Label2.Name = "Label2" + Me.Label2.Size = New System.Drawing.Size(68, 13) + Me.Label2.TabIndex = 18 + Me.Label2.Text = "Gesamtpreis:" + ' + 'cbxGebauede + ' + Me.cbxGebauede._allowedValuesFreiText = Nothing + Me.cbxGebauede._allowFreiText = False + Me.cbxGebauede._value = "" + Me.cbxGebauede.FormattingEnabled = True + Me.cbxGebauede.Location = New System.Drawing.Point(580, 24) + Me.cbxGebauede.Name = "cbxGebauede" + Me.cbxGebauede.Size = New System.Drawing.Size(95, 21) + Me.cbxGebauede.TabIndex = 21 + ' + 'lblBestellungBis + ' + Me.lblBestellungBis.AutoSize = True + Me.lblBestellungBis.Location = New System.Drawing.Point(167, 38) + Me.lblBestellungBis.Name = "lblBestellungBis" + Me.lblBestellungBis.Size = New System.Drawing.Size(114, 13) + Me.lblBestellungBis.TabIndex = 22 + Me.lblBestellungBis.Text = "Bestellung möglich bis:" + ' 'frmEssensbestellungen ' Me.AutoScaleDimensions = New System.Drawing.SizeF(6.0!, 13.0!) Me.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font - Me.ClientSize = New System.Drawing.Size(680, 476) + Me.ClientSize = New System.Drawing.Size(687, 518) + Me.Controls.Add(Me.lblBestellungBis) + Me.Controls.Add(Me.cbxGebauede) + Me.Controls.Add(Me.lblBestellungen) + Me.Controls.Add(Me.MyPanel1) + Me.Controls.Add(Me.btnSave) Me.Controls.Add(Me.lblGebaeude) Me.Controls.Add(Me.lblAbteilung) - Me.Controls.Add(Me.txtAnzahlLaCart) - Me.Controls.Add(Me.txtAnzahlMenu) - Me.Controls.Add(Me.lbl2) - Me.Controls.Add(Me.lbl1) - Me.Controls.Add(Me.GroupBox5) - Me.Controls.Add(Me.GroupBox4) - Me.Controls.Add(Me.GroupBox3) - Me.Controls.Add(Me.GroupBox2) - Me.Controls.Add(Me.GroupBox1) Me.Controls.Add(Me.lblDatum) - Me.Controls.Add(Me.btnSave) Me.Controls.Add(Me.dgvBestellungen) Me.Controls.Add(Me.lblWochenkarte) - Me.Controls.Add(Me.MyComboBox1) + Me.Controls.Add(Me.cbxMenu) Me.Name = "frmEssensbestellungen" Me.Text = "Essensbestellung" Me.GroupBox1.ResumeLayout(False) Me.GroupBox1.PerformLayout() - Me.GroupBox2.ResumeLayout(False) - Me.GroupBox2.PerformLayout() - Me.GroupBox3.ResumeLayout(False) - Me.GroupBox3.PerformLayout() + CType(Me.pbMontag, System.ComponentModel.ISupportInitialize).EndInit() + Me.Dienstag.ResumeLayout(False) + Me.Dienstag.PerformLayout() + CType(Me.pbDienstag, System.ComponentModel.ISupportInitialize).EndInit() + Me.Mittwoch.ResumeLayout(False) + Me.Mittwoch.PerformLayout() + CType(Me.pbMittwoch, System.ComponentModel.ISupportInitialize).EndInit() Me.GroupBox4.ResumeLayout(False) Me.GroupBox4.PerformLayout() + CType(Me.pbDonnerstag, System.ComponentModel.ISupportInitialize).EndInit() Me.GroupBox5.ResumeLayout(False) Me.GroupBox5.PerformLayout() + CType(Me.pbFreitag, System.ComponentModel.ISupportInitialize).EndInit() CType(Me.dgvBestellungen, System.ComponentModel.ISupportInitialize).EndInit() + Me.MyPanel1.ResumeLayout(False) + Me.MyPanel1.PerformLayout() Me.ResumeLayout(False) Me.PerformLayout() End Sub - Friend WithEvents MyComboBox1 As VERAG_PROG_ALLGEMEIN.MyComboBox + Friend WithEvents cbxMenu As VERAG_PROG_ALLGEMEIN.MyComboBox Friend WithEvents lblWochenkarte As Label Friend WithEvents dgvBestellungen As VERAG_PROG_ALLGEMEIN.MyDatagridview Friend WithEvents btnSave As Button Friend WithEvents lblDatum As Label Friend WithEvents GroupBox1 As GroupBox Friend WithEvents txtAltMo As VERAG_PROG_ALLGEMEIN.MyTextBox - Friend WithEvents rbMenoAltMo As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents rbMenuMo As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents GroupBox2 As GroupBox + Friend WithEvents rbMenoAlt_Mo As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenu_Mo As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents Dienstag As GroupBox Friend WithEvents txtAltDi As VERAG_PROG_ALLGEMEIN.MyTextBox - Friend WithEvents rbMenuAltDi As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents rbMenuDi As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents GroupBox3 As GroupBox + Friend WithEvents rbMenuAlt_Di As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenu_Di As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents Mittwoch As GroupBox Friend WithEvents txtAltMi As VERAG_PROG_ALLGEMEIN.MyTextBox - Friend WithEvents rbMenuAltMi As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents rbMenuMi As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenuAlt_Mi As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenu_Mi As VERAG_PROG_ALLGEMEIN.MyRadioButton Friend WithEvents GroupBox4 As GroupBox Friend WithEvents txtAltDo As VERAG_PROG_ALLGEMEIN.MyTextBox - Friend WithEvents rbMenuAltDo As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents rbMenuDo As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenuAlt_Do As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenu_Do As VERAG_PROG_ALLGEMEIN.MyRadioButton Friend WithEvents GroupBox5 As GroupBox Friend WithEvents txtAltFr As VERAG_PROG_ALLGEMEIN.MyTextBox - Friend WithEvents rbMenuFrAlt As VERAG_PROG_ALLGEMEIN.MyRadioButton - Friend WithEvents rbMenuFr As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenuAlt_Fr As VERAG_PROG_ALLGEMEIN.MyRadioButton + Friend WithEvents rbMenu_Fr As VERAG_PROG_ALLGEMEIN.MyRadioButton Friend WithEvents lbl1 As Label Friend WithEvents lbl2 As Label Friend WithEvents txtAnzahlMenu As Label @@ -639,4 +781,15 @@ Partial Class frmEssensbestellungen Friend WithEvents cbFreitag As CheckBox Friend WithEvents lblAbteilung As Label Friend WithEvents lblGebaeude As Label + Friend WithEvents MyPanel1 As VERAG_PROG_ALLGEMEIN.MyPanel + Friend WithEvents lblBestellungen As Label + Friend WithEvents pbMontag As PictureBox + Friend WithEvents pbDienstag As PictureBox + Friend WithEvents pbMittwoch As PictureBox + Friend WithEvents pbDonnerstag As PictureBox + Friend WithEvents pbFreitag As PictureBox + Friend WithEvents txtPreis As Label + Friend WithEvents Label2 As Label + Friend WithEvents cbxGebauede As VERAG_PROG_ALLGEMEIN.MyComboBox + Friend WithEvents lblBestellungBis As Label End Class diff --git a/Aviso/frmEssensbestellungen.vb b/Aviso/frmEssensbestellungen.vb index 4f6dfa6..3f8c1a8 100644 --- a/Aviso/frmEssensbestellungen.vb +++ b/Aviso/frmEssensbestellungen.vb @@ -1,128 +1,432 @@ - - -Imports System.Web.UI.WebControls -Imports GrapeCity.ActiveReports.ReportsCore.Tools -Imports Spire.Pdf.General.Paper +Imports Org.BouncyCastle.Asn1.Cms Imports VERAG_PROG_ALLGEMEIN Public Class frmEssensbestellungen Dim SQL As New VERAG_PROG_ALLGEMEIN.SQL Dim essen As New cEssensbestellung() + Dim dt As New DataTable + Private Sub frmEssensbestellungen_Load(sender As Object, e As EventArgs) Handles MyBase.Load - MyComboBox1.fillWithSQL("SELECT MenuTitel from tblEBMenu", False, "AVISO", True) - - lblGebaeude.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.BÜRO - lblAbteilung.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG + cbxMenu.fillWithSQL("SELECT MenuTitel from tblEBMenu", False, "AVISO", True) + lblGebaeude.Text = "Gebäude: " + lblAbteilung.Text = "Abteilung: " & VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG + loadDGVBestellungen() + cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Frontoffice", "Frontoffice")) + cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Asfinag", "Asfinag")) + cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Verag Verrechnung", "Verag Verrechnung")) + cbxGebauede.Items.Add(New VERAG_PROG_ALLGEMEIN.MyListItem("Maut", "Maut")) End Sub Private Sub btnSave_Click(sender As Object, e As EventArgs) Handles btnSave.Click + essen = New cEssensbestellung(cbxMenu._value, cAllgemein.USRID, "Test", cAllgemein.ABTEILUNG) If cbMontag.Checked Then - IIf(rbMenuMo.Checked, essen.eb_montag = "Menu", essen.eb_montag = txtAltMo.ToString) + If rbMenu_Mo.Checked Then + essen.eb_montag = "Menu" + Else + essen.eb_montag = txtAltMo.Text.ToString + End If + Else essen.eb_montag = Nothing End If + If cbDienstag.Checked Then - IIf(rbMenuDi.Checked, essen.eb_dienstag = "Menu", essen.eb_dienstag = txtAltMo.ToString) + If rbMenu_Di.Checked Then + essen.eb_dienstag = "Menu" + Else + essen.eb_dienstag = txtAltDi.Text.ToString + End If + Else essen.eb_dienstag = Nothing End If If cbMittwoch.Checked Then - IIf(rbMenuMi.Checked, essen.eb_mittwoch = "Menu", essen.eb_mittwoch = txtAltMo.ToString) + If rbMenu_Mi.Checked Then + essen.eb_mittwoch = "Menu" + Else + essen.eb_mittwoch = txtAltMi.Text.ToString + End If + Else essen.eb_mittwoch = Nothing End If - If cbDonnerstag.Checked Then - IIf(rbMenuDo.Checked, essen.eb_donnerstag = "Menu", essen.eb_donnerstag = txtAltMo.ToString) + If rbMenu_Do.Checked Then + essen.eb_donnerstag = "Menu" + Else + essen.eb_donnerstag = txtAltDo.Text.ToString + End If + Else essen.eb_donnerstag = Nothing End If If cbFreitag.Checked Then - IIf(rbMenuFr.Checked, essen.eb_freitag = "Menu", essen.eb_freitag = txtAltMo.ToString) + If rbMenu_Fr.Checked Then + essen.eb_freitag = "Menu" + Else + essen.eb_freitag = txtAltFr.Text.ToString + End If + Else essen.eb_freitag = Nothing End If + If txtPreis.Text IsNot "" Then + essen.eb_preis = CDbl(txtPreis.Text) + End If essen.SAVE() + loadDGVBestellungen() End Sub - Private Sub MyComboBox1_SelectedValueChanged(sender As Object, e As EventArgs) Handles MyComboBox1.SelectedValueChanged + Private Sub cbxMenu_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxMenu.SelectedValueChanged - essen = New cEssensbestellung(MyComboBox1._value, VERAG_PROG_ALLGEMEIN.cAllgemein.USRID, VERAG_PROG_ALLGEMEIN.cAllgemein.BÜRO, VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG) - Dim dt As New DataTable - dt = SQL.loadDgvBySql("SELECT * FROM tblEBMenu where [MenuTitel] = '" & MyComboBox1._value & "'", "AVISO", 100, True) + dt.Clear() + dt = SQL.loadDgvBySql("SELECT * FROM tblEBMenu where [MenuTitel] = '" & cbxMenu._value & "'", "AVISO", 100, True) If dt.Rows.Count > 0 Then + If checkIfOrderIsPossible() Then + MyPanel1.Enabled = True + Else + MyPanel1.Enabled = True + End If + lblDatum.Text = "Datum: " & CDate(dt.Rows(0).Item("MenuDateVon")).ToString("dd.MM.yyyy") & " - " & CDate(dt.Rows(0).Item("MenuDateBis")).ToString("dd.MM.yyyy") + loadMenuInfo(dt) btnSave.Enabled = True Else btnSave.Enabled = False End If + uncheckGroupBoxes(sender, e) + loadDGVBestellungen() End Sub - Private Sub rbMenoAltMo_CheckedChanged(sender As Object, e As EventArgs) Handles rbMenoAltMo.CheckedChanged + Private Sub rbaLaCarte_CheckedChanged(sender As Object, e As EventArgs) Handles rbMenoAlt_Mo.CheckedChanged, rbMenuAlt_Di.CheckedChanged, rbMenuAlt_Do.CheckedChanged, rbMenuAlt_Mi.CheckedChanged, rbMenuAlt_Fr.CheckedChanged + If rbMenoAlt_Mo.Checked Then + txtAltMo.Visible = True + Else + txtAltMo.Visible = False + End If + + If rbMenuAlt_Di.Checked Then + txtAltDi.Visible = True + Else + + txtAltDi.Visible = False + End If + + If rbMenuAlt_Mi.Checked Then + txtAltMi.Visible = True + Else + txtAltMi.Visible = False + End If + + + If rbMenuAlt_Do.Checked Then + txtAltDo.Visible = True + Else + txtAltDo.Visible = False + End If + + If rbMenuAlt_Fr.Checked Then + txtAltFr.Visible = True + Else + txtAltFr.Visible = False + End If + countChecks() End Sub Private Sub cbFields_CheckedChanged(sender As Object, e As EventArgs) Handles cbMontag.CheckedChanged, cbDienstag.CheckedChanged, cbMittwoch.CheckedChanged, cbDonnerstag.CheckedChanged, cbFreitag.CheckedChanged If cbMontag.Checked Then - rbMenoAltMo.Enabled = True - rbMenuMo.Enabled = True + rbMenoAlt_Mo.Enabled = True + rbMenu_Mo.Enabled = True Else - rbMenoAltMo.Enabled = False - rbMenoAltMo.Enabled = False + rbMenoAlt_Mo.Enabled = False + rbMenu_Mo.Enabled = False + txtAltMo.Text = "" End If If cbDienstag.Checked Then - rbMenuAltDi.Enabled = True - rbMenuDi.Enabled = True + rbMenuAlt_Di.Enabled = True + rbMenu_Di.Enabled = True Else - rbMenuDi.Enabled = False - rbMenuAltDi.Enabled = False + rbMenu_Di.Enabled = False + rbMenuAlt_Di.Enabled = False + txtAltDi.Text = "" End If If cbMittwoch.Checked Then - rbMenuAltMi.Enabled = True - rbMenuMi.Enabled = True + rbMenuAlt_Mi.Enabled = True + rbMenu_Mi.Enabled = True Else - rbMenuMi.Enabled = False - rbMenuAltMi.Enabled = False + rbMenu_Mi.Enabled = False + rbMenuAlt_Mi.Enabled = False + txtAltMi.Text = "" End If If cbDonnerstag.Checked Then - rbMenuAltDo.Enabled = True - rbMenuDo.Enabled = True + rbMenuAlt_Do.Enabled = True + rbMenu_Do.Enabled = True Else - rbMenuDo.Enabled = False - rbMenuAltDo.Enabled = False + rbMenu_Do.Enabled = False + rbMenuAlt_Do.Enabled = False + txtAltDo.Text = "" End If If cbFreitag.Checked Then - rbMenuFrAlt.Enabled = True - rbMenuFr.Enabled = True + rbMenuAlt_Fr.Enabled = True + rbMenu_Fr.Enabled = True Else - rbMenuFr.Enabled = False - rbMenuFrAlt.Enabled = False + rbMenu_Fr.Enabled = False + rbMenuAlt_Fr.Enabled = False + txtAltFr.Text = "" + End If + countChecks() + End Sub + + + Private Sub loadDGVBestellungen() + + Dim SQLWhere As String = "" + If cbxMenu._value IsNot "" Then SQLWhere = " AND [eb_kw] = '" & cbxMenu._value.ToString & "'" + + Dim SQLString As String = "SELECT [eb_kw], [eb_mitid] , [eb_gebaeude],[eb_abteilung],[eb_montag],[eb_dienstag],[eb_mittwoch],[eb_donnerstag] ,[eb_freitag],[eb_preis] FROM [tblEssensbestellungen] where [eb_mitid] = '" & VERAG_PROG_ALLGEMEIN.cAllgemein.USRID & "'" & SQLWhere & " order by [eb_kw]" + + dgvBestellungen.SET_SQL(SQLString, "AVISO", ,) + dgvBestellungen.LOAD() + + + If dgvBestellungen.Columns.Count < 1 Then Exit Sub + + With dgvBestellungen + .RowHeadersWidth = 10 + .Columns("eb_kw").AutoSizeMode = DataGridViewAutoSizeColumnMode.Fill + .Columns("eb_kw").HeaderText = "KW" + .Columns("eb_mitid").Visible = False + .Columns("eb_gebaeude").Visible = False + .Columns("eb_abteilung").Visible = False + .Columns("eb_montag").Width = 100 + .Columns("eb_montag").HeaderText = "Montag" + .Columns("eb_montag").Width = 100 + .Columns("eb_dienstag").HeaderText = "Dienstag" + .Columns("eb_dienstag").Width = 100 + .Columns("eb_mittwoch").HeaderText = "Mittwoch" + .Columns("eb_mittwoch").Width = 100 + .Columns("eb_donnerstag").HeaderText = "Donnerstag" + .Columns("eb_donnerstag").Width = 100 + .Columns("eb_freitag").HeaderText = "Freitag" + .Columns("eb_freitag").Width = 100 + .Columns("eb_preis").HeaderText = "Preis" + .Columns("eb_preis").Width = 40 + End With + + End Sub + + Private Sub uncheckGroupBoxes(sender, e) + For Each gb As Control In MyPanel1.Controls + If TypeOf gb Is GroupBox Then + For Each c As Control In gb.Controls + If TypeOf c Is CheckBox Then + Dim checkbox As CheckBox = c + checkbox.Checked = False + End If + Next + End If + Next + cbFields_CheckedChanged(sender, e) + End Sub + + Private Sub countChecks() + + Dim countMenus As Integer + Dim countlaCarte As Integer + countMenus = 0 + countlaCarte = 0 + For Each gb As Control In MyPanel1.Controls + If TypeOf gb Is GroupBox Then + For Each c As Control In gb.Controls + + If c.Text.ToLower.StartsWith("menü") AndAlso TypeOf c Is VERAG_PROG_ALLGEMEIN.MyRadioButton AndAlso c.Enabled = True Then + Dim rb As VERAG_PROG_ALLGEMEIN.MyRadioButton = c + If rb.Checked Then countMenus = countMenus + 1 + End If + + If c.Text.ToLower.StartsWith("a la carte") AndAlso TypeOf c Is VERAG_PROG_ALLGEMEIN.MyRadioButton AndAlso c.Enabled = True Then + Dim rb As VERAG_PROG_ALLGEMEIN.MyRadioButton = c + If rb.Checked Then countlaCarte = countlaCarte + 1 + End If + Next + End If + Next + + txtAnzahlMenu.Text = countMenus.ToString() + txtAnzahlLaCart.Text = countlaCarte.ToString + txtPreis.Text = (CDbl(countlaCarte) + CDbl(countMenus)) * 3 + + + End Sub + + Private Sub loadMenuInfo(dt As DataTable) + + If dt.Rows(0).Item("MenuEssenMo") IsNot Nothing Then + pbMontag.Visible = True + Dim ttMontag As New ToolTip() + ttMontag.SetToolTip(pbMontag, dt.Rows(0).Item("MenuEssenMo").ToString) + Else + pbMontag.Visible = False + End If + + + If dt.Rows(0).Item("MenuEssenDi") IsNot Nothing Then + pbDienstag.Visible = True + Dim ttDienstag As New ToolTip() + ttDienstag.SetToolTip(pbDienstag, dt.Rows(0).Item("MenuEssenDi").ToString) + Else + pbDienstag.Visible = False + End If + + + If dt.Rows(0).Item("MenuEssenMi") IsNot Nothing Then + pbMittwoch.Visible = True + Dim ttMittwoch As New ToolTip() + ttMittwoch.SetToolTip(pbMittwoch, dt.Rows(0).Item("MenuEssenMi").ToString) + Else + pbMittwoch.Visible = False + End If + + If dt.Rows(0).Item("MenuEssenDo") IsNot Nothing Then + pbDonnerstag.Visible = True + Dim ttDonnerstag As New ToolTip() + ttDonnerstag.SetToolTip(pbDonnerstag, dt.Rows(0).Item("MenuEssenDo").ToString) + Else + pbDonnerstag.Visible = False + End If + + If dt.Rows(0).Item("MenuEssenFr") IsNot Nothing Then + pbFreitag.Visible = True + Dim ttFreitag As New ToolTip() + ttFreitag.SetToolTip(pbFreitag, dt.Rows(0).Item("MenuEssenFr").ToString) + Else + pbFreitag.Visible = False + End If + + End Sub + + Private Sub dgvBestellungen_Click(sender As Object, e As EventArgs) Handles dgvBestellungen.Click + + If dgvBestellungen.Rows.Count = 0 Then Exit Sub + + Dim currentEssen As New cEssensbestellung(dgvBestellungen.CurrentRow.Cells("eb_kw").Value, dgvBestellungen.CurrentRow.Cells("eb_mitid").Value, dgvBestellungen.CurrentRow.Cells("eb_gebaeude").Value, dgvBestellungen.CurrentRow.Cells("eb_abteilung").Value) + + If currentEssen.eb_montag IsNot Nothing Then + cbMontag.Checked = True + If currentEssen.eb_montag.ToString = "Menu" Then + rbMenu_Mo.Checked = True + Else + rbMenoAlt_Mo.Checked = True + If currentEssen.eb_montag IsNot Nothing Then txtAltMo.Text = currentEssen.eb_montag.ToString + End If + Else + cbMontag.Checked = False + End If + + If currentEssen.eb_dienstag IsNot Nothing Then + cbDienstag.Checked = True + If currentEssen.eb_dienstag.ToString = "Menu" Then + rbMenu_Di.Checked = True + Else + rbMenuAlt_Di.Checked = True + If currentEssen.eb_dienstag IsNot Nothing Then txtAltDi.Text = currentEssen.eb_dienstag.ToString + End If + Else + cbDienstag.Checked = False + End If + + + If currentEssen.eb_mittwoch IsNot Nothing Then + cbMittwoch.Checked = True + If currentEssen.eb_mittwoch.ToString = "Menu" Then + rbMenu_Mi.Checked = True + Else + rbMenuAlt_Mi.Checked = True + If currentEssen.eb_mittwoch IsNot Nothing Then txtAltMi.Text = currentEssen.eb_mittwoch.ToString + End If + Else + cbMittwoch.Checked = False + End If + + If currentEssen.eb_donnerstag IsNot Nothing Then + cbDonnerstag.Checked = True + If currentEssen.eb_donnerstag.ToString = "Menu" Then + rbMenu_Do.Checked = True + Else + rbMenuAlt_Do.Checked = True + If currentEssen.eb_donnerstag IsNot Nothing Then txtAltDo.Text = currentEssen.eb_donnerstag.ToString + End If + Else + cbMittwoch.Checked = False + End If + + + If currentEssen.eb_freitag IsNot Nothing Then + cbFreitag.Checked = True + If currentEssen.eb_freitag.ToString = "Menu" Then + rbMenu_Fr.Checked = True + Else + rbMenuAlt_Fr.Checked = True + If currentEssen.eb_freitag IsNot Nothing Then txtAltDo.Text = currentEssen.eb_freitag.ToString + End If + Else + cbFreitag.Checked = False End If End Sub + + Private Function checkIfOrderIsPossible() As Boolean + + Dim isPossible As Boolean = False + + If dt.Rows.Count = 0 Then Return False + + Try + Dim startMenu = Date.Parse(dt.Rows(0).Item("MenuDateVon")) + + + Dim newTime As New TimeSpan(14, 30, 0) + Dim timeToOrderLimit = startMenu.AddDays(-5) + newTime + lblBestellungBis.Text = "Bestellung möglich bis: " & timeToOrderLimit.ToShortDateString & " - " & timeToOrderLimit.ToShortTimeString + + If Now >= timeToOrderLimit Then + lblBestellungBis.ForeColor = Color.Red + Return True + Else + lblBestellungBis.ForeColor = Color.Black + Return True + End If + Catch ex As Exception + MessageBox.Show(ex.Message) + End Try + + + End Function + End Class \ No newline at end of file