Ambar -> Sendungsdetails -> Emailvorlage für Warenort; Ambar Zollbeschau NEU, GUI-Änderungen Essensbestellungen

This commit is contained in:
2022-12-21 14:05:18 +01:00
parent 374bd9c4b8
commit bc100dc340
7 changed files with 554 additions and 415 deletions

View File

@@ -7,6 +7,8 @@ Public Class frmEssensbestellungen
Dim essen As New cEssensbestellung()
Dim dt As New DataTable
Dim ttMontag, ttDienstag, ttMittwoch, ttDonnerstag, ttFreitag As New ToolTip()
Private ToolTipFont As New Font("Courier New", 12)
Dim essenMontag As String = ""
@@ -14,6 +16,7 @@ Public Class frmEssensbestellungen
cbxMenu.fillWithSQL("SELECT Distinct Top 10 (MenuTitel), MenuDateVon from tblEBMenu order by MenuDateVon desc", True, "AVISO", True) '/ where MenuDateVon >= GETDATE()
txtMA.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.USRNAME
txtAbteilung.Text = VERAG_PROG_ALLGEMEIN.cAllgemein.ABTEILUNG
loadDGVBestellungen()
@@ -107,17 +110,19 @@ Public Class frmEssensbestellungen
Private Sub cbxMenu_SelectedValueChanged(sender As Object, e As EventArgs) Handles cbxMenu.SelectedValueChanged
If cbxMenu._value Is Nothing Or cbxMenu._value = "" Then
Button1.Visible = False
'Button1.Visible = False
lblDatum.Text = "Datum: "
lblBestellungBis.Text = ""
loadDGVBestellungen()
btnSave.Enabled = False
For Each comp As System.ComponentModel.Component In Me.components.Components
If TypeOf comp Is ToolTip Then
Dim tip = DirectCast(comp, ToolTip)
tip.RemoveAll()
End If
Next
Exit Sub
End If
@@ -319,7 +324,6 @@ Public Class frmEssensbestellungen
If dt.Rows(0).Item("MenuEssenMo") IsNot Nothing Then
pbMontag.Visible = True
ttMontag.SetToolTip(pbMontag, dt.Rows(0).Item("MenuEssenMo").ToString)
Else
pbMontag.Visible = False
@@ -328,8 +332,8 @@ Public Class frmEssensbestellungen
If dt.Rows(0).Item("MenuEssenDi") IsNot Nothing Then
pbDienstag.Visible = True
ttDienstag.SetToolTip(pbDienstag, dt.Rows(0).Item("MenuEssenDi").ToString)
Else
pbDienstag.Visible = False
End If
@@ -432,9 +436,30 @@ Public Class frmEssensbestellungen
End Sub
Private Function checkIfOrderIsPossible() As Boolean
Private Sub ToolTipInfoMo_Draw(sender As Object, e As DrawToolTipEventArgs) Handles ToolTipInfoMo.Draw, ToolTipInfoDi.Draw, ToolTipInfoMi.Draw, ToolTipInfoDo.Draw, ToolTipInfoFr.Draw
e.DrawBackground()
e.DrawBorder()
e.Graphics.DrawString(e.ToolTipText,
Me.ToolTipFont,
Brushes.Black,
e.Bounds)
Dim isPossible As Boolean = False
End Sub
Private Sub ToolTipInfoMo_Popup(sender As Object, e As PopupEventArgs) Handles ToolTipInfoMo.Popup
e.ToolTipSize = TextRenderer.MeasureText(Me.ToolTipInfoMo.GetToolTip(e.AssociatedControl), Me.ToolTipFont)
End Sub
Private Sub PictureBox1_Click(sender As Object, e As EventArgs) Handles PictureBox1.Click
Dim webAddress As String = "http://www.highway-118.de/speisekarte/speisekarte.html"
Process.Start(webAddress)
End Sub
Private Function checkIfOrderIsPossible() As Boolean
If dt.Rows.Count = 0 Then Return False
@@ -443,12 +468,12 @@ Public Class frmEssensbestellungen
Dim newTime As New TimeSpan(14, 30, 0)
Dim timeToOrderLimit = startMenu.AddDays(-5) + newTime
Dim timeToOrderLimit = startMenu.AddDays(20) + newTime '-5
lblBestellungBis.Text = "Bestellung möglich bis: " & timeToOrderLimit.ToShortDateString & " - " & timeToOrderLimit.ToShortTimeString
If Now >= timeToOrderLimit Then
lblBestellungBis.ForeColor = Color.Red
Return True 'zu testzwecken -> muss dann wieder auf false gesetzt werden!!!!
Return False
Else
lblBestellungBis.ForeColor = Color.Black
Return True
@@ -465,7 +490,9 @@ Public Class frmEssensbestellungen
End Sub
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
'If cbxMenu._value Is Nothing Then Exit Sub
'Process.Start("\\YM5T001348\Gastro\FTPUpload\Menues\" & cbxMenu._value & ".pdf")
End Sub