public List <EmployeeWeek> FillPlanningEmployeeWeeks(long storeid, long worldid, DateTime aBegin, DateTime aEnd) { if (_listweeks != null && _listweeks.Count > 0) { FillEmployeeWeeks(aBegin, aEnd, true); // EmployeeTimeService timeService = EmployeeService.EmployeeTimeService as EmployeeTimeService; // timeService.FillEmployeeWeeks(_listweeks, _employeeids, _dictionWeek, aBegin, aEnd, true); if (LoadWeeks) { EmployeeTimeService timeService = EmployeeService.EmployeeTimeService as EmployeeTimeService; EmployeeWeekTimePlanningService weekService = timeService.EmployeeWeekTimePlanningService as EmployeeWeekTimePlanningService; List <EmployeeWeekTimePlanning> planningweeks = weekService.GetEmployeesWeekState(_employeeids, aBegin, aEnd); if (planningweeks != null && planningweeks.Count > 0) { EmployeeWeek emplweek = null; foreach (EmployeeWeekTimePlanning week in planningweeks) { if (_dictionWeek.TryGetValue(week.EmployeeID, out emplweek)) { emplweek.NewWeek = false; EmployeeWeekProcessor.Assign(week, emplweek); } } } } } return(_listweeks); }
protected virtual void Init() { _weekplanningservice = _timeservice.EmployeeWeekTimePlanningService as EmployeeWeekTimePlanningService; _dayplanningservice = _timeservice.EmployeeDayStatePlanningService as EmployeeDayStatePlanningService; _worktimeservice = _timeservice.WorkingTimePlanningService as WorkingTimePlanningService; _absencetimeservice = _timeservice.AbsenceTimePlanningService as AbsenceTimePlanningService; }
protected virtual List <EmployeeWeekTimePlanning> LoadEntities(long[] ids, DateTime date) { EmployeeWeekTimePlanningService service = ServerEnvironment.EmployeeWeekTimePlanningService as EmployeeWeekTimePlanningService; if (ids == null) { return(service.ServiceDao.LoadAllFromDateSorted(date)); } else { return(service.GetEmployeesWeekStateByDateRange(ids, date, DateTimeSql.LastMaxSunday)); } }
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(); }
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; }