private double CalculatePayForTimeCard(TimeCard card) { double overtimeHours = Math.Max(0.0, card.Hours - 8); double normalHours = card.Hours - overtimeHours; return((hourlyRate * normalHours) + (hourlyRate * 1.5 * overtimeHours)); }
private bool IsInPayPeriod(TimeCard card, DateTime payPeriod) { DateTime payPeriodEndDate = payPeriod; DateTime payPeriodStartDate = payPeriod.AddDays(-5); return(card.Date <= payPeriodEndDate && card.Date >= payPeriodStartDate); }
public static void AddTimeCard(int empId, TimeCard timeCard) { if (!timeCards.ContainsKey(empId)) { timeCards[empId] = new List <TimeCard>(); } timeCards[empId].Add(timeCard); }
public void AddTimeCard(TimeCard timeCard) { PayrollDatabase.AddTimeCard(empId, timeCard); }