private double CalculatePayForSalesReceipt(SalesReceipt receipt) { double commissionPay = ((receipt.Amount * ComissionRate) / 100); double salaryHalfPay = (Salary / 2); return(commissionPay + salaryHalfPay); }
private bool IsInPayPeriod(SalesReceipt card, DateTime payPeriod) { DateTime payPeriodEndDate = payPeriod; DateTime payPeriodStartDate = payPeriod.AddDays(-12); // Friday - 12 - 2 weeks return(card.Date <= payPeriodEndDate && card.Date >= payPeriodStartDate); }
public static void AddSalesReceipt(int empId, SalesReceipt receipt) { if (!salesReceipts.ContainsKey(empId)) { salesReceipts[empId] = new List <SalesReceipt>(); } salesReceipts[empId].Add(receipt); }
public void AddSalesReceipt(SalesReceipt salesReceipt) { PayrollDatabase.AddSalesReceipt(empId, salesReceipt); }