private void FillFirstOrder(Order order) { Chef_lblOpmerkingenContent.Text = order.Comment; Chef_pnlOpmerkingen.Show(); Chef_lvFirst.Clear(); Chef_lblTafelFirst.Text = $"Tafel: {order.TableId}"; Chef_lblBesteldOpFirst.Text = $"Besteld op: {order.TimeOrdering.ToString("hh:mm")}"; foreach (Dish dish in order.Dishes) { Chef_lvFirst.Items.Add(new ListViewItem(dish.Name)); } Chef_pnlFirstOrder.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; } } }