private void FillListViewProducts(string subCategory) { if (subCategory == "Alcoholic") { products = order_Service.GetMenuItems("Alcoholisch"); } else if (subCategory == "nonAlcoholic") { products = order_Service.GetMenuItems("nietAlcoholisch"); } else { if (btn_LunchCategory.BackColor == Color.LightSlateGray) { products = order_Service.GetMenuItems("Lunch", subCategory); } else if (btn_DinerCategory.BackColor == Color.LightSlateGray) { products = order_Service.GetMenuItems("Diner", subCategory); } } listViewMenuItems.Items.Clear(); foreach (MenuProduct product in products) { ListViewItem lvItem = new ListViewItem(new string[] { product.Name, product.Description, product.Stock.ToString() }); lvItem.Tag = product; listViewMenuItems.Items.Add(lvItem); } listViewMenuItems.Visible = true; }
private void AddMenuSection(string category, string subCategory, string title) { List <ChapeauMenuItem> menuItems = order_service.GetMenuItems(category, subCategory); AddMenuSectionToUI(menuItems, title); }