Example #1
0
        public ActionResult SalariesInformation()
        {
            ViewBag.employees = employeeRepository.GetEmployees();
            var salaries = salaryRepository.GetFullSalaries(salaryRepository.GetSalaries(), employeeRepository);

            return(View(salaries));
        }
        public IActionResult GetSalaries()
        {
            var salaries = _SalaryRepository.GetSalaries();

            if (!ModelState.IsValid)
            {
                return(BadRequest(ModelState));
            }
            return(Ok(salaries));
        }
Example #3
0
        public Salary[] RecalculationSalary()
        {
            var salaryInTeam = _salaryRepository.GetSalaries();
            var euroRate     = Strategy.GetEuroRate();

            foreach (var item in salaryInTeam)
            {
                item.Amount       = item.Amount * euroRate;
                item.Country      = Strategy.Country;
                item.SignCurrency = Strategy.Currency;
            }
            return(salaryInTeam);
        }