public void AssignCashDeskInfo(CashDeskPlanningInfo cashdeskinfo, DateTime weekMondayDate)
        {
            CashDeskPlanningInfo CashDeskInfo = cashdeskinfo;

            if (CashDeskInfo != null)
            {
                DateTime sunday     = DateTimeHelper.GetSunday(weekMondayDate);
                DateTime index_date = DateTimeHelper.GetMonday(weekMondayDate);
                int      index      = 0;
                while (index_date <= sunday)
                {
                    index = (int)index_date.DayOfWeek;
                    DateCashDeskPeoplePerHour datecashdesk = cashdeskinfo.GetDayCashDeskData(index_date);
                    days_calculators[index] = new CashDeskDailyPlanningCalculator2();
                    days_calculators[index].AssignCashDeskInfo(cashdeskinfo, index_date);

                    if (datecashdesk != null)
                    {
                        TargetUnits[index] = datecashdesk.Calculate2(CashDeskInfo.CashDeskAmount, CashDeskInfo.MinimumPresence, CashDeskInfo.MaximumPresence);
                    }
                    else
                    {
                        TargetUnits[index] = 0;
                    }

                    index_date = index_date.AddDays(1);
                }
                TargetUnits.Calculate();
            }
            else
            {
                Clear();
            }
        }
 public void AssignPlannedInfo(int[] timePerDay, int[][] timeperhours)
 {
     if (timePerDay != null && timePerDay.Length >= COUNTITEM)
     {
         double m = 60;
         for (int i = 0; i < COUNTITEM; i++)
         {
             PlannedUnits[i] = Math.Round(timePerDay[i] / m, 2);
             if (days_calculators[i] == null)
             {
                 days_calculators[i] = new CashDeskDailyPlanningCalculator2();
             }
             days_calculators [i].AssignPlannedInfo(timeperhours [i]);
         }
     }
     else
     {
         PlannedUnits.Clear();
     }
     Calculate();
 }
 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();
 }
        public void AssignTargetedInfo(int[] timePerDay, int[][] timeperhours)
        {
            if (timePerDay != null && timePerDay.Length >= COUNTITEM)
            {
                double m = 60;
                for (int i = 0; i < COUNTITEM; i++)
                {
                    TargetUnits[i] = Math.Round(timePerDay[i] / m, 2);
                    if (days_calculators[i] == null)
                    {
                        days_calculators[i] = new CashDeskDailyPlanningCalculator2();
                    }

                    days_calculators [i].AssignTargetedInfo(timeperhours [i]);
                    //days_calculators[i].Calculate();
                }
            }
            else
            {
                TargetUnits.Clear();
            }
            //TODO: I think need remove - becouse Targeted method calls one time - as init
            //Calculate();
        }
        public void AssignTargetedInfo(int[] timePerDay, int[][] timeperhours)
        {
            if (timePerDay != null && timePerDay.Length >= COUNTITEM)
            {
                double m = 60;
                for (int i = 0; i < COUNTITEM; i++)
                {
                    TargetUnits[i] = Math.Round(timePerDay[i] / m, 2);
                    if (days_calculators[i] == null)
                        days_calculators[i] = new CashDeskDailyPlanningCalculator2();

                    days_calculators [i].AssignTargetedInfo (timeperhours [i]);
                    //days_calculators[i].Calculate();
                }

            }
            else
            {
                TargetUnits.Clear();
            }
            //TODO: I think need remove - becouse Targeted method calls one time - as init
            //Calculate();
        }
 public void AssignPlannedInfo(int[] timePerDay, int[][] timeperhours)
 {
     if (timePerDay != null && timePerDay.Length >= COUNTITEM)
     {
         double m = 60;
         for (int i = 0; i < COUNTITEM; i++)
         {
             PlannedUnits[i] = Math.Round(timePerDay[i] / m, 2);
             if (days_calculators[i] == null)
                 days_calculators[i] = new CashDeskDailyPlanningCalculator2();
             days_calculators [i].AssignPlannedInfo(timeperhours [i]);
         }
     }
     else
     {
         PlannedUnits.Clear();
     }
     Calculate();
 }
 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();
 }
        public void AssignCashDeskInfo(CashDeskPlanningInfo cashdeskinfo, DateTime weekMondayDate)
        {
            CashDeskPlanningInfo CashDeskInfo = cashdeskinfo;
            if (CashDeskInfo != null)
            {
                DateTime sunday = DateTimeHelper.GetSunday(weekMondayDate);
                DateTime index_date = DateTimeHelper.GetMonday(weekMondayDate);
                int index = 0;
                while (index_date <= sunday)
                {
                    index = (int)index_date.DayOfWeek;
                    DateCashDeskPeoplePerHour datecashdesk = cashdeskinfo.GetDayCashDeskData(index_date);
                    days_calculators[index] = new CashDeskDailyPlanningCalculator2();
                    days_calculators[index].AssignCashDeskInfo(cashdeskinfo, index_date);

                    if (datecashdesk != null)
                    {
                        TargetUnits[index] = datecashdesk.Calculate2(CashDeskInfo.CashDeskAmount, CashDeskInfo.MinimumPresence, CashDeskInfo.MaximumPresence);
                    }
                    else
                    {
                        TargetUnits[index] = 0;
                    }

                    index_date = index_date.AddDays(1);
                }
                TargetUnits.Calculate();
            }
            else
            {
                Clear();
            }
        }