Beispiel #1
0
 public BusinessDaysService(
     ILogger <BusinessDaysService> logger,
     IHolidayService holidayService)
 {
     _logger         = logger;
     _holidayService = holidayService;
 }
        public void Initialize()
        {
            //Arrange
            var databaseFactory = new DatabaseFactory();

            _unitOfWork = new UnitOfWork(databaseFactory);

            _employeeWorkScheduleRepository = new EmployeeWorkScheduleRepository(databaseFactory);
            _employeeDailyPayrollRepository = new EmployeeDailyPayrollRepository(databaseFactory);
            _totalEmployeeHoursRepository   = new TotalEmployeeHoursRepository(databaseFactory);
            _employeeWorkScheduleRepository = new EmployeeWorkScheduleRepository(databaseFactory);
            _holidayRepository       = new HolidayRepository(databaseFactory);
            _employeeInfoRepository  = new EmployeeInfoRepository(databaseFactory);
            _employeeHoursRepository = new EmployeeHoursRepository(databaseFactory);
            _settingRepository       = new SettingRepository(databaseFactory);

            _totalEmployeeHoursService = new TotalEmployeeHoursService(_unitOfWork, _totalEmployeeHoursRepository, null, _settingService);

            _employeeWorkScheduleService = new EmployeeWorkScheduleService(_employeeWorkScheduleRepository);
            _holidayService        = new HolidayService(_holidayRepository, _settingRepository, _unitOfWork);
            _settingService        = new SettingService(_settingRepository);
            _employeeInfoService   = new EmployeeInfoService(_employeeInfoRepository);
            _employeeSalaryService = new EmployeeSalaryService();

            _employeeDailyPayrollService = new EmployeeDailyPayrollService(_unitOfWork, _totalEmployeeHoursService,
                                                                           _employeeWorkScheduleService, _holidayService, _settingService, _employeeDailyPayrollRepository, _employeeInfoService, _employeeSalaryService);
        }
        public static bool IsHoliday(this DateTime date, IHolidayService holidayService)
        {
            bool retorno = false;

            retorno = holidayService.IsHoliday(date);

            return(retorno);
        }
Beispiel #4
0
 public HolidayController(IErrorService errorService, IHolidayService holidayService,
                          ITimeDayService timedayService, IOTRequestService otRequestService, IStatusRequestService statusRequestService, IRequestService requestService) : base(errorService)
 {
     _holidayService       = holidayService;
     _timedayService       = timedayService;
     _otRequestService     = otRequestService;
     _statusRequestService = statusRequestService;
     _requestService       = requestService;
 }
 public static DateTime AddWorkDays(this DateTime date, int workingDays, IHolidayService holidayService)
 {
     return(date.GetDates(workingDays < 0)
            .Where(newDate =>
                   (newDate.DayOfWeek != DayOfWeek.Saturday &&
                    newDate.DayOfWeek != DayOfWeek.Sunday &&
                    !newDate.IsHoliday(holidayService)))
            .Take(Math.Abs(workingDays))
            .Last());
 }
Beispiel #6
0
        public HolidaySchedule()
        {
            _payrollContext  = new PayrollContext();
            _databaseFactory = new DatabaseFactory(_payrollContext);
            _unitOfWork      = new UnitOfWork(_databaseFactory);

            _employeeWorkScheduleRepository = new EmployeeWorkScheduleRepository(_databaseFactory);
            _employeeWorkScheduleService    = new EmployeeWorkScheduleService(_employeeWorkScheduleRepository);
            _settingRepository = new SettingRepository(_databaseFactory);
            _holidayRepository = new HolidayRepository(_databaseFactory);
            _holidayService    = new HolidayService(_holidayRepository, _settingRepository, _unitOfWork);
        }
 public EmployeeDailyPayrollService(IUnitOfWork unitOfWork, ITotalEmployeeHoursService totalEmployeeHoursService,
                                    IEmployeeWorkScheduleService employeeWorkScheduleService, IHolidayService holidayService, ISettingService settingService,
                                    IEmployeeDailyPayrollRepository employeeDailyPayrollRepository, IEmployeeInfoService employeeInfoService, IEmployeeSalaryService employeeSalaryService)
 {
     _unitOfWork = unitOfWork;
     _totalEmployeeHoursService   = totalEmployeeHoursService;
     _employeeWorkScheduleService = employeeWorkScheduleService;
     _holidayService                 = holidayService;
     _settingService                 = settingService;
     _employeeInfoService            = employeeInfoService;
     _employeeDailyPayrollRepository = employeeDailyPayrollRepository;
     _employeeSalaryService          = employeeSalaryService;
 }
