- 01
- 02
- 03
- 04
- 05
- 06
- 07
- 08
- 09
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
public void Recalculate(List<DateTime> weekDates,List<HistoricalRateOccurence> historicalRates) {
UnitsTotal = MonUnits + TuesUnits + WedsUnits + ThursUnits + FriUnits + SatUnits + SunUnits;
if (historicalRates.Count == 0) {
PayAmount = UnitsTotal*PayRate;
}else {
for (int i = 0; i < weekDates.Count; i++) {
switch (i) {
case 0:
PayAmount += MonUnits*GetPayRateForDay(PayRate, weekDates[i], historicalRates);
break;
case 1:
PayAmount += TuesUnits * GetPayRateForDay(PayRate, weekDates[i], historicalRates);
break;
case 2:
PayAmount += WedsUnits * GetPayRateForDay(PayRate, weekDates[i], historicalRates);
break;
case 3:
PayAmount += ThursUnits * GetPayRateForDay(PayRate, weekDates[i], historicalRates);
break;
case 4:
PayAmount += FriUnits * GetPayRateForDay(PayRate, weekDates[i], historicalRates);
break;
}
}
}
ChargeAmount = UnitsTotal * AmsBillRate;
}
imshaman 28.08.2009 17:26 # 0
Говногость 31.08.2009 15:46 # 0
guest 28.08.2009 18:05 # +3
(j/k)
guest 28.08.2009 23:10 # 0
guest 28.08.2009 23:10 # 0
Говногость 31.08.2009 15:48 # 0
guest 30.08.2009 10:33 # 0