Пример #1
0
        private void FillSecondOrder(Order order)
        {
            Chef_lvSecond.Clear();
            Chef_lblTafelSecond.Text     = $"Tafel: {order.TableId}";
            Chef_lblBesteldOpSecond.Text = $"Besteld op: {order.TimeOrdering.ToString("hh:mm")}";

            foreach (Dish dish in order.Dishes)
            {
                Chef_lvSecond.Items.Add(new ListViewItem(dish.Name));
            }

            Chef_pnlSecondOrder.Show();
        }
Пример #2
0
        private void RefreshOrders()
        {
            if (Chef_pnlOverzicht.InvokeRequired)
            {
                RefreshOrdersCallback d = new RefreshOrdersCallback(RefreshOrders);

                Invoke(d, new object[] { });
            }
            else
            {
                Chef_lblGeenBestellingen.Hide();
                Chef_pnlOpmerkingen.Hide();
                Chef_pnlFirstOrder.Hide();
                Chef_pnlSecondOrder.Hide();
                Chef_pnlThirdOrder.Hide();
                Chef_pnlFourthOrder.Hide();
                Chef_pnlOverflow.Hide();

                switch (orders.Count)
                {
                case 0:
                    Chef_lblGeenBestellingen.Show();
                    break;

                case 1:
                    FillFirstOrder(orders[0]);
                    break;

                case 2:
                    FillSecondOrder(orders[1]);
                    goto case 1;

                case 3:
                    FillThirdOrder(orders[2]);
                    goto case 2;

                case 4:
                    FillFourthOrder(orders[3]);
                    goto case 3;

                default:
                    ShowOverflow(orders.Count - 4);
                    goto case 4;
                }
            }
        }