Beispiel #8
0
 public OrderHelper(
     IOrderService orderService,
     IOrderProcessingService orderProcessingService,
     IWorkflowMessageService workflowMessageService,
     IWorkContext workContext,
     IShippingService shippingService,
     IHolidayService holidayService
     )
 {
     _workContext            = workContext;
     _orderService           = orderService;
     _orderProcessingService = orderProcessingService;
     _workflowMessageService = workflowMessageService;
     _shippingService        = shippingService;
     _holidayService         = holidayService;
 }
 public BaseController(IBaseService baseService,
                       IScheduledClassService scheduledClassService,
                       IHolidayService holidayService,
                       IClassTimetableService classTimetableService,
                       IClassTypeService classTypeService,
                       IAccountService accountService,
                       IClassAttendanceService classAttendanceService)
 {
     _baseService            = baseService;
     _classAttendanceService = classAttendanceService;
     _accountService         = accountService;
     _classTimetableService  = classTimetableService;
     _classTypeService       = classTypeService;
     _holidayService         = holidayService;
     _scheduledClassService  = scheduledClassService;
 }
 public OrderNoteService(
     IOrderService orderService,
     IOrderProcessingService orderProcessingService,
     IWorkflowMessageService workflowMessageService,
     IWorkContext workContext,
     IShippingService shippingService,
     IHolidayService holidayService,
     ILogger logger)
 {
     _workContext            = workContext;
     _orderService           = orderService;
     _orderProcessingService = orderProcessingService;
     _workflowMessageService = workflowMessageService;
     _shippingService        = shippingService;
     _holidayService         = holidayService;
     _logger = logger;
 }
 public EmployeePayrollItemPerCompanyService(IUnitOfWork unitOfWork, IEmployeePayrollItemPerCompanyRepository employeePayrollItemPerCompanyRepository,
                                             ITotalEmployeeHoursPerCompanyService totalEmployeeHoursPerCompanyService,
                                             IEmployeeWorkScheduleService employeeWorkScheduleService, IHolidayService holidayService, ISettingService settingService,
                                             IEmployeeInfoService employeeInfoService, IEmployeeSalaryService employeeSalaryService, IEmployeePayrollPerCompanyRepository employeePayrollRepository,
                                             IEmployeeLeaveRepository employeeLeaveRepository)
     : base(employeePayrollItemPerCompanyRepository)
 {
     _employeePayrollItemPerCompanyRepository = employeePayrollItemPerCompanyRepository;
     _unitOfWork = unitOfWork;
     _totalEmployeeHoursPerCompanyService = totalEmployeeHoursPerCompanyService;
     _employeeWorkScheduleService         = employeeWorkScheduleService;
     _holidayService            = holidayService;
     _settingService            = settingService;
     _employeeInfoService       = employeeInfoService;
     _employeeSalaryService     = employeeSalaryService;
     _employeePayrollRepository = employeePayrollRepository;
     _employeeLeaveRepository   = employeeLeaveRepository;
 }
        public EmployeePayrollSchedule()
        {
            _employeeDepartmentRepository       = new EmployeeDepartmentRepository(_databaseFactory);
            _employeeRepository                 = new EmployeeRepository(_databaseFactory, _employeeDepartmentRepository);
            _attendanceRepository               = new AttendanceRepository(_databaseFactory);
            _attendanceLogRepository            = new AttendanceLogRepository(_databaseFactory, _employeeRepository);
            _settingRepository                  = new SettingRepository(_databaseFactory);
            _employeeWorkScheduleRepository     = new EmployeeWorkScheduleRepository(_databaseFactory);
            _employeeInfoRepository             = new EmployeeInfoRepository(_databaseFactory);
            _frequencyRepository                = new FrequencyRepository(_databaseFactory);
            _paymentFrequencyRepository         = new PaymentFrequencyRepository(_databaseFactory);
            _employeePayrollRepository          = new EmployeePayrollRepository(_databaseFactory);
            _employeePayrollDeductionRepository = new EmployeePayrollDeductionRepository(_databaseFactory);
            _employeeDailyPayrollRepository     = new EmployeeDailyPayrollRepository(_databaseFactory);
            _employeeHoursRepository            = new EmployeeHoursRepository(_databaseFactory);
            _totalEmployeeHoursRepository       = new TotalEmployeeHoursRepository(_databaseFactory);
            _holidayRepository                  = new HolidayRepository(_databaseFactory);
            _employeeDeductionRepository        = new EmployeeDeductionRepository(_databaseFactory);
            _deductionRepository                = new DeductionRepository(_databaseFactory);
            _employeePayrollItemRepository      = new EmployeePayrollItemRepository(_databaseFactory);
            _employeeAdjustmentRepository       = new EmployeeAdjustmentRepository(_databaseFactory);
            _adjustmentRepository               = new AdjustmentRepository(_databaseFactory);

            _employeeService             = new EmployeeService(_employeeRepository);
            _employeeInfoService         = new EmployeeInfoService(_employeeInfoRepository);
            _attendanceLogService        = new AttendanceLogService(_attendanceLogRepository);
            _attendanceService           = new AttendanceService(_unitOfWork, _attendanceRepository, _attendanceLogService, _employeeHoursRepository);
            _settingService              = new SettingService(_settingRepository);
            _employeeWorkScheduleService = new EmployeeWorkScheduleService(_employeeWorkScheduleRepository);
            _employeeSalaryService       = new EmployeeSalaryService();
            _employeeHoursService        = new EmployeeHoursService(_unitOfWork, _employeeHoursRepository,
                                                                    _attendanceService, _settingService, _employeeWorkScheduleService, _employeeInfoService);
            _totalEmployeeHoursService   = new TotalEmployeeHoursService(_unitOfWork, _totalEmployeeHoursRepository, _employeeHoursService, _settingService);
            _holidayService              = new HolidayService(_holidayRepository, _settingRepository, _unitOfWork);
            _employeeDailyPayrollService = new EmployeeDailyPayrollService(_unitOfWork, _totalEmployeeHoursService, _employeeWorkScheduleService, _holidayService,
                                                                           _settingService, _employeeDailyPayrollRepository, _employeeInfoService, _employeeSalaryService);
            _deductionService = new DeductionService(_deductionRepository);
            _taxService       = new TaxService(_taxRepository);
            _employeePayrollDeductionService = new EmployeePayrollDeductionService(_unitOfWork, _settingService, _employeeSalaryService, _employeeInfoService, _employeeDeductionService, _deductionService, _employeePayrollDeductionRepository, _taxService);
            _employeePayrollItemService      = new EmployeePayrollItemService(_unitOfWork, _employeePayrollItemRepository, _totalEmployeeHoursService, _employeeWorkScheduleService, _holidayService, _settingService, _employeeInfoService, _employeeSalaryService, _employeePayrollRepository, _employeePayrollDeductionRepository, _employeeAdjustmentRepository, _adjustmentRepository);
            _employeeAdjusmentService        = new EmployeeAdjustmentService(_employeeAdjustmentRepository, _employeeRepository);
            _employeePayrollService          = new EmployeePayrollService(_unitOfWork, _employeePayrollRepository, _settingService, null, _employeeInfoService, null, _employeeService, _totalEmployeeHoursService, _employeePayrollItemService, _employeeAdjusmentService);
        }
 public HolidayController(IHolidayService holidayService,
                          IHolidayBuildingRepository holidayBuildingRepository,
                          IHolidayBuildingService holidayBuildingService,
                          IHolidayRepository holidayRepository,
                          ICurrentUser currentUser,
                          IUserRepository userRepository,
                          IBuildingRepository buildingRepository,
                          IBuildingObjectRepository buildingObjectRepository,
                          ILogger logger)
     : base(currentUser, logger)
 {
     _holidayRepository         = holidayRepository;
     _HolidayBuildingRepository = holidayBuildingRepository;
     _holidayBuildingService    = holidayBuildingService;
     _holidayService            = holidayService;
     _userRepository            = userRepository;
     _buildingRepository        = buildingRepository;
     _buildingObjectRepository  = buildingObjectRepository;
     _currentUser = currentUser;
 }
