Пример #1
0
        private bool checkVacaionDaysPost(EmployeeRequest employeeRequest)
        {
            List <VacationView> vacationViews = _employeeBalanceRepo.GetAllEmployeeBalances();
            var vacationview = vacationViews.Find(v => v.employeeID == employeeRequest.EmployeeID && v.vacationID == employeeRequest.VacationID);

            return(employeeRequest.Days > (vacationview.Balance - vacationview.Used));
        }
Пример #2
0
 //public List<EmployeeBalance> GetAllEmployeeBalances()
 //{
 //    return _employeeBalanceRepo.GetAllEmployeeBalances();
 //}
 public List <VacationView> GetAllEmployeeBalances()
 {
     return(_employeeBalanceRepo.GetAllEmployeeBalances());
 }