Exemplo n.º 1
0
        public async Task <IActionResult> Reports(List <Order> order)
        {
            ViewBag.DishList = await _dishService.AllDishes();

            ViewBag.DishCatList = await _dishCatService.AllDishCategories();

            ViewBag.Users = await _userManager.Users.ToListAsync();

            return(View(order));
        }
Exemplo n.º 2
0
        public async Task <IActionResult> Index(int?id)
        {
            ViewBag.Categories = await _categoryService.AllDishCategories();

            if (id == null || id == 0)
            {
                var dishes = await _service.AllDishes();

                return(View(dishes));
            }
            else
            {
                var dishes = await _service.SearchWithCategory(Convert.ToInt32(id));

                return(View(dishes));
            }
        }