public void PlayWorkingModel(IPlanningContext context, List <EmployeeWeek> listEmployee) { _listItems.Clear(); gridControl.DataSource = null; if (context != null && listEmployee != null && listEmployee.Count > 0) { WorkingModelManagerNew wmmanager = context.WorkingModels as WorkingModelManagerNew; WorkingModelWrapperNew wrapper = null; foreach (EmployeeWeek week in listEmployee) { foreach (EmployeeDay day in week.DaysList) { if (day.WorkingModels != null) { foreach (EmployeeWorkingModel model in day.WorkingModels) { wrapper = wmmanager[model.WorkingModelID]; if (wrapper != null && wrapper.IsContainMessage()) { _listItems.Add(new EmployeeWTItem( week.EmployeeId, week.FullName, day.Date, wrapper.Model.Name, wrapper.Model.Message )); } } } } } } gridControl.DataSource = _listItems; }
public WorldRecordingContext(ILongTimeAbsenceService longabsenceService, IAbsenceService absenceService, IWorkingModelService wmManager, IColouringService colorManager, IEmployeeService emplService, IStoreService storeService, IWorkingTimePlanningService workingTimePlanningService, IAbsenceTimePlanningService absenceTimePlanningService, IWorkingTimeRecordingService workingTimeRecordingService, IAbsenceTimeRecordingService absenceTimeRecordingService ) { _EmployeeService = emplService; _StoreService = storeService; _WorkingTimePlanningService = workingTimePlanningService; _AbsenceTimePlanningService = absenceTimePlanningService; _WorkingTimeRecordingService = workingTimeRecordingService; _AbsenceTimeRecordingService = absenceTimeRecordingService; m_countryabsences = new AbsenceManager(absenceService); m_longabsences = new LongTimeAbsenceManager(longabsenceService); m_workingmodelmanager = new WorkingModelManagerNew(wmManager); m_colormanager = new CountryColorManager(colorManager); _ViewDate = DateTime.Today; _BeginWeekDate = DateTimeHelper.GetMonday(DateTime.Today); _EndWeekDate = DateTimeHelper.GetSunday(DateTime.Today); _ViewDate = DateTime.Today; }
public StoreWeekCalculater(long storeid, DateTime abegin, DateTime aend, EmployeeTimeService timeservice) { _storeid = storeid; _begindate = abegin; _enddate = aend; _timeservice = timeservice; _employeeservice = _timeservice.EmployeeService as EmployeeService; _storeservice = _employeeservice.StoreService as StoreService; CountryId = _storeservice.GetCountryByStoreId(_storeid); _absencemanager = new AbsenceManager(_storeservice.CountryService.AbsenceService); _absencemanager.CountryId = CountryId; _wmodelmanager = new WorkingModelManagerNew(_storeservice.CountryService.WorkingModelService); _wmodelmanager.CountryId = CountryId; Init(); }
public WorldsTimeRecordingPrintoutContext(long countryID, long storeID, DateTime startDate, DateTime viewDate) { _countryID = countryID; _storeID = storeID; _countryAbsences = new AbsenceManager(ClientEnvironment.AbsenceService); _countryAbsences.CountryId = _countryID; _longAbsences = new LongTimeAbsenceManager(ClientEnvironment.LongTimeAbsenceService); _longAbsences.CountryId = _countryID; _workingModelManager = new WorkingModelManagerNew(ClientEnvironment.WorkingModelService); _workingModelManager.CountryId = _countryID; _colorManager = new CountryColorManager(ClientEnvironment.ColouringService); _colorManager.CountryId = _countryID; _beginWeekDate = DateTimeHelper.GetMonday(startDate); _endWeekDate = DateTimeHelper.GetSunday(startDate); _viewDate = viewDate; LoadStoreDayInfo(); }