Esempio n. 1
0
        public void BuildNewWeekWorldPlanningList()
        {
            _dictionStoreWorldStates.Clear();

            if (ListStoreWorlds != null)
            {
                List <EmployeePlanningWeek> lst   = null;
                StoreWorldWeekPlanningState state = null;

                foreach (StoreToWorld stw in ListStoreWorlds)
                {
                    lst = PlanningWeekProcessor.GetEmployeesByWorld(stw.ID, PlanningEmployees);

                    state          = new StoreWorldWeekPlanningState(stw.ID, BeginTime, EndTime);
                    state.IContext = this;
                    if (lst != null)
                    {
                        state.List.AddRange(lst);
                    }
                    _dictionStoreWorldStates[stw.WorldID] = state;

                    WorldPlanningInfo infoworld =
                        ClientEnvironment.StoreService.StoreToWorldService.GetStoreWorldPlanningInfo(true, CurrentStoreId, stw.WorldID, BeginTime);

                    state.StoreWorldInfo = infoworld;
                }
            }
        }
        public StoreWorldWeekPlanningState GetWorldPlanningState(long worldID)
        {
            StoreWorldWeekPlanningState result = new StoreWorldWeekPlanningState(worldID, StartDate, EndDate);

            result.IContext = this;

            List <EmployeePlanningWeek> worldEmployees = PlanningWeekProcessor.GetEmployeesByWorld(worldID, _storeEmployees);

            if (worldEmployees != null)
            {
                result.List.AddRange(worldEmployees);
            }

            return(result);
        }