public void AssignPlannedInfo(int[] timePerDay) { if (timePerDay != null && timePerDay.Length >= COUNTITEM) { double m = 60; for (int i = 0; i < COUNTITEM; i++) { PlannedUnits[i] = Math.Round(timePerDay[i] / m, 2); } } else { PlannedUnits.Clear(); } Calculate(); }
public void AssignTargetedInfo(int[] timePerDay) { if (timePerDay != null && timePerDay.Length >= COUNTITEM) { double m = 60; for (int i = 0; i < COUNTITEM; i++) { TargetUnits[i] = Math.Round(timePerDay[i] / m, 2); } } else { TargetUnits.Clear(); } //TODO: I think need remove - becouse Targeted method calls one time - as init //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 date) { _CashDeskInfo = cashdeskinfo; TargetedCashDeskUnits.Clear(); if (CashDeskInfo != null) { AvgCashDeskAmount = CashDeskInfo.CashDeskAmount; MinPercent = CashDeskInfo.MinimumPresence; MaxPercent = CashDeskInfo.MaximumPresence; DateCashDeskPeoplePerHour datecashdesk = CashDeskInfo.GetDayCashDeskData(date); TargetedCashDeskUnits = new DblArray50MinMax(24, MinPercent, MaxPercent); if (datecashdesk != null) { //Random n = new Random(5000); for (int i = 0; i < 24; i++) { if (AvgCashDeskAmount != 0) { //TargetedCashDeskUnits.Elements[i] = n.NextDouble () / AvgCashDeskAmount; TargetedCashDeskUnits.Elements[i] = datecashdesk.GetReceipt(i) / AvgCashDeskAmount; // _GetPeoplePerHour(datecashdesk.GetReceipt(i), AvgCashDeskAmount); } else { TargetedCashDeskUnits.Elements[i] = 0; } } } TargetedCashDeskUnits.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[] unitsPerHour) { PlannedCashDeskUnits.Clear(); double m = 60; if (unitsPerHour != null && unitsPerHour.Length == 24) { for (int i = 0; i < 24; i++) { PlannedCashDeskUnits.Elements[i] = Math.Round(unitsPerHour[i] / m, 2); } } PlannedCashDeskUnits.Calculate(); Calculate(); }
public void Clear() { PlannedUnits.Clear(); DiffTargetPlannedPercent.Clear(); TargetUnits.Clear(); }