C# Class Engage.Dnn.Publish.ItemRelationship

Inheritance: Engage.Dnn.Publish.Portability.TransportableElement
Show file Open project: EngageSoftware/Engage-Publish Class Usage Examples

Private Properties

Property Type Description
BuildHierarchy System.Windows.Forms.TreeNode
Create ItemRelationship
FillListControl void

Public Methods

Method Description
AddItemRelationship ( IDbTransaction trans, int childItemId, int childItemVersionId, int parentItemId, int relationshipTypeId, string startDate, string endDate, int sortOrder ) : void
AddItemRelationship ( int childItemId, int childItemVersionId, int parentItemId, int relationshipTypeId, string startDate, string endDate, int sortOrder ) : void
AddItemRelationshipWithOriginalSortOrder ( IDbTransaction trans, int childItemId, int childItemVersionId, int parentItemId, int relationshipTypeId, string startDate, string endDate, int originalItemVersionId ) : void
CorrectDates ( ) : void
DisplayCategoryHierarchy ( ListControl lc, int categoryId, int portalId, bool includeParentCategory ) : void

Inserts a collection of ListItem into a System.Web.UI.WebControls.ListControl. Each item has a value of the name of the category plus ticks to indicate hierarchy between categories. Each item has a value of the category's itemId. If you have problems showing all Categories, you can try using DisplayChildren(ListControl, int, int?) on an instantiated ItemRelationship (see Controls.ItemRelationships.UpdateAvailableItems for an example).

DisplayCategoryHierarchy ( ListControl lc, int categoryId, int portalId, bool includeParentCategory, int itemToExclude ) : void

Inserts a collection of ListItem into a System.Web.UI.WebControls.ListControl. Each item has a value of the name of the category plus ticks to indicate hierarchy between categories. Each item has a value of the category's itemId. If you have problems showing all Categories, you can try using DisplayChildren(ListControl, int, int?) on an instantiated ItemRelationship (see Controls.ItemRelationships.UpdateAvailableItems for an example).

DisplayChildren ( ListControl lc, int portalId ) : void
DisplayChildren ( ListControl lc, int portalId, int itemToExclude ) : void
GetAllChildren ( int parentId, int relationshipTypeId, int portalId ) : DataSet
GetAllChildrenNLevels ( int parentCategoryId, int nLevels, int mItems, int portalId ) : System.Windows.Forms.TreeNode
GetAllChildrenNLevelsInDataTable ( int parentCategoryId, int nLevels, int mItems, int portalId ) : DataTable
GetAllRelationships ( int moduleId ) : List
GetAllRelationshipsByPortalId ( int portalId ) : List
GetItemChildRelationships ( int parentItemId, int relationshipTypeId ) : ArrayList
GetItemChildRelationships ( int parentItemId, int relationshipTypeId, int portalId ) : ArrayList
GetItemRelationshipByItemRelationshipId ( int itemRelationshipId ) : DataSet
GetItemRelationships ( int childItemId, int childItemVersionId, int relationshipTypeId, bool isActive ) : ArrayList
GetItemRelationships ( int childItemId, int childItemVersionId, int relationshipTypeId, bool isActive, int portalId ) : ArrayList
GetItemRelationships ( int childItemId, int childItemVersionId, bool isActive ) : List
Import ( int currentModuleId, int portalId ) : void

This method is invoked by the Import mechanism and has to take this instance of a ItemRelationship and resolve all the id's using the names supplied in the export. hk

ItemRelationship ( ) : System
UpdateItemRelationship ( int itemRelationshipId, int sortOrder ) : void

Private Methods

Method Description
BuildHierarchy ( DataTable dt ) : System.Windows.Forms.TreeNode
Create ( ) : ItemRelationship
FillListControl ( System.Windows.Forms.TreeNode root, ListControl lc, int itemToExclude ) : void

Method Details

AddItemRelationship() public static method

public static AddItemRelationship ( IDbTransaction trans, int childItemId, int childItemVersionId, int parentItemId, int relationshipTypeId, string startDate, string endDate, int sortOrder ) : void
trans IDbTransaction
childItemId int
childItemVersionId int
parentItemId int
relationshipTypeId int
startDate string
endDate string
sortOrder int
return void

AddItemRelationship() public static method

public static AddItemRelationship ( int childItemId, int childItemVersionId, int parentItemId, int relationshipTypeId, string startDate, string endDate, int sortOrder ) : void
childItemId int
childItemVersionId int
parentItemId int
relationshipTypeId int
startDate string
endDate string
sortOrder int
return void

AddItemRelationshipWithOriginalSortOrder() public static method

public static AddItemRelationshipWithOriginalSortOrder ( IDbTransaction trans, int childItemId, int childItemVersionId, int parentItemId, int relationshipTypeId, string startDate, string endDate, int originalItemVersionId ) : void
trans IDbTransaction
childItemId int
childItemVersionId int
parentItemId int
relationshipTypeId int
startDate string
endDate string
originalItemVersionId int
return void

CorrectDates() public method

public CorrectDates ( ) : void
return void

DisplayCategoryHierarchy() public static method

Inserts a collection of ListItem into a System.Web.UI.WebControls.ListControl. Each item has a value of the name of the category plus ticks to indicate hierarchy between categories. Each item has a value of the category's itemId. If you have problems showing all Categories, you can try using DisplayChildren(ListControl, int, int?) on an instantiated ItemRelationship (see Controls.ItemRelationships.UpdateAvailableItems for an example).
public static DisplayCategoryHierarchy ( ListControl lc, int categoryId, int portalId, bool includeParentCategory ) : void
lc ListControl The into which the category options will be added.
categoryId int The id of the parent category from which the hierarchy will start, or -1 if all categories.
portalId int The id of the portal in which these categories reside.
includeParentCategory bool if set to true includes the parent category in the list, otherwise only shows the parent's children. This is ignored if the TopLevelCategory is selected.
return void

DisplayCategoryHierarchy() public static method

Inserts a collection of ListItem into a System.Web.UI.WebControls.ListControl. Each item has a value of the name of the category plus ticks to indicate hierarchy between categories. Each item has a value of the category's itemId. If you have problems showing all Categories, you can try using DisplayChildren(ListControl, int, int?) on an instantiated ItemRelationship (see Controls.ItemRelationships.UpdateAvailableItems for an example).
public static DisplayCategoryHierarchy ( ListControl lc, int categoryId, int portalId, bool includeParentCategory, int itemToExclude ) : void
lc ListControl The into which the category options will be added.
categoryId int The id of the parent category from which the hierarchy will start, or -1 if all categories.
portalId int The id of the portal in which these categories reside.
includeParentCategory bool if set to true includes the parent category in the list, otherwise only shows the parent's children. This is ignored if the TopLevelCategory is selected.
itemToExclude int An item which you want to exclude from the list (including its children). This is typically used to keep circular relationships from being possibe options.
return void

DisplayChildren() public method

public DisplayChildren ( ListControl lc, int portalId ) : void
lc ListControl
portalId int
return void

DisplayChildren() public method

public DisplayChildren ( ListControl lc, int portalId, int itemToExclude ) : void
lc ListControl
portalId int
itemToExclude int
return void

GetAllChildren() public static method

public static GetAllChildren ( int parentId, int relationshipTypeId, int portalId ) : DataSet
parentId int
relationshipTypeId int
portalId int
return DataSet

GetAllChildrenNLevels() public static method

public static GetAllChildrenNLevels ( int parentCategoryId, int nLevels, int mItems, int portalId ) : System.Windows.Forms.TreeNode
parentCategoryId int
nLevels int
mItems int
portalId int
return System.Windows.Forms.TreeNode

GetAllChildrenNLevelsInDataTable() public static method

public static GetAllChildrenNLevelsInDataTable ( int parentCategoryId, int nLevels, int mItems, int portalId ) : DataTable
parentCategoryId int
nLevels int
mItems int
portalId int
return DataTable

GetAllRelationships() public static method

public static GetAllRelationships ( int moduleId ) : List
moduleId int
return List

GetAllRelationshipsByPortalId() public static method

public static GetAllRelationshipsByPortalId ( int portalId ) : List
portalId int
return List

GetItemChildRelationships() public static method

public static GetItemChildRelationships ( int parentItemId, int relationshipTypeId ) : ArrayList
parentItemId int
relationshipTypeId int
return ArrayList

GetItemChildRelationships() public static method

public static GetItemChildRelationships ( int parentItemId, int relationshipTypeId, int portalId ) : ArrayList
parentItemId int
relationshipTypeId int
portalId int
return ArrayList

GetItemRelationshipByItemRelationshipId() public static method

public static GetItemRelationshipByItemRelationshipId ( int itemRelationshipId ) : DataSet
itemRelationshipId int
return DataSet

GetItemRelationships() public static method

public static GetItemRelationships ( int childItemId, int childItemVersionId, int relationshipTypeId, bool isActive ) : ArrayList
childItemId int
childItemVersionId int
relationshipTypeId int
isActive bool
return ArrayList

GetItemRelationships() public static method

public static GetItemRelationships ( int childItemId, int childItemVersionId, int relationshipTypeId, bool isActive, int portalId ) : ArrayList
childItemId int
childItemVersionId int
relationshipTypeId int
isActive bool
portalId int
return ArrayList

GetItemRelationships() public static method

public static GetItemRelationships ( int childItemId, int childItemVersionId, bool isActive ) : List
childItemId int
childItemVersionId int
isActive bool
return List

Import() public method

This method is invoked by the Import mechanism and has to take this instance of a ItemRelationship and resolve all the id's using the names supplied in the export. hk
public Import ( int currentModuleId, int portalId ) : void
currentModuleId int
portalId int
return void

ItemRelationship() public method

public ItemRelationship ( ) : System
return System

UpdateItemRelationship() public static method

public static UpdateItemRelationship ( int itemRelationshipId, int sortOrder ) : void
itemRelationshipId int
sortOrder int
return void