HR - Gehaltserhöhung Template
Mein Chef hat mir gezeigt, wie leicht es doch ist über die Abteilung HR eine Gehaltserhöhung zu bekommen. Ich fand das so gut, das muss ich nun hier Euch zeigen:
using System;
using MYCOMPANY.HelperFromHell;
namespace MYCOMPANY.Management.HR.HellWeDontWantThis
{
public class IncreaseSalary
{
private string m_id;
private decimal m_salary;
public IncreaseSalary(string idNumberOfEmployee, decimal currentSalary)
{
m_id = idNumberOfEmployee;
m_salary = currentSalary;
}
/// <summary>
/// This is the increase of salary done by HR from time to time.
/// </summary>
/// <returns>New salary.</returns>
public decimal IncreaseItsHr()
{
return m_salary;
}
/// <summary>
/// Employee request a higher salary.
/// </summary>
/// <param name="whatEmployeeWants">Increase that results from the fucking brain of our brain dead employee.</param>
/// <returns>New increased salary.</returns>
public decimal OhNoEmployeeWantsMoreMoneyHowCouldThatHappen(decimal whatEmployeeWants)
{
if (Math.Sign(whatEmployeeWants) == 1)
{
m_salary = HrHelperFromHell.DoSomeSalaryMagic(m_salary);
throw new ArgumentOutOfRangeException("whatEmployeeWants", whatEmployeeWants, "The increase is to high! HR Manager was brought to hospital.");
}
else
{
m_salary += whatEmployeeWants;
}
return m_salary;
}
}
}