コード例 #1
0
        public async Task <List <EmployeeResponse> > GetAllEmployeeContract()
        {
            EmployeesDTO employeesDTO = new EmployeesDTO();

            var employeesResponse = await employeesDTO.GetAllAnnualSalary();

            if (employeesResponse != null)
            {
                foreach (var e in employeesResponse)
                {
                    EmployeeAbstract employeeAbstract = CalculateAnnualSalary(e);
                    employeeAbstract.GetAnnualSalary(e);
                }
            }
            return(employeesResponse);
        }
コード例 #2
0
        public async Task <List <EmployeeResponse> > GetEmployeeById(int id)
        {
            List <EmployeeResponse> responseList = new List <EmployeeResponse>();

            EmployeesDTO employeesDTO = new EmployeesDTO();

            var employeesResponse = await employeesDTO.GetEmployeeById(id);

            if (employeesResponse != null)
            {
                EmployeeAbstract employeeAbstract = CalculateAnnualSalary(employeesResponse);

                employeeAbstract.GetAnnualSalary(employeesResponse);

                responseList.Add(employeesResponse);

                return(responseList);
            }
            else
            {
                return(null);
            }
        }