Class CaseRelationBuildFunction
Build related case, considering related source case values, see SourceValue and HasSourceValue(string)
Implements
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Function
Assembly: PayrollEngine.Client.Scripting.dll
Syntax
public class CaseRelationBuildFunction : CaseRelationFunction, IDisposable
Examples
// Example with case value
(int)Employee["Level"] >= 2
// Example with related case value
TargetValue["Wage"] = (decimal)SourceValue[\"Wage\"] * 0.125M; TargetStart[\"Wage\"] = SourceStart[\"Wage\"]?.AddMonths(3)
Constructors
CaseRelationBuildFunction(object)
Initializes a new instance with the function runtime
Declaration
public CaseRelationBuildFunction(object runtime)
Parameters
| Type | Name | Description |
|---|---|---|
| object | runtime | The runtime |
CaseRelationBuildFunction(string)
New function instance without runtime (scripting development)
Declaration
protected CaseRelationBuildFunction(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
Methods
Build()
Entry point for the runtime
Declaration
public bool? Build()
Returns
| Type | Description |
|---|---|
| bool? |
Remarks
Internal usage only, do not call this method
GetSourceFieldEnd(string)
Get the case relation source field end date
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[CaseRelationBuildAction("GetSourceFieldEnd", "Get the case relation source field end date", new string[] { "RelationField" })]
public ActionValue GetSourceFieldEnd(string field)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the source case |
Returns
| Type | Description |
|---|---|
| ActionValue |
GetSourceFieldStart(string)
Get the case relation source field start date
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[CaseRelationBuildAction("GetSourceFieldStart", "Get the case relation source field start date", new string[] { "RelationField" })]
public ActionValue GetSourceFieldStart(string field)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the source case |
Returns
| Type | Description |
|---|---|
| ActionValue |
GetSourceFieldValue(string)
Get the case relation source field value
Declaration
[ActionParameter("field", "The case field on the source case", new string[] { "String" }, null, null)]
[CaseRelationBuildAction("GetSourceFieldValue", "Det the case relation source field value", new string[] { "RelationField" })]
public ActionValue GetSourceFieldValue(string field)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the source case |
Returns
| Type | Description |
|---|---|
| ActionValue |
GetTargetFieldEnd(string)
Get the case relation target field end date
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[CaseRelationBuildAction("GetTargetFieldEnd", "Get the case relation target field end date", new string[] { "RelationField" })]
public ActionValue GetTargetFieldEnd(string field)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the target case |
Returns
| Type | Description |
|---|---|
| ActionValue |
GetTargetFieldStart(string)
Get the case relation target field start date
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[CaseRelationBuildAction("GetTargetFieldStart", "Get the case relation target field start date", new string[] { "RelationField" })]
public ActionValue GetTargetFieldStart(string field)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the target case |
Returns
| Type | Description |
|---|---|
| ActionValue |
GetTargetFieldValue(string)
Get the case relation target field value
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[CaseRelationBuildAction("GetTargetFieldValue", "Get the case relation target field value", new string[] { "RelationField" })]
public ActionValue GetTargetFieldValue(string field)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the target case |
Returns
| Type | Description |
|---|---|
| ActionValue |
SetTargetFieldEnd(string, DateTime?)
Set the case relation target field end date
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[ActionParameter("end", "The end date to set", new string[] { "Date" }, null, null)]
[CaseRelationBuildAction("SetTargetFieldEnd", "Set the case relation target field change end date", new string[] { "RelationField" })]
public void SetTargetFieldEnd(string field, DateTime? end)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the target case |
| DateTime? | end | The end date to set |
SetTargetFieldStart(string, DateTime?)
Set the case relation target field start date
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[ActionParameter("start", "The start date to set", new string[] { "Date" }, null, null)]
[CaseRelationBuildAction("SetTargetFieldStart", "Set the case relation target field change start date", new string[] { "RelationField" })]
public void SetTargetFieldStart(string field, DateTime? start)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the target case |
| DateTime? | start | The start date to set |
SetTargetFieldValue(string, object)
Set the case relation target field value
Declaration
[ActionParameter("field", "The case field on the target case", new string[] { "String" }, null, null)]
[ActionParameter("value", "The value to set", null, null, null)]
[CaseRelationBuildAction("SetTargetFieldValue", "Set the case relation target field value", new string[] { "RelationField" })]
public void SetTargetFieldValue(string field, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | field | The case field on the target case |
| object | value | The value to set |