private void FillStoreWorldEstimateData(StoreWorldPlanningInfo worldinfo, StoreToWorld storeworld, DateTime begin, DateTime end)
        {
            //IList lst = _storetoworldservice.GetEstimatedWorldWorkingHours(begin, end, storeworld.StoreID, storeworld.WorldID);

            //if (lst != null)
            //{
            //    if (_trendhelper == null)
            //    {
            //        _trendhelper = new TrendCorrectionHelper(_storeservice.TrendCorrectionService);
            //        _trendhelper.LoadByStoreAndDateRange(storeworld.StoreID, begin, end);
            //    }

            //    bool isExistsTrendCorrection = _trendhelper.IsExistsForWorld(storeworld.ID);

            //    decimal trendcorrection = 1;

            //    foreach (EstimatedWorldWorkingHours workinghours in lst)
            //    {
            //        if (isExistsTrendCorrection)
            //        {
            //            trendcorrection = Convert.ToDecimal(_trendhelper.GetTrendCorrection(storeworld.ID, workinghours.Date));
            //            worldinfo.SetTargetedHoursByDate(workinghours.Date, (int)(workinghours.WorkingHours * 60 * trendcorrection));
            //        }
            //        else
            //            worldinfo.SetTargetedHoursByDate(workinghours.Date, (int)(workinghours.WorkingHours * 60));
            //    }
            //}
            WeeklyEstimatedWorldHoursBuilder estimateLoader = new WeeklyEstimatedWorldHoursBuilder();

            estimateLoader.AssignTrendCorrecttionHelper(_trendhelper);
            int[] days = estimateLoader.BuildWeek(storeworld, begin);
            worldinfo.SetTargetedHours(days);
            //if (lst != null && estimateLoader.EstimatedHours != null)
            //{
            //    if (lst.Count == estimateLoader.EstimatedHours.Count)
            //    {
            //        for (int i = 0; i < 7; i++)
            //        {
            //            Debug.Assert(worldinfo.TargetedHours[i] == days[i]);
            //        }
            //    }
            //}
        }
        private void FillStoreWorldEstimateData(StoreWorldPlanningInfo worldinfo, StoreToWorld storeworld, DateTime begin, DateTime end)
        {
            //IList lst = _storetoworldservice.GetEstimatedWorldWorkingHours(begin, end, storeworld.StoreID, storeworld.WorldID);

            //if (lst != null)
            //{
            //    if (_trendhelper == null)
            //    {
            //        _trendhelper = new TrendCorrectionHelper(_storeservice.TrendCorrectionService);
            //        _trendhelper.LoadByStoreAndDateRange(storeworld.StoreID, begin, end);
            //    }

            //    bool isExistsTrendCorrection = _trendhelper.IsExistsForWorld(storeworld.ID);

            //    decimal trendcorrection = 1;

            //    foreach (EstimatedWorldWorkingHours workinghours in lst)
            //    {
            //        if (isExistsTrendCorrection)
            //        {
            //            trendcorrection = Convert.ToDecimal(_trendhelper.GetTrendCorrection(storeworld.ID, workinghours.Date));
            //            worldinfo.SetTargetedHoursByDate(workinghours.Date, (int)(workinghours.WorkingHours * 60 * trendcorrection));
            //        }
            //        else
            //            worldinfo.SetTargetedHoursByDate(workinghours.Date, (int)(workinghours.WorkingHours * 60));
            //    }
            //}
            WeeklyEstimatedWorldHoursBuilder estimateLoader = new WeeklyEstimatedWorldHoursBuilder();
            estimateLoader.AssignTrendCorrecttionHelper(_trendhelper);
            int[] days = estimateLoader.BuildWeek(storeworld, begin);
            worldinfo.SetTargetedHours(days);
            //if (lst != null && estimateLoader.EstimatedHours != null)
            //{
            //    if (lst.Count == estimateLoader.EstimatedHours.Count)
            //    {
            //        for (int i = 0; i < 7; i++)
            //        {
            //            Debug.Assert(worldinfo.TargetedHours[i] == days[i]);
            //        }
            //    }
            //}
        }