Table of Contents

Class NamedItemList

Namespace
Dynamicweb.Content.Items
Assembly
Dynamicweb.dll

NamedItemList connects an ItemList to a something (a Page, an Area, ...)

public class NamedItemList : DbObject
Inheritance
NamedItemList
Inherited Members

Constructors

NamedItemList()

public NamedItemList()

Properties

ItemList

Gets or sets the item list.

public ItemList ItemList { get; }

Property Value

ItemList

ItemListId

Gets or sets the id of the item list.

public int ItemListId { get; set; }

Property Value

int

Name

Gets or sets the name of the named item list.

public string Name { get; set; }

Property Value

string

SourceId

Gets or sets the id of the owner.

public int SourceId { get; set; }

Property Value

int

SourceType

Gets or sets the type of the owner(a Page, an Area, an Item ...).

public string SourceType { get; set; }

Property Value

string

Methods

Add(Item, string, Page)

Add an item to a named item list

public static NamedItemList Add(Item item, string listName, Page page)

Parameters

item Item

The item

listName string

List name for new item

page Page

Page with list name

Returns

NamedItemList

Add(Item, string, Page, int)

Add an item to a named item list

public static NamedItemList Add(Item item, string listName, Page page, int sortIndex)

Parameters

item Item

The item

listName string

List name for new item

page Page

Page with list name

sortIndex int

Index of item in list

Returns

NamedItemList

Create(string, string, ListSourceType, int)

Create a new named list with all required properties

public static NamedItemList Create(string name, string itemType, NamedItemList.ListSourceType sourceType, int sourceId)

Parameters

name string
itemType string
sourceType NamedItemList.ListSourceType
sourceId int

Returns

NamedItemList

Delete(int)

Deletes the named list

public override void Delete(int id)

Parameters

id int

Fill(IDataReader)

Fills object properties with data from the given IDataReader object.

public override void Fill(IDataReader reader)

Parameters

reader IDataReader

Reader to read data from.

FillRow(DataRow)

Fills the given DataRow object with object state values.

protected override void FillRow(DataRow row)

Parameters

row DataRow

Row to write data into.

GetListById(int)

Gets named item list by ID

public static NamedItemList GetListById(int listId)

Parameters

listId int

The item list id

Returns

NamedItemList

GetListByName(string, ListSourceType, int)

Gets named item lists by source

public static NamedItemList GetListByName(string name, NamedItemList.ListSourceType sourceType, int sourceId)

Parameters

name string
sourceType NamedItemList.ListSourceType

The source type

sourceId int

The source id

Returns

NamedItemList

GetListsByArea(int)

Gets named item lists by area

public static IEnumerable<NamedItemList> GetListsByArea(int areaId)

Parameters

areaId int

The area id

Returns

IEnumerable<NamedItemList>

GetListsBySource(ListSourceType, int)

Gets named item lists by source

public static IEnumerable<NamedItemList> GetListsBySource(NamedItemList.ListSourceType sourceType, int sourceId)

Parameters

sourceType NamedItemList.ListSourceType

The source type

sourceId int

The source id

Returns

IEnumerable<NamedItemList>

GetNamedItemListByListId(int)

Gets named item lists by his list Id

public static NamedItemList GetNamedItemListByListId(int listId)

Parameters

listId int

The list id

Returns

NamedItemList

GetNamedItemListsBySourceType(ListSourceType)

Gets named item lists by source type

public static IEnumerable<NamedItemList> GetNamedItemListsBySourceType(NamedItemList.ListSourceType sourceType)

Parameters

sourceType NamedItemList.ListSourceType

The source type

Returns

IEnumerable<NamedItemList>
To top