Class OverrideService
Inheritance
System.Object
OverrideService
Implements
Namespace: DirectScale.Disco.Extension.Services
Assembly: DirectScale.Disco.Extension.Abstractions.dll
Syntax
public class OverrideService : Object, IOverrideService
Constructors
OverrideService(IApiService)
Declaration
public OverrideService(IApiService apiService)
Parameters
Type | Name | Description |
---|---|---|
IApiService | apiService |
Methods
DeleteOverride(Int32)
Deletes the specified override in the DB.
Declaration
public Task DeleteOverride(int overrideId)
Parameters
Type | Name | Description |
---|---|---|
System.Int32 | overrideId |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task |
Exceptions
Type | Condition |
---|---|
System.Exception | Thrown when specified override is not found. |
GetOverrides(String, DateTime)
Gets the overrides that apply to templateName
during the period containing date
.
Declaration
public Task<CommissionOverride[]> GetOverrides(string templateName, DateTime date)
Parameters
Type | Name | Description |
---|---|---|
System.String | templateName | Limits the overrides to only ones that apply to this template. |
System.DateTime | date | Limits the overrides to only ones that are active within the commission period that this day falls in. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<CommissionOverride[]> | Commission overrides that apply for the specified period. |
See Also
SaveOverride(CommissionOverride)
Validates comOverride
then creates or updates the override in the database.
Declaration
public Task<int> SaveOverride(CommissionOverride comOverride)
Parameters
Type | Name | Description |
---|---|---|
CommissionOverride | comOverride | The override to update or create. |
Returns
Type | Description |
---|---|
System.Threading.Tasks.Task<System.Int32> | The Id of the override saved. |
Exceptions
Type | Condition |
---|---|
System.Exception | Thrown when the begin and end periods are invalid. |
System.Exception | Thrown when the associate is not found. |