private void FillFourthOrder(Order order) { Chef_lvFourth.Clear(); Chef_lblTafelFourth.Text = $"Tafel: {order.TableId}"; Chef_lblBesteldOpFourth.Text = $"Besteld op: {order.TimeOrdering.ToString("hh:mm")}"; foreach (Dish dish in order.Dishes) { Chef_lvFourth.Items.Add(new ListViewItem(dish.Name)); } Chef_pnlFourthOrder.Show(); }
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; } } }