コード例 #1
0
        private void LoadStoreDayInfo()
        {
            if (_storeDays != null && _storeDays.StoreId == StoreId && _storeDays.BeginTime == BeginWeekDate)
            {
                return;
            }

            _storeDays = ClientEnvironment.StoreService.GetStoreDays(StoreId, BeginWeekDate, EndWeekDate);
        }
コード例 #2
0
        private void LoadStoreDayInfo()
        {
            if (m_storedays != null && m_storedays.StoreId == StoreId &&
                m_storedays.BeginTime == BeginWeekDate)
            {
                return;
            }

            m_storedays = _StoreService.GetStoreDays(StoreId, BeginWeekDate, EndWeekDate);
        }
コード例 #3
0
        // must call after change store or date
        protected void LoadContext()
        {
            if (CurrentStoreId != 0)
            {
                ErrorCode = ErrorCodes.Empty;
                ClearContext();

                m_storedays = ClientEnvironment.StoreService.GetStoreDays(CurrentStoreId, BeginTime, EndTime);


                if (m_storedays.IsUndefined())
                {
                    ErrorCode |= ErrorCodes.NotExistsOpenTime;
                }
                if (m_storedays.AvgDayInWeek == 0)
                {
                    ErrorCode |= ErrorCodes.NotExistsAvgDaysPerWeek;
                }

                if (ErrorCodes.Empty != ErrorCode)
                {
                    ProcessError();
                    return;
                }



                _ListPlanningEmployees = ClientEnvironment.EmployeeService.GetTimePlannignEmployee2(CurrentStoreId, BeginTime, EndTime);

                if (_ListPlanningEmployees != null)
                {
                    foreach (EmployeePlanningWeek week in _ListPlanningEmployees)
                    {
                        week.AvgDaysWeek = StoreDays.AvgDayInWeek;
                        week.InitWeekState();
                    }
                }
                ApplyStoreDays();

                BuildNewWeekWorldPlanningList();

                LoadWorkingAndAbsenceTimes();
            }
        }
コード例 #4
0
ファイル: EmployeeWeekBuilder.cs プロジェクト: 5509850/baumax
        private void FillEmployeeDayByStoreDay(long storeid, DateTime aBegin, DateTime aEnd)
        {
            long countryid = EmployeeService.StoreService.GetCountryByStoreId(storeid);
            List <StoreToWorld>             lst      = EmployeeService.StoreWorldService.FindAllForCountry(countryid);
            Dictionary <long, StoreToWorld> _diction = new Dictionary <long, StoreToWorld>();

            if (lst != null)
            {
                foreach (StoreToWorld sw in lst)
                {
                    _diction[sw.ID] = sw;
                }
            }
            StoreDaysList dayslist = EmployeeService.StoreService.GetStoreDays(storeid, aBegin, aEnd);
            Dictionary <long, StoreDaysList> _dictionDays = new Dictionary <long, StoreDaysList>();

            _dictionDays[storeid] = dayslist;
            if (_listweeks != null)
            {
                foreach (EmployeeWeek ew in _listweeks)
                {
                    foreach (EmployeeDay ed in ew.DaysList)
                    {
                        if (ed.StoreWorldId > 0)
                        {
                            StoreToWorld sw = _diction[ed.StoreWorldId];
                            if (!_dictionDays.TryGetValue(sw.StoreID, out dayslist))
                            {
                                dayslist = EmployeeService.StoreService.GetStoreDays(sw.StoreID, aBegin, aEnd);
                                _dictionDays[sw.StoreID] = dayslist;
                            }

                            if (_dictionDays.TryGetValue(sw.StoreID, out dayslist))
                            {
                                ed.StoreDay = dayslist[ed.Date];
                            }
                        }
                    }
                }
            }
        }
コード例 #5
0
ファイル: EmployeeWeekBuilder.cs プロジェクト: 5509850/baumax
 private void FillEmployeeDayByStoreDay(EmployeeWeek emplweek)
 {
     if (emplweek != null)
     {
         StoreDaysList dayslist = null;
         foreach (EmployeeDay day in emplweek.DaysList)
         {
             if (day.HasRelation)
             {
                 if (!m_dictionDays.TryGetValue(day.StoreId, out dayslist))
                 {
                     dayslist = EmployeeService.StoreService.GetStoreDays(day.StoreId, emplweek.BeginDate, emplweek.EndDate.AddDays(356));
                     m_dictionDays[day.StoreId] = dayslist;
                 }
                 if (m_dictionDays.TryGetValue(day.StoreId, out dayslist))
                 {
                     day.StoreDay = dayslist[day.Date];
                 }
             }
         }
     }
 }
コード例 #6
0
        private void LoadStoreDayInfo()
        {
            if(_storeDays != null && _storeDays.StoreId == StoreId && _storeDays.BeginTime == BeginWeekDate)
            {
                return;
            }

            _storeDays = ClientEnvironment.StoreService.GetStoreDays(StoreId, BeginWeekDate, EndWeekDate);
        }