//Laden van orders in overview public void LoadOrders() { listviewOverview.Clear(); comBestellingen.Items.Clear(); bestellingen = orderService.GetTablesOrder(tafelNummer); foreach (Bestelling bestelling in bestellingen) { orderItems = orderService.GetTablesOrderItems(tafelNummer, bestelling.bestelling_id); if (orderItems.Count > 0) { foreach (OrderItem item in orderItems) { ListViewItem li = new ListViewItem(bestelling.bestelling_id.ToString()); li.SubItems.Add(item.menuItem.naam); li.SubItems.Add(item.Aantal.ToString()); li.SubItems.Add(item.Comment); li.SubItems.Add(item.Status); li.Tag = item; listviewOverview.Items.Add(li); } comBestellingen.Items.Add(bestelling.bestelling_id); } else { //Tafel_Service tafelservice = new Tafel_Service(); //tafelservice.EditStatus(tafelNummer, false); } } listviewOverview.View = View.Details; listviewOverview.Columns.Add("ID"); listviewOverview.Columns.Add("Besteld"); listviewOverview.Columns.Add("#"); listviewOverview.Columns.Add("Commentaar"); listviewOverview.Columns.Add("Status"); listviewOverview.AutoResizeColumns(ColumnHeaderAutoResizeStyle.ColumnContent); }
//Laden van orders in overview public void LoadOrders() { listviewOverview.Clear(); bestellingen = orderService.GetTablesOrder(tafelNummer); foreach (Bestelling bestelling in bestellingen) { orderItems = orderService.GetTablesOrderItems(tafelNummer, bestelling.bestelling_ID); foreach (OrderItem item in orderItems) { ListViewItem li = new ListViewItem(bestelling.bestelling_ID.ToString()); li.SubItems.Add(item.menuItem.naam); li.SubItems.Add(item.Aantal.ToString()); li.Tag = item; listviewOverview.Items.Add(li); } } listviewOverview.View = View.Details; listviewOverview.Columns.Add("BestellingID"); listviewOverview.Columns.Add("Besteld"); listviewOverview.Columns.Add("Aantal"); }