Exemple #1
0
        /// <summary>
        /// Gets the payroll employee list.
        /// </summary>
        /// <param name="selectedMonth">The selected month.</param>
        /// <param name="selectedYear">The selected year.</param>
        /// <param name="message">The message.</param>
        /// <returns></returns>
        public IPayrollListView GetPayrollEmployeeList(string selectedMonth, int?selectedYear, string message)
        {
            var loggedUserDetails = usersRepository.GetUserById((int)this.session.GetSessionValue(SessionKey.UserId));

            var employeeInfo = this.employeeOnBoardRepository.GetEmployeeByEmail(loggedUserDetails.Email);

            var monthDropDown = this.lookupRepository.GetAllMonths();
            var yearDropDown  = this.lookupRepository.GetAllYears();

            var payrollCollection = payrollRepository.GetEmployeePayrollList(employeeInfo.EmployeeId);

            var viewModel = this.payrollViewModelFactory.CreatePayrollList(selectedMonth, selectedYear, payrollCollection, monthDropDown, yearDropDown, message);

            return(viewModel);
        }