//private static void BillCustomer(List<TimeSheetEntry> timeSheets, string companyName, decimal hourlyRate) private static void BillCustomer(List <TimeSheetEntry> timeSheets, CustomerModel customer) { double totalHours = TimeSheetProcessing.GetHoursWorkedForCompany(timeSheets, customer.CustomerName); Console.WriteLine(); Console.WriteLine($"Simulating Sending email to {customer.CustomerName}"); Console.WriteLine("Your bill is $" + (decimal)totalHours * customer.HourlyRateToBill + " for the hours worked."); }
private static void PayEmployee(List <TimeSheetEntry> timeSheets, EmployeeModel employee) { //decimal totalHours = 0; //for (i = 0; i < timeSheets.Count; i++) //{ // totalHours += timeSheets[i].WorkedHours; //} //if (totalHours > 40) //{ // Console.WriteLine("You will get paid $" + ((40 * 10) + ((totalHours - 40) * 15)) + " for your work."); //} //else //{ //Console.WriteLine($"You will get paid " + totalHours * 10 + " for your time."); //} decimal totalPay = TimeSheetProcessing.CalculateEmployeePay(timeSheets, employee); Console.WriteLine($"You will get paid {totalPay} for your time."); }