Class PayrollPeriodExtensions
Extension methods for IPayrollPeriod
Inherited Members
Namespace: PayrollEngine.Client
Assembly: PayrollEngine.Client.Services.dll
Syntax
public static class PayrollPeriodExtensions
Methods
View SourceGetContinuePeriods(IPayrollPeriod, DateTime, int)
Get all periods between this period and the period containing the target moment.
The starting payrun period is not included.
The payrun period containing the target moment is included.
Declaration
public static IList<IPayrollPeriod> GetContinuePeriods(this IPayrollPeriod payrollPeriod, DateTime targetMoment, int maxCount)
Parameters
| Type | Name | Description |
|---|---|---|
| IPayrollPeriod | payrollPeriod | |
| DateTime | targetMoment | Target moment |
| int | maxCount | Maximum result count |
Returns
| Type | Description |
|---|---|
| IList<IPayrollPeriod> | Payrun periods between this and the target moment, sorted from the oldest to the newest one |
GetDatePeriod(IPayrollPeriod)
Get date period
Declaration
public static DatePeriod GetDatePeriod(this IPayrollPeriod payrollPeriod)
Parameters
| Type | Name | Description |
|---|---|---|
| IPayrollPeriod | payrollPeriod |
Returns
| Type | Description |
|---|---|
| DatePeriod | Date period |
GetOffsetDatePeriod(IPayrollPeriod, int)
Get offset period
Declaration
public static DatePeriod GetOffsetDatePeriod(this IPayrollPeriod payrollPeriod, int offset)
Parameters
| Type | Name | Description |
|---|---|---|
| IPayrollPeriod | payrollPeriod | |
| int | offset | The period offset count |
Returns
| Type | Description |
|---|---|
| DatePeriod | Offset period |