Table of Contents

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 int

The 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

fieldOption Option

The Option to copy.

destinationFieldId int

The destination field identifier.

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 int

The option identifier.

DeleteByFieldId(int)

Deletes all Options belonging to the field with the given identifier.

public override void DeleteByFieldId(int fieldId)

Parameters

fieldId int

The field identifier.

GetAll()

Get all options.

public override IEnumerable<Option> GetAll()

Returns

IEnumerable<Option>

GetById(int)

Get an option by ID.

public override Option GetById(int optionId)

Parameters

optionId int

The 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 int

The field identifier.

Returns

IEnumerable<Option>

Save(Option)

Saves or updates the given Option.

public override void Save(Option fieldOption)

Parameters

fieldOption Option

The Option to save or update.

SortDown(Option)

Sorts down.

public override void SortDown(Option fieldOption)

Parameters

fieldOption Option

The Option to sort down.

SortUp(Option)

Sorts up.

public override void SortUp(Option fieldOption)

Parameters

fieldOption Option

The Option to sort up.

ToggleActive(int)

Toggles the value of Active.

public override void ToggleActive(int optionId)

Parameters

optionId int

The option identifier.

ToggleDefault(int)

Toggles the value of DefaultSelected.

public override void ToggleDefault(int optionId)

Parameters

optionId int

The option identifier.

To top