Class CaseChangeRuntimeBase
Runtime for the case change function
Inheritance
Inherited Members
Namespace: PayrollEngine.Client.Scripting.Runtime.Api
Assembly: PayrollEngine.Client.Services.dll
Syntax
public abstract class CaseChangeRuntimeBase : CaseRuntimeBase, ICaseChangeRuntime, ICaseRuntime, IPayrollRuntime, IRuntime
Constructors
View SourceCaseChangeRuntimeBase(PayrollHttpClient, ScriptContext, int, int, int, CaseSet, int?)
Initializes a new instance of the CaseChangeRuntimeBase class
Declaration
protected CaseChangeRuntimeBase(PayrollHttpClient httpClient, ScriptContext scriptContext, int tenantId, int userId, int payrollId, CaseSet caseSet, int? employeeId = null)
Parameters
| Type | Name | Description |
|---|---|---|
| PayrollHttpClient | httpClient | The Payroll http client |
| ScriptContext | scriptContext | The scrip context |
| int | tenantId | The tenant id |
| int | userId | The user id |
| int | payrollId | The payroll id |
| CaseSet | caseSet | The runtime case set |
| int? | employeeId | The employee id |
Properties
View SourceCancellationDate
Get the cancellation date
Declaration
public DateTime? CancellationDate { get; }
Property Value
| Type | Description |
|---|---|
| DateTime? |
Case
The case set
Declaration
protected CaseSet Case { get; }
Property Value
| Type | Description |
|---|---|
| CaseSet |
Methods
View SourceAddCaseValueTag(string, string)
Add case value tag
Declaration
public bool AddCaseValueTag(string caseFieldName, string tag)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | tag | The tag to add |
Returns
| Type | Description |
|---|---|
| bool | True if the case value tag has been added |
CaseAvailable(string)
Test if a case is available
Declaration
public bool CaseAvailable(string caseName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseName | The name of the case |
Returns
| Type | Description |
|---|---|
| bool | True if the case is available |
FieldAvailable(string)
Test if a case field is available
Declaration
public bool FieldAvailable(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case field is available |
FieldAvailable(string, bool)
Set if the case field is available
Declaration
public void FieldAvailable(string caseFieldName, bool available)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| bool | available | The case field available value |
GetCaseFieldAttribute(string, string)
Get case field attribute value
Declaration
public override object GetCaseFieldAttribute(string caseFieldName, string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | attributeName | Name of the attribute |
Returns
| Type | Description |
|---|---|
| object | The case field attribute value |
Overrides
View SourceGetCaseFieldSet(string, bool)
Get case field by name
Declaration
protected CaseFieldSet GetCaseFieldSet(string caseFieldName, bool addField = false)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| bool | addField | Add unknown field |
Returns
| Type | Description |
|---|---|
| CaseFieldSet | The derived case field |
GetCaseSet(string)
Get case by name
Declaration
protected CaseSet GetCaseSet(string caseName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseName | The name of the case |
Returns
| Type | Description |
|---|---|
| CaseSet | The case set matching the name, script exception on missing case |
GetCaseValueAttribute(string, string)
Get case field value attribute value
Declaration
public override object GetCaseValueAttribute(string caseFieldName, string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | attributeName | Name of the attribute |
Returns
| Type | Description |
|---|---|
| object | The case field value attribute value |
Overrides
View SourceGetEnd(string)
Get the case end date by his field name
Declaration
public DateTime? GetEnd(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| DateTime? | The case end date |
GetFieldNames()
Get field names
Declaration
public string[] GetFieldNames()
Returns
| Type | Description |
|---|---|
| string[] |
GetForecast()
Get the case change forecast
Declaration
public string GetForecast()
Returns
| Type | Description |
|---|---|
| string |
GetReason()
Get the case change reason
Declaration
public string GetReason()
Returns
| Type | Description |
|---|---|
| string |
GetStart(string)
Get the case start date by his field name
Declaration
public DateTime? GetStart(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| DateTime? | The source case start date |
GetValue(string)
Get a case value by his field name, in context of the script
Declaration
public object GetValue(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| object |
GetValueType(string)
Get a case value type
Declaration
public int GetValueType(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| int |
HasEnd(string)
Test if a case end date is defined
Declaration
public bool HasEnd(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case end date is available |
HasField(string)
Test if a case field is defined
Declaration
public bool HasField(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case field is available |
HasFields()
Test if the case contains fields
Declaration
public bool HasFields()
Returns
| Type | Description |
|---|---|
| bool |
HasStart(string)
Test if a case start date is defined
Declaration
public bool HasStart(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case start date is available |
HasValue(string)
Test if a case value is defined
Declaration
public bool HasValue(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool |
InitEnd(string, DateTime?)
Initialize the case end date by his field name
Declaration
public void InitEnd(string caseFieldName, DateTime? end)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| DateTime? | end | The end date to initialize |
InitStart(string, DateTime?)
Initialize the case start date by his field name
Declaration
public void InitStart(string caseFieldName, DateTime? start)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| DateTime? | start | The start date to initialize |
InitValue(string, object)
Initialize the case value by his field name
Declaration
public void InitValue(string caseFieldName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| object | value | The value to initialize |
IsFieldComplete(string)
Test if a case field is complete
Declaration
public bool IsFieldComplete(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case field is complete |
IsFieldEmpty(string)
Test if a case field is empty (no start, end and value)
Declaration
public bool IsFieldEmpty(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case field is empty |
MandatoryEnd(string)
Test if a case end date is mandatory
Declaration
public bool MandatoryEnd(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case end date is mandatory |
MandatoryValue(string)
Test if a case value is mandatory
Declaration
public bool MandatoryValue(string caseFieldName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
Returns
| Type | Description |
|---|---|
| bool | True if the case value is mandatory |
RemoveCaseAttribute(string, string)
Remove case attribute
Declaration
public bool RemoveCaseAttribute(string caseName, string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseName | The name of the case |
| string | attributeName | The name of the case attribute |
Returns
| Type | Description |
|---|---|
| bool | True if the case attribute has been removed |
RemoveCaseFieldAttribute(string, string)
Remove case field attribute
Declaration
public bool RemoveCaseFieldAttribute(string caseFieldName, string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | attributeName | The name of the case field attribute |
Returns
| Type | Description |
|---|---|
| bool | True if the case field attribute has been removed |
RemoveCaseValueAttribute(string, string)
Remove case field value attribute
Declaration
public bool RemoveCaseValueAttribute(string caseFieldName, string attributeName)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | attributeName | The name of the case field attribute |
Returns
| Type | Description |
|---|---|
| bool | True if the case field attribute has been removed |
RemoveCaseValueTag(string, string)
Remove case value tag
Declaration
public bool RemoveCaseValueTag(string caseFieldName, string tag)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | tag | The tag to remove |
Returns
| Type | Description |
|---|---|
| bool | True if the case value tag has been removed |
SetCaseAttribute(string, string, object)
Set case attribute value
Declaration
public void SetCaseAttribute(string caseName, string attributeName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseName | The name of the case |
| string | attributeName | The name of the case attribute |
| object | value | The value of the case attribute |
SetCaseFieldAttribute(string, string, object)
Set case field attribute value
Declaration
public void SetCaseFieldAttribute(string caseFieldName, string attributeName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | attributeName | The name of the case field attribute |
| object | value | The value of the case field attribute |
SetCaseValueAttribute(string, string, object)
Set case field value attribute value
Declaration
public void SetCaseValueAttribute(string caseFieldName, string attributeName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| string | attributeName | The name of the case field attribute |
| object | value | The value of the case field value attribute |
SetEnd(string, DateTime?)
Set the case end date by his field name
Declaration
public void SetEnd(string caseFieldName, DateTime? end)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| DateTime? | end | The end date to set |
SetForecast(string)
Set the case change forecast
Declaration
public void SetForecast(string forecast)
Parameters
| Type | Name | Description |
|---|---|---|
| string | forecast |
SetReason(string)
Set the case change reason
Declaration
public void SetReason(string reason)
Parameters
| Type | Name | Description |
|---|---|---|
| string | reason |
SetStart(string, DateTime?)
Set the case start date by his field name
Declaration
public void SetStart(string caseFieldName, DateTime? start)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| DateTime? | start | The start date to set |
SetValue(string, object)
Set the target case value by his field name
Declaration
public void SetValue(string caseFieldName, object value)
Parameters
| Type | Name | Description |
|---|---|---|
| string | caseFieldName | The name of the case field |
| object | value | The value to set |