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
IDataReaderDataReader with selected properties
GroupShopRelation(string, string)
Create relation for given group ID and shop ID
public GroupShopRelation(string theGroupId, string theShopId)
Parameters
Properties
GroupId
Group ID in relation
public string GroupId { get; set; }
Property Value
ShopId
Shop ID in relation
public string ShopId { get; set; }
Property Value
Sorting
Sort order for related shops
public int Sorting { get; set; }
Property Value
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(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
boolExecute 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
Save(string, string)
Save relation for given group ID and shop ID
public void Save(string theGroupId, string theShopId)