Пример #1
0
        private double CalculatePayForSalesReceipt(SalesReceipt receipt)
        {
            double commissionPay = ((receipt.Amount * ComissionRate) / 100);
            double salaryHalfPay = (Salary / 2);

            return(commissionPay + salaryHalfPay);
        }
Пример #2
0
        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);
 }
Пример #4
0
 public void AddSalesReceipt(SalesReceipt salesReceipt)
 {
     PayrollDatabase.AddSalesReceipt(empId, salesReceipt);
 }