Beispiel #14
0
 public EmployeePayrollItemService(IUnitOfWork unitOfWork, IEmployeePayrollItemRepository employeePayrollItemRepository, ITotalEmployeeHoursService totalEmployeeHoursService,
                                   IEmployeeWorkScheduleService employeeWorkScheduleService, IHolidayService holidayService, ISettingService settingService,
                                   IEmployeeInfoService employeeInfoService, IEmployeeSalaryService employeeSalaryService, IEmployeePayrollRepository employeePayrollRepository, IEmployeePayrollDeductionRepository employeePayrollDeductionRepository,
                                   IEmployeeAdjustmentRepository employeeAdjustmentRepository, IAdjustmentRepository adjustmentRepository, IEmployeeLeaveRepository employeeLeaveRepository)
     : base(employeePayrollItemRepository)
 {
     _employeePayrollItemRepository = employeePayrollItemRepository;
     _unitOfWork = unitOfWork;
     _totalEmployeeHoursService   = totalEmployeeHoursService;
     _employeeWorkScheduleService = employeeWorkScheduleService;
     _holidayService                     = holidayService;
     _settingService                     = settingService;
     _employeeInfoService                = employeeInfoService;
     _employeeSalaryService              = employeeSalaryService;
     _employeePayrollRepository          = employeePayrollRepository;
     _employeePayrollDeductionRepository = employeePayrollDeductionRepository;
     _employeeAdjustmentRepository       = employeeAdjustmentRepository;
     _adjustmentRepository               = adjustmentRepository;
     _employeeLeaveRepository            = employeeLeaveRepository;
 }
Beispiel #15
0
 public AttendanceService(
     IEnumReferenceService enumReferenceService
     , IHolidayService holidayService
     , IRepository <mf_Employee> repoEmployee
     , IRepository <mf_WorkDay> repoWorkDay
     , IRepository <ta_CutOffAttendance> repoCutOffAttendance
     , IRepository <ta_CutOffAttendanceSummary> repoCutOffAttendanceSummary
     , IRepository <ta_CutOffAttendanceSummaryDetail> repoCutOffAttendanceSummaryDetail
     , IRepository <ta_EmployeeAttendance> repoEmployeeAttendance
     , IUnitOfWork unitOfWork
     )
 {
     this._holidayService                    = holidayService;
     this._enumReferenceService              = enumReferenceService;
     this._repoCutOffAttendance              = repoCutOffAttendance;
     this._repoCutOffAttendanceSummary       = repoCutOffAttendanceSummary;
     this._repoCutOffAttendanceSummaryDetail = repoCutOffAttendanceSummaryDetail;
     this._repoEmployee           = repoEmployee;
     this._repoEmployeeAttendance = repoEmployeeAttendance;
     this._repoWorkDay            = repoWorkDay;
     this._unitOfWork             = unitOfWork;
 }
Beispiel #16
0
 public HolidayController()
 {
     hs = new HolidayService();
 }
 public HolidaysController(HolidayService holidayService)
 {
     _holidayService = holidayService;
 }
Beispiel #18
0
 //use dependency injection
 public Bill(IHolidayService holidayService)
 {
     this.holidayService = holidayService;
 }
 /// <summary>
 /// </summary>
 /// <param name="iHolidayService">
 /// </param>
 /// <param name="unitOfWork">
 /// </param>
 /// <param name="jsonDataService">
 /// </param>
 public HolidayController(IHolidayService iHolidayService, IUnitOfWork unitOfWork, IJsonDataService jsonDataService)
 {
     _iHolidayService     = iHolidayService;
     _unitOfWork          = unitOfWork;
     this.jsonDataService = jsonDataService;
 }
Beispiel #20
0
 public SplashScreenViewComponent(IHolidayService holidayService)
 {
     _holidayService = holidayService;
 }
Beispiel #21
0
 public CargaObligacionRepository(DataContext context, IListaRepository listaRepository, IHolidayService holiday)
 {
     _holiday   = holiday;
     _context   = context;
     _repoLista = listaRepository;
 }
Beispiel #22
0
 public HolidayController(IHolidayService HolidayService)
 {
     this._HolidayService = HolidayService;
 }
 public HolidayController(IBus bus, IHolidayService holidayService)
 {
     _bus = bus;
     _holidayService = holidayService;
 }
Beispiel #24
0
 public Bill(IHolidayService mockService)
 {
 }
Beispiel #25
0
 public Bill(IHolidayService newHolidayService)
 {
     _holidayService = newHolidayService;
 }
Beispiel #26
0
 public TestController(IHolidayService holidayService)
 {
     _holidayService = holidayService;
 }
Beispiel #27
0
 public HolidayController(IHolidayService service)
 {
     _service = service;
 }
 public BaseController(IHolidayService holidayService)
 {
     this.holidayService = holidayService;
 }
 public HolidayController(IHolidayService holidayService, ILoggingService loggingService)
 {
     this.holidayService = holidayService;
     this.loggingService = loggingService;
 }
Beispiel #30
0
        //bring in holiday service to check for holidays
        //use dependency injection

        public Bill(IHolidayService service)
        {
            this.service = service;
        }
Beispiel #31
0
 public HolidayController(IHolidayService holService, IVacationRequestService vacreqService, IMutationsVacationService mutvacService)
 {
     _holService    = holService;
     _vacreqService = vacreqService;
     _mutvacService = mutvacService;
 }
Beispiel #32
0
 public CalendarController(IVacationRequestService vacreqService, IDepartmentService depService, IHolidayService holService)
 {
     _vacreqService = vacreqService;
     _depService    = depService;
     _holService    = holService;
 }