예제 #1
0
        public override string GetPersistInnerHtml()
        {
            StringWriter   sw   = new StringWriter();
            HtmlTextWriter html = new HtmlTextWriter(sw);

            RestrictedCalendar calendar
                = this.Component as RestrictedCalendar;

            if (calendar != null)
            {
                // for each color in the collection, output its
                // html known name (if it is a known color)
                // or its html hex string representation
                // in the format:
                //   <Color value='xxx' />
                foreach (DateTime date in calendar.NonSelectableDates)
                {
                    html.WriteBeginTag("DateTime");
                    html.WriteAttribute("Value", date.ToString());
                    html.WriteLine(HtmlTextWriter.SelfClosingTagEnd);
                }
            }

            return(sw.ToString());
        }
        public override string GetPersistInnerHtml()
        {
            StringWriter   sw   = new StringWriter();
            HtmlTextWriter html = new HtmlTextWriter(sw);

            RestrictedCalendar calendar
                = this.Component as RestrictedCalendar;

            if (calendar != null)
            {
                // in the format:
                //   <DateTime Value='xxx' />
                foreach (DateTime date in calendar.NonSelectableDates)
                {
                    html.WriteBeginTag("DateTime");
                    html.WriteAttribute("Value", date.ToString());
                    html.WriteLine(HtmlTextWriter.SelfClosingTagEnd);
                }
            }

            return(sw.ToString());
        }