Exemple #1
0
        /// <summary>
        /// Creates the control(s) necessary for prompting user for a new value
        /// </summary>
        /// <param name="configurationValues">The configuration values.</param>
        /// <param name="id">The id.</param>
        /// <returns>
        /// The control
        /// </returns>
        public override Control EditControl(Dictionary <string, ConfigurationValue> configurationValues, string id)
        {
            DynamicPhoneNumberPicker dynamicPhoneNumberPicker = new DynamicPhoneNumberPicker {
                ID = id
            };

            return(dynamicPhoneNumberPicker);
        }
Exemple #2
0
        /// <summary>
        /// Reads new values entered by the user for the field (as id)
        /// </summary>
        /// <param name="control">Parent control that controls were added to in the CreateEditControl() method</param>
        /// <param name="configurationValues">The configuration values.</param>
        /// <returns></returns>
        public override string GetEditValue(System.Web.UI.Control control, Dictionary <string, ConfigurationValue> configurationValues)
        {
            DynamicPhoneNumberPicker picker = control as DynamicPhoneNumberPicker;

            if (string.IsNullOrWhiteSpace(picker.PhoneNumber))
            {
                return("");
            }
            var value = string.Format("{0}|{1}", picker.PhoneNumberType, picker.PhoneNumber);

            return(value);
        }