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

            return(View(bivm));
        }
Example #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));
        }