Class OptionService
- Namespace
- Dynamicweb.Forms
- Assembly
- Dynamicweb.Forms.dll
- Inheritance
-
Option
Service
- Inherited Members
Methods
AttachToField(int, IEnumerable<Option>)
Attaches the given Options to a field.
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.
Parameters
Delete(IEnumerable<int>)
Deletes the options matching the specified IDs.
Parameters
optionIds
IEnumerable<int>The IDs of the options to delete.
Delete(int)
Deletes the Option with the given identifier.
Parameters
optionId
intThe option identifier.
DeleteByFieldId(int)
Deletes all Options belonging to the field with the given identifier.
Parameters
fieldId
intThe field identifier.
GetAll()
Get all options.
Returns
GetById(int)
Get an option by ID.
Parameters
optionId
intThe option identifier.
Returns
- Option
The option, or
null
if not found.
GetOptions(int)
Get options belonging to a field.
Parameters
fieldId
intThe field identifier.
Returns
Save(Option)
Saves or updates the given Option.
Parameters
SortDown(Option)
Sorts down.
Parameters
SortUp(Option)
Sorts up.
Parameters
ToggleActive(int)
Toggles the value of Active.
Parameters
optionId
intThe option identifier.
ToggleDefault(int)
Toggles the value of Default
Parameters
optionId
intThe option identifier.