Table of Contents

Class GroupRelation

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll
Class for parent-child relations between product groups
[Serializable]
public class GroupRelation
Inheritance
GroupRelation
Inherited Members

Constructors

GroupRelation()

Empty constructor
public GroupRelation()

GroupRelation(IDataReader)

Create relation object with data from given DataReader
public GroupRelation(IDataReader dataReader)

Parameters

dataReader IDataReader
DataReader with selected relation

GroupRelation(string, string)

Create groups relation using group ID and parent group ID
public GroupRelation(string id, string groupParentId)

Parameters

id string
Group ID
groupParentId string
Parent group ID

Properties

Id

Group ID.
public string Id { get; set; }

Property Value

string

InheritCategories

Do inherit categories.
public bool InheritCategories { get; set; }

Property Value

bool

IsPrimary

Is this group primary.
public bool IsPrimary { get; set; }

Property Value

bool

ParentId

Parent group ID.
public string ParentId { get; set; }

Property Value

string

Sorting

Sort order of current group inside parent group's children collection.
public int Sorting { get; set; }

Property Value

int

Methods

ClearCache()

Clears the relations cache.
public static void ClearCache()

Clone()

Create in-memory copy of current relation
public GroupRelation Clone()

Returns

GroupRelation
Copied relation

Copy()

Create a copy of current relation and save it to database
public GroupRelation Copy()

Returns

GroupRelation
Copied relation

Delete()

Delete current relation
public void Delete()

Delete(GroupCollection)

[Obsolete("Use CommandBuilder Delete(IEnumerable<Group> groups) method instead.")]
public string Delete(GroupCollection groups)

Parameters

groups GroupCollection

Returns

string

Delete(GroupCollection, bool)

[Obsolete("Use CommandBuilder Delete(IEnumerable<Group> groups, bool run) method instead.")]
public string Delete(GroupCollection groups, bool run)

Parameters

groups GroupCollection
run bool

Returns

string

Delete(IEnumerable<Group>)

Delete all relations for groups from given collection
public CommandBuilder Delete(IEnumerable<Group> groups)

Parameters

groups IEnumerable<Group>
Groups collection to delete from group relations

Returns

CommandBuilder
SQL statement used to delete relations

Delete(IEnumerable<Group>, bool)

Create SQL statement to delete all relations for groups from given collection and optionally execute it
public CommandBuilder Delete(IEnumerable<Group> groups, bool run)

Parameters

groups IEnumerable<Group>
Groups collection to delete from group relations
run bool
Execute prepared SQL statement or not

Returns

CommandBuilder
SQL statement used to delete relations

Delete(string, string)

Delete relation between given group and parent group
public void Delete(string theGroupId, string groupParentId = "")

Parameters

theGroupId string
Group ID
groupParentId string
Parent group ID

get_GroupRelationsByChildId(string)

Get all group relations for given child group ID
[Obsolete("Use GetGroupRelationsByChildId instead")]
public static GroupRelationCollection get_GroupRelationsByChildId(string childId)

Parameters

childId string
Child group ID

Returns

GroupRelationCollection
GroupRelation collection

get_GroupRelationsByParentId(string)

Get all group relations for given parent group ID
[Obsolete("Use GetGroupRelationsByParentId instead")]
public static GroupRelationCollection get_GroupRelationsByParentId(string theParentId)

Parameters

theParentId string
Parent group ID

Returns

GroupRelationCollection
GroupRelation collection

GetGroupRelationsByChildId(string)

Get all group relations for given child group ID
public static GroupRelationCollection GetGroupRelationsByChildId(string childId)

Parameters

childId string
Child group ID

Returns

GroupRelationCollection

GetGroupRelationsByParentId(string)

Get all group relations for given parent group ID
public static GroupRelationCollection GetGroupRelationsByParentId(string theParentId)

Parameters

theParentId string
Parent group ID

Returns

GroupRelationCollection

Save(string, string)

Save relation object
public void Save(string theGroupId, string theParentId)

Parameters

theGroupId string
Group ID
theParentId string
Parent group ID

Remarks

Fires Notifications.eCommerce.Group.RelationUpdated event
To top