Пример #1
0
 public FormNewPayrollItemDlg(IPayroll ipr, int wb)
 {
     ipayroll = ipr;
     wageBonus = wb;
     InitializeComponent();
     Initialize();
 }
Пример #2
0
        /// <summary>
        /// Creates the pay slip view.
        /// </summary>
        /// <param name="payroll">The payroll.</param>
        /// <param name="employee">The employee.</param>
        /// <returns></returns>
        /// <exception cref="ArgumentNullException">payroll</exception>
        public IPaySlipViewModel CreatePaySlipView(IPayroll payroll, IPayScale payScale, decimal taxRate, IList <IPayScaleBenefit> payScaleBenefits,
                                                   ICompanyDetail companyDetail, IDigitalFile companyLogo, IEmployee employee, ILevel level, IGrade grade, IList <IPayrollEmployeeReward> rewardCollection,
                                                   IList <IPayrollEmployeeDeduction> employeeDeductionCollection, IList <IPayrollEmployeeLoan> loanCollection, decimal pensionContribution, decimal spouseConsolidation,
                                                   decimal childrenConsolidation, decimal consolidationTaxRelief, decimal taxableIncome)
        {
            if (payroll == null)
            {
                throw new ArgumentNullException(nameof(payroll));
            }

            var viewModel = new PaySlipViewModel
            {
                CompanyDetail       = companyDetail,
                Payroll             = payroll,
                Employee            = employee,
                Loan                = loanCollection,
                Reward              = rewardCollection,
                EmployeeDeduction   = employeeDeductionCollection,
                Level               = level,
                Grade               = grade,
                PayScale            = payScale,
                PayScaleCollection  = payScaleBenefits,
                CompanyLogo         = companyLogo,
                TaxRate             = taxRate,
                PensionContribution = pensionContribution,
                Dependant           = spouseConsolidation,
                Children            = childrenConsolidation,
                TaxCollation        = consolidationTaxRelief,
                TaxationAmount      = taxableIncome,
            };

            return(viewModel);
        }
Пример #3
0
 public Company(IPayroll payroll, IEnumerable <IEmployee> employees, int highEarnerThreshold)
 {
     if (payroll == null)
     {
         throw new ArgumentNullException(nameof(payroll));
     }
     if (employees == null)
     {
         throw new ArgumentNullException(nameof(employees));
     }
     m_Payroll             = payroll;
     Employees             = employees;
     m_HighEarnerThreshold = highEarnerThreshold;
 }
Пример #4
0
        public void As_a_Payroll_user_I_should_get_the_calculations_based_on_employee_location_Italy()
        {
            var employee = new Employee()
            {
                HourRate = 40, TotalWorkedHours = 100, Location = Location.Italy
            };

            IPayroll italyPayrollCalculator = PayrollCalculatorFactory.Create(employee);

            italyPayrollCalculator.Calculate(employee);

            var actual   = italyPayrollCalculator.GetType();
            var expected = typeof(ItalyPayrollCalculator);

            Assert.Equal(actual, expected);
        }
        public static IPayroll GetPayroll(PayRollType payRollType)
        {
            IPayroll payroll = null;

            switch (payRollType)
            {
            case PayRollType.Probation:
                payroll = new ProbationPayroll();
                break;

            case PayRollType.Permanent:
                payroll = new PermanentPayroll();
                break;

            case PayRollType.PartTime:
                payroll = new PartTimePayroll();
                break;
            }

            return(payroll);
        }
Пример #6
0
 public GroupedPayrollItemTree(IPayroll ipayroll, int wb, TreeView tv)
     : base(tv)
 {
     this.ipayroll = ipayroll;
     this.wageBonus = wb;
 }
 public Task <SaveResponse <IPayroll> > SavePayrollAsync(IPayroll payroll)
 {
     throw new NotImplementedException();
 }
 public Task <ValidationResult> ValidateAsync(IPayroll payroll)
 {
     throw new NotImplementedException();
 }
Пример #9
0
 public FormCalcFlagModiDlg(IPayroll ipr)
 {
     ipayroll = ipr;
     InitializeComponent();
     Initialize();
 }
Пример #10
0
 public PayrollController(IPayroll payrollHelper)
 {
     this.payrollHelper = payrollHelper;
 }
Пример #11
0
 public Employee(IPayroll payroll)
 {
     _payroll = payroll;
 }
Пример #12
0
 public CompanyBuilder WithPayroll(IPayroll payroll)
 {
     m_Payroll = payroll;
     return(this);
 }
Пример #13
0
 private Company CreateSut(IPayroll payroll, IEnumerable <IEmployee> employees, int highEarnerThreshold)
 {
     return(new Company(payroll, employees, highEarnerThreshold));
 }