//constructor
        public AutoCompleteDataEditor(IData data, AutoCompleteOptions options)
        {
            this.data = data;
            this.options = options;

            switch (uQuery.GetUmbracoObjectType(new Guid(this.options.TypeToPick)))
            {
                case uQuery.UmbracoObjectType.Document: this.sourceItems = uQuery.GetNodesByXPath(this.options.XPath).ToIntStringDictionary(); break;
                case uQuery.UmbracoObjectType.Media: this.sourceItems = uQuery.GetMediaByXPath(this.options.XPath).ToIntStringDictionary(); break;
                case uQuery.UmbracoObjectType.Member: this.sourceItems = uQuery.GetMembersByXPath(this.options.XPath).ToIntStringDictionary(); break;
            }
        }
예제 #2
0
        //constructor
        public AutoCompleteDataEditor(IData data, AutoCompleteOptions options)
        {
            this.data    = data;
            this.options = options;

            switch (uQuery.GetUmbracoObjectType(new Guid(this.options.TypeToPick)))
            {
            case uQuery.UmbracoObjectType.Document: this.sourceItems = uQuery.GetNodesByXPath(this.options.XPath).ToIntStringDictionary(); break;

            case uQuery.UmbracoObjectType.Media: this.sourceItems = uQuery.GetMediaByXPath(this.options.XPath).ToIntStringDictionary(); break;

            case uQuery.UmbracoObjectType.Member: this.sourceItems = uQuery.GetMembersByXPath(this.options.XPath).ToIntStringDictionary(); break;
            }
        }
        /// <summary>
        /// Initializes a new instance of the <see cref="AutoCompleteDataEditorUpdatePanel"/> class.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <param name="options">The options.</param>
        public AutoCompleteDataEditorUpdatePanel(IData data, AutoCompleteOptions options)
        {
            this.data = data;
            this.options = options;

            string xPath = this.options.XPath;

            switch (this.TypeToPick)
            {
                case umbraco.uQuery.UmbracoObjectType.Document:
                    this.sourceItems = umbraco.uQuery.GetNodesByXPath(xPath).ToNameIds();
                    break;
                case umbraco.uQuery.UmbracoObjectType.Media:
                    this.sourceItems = umbraco.uQuery.GetMediaByXPath(xPath).ToNameIds();
                    break;
                case umbraco.uQuery.UmbracoObjectType.Member:
                    this.sourceItems = umbraco.uQuery.GetMembersByXPath(xPath).ToNameIds();
                    break;
            }
        }
예제 #4
0
        /// <summary>
        /// Initializes a new instance of the <see cref="AutoCompleteDataEditorUpdatePanel"/> class.
        /// </summary>
        /// <param name="data">The data.</param>
        /// <param name="options">The options.</param>
        public AutoCompleteDataEditorUpdatePanel(IData data, AutoCompleteOptions options)
        {
            this.data    = data;
            this.options = options;

            string xPath = this.options.XPath;

            switch (this.TypeToPick)
            {
            case umbraco.uQuery.UmbracoObjectType.Document:
                this.sourceItems = umbraco.uQuery.GetNodesByXPath(xPath).ToNameIds();
                break;

            case umbraco.uQuery.UmbracoObjectType.Media:
                this.sourceItems = umbraco.uQuery.GetMediaByXPath(xPath).ToNameIds();
                break;

            case umbraco.uQuery.UmbracoObjectType.Member:
                this.sourceItems = umbraco.uQuery.GetMembersByXPath(xPath).ToNameIds();
                break;
            }
        }