Ejemplo n.º 1
0
        public void OnPost(string Search, List <string> OrderCategory, float?MinimumPrice, float?MaximumPrice, List <string> ExcludeIngredients)
        {
            SearchAndFilter filter = new SearchAndFilter();

            if (OrderCategory.Count > 0)
            {
                AvailableMenuItems = filter.filterCategories(OrderCategory);
            }

            if (Search != null)
            {
                AvailableMenuItems = filter.filterSearch(AvailableMenuItems, Search);
            }

            AvailableMenuItems = filter.filterByPrice(AvailableMenuItems, MinimumPrice, MaximumPrice);

            AvailableMenuItems = filter.filterIngredients(AvailableMenuItems, ExcludeIngredients);
        }
Ejemplo n.º 2
0
        private void SearchAndFilter_Click(object sender, RoutedEventArgs e)
        {
            SearchAndFilter d = new SearchAndFilter();

            d.ShowDialog();
        }