Ejemplo n.º 1
0
        /// <summary>‍
        /// Default constructor
        /// </summary>
        public DateInputBoxExtender()
        {
            this.EnableClientState = true;
            this.state             = new DateInputClientState();
            this.value             = new NhsDate();

            this.ClientStateValuesLoaded += new EventHandler(this.DateInputBoxExtender_ClientStateValuesLoaded);
        }
Ejemplo n.º 2
0
        /// <summary>‍
        /// Handle loading of client state
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">args</param>
        private void DateInputBoxExtender_ClientStateValuesLoaded(object sender, EventArgs e)
        {
            if (this.ClientState != null)
            {
                JavaScriptSerializer jss = new JavaScriptSerializer();
                jss.RegisterConverters(new JavaScriptConverter[] { new NhsDateJavascriptConverter() });

                this.state = jss.Deserialize <DateInputClientState>(ClientState);

                this.value            = this.state.Value;
                this.calendarPosition = this.state.CalendarPosition;
            }
        }
Ejemplo n.º 3
0
        /// <summary>‍
        /// Default constructor
        /// </summary>
        public DateInputBoxExtender()
        {
            this.EnableClientState = true;
            this.state = new DateInputClientState();
            this.value = new NhsDate();

            this.ClientStateValuesLoaded += new EventHandler(this.DateInputBoxExtender_ClientStateValuesLoaded);
        }
Ejemplo n.º 4
0
        /// <summary>‍
        /// Handle loading of client state
        /// </summary>
        /// <param name="sender">sender</param>
        /// <param name="e">args</param>
        private void DateInputBoxExtender_ClientStateValuesLoaded(object sender, EventArgs e)
        {
            if (this.ClientState != null)
            {
                JavaScriptSerializer jss = new JavaScriptSerializer();
                jss.RegisterConverters(new JavaScriptConverter[] { new NhsDateJavascriptConverter() });

                this.state = jss.Deserialize<DateInputClientState>(ClientState);

                this.value = this.state.Value;
                this.calendarPosition = this.state.CalendarPosition;
            }
        }