Class WageTypeValueFunction
Wage type function
Implements
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class WageTypeValueFunction : WageTypeFunction, IDisposable
Examples
// Example from case value
Employee["Wage"]
// Example from conditional case payroll value
(int)Employee["Wage"] > 0 ? Employee["ManagementWage"] : PayrollValue.Empty
// Example from running collector.
Collector["MyCollector"]
// Example from running wage type
WageType[2300]
// Example with custom wage type result
SetResult("MyResult", 5300); return WageType[2300]
// Example with custom wage type result including the value type
SetResult("MyResult", 5300, 2); return WageType[2300]
// Example with custom wage type result including the value description
SetResult("MyResult", 5300, "KST1"); return WageType[2300]
// Example with custom wage type result including the value type and description
SetResult("MyResult", 5300, 2, "KST1"); return WageType[2300]
// Example with average wage type result from the last 3 periods on complete payrun jobs
GetWageTypeResults(2300, new PeriodResultQuery(3, PayrunJobStatus.Complete)).DefaultIfEmpty().Average()
Constructors
WageTypeValueFunction(object)
Initializes a new instance with the function runtime
Declaration
public WageTypeValueFunction(object runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| object | runtime | The runtime |
WageTypeValueFunction(string)
New function instance without runtime (scripting development)
Declaration
protected WageTypeValueFunction(string sourceFileName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | sourceFileName | The name of the source file |
Remarks
Use GetSourceFileName(string) in your constructor for the source file name
Properties
ExecutionCount
The execution count
Declaration
[ActionProperty("Wage type value execution count", null)]
public int ExecutionCount { get; }
Property Value
| Type | Description |
|---|---|
| int |
Methods
GetValue()
Entry point for the runtime
Declaration
public object GetValue()
Returns
| Type | Description |
|---|---|
| object |
Remarks
Internal usage only, do not call this method
RestartExecution()
Restart execution of wage type calculation
Declaration
public void RestartExecution()