Example #1
0
        /// <summary>
        /// Gets the attributes selection values.
        /// </summary>
        /// <returns></returns>
        private Dictionary<string, string> GetAttributesSelectionValues( Control[] controls )
        {
            PlaceHolder phAttributes = controls.FirstOrDefault( a => a.ID.EndsWith( "_phAttributes" ) ) as PlaceHolder;
            Dictionary<string, string> values = new Dictionary<string, string>();
            if ( this.Attributes != null )
            {
                foreach ( var attribute in this.Attributes )
                {
                    Control control = phAttributes.FindControl( string.Format( "attribute_field_{0}", attribute.Value.Id ) );
                    if ( control != null )
                    {
                        string value = attribute.Value.FieldType.Field.GetEditValue( control, attribute.Value.QualifierValues );
                        values.Add( attribute.Key, value );
                    }
                }
            }

            return values;
        }