Ejemplo n.º 1
0
        public StoreWorldWeekPlanningState(long storeworldid, DateTime begin, DateTime end)
        {
            Debug.Assert(begin < end);
            Debug.Assert(begin.DayOfWeek == DayOfWeek.Monday);
            Debug.Assert(end.DayOfWeek == DayOfWeek.Sunday);

            BeginWeekDate = begin;
            EndWeekDate   = end;
            StoreWorldId  = storeworldid;

            _summary = new SummariesByWorld(storeworldid);
        }
Ejemplo n.º 2
0
        public StoreWorldWeekPlanningState(long storeworldid, DateTime begin, DateTime end)
        {
            Debug.Assert(begin < end);
            Debug.Assert(begin.DayOfWeek == DayOfWeek.Monday);
            Debug.Assert(end.DayOfWeek == DayOfWeek.Sunday);

            BeginWeekDate = begin;
            EndWeekDate = end;
            StoreWorldId = storeworldid;

            _summary = new SummariesByWorld(storeworldid);
        }
 public void AssignPlannedInfo(SummariesByWorld summary)
 {
     if (summary != null && summary.DaysSum != null && summary.CashDeskUnitsPerHour != null)
     {
         double m = 60;
         for (int i = 0; i < COUNTITEM; i++)
         {
             PlannedUnits[i] = Math.Round(summary.DaysSum[i] / m, 2);
             if (days_calculators[i] == null)
                 days_calculators[i] = new CashDeskDailyPlanningCalculator2();
             days_calculators[i].AssignPlannedInfo(summary.CashDeskUnitsPerHour[i]);
         }
     }
     else
     {
         PlannedUnits.Clear();
     }
     Calculate();
 }