Class DefaultOptionService
- Namespace
- Dynamicweb.Forms.Internal
- Assembly
- Dynamicweb.Forms.dll
public sealed class DefaultOptionService : OptionService
- Inheritance
-
DefaultOptionService
- Inherited Members
Constructors
DefaultOptionService()
public DefaultOptionService()
Methods
AttachToField(int, IEnumerable<Option>)
Attaches the given Options to a field.
public override void AttachToField(int fieldId, IEnumerable<Option> options)
Parameters
fieldId
intThe field identifier.
options
IEnumerable<Option>The options to attach to the field.
Copy(Option, int)
Copies the given Option to the field with the given identifier.
public override void Copy(Option fieldOption, int destinationFieldId)
Parameters
Delete(IEnumerable<int>)
Deletes the options matching the specified IDs.
public override void Delete(IEnumerable<int> optionIds)
Parameters
optionIds
IEnumerable<int>The IDs of the options to delete.
Delete(int)
Deletes the Option with the given identifier.
public override void Delete(int optionId)
Parameters
optionId
intThe option identifier.
DeleteByFieldId(int)
Deletes all Options belonging to the field with the given identifier.
public override void DeleteByFieldId(int fieldId)
Parameters
fieldId
intThe field identifier.
GetAll()
Get all options.
public override IEnumerable<Option> GetAll()
Returns
GetById(int)
Get an option by ID.
public override Option GetById(int optionId)
Parameters
optionId
intThe option identifier.
Returns
- Option
The option, or
null
if not found.
GetOptions(int)
Get options belonging to a field.
public override IEnumerable<Option> GetOptions(int fieldId)
Parameters
fieldId
intThe field identifier.
Returns
Save(Option)
Saves or updates the given Option.
public override void Save(Option fieldOption)
Parameters
SortDown(Option)
Sorts down.
public override void SortDown(Option fieldOption)
Parameters
SortUp(Option)
Sorts up.
public override void SortUp(Option fieldOption)
Parameters
ToggleActive(int)
Toggles the value of Active.
public override void ToggleActive(int optionId)
Parameters
optionId
intThe option identifier.
ToggleDefault(int)
Toggles the value of DefaultSelected.
public override void ToggleDefault(int optionId)
Parameters
optionId
intThe option identifier.