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 |
---|---|---|
IApi |
apiService |
Methods
DeleteOverride(Int32)
Deletes the specified override in the DB.
Declaration
public Task DeleteOverride(int overrideId)
Parameters
Type | Name | Description |
---|---|---|
System. |
overrideId |
Returns
Type | Description |
---|---|
System. |
Exceptions
Type | Condition |
---|---|
System. |
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. |
templateName | Limits the overrides to only ones that apply to this template. |
System. |
date | Limits the overrides to only ones that are active within the commission period that this day falls in. |
Returns
Type | Description |
---|---|
System. |
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 |
---|---|---|
Commission |
comOverride | The override to update or create. |
Returns
Type | Description |
---|---|
System. |
The Id of the override saved. |
Exceptions
Type | Condition |
---|---|
System. |
Thrown when the begin and end periods are invalid. |
System. |
Thrown when the associate is not found. |