Table of Contents

Class GroupShopRelation

Namespace
Dynamicweb.Ecommerce.Products
Assembly
Dynamicweb.Ecommerce.dll
Class for relation objects between shops and product groups
[Serializable]
public class GroupShopRelation
Inheritance
GroupShopRelation
Inherited Members

Constructors

GroupShopRelation()

Empty constructor
public GroupShopRelation()

GroupShopRelation(IDataReader)

Create relation using DataReader with selected relation
public GroupShopRelation(IDataReader dataReader)

Parameters

dataReader IDataReader
DataReader with selected properties

GroupShopRelation(string, string)

Create relation for given group ID and shop ID
public GroupShopRelation(string theGroupId, string theShopId)

Parameters

theGroupId string
Group ID
theShopId string
Shop ID

Properties

GroupId

Group ID in relation
public string GroupId { get; set; }

Property Value

string

ShopId

Shop ID in relation
public string ShopId { get; set; }

Property Value

string

Sorting

Sort order for related shops
public int Sorting { get; set; }

Property Value

int

Methods

ClearCache()

Clears group shop relation cache.
public static void ClearCache()

Clone()

Create in-memory copy of current object
public GroupShopRelation Clone()

Returns

GroupShopRelation
Copied relation

Copy()

Create and save to database a copy of current object
public GroupShopRelation Copy()

Returns

GroupShopRelation
Copied relation

Delete()

Delete relation from database
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 groups from given collection from relations between shops and groups
public CommandBuilder Delete(IEnumerable<Group> groups)

Parameters

groups IEnumerable<Group>
Groups collection to delete from relations

Returns

CommandBuilder
SQL statement used to delete relations

Delete(IEnumerable<Group>, bool)

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

Parameters

groups IEnumerable<Group>
Groups to delete from relations
run bool
Execute created statement or not

Returns

CommandBuilder
SQL statement used to delete relations

Delete(string, string)

Delete relation between given group ID and shop ID
public static void Delete(string theGroupId, string theShopId = "")

Parameters

theGroupId string
Group ID
theShopId string
Shop ID

Save(string, string)

Save relation for given group ID and shop ID
public void Save(string theGroupId, string theShopId)

Parameters

theGroupId string
Group ID
theShopId string
Shop ID
To top