public List <KeyValuePair <int, decimal> > GetPackageChildEntries(int id) { List <KeyValuePair <int, decimal> > childEntryQuanities = new List <KeyValuePair <int, decimal> >(); CatalogRelationResponseGroup group = new CatalogRelationResponseGroup(CatalogRelationResponseGroup.ResponseGroup.CatalogEntry); CatalogRelationDto relations = CatalogContext.Current.GetCatalogRelationDto(0, 0, id, string.Empty, group); if (relations != null && relations.CatalogEntryRelation != null && relations.CatalogEntryRelation.Count > 0) { foreach (CatalogRelationDto.CatalogEntryRelationRow row in relations.CatalogEntryRelation.Rows) { childEntryQuanities.Add(new KeyValuePair <int, decimal>(row.ChildEntryId, row.Quantity)); } } return(childEntryQuanities); }
public List<KeyValuePair<int, decimal>> GetPackageChildEntries(int id) { List<KeyValuePair<int, decimal>> childEntryQuanities = new List<KeyValuePair<int, decimal>>(); CatalogRelationResponseGroup group = new CatalogRelationResponseGroup(CatalogRelationResponseGroup.ResponseGroup.CatalogEntry); CatalogRelationDto relations = CatalogContext.Current.GetCatalogRelationDto(0, 0, id, string.Empty, group); if (relations != null && relations.CatalogEntryRelation != null && relations.CatalogEntryRelation.Count > 0) { foreach (CatalogRelationDto.CatalogEntryRelationRow row in relations.CatalogEntryRelation.Rows) { childEntryQuanities.Add(new KeyValuePair<int, decimal>(row.ChildEntryId, row.Quantity)); } } return childEntryQuanities; }
/// <summary> /// Gets the catalog relation dto. /// </summary> /// <param name="catalogId">The catalog id.</param> /// <param name="catalogNodeId">The catalog node id.</param> /// <param name="catalogEntryId">The catalog entry id.</param> /// <param name="groupName">Name of the group.</param> /// <param name="responseGroup">The response group.</param> /// <returns></returns> public CatalogRelationDto GetCatalogRelationDto(int catalogId, int catalogNodeId, int catalogEntryId, string groupName, CatalogRelationResponseGroup responseGroup) { return(CatalogRelationManager.GetCatalogRelationDto(catalogId, catalogNodeId, catalogEntryId, groupName, responseGroup)); }