Esempio n. 1
0
        public IActionResult Index()
        {
            BillIndexViewModel bivm = new BillIndexViewModel
            {
                Bills     = _billRepository.GetAllWithEmployees(),
                Employees = _employeeRepository.GetAllSorted()
            };

            return(View(bivm));
        }
Esempio n. 2
0
        public IActionResult Filter(int employeeId)
        {
            BillIndexViewModel bivm = new BillIndexViewModel
            {
                Bills     = _billRepository.GetAllByEmployee(employeeId),
                Employees = _employeeRepository.GetAllSorted()
            };

            TempData["filteredEmployeeId"] = employeeId;
            return(View(nameof(Index), bivm));
        }