Esempio n. 1
0
 protected override void Init()
 {
     _weekservice        = _timeservice.EmployeeWeekTimeRecordingService as EmployeeWeekTimeRecordingService;
     _dayservice         = _timeservice.EmployeeDayStateRecordingService as EmployeeDayStateRecordingService;
     _worktimeservice    = _timeservice.WorkingTimeRecordingService as WorkingTimeRecordingService;
     _absencetimeservice = _timeservice.AbsenceTimeRecordingService as AbsenceTimeRecordingService;
 }
Esempio n. 2
0
        /// <summary>
        /// RecalculateHolidaysTimeRanges(long countryid, DateTime date1, DateTime date2)
        /// Calculate absence with type=Holidays as day
        /// </summary>
        /// <param name="countryid">country's ID for which need calculate</param>
        /// <param name="date1">begin date for load absences</param>
        /// <param name="date2">end date for load absences</param>
        public static void RecalculateHolidaysTimeRanges(long countryid, DateTime date1, DateTime date2)
        {
            AbsenceTimeRecordingService ser = (ServerEnvironment.AbsenceTimeRecordingService as AbsenceTimeRecordingService);

            if (ser == null)
            {
                throw new ArgumentNullException();
            }

            List <AbsenceTimeRecording> absences = ser.absenceTimeRecordingDao.GetCountryHolidayTimeRecordingsBetweenDate(countryid, date1, date2);

            RecalculateHolidaysTimeRanges(countryid, absences);
        }
Esempio n. 3
0
        private static void TestServices()
        {
            RoleService.Init();
            UserService.Init();
            CountryService.Init();
            LanguageService.Init();
            AvgAmountService.Init();
            CountryAdditionalHourService.Init();
            ColouringService.Init();
            FeastService.Init();
            AbsenceService.Init();
            WorkingModelService.Init();
            YearlyWorkingDayService.Init();
            EmployeeService.Init();
            EmployeeRelationService.Init();
            EmployeeContractService.Init();
            LongTimeAbsenceService.Init();
            EmployeeLongTimeAbsenceService.Init();
            StoreService.Init();
            WGRService.Init();
            HWGRService.Init();
            WorldService.Init();
            StoreToWorldService.Init();
            WorldToHWGRService.Init();
            HwgrToWgrService.Init();
            StoreWorkingTimeService.Init();
            StoreAdditionalHourService.Init();
            BufferHoursService.Init();
            BenchmarkService.Init();
            TrendCorrectionService.Init();
            PersonMinMaxService.Init();
            RegionService.Init();

            AbsenceTimePlanningService.Init();
            AbsenceTimeRecordingService.Init();
            WorkingTimePlanningService.Init();
            WorkingTimeRecordingService.Init();
            EmployeeTimeService.Init();
            AvgWorkingDaysInWeekService.Init();
            EmployeeDayStatePlanningService.Init();
            EmployeeDayStateRecordingService.Init();
            EmployeeWeekTimePlanningService.Init();
            EmployeeWeekTimeRecordingService.Init();
            EmployeePlanningWorkingModelService.Init();
            EmployeeRecordingWorkingModelService.Init();
        }
Esempio n. 4
0
 protected override void Init()
 {
     _weekservice = _timeservice.EmployeeWeekTimeRecordingService as EmployeeWeekTimeRecordingService;
     _dayservice = _timeservice.EmployeeDayStateRecordingService as EmployeeDayStateRecordingService;
     _worktimeservice = _timeservice.WorkingTimeRecordingService as WorkingTimeRecordingService;
     _absencetimeservice = _timeservice.AbsenceTimeRecordingService as AbsenceTimeRecordingService;
 }
Esempio n. 5
0
        public static void InitServices()
        {
            // when connection is lost, it seems old references are no longer valid
            _ImportParam.CountryService  = null;
            _ImportParam.EmployeeService = null;
            _ImportParam.RegionService   = null;
            _ImportParam.StoreService    = null;
            _UserService     = null;
            _CountryService  = null;
            _LanguageService = null;
            _EmployeeService = null;
            _StoreService    = null;
            _RegionService   = null;
            _AuthService     = null;
            _RoleService     = null;

            RoleService.Init();
            UserService.Init();
            CountryService.Init();
            LanguageService.Init();
            AvgAmountService.Init();
            CountryAdditionalHourService.Init();
            ColouringService.Init();
            FeastService.Init();
            AbsenceService.Init();
            WorkingModelService.Init();
            YearlyWorkingDayService.Init();
            EmployeeService.Init();
            EmployeeRelationService.Init();
            EmployeeAllInService.Init();
            EmployeeContractService.Init();
            LongTimeAbsenceService.Init();
            EmployeeLongTimeAbsenceService.Init();
            StoreService.Init();
            WGRService.Init();
            HWGRService.Init();
            WorldService.Init();
            StoreToWorldService.Init();
            WorldToHWGRService.Init();
            HwgrToWgrService.Init();
            StoreWorkingTimeService.Init();
            StoreAdditionalHourService.Init();
            BufferHoursService.Init();
            BufferHourAvailableService.Init();
            BenchmarkService.Init();
            TrendCorrectionService.Init();
            PersonMinMaxService.Init();
            RegionService.Init();

            AbsenceTimePlanningService.Init();
            AbsenceTimeRecordingService.Init();
            WorkingTimePlanningService.Init();
            WorkingTimeRecordingService.Init();
            EmployeeTimeService.Init();
            AvgWorkingDaysInWeekService.Init();
            EmployeeDayStatePlanningService.Init();
            EmployeeDayStateRecordingService.Init();
            EmployeeWeekTimePlanningService.Init();
            EmployeeWeekTimeRecordingService.Init();
            EmployeePlanningWorkingModelService.Init();
            EmployeeRecordingWorkingModelService.Init();
            EmployeeHolidaysInfoService.Init();

            _ImportParam.CountryService  = CountryService;
            _ImportParam.EmployeeService = EmployeeService;
            _ImportParam.RegionService   = RegionService;
            _ImportParam.StoreService    = StoreService;
        }