Exemplo n.º 1
0
        private void BindFeaturesWidget()
        {
            List <DynamicContent> dataSource;

            var productFeatures = DynamicModulesUtilities.GetDataItemsByType(productFeaturesType);

            if (productFeatures != null)
            {
                if (this.ProductId != null && this.ProductId != Guid.Empty)
                {
                    var productTitle = DynamicModulesUtilities.GetDataItemTitleById(productType, this.ProductId);
                    dataSource = this.GetDataItemsRelatedToItemWithTitle(productTitle, productFeatures);
                }
                else
                {
                    dataSource = productFeatures.ToList();
                }

                if (dataSource != null)
                {
                    this.featuresList.DataSource = dataSource;
                    this.featuresList.DataBind();

                    this.featuresPopupList.DataSource = dataSource;
                    this.featuresPopupList.DataBind();
                }
            }
        }