コード例 #1
0
        public double CalculateBonus(Personnel personnel)
        {
            double bonusRate = 0.0D;

            switch (personnel.PersonnelType)
            {
            case Personnel.PersonnelTypes.FullTime:
                bonusRate = 0.15D;
                break;

            // new
            case Personnel.PersonnelTypes.Temporary:
                bonusRate = 0.10D;
                break;

            default:
                break;
            }

            // processing here
            return(personnel.AnnualSalary * bonusRate);
        }
コード例 #2
0
 public void GenerateTimeEntryReport(Personnel personnel)
 {
     // processing here
     emailSender.SendNotification($"{ReportName}: Report created.");
 }
コード例 #3
0
 public double GetHourlyRate(Personnel personnel)
 {
     return(personnel.AnnualSalary / (40 * 52));
 }
コード例 #4
0
 public DateTime GetPaySchedule(Personnel personnel)
 {
     return(personnel.PaySchedule);
 }
コード例 #5
0
 public void PersistPersonnelUpdates(Personnel personnel)
 {
     logger.Log($"Personnel information updated.");
     // processing here
     emailSender.SendNotification("Personnel information updated.");
 }
コード例 #6
0
 public void RegisterPersonnel(Personnel personnel)
 {
     logger.Log($"New personnel information created.");
     // processing here
     emailSender.SendNotification("New personnel information created.");
 }