Ejemplo n.º 1
0
        public MvcHtmlString Html(HtmlHelper htmlHelper,
                                  string smonName, object smonValue,
                                  string emonName, object emonValue
                                  )
        {
            _emonBox.SetHtmlAttributes(new { isLargerThen = "#" + smonName });

            var result = string.Format("{0}-{1}",
                                       _smonBox.Html(htmlHelper, smonName, smonValue),
                                       _emonBox.Html(htmlHelper, emonName, emonValue)
                                       );

            return(MvcHtmlString.Create(result));
        }
Ejemplo n.º 2
0
        public PFMonthRangeInOneYearBox()
        {
            _yearBox = new PFNumberBox();
            _yearBox.SetStyle("width:50px;padding-right:0px");
            _yearBox.SetRequired();
            _yearBox.SetHtmlAttributes(new { isYear = true });//自定义jquery validate

            _smonBox = new PFNumberBox();
            _smonBox.SetStyle("width:30px;padding-right:0px");
            _smonBox.SetRequired();
            _smonBox.SetHtmlAttributes(new { isMonth = true });//自定义jquery validate
            _smonBox.SetMin(1);
            _smonBox.SetMax(12);

            _emonBox = new PFNumberBox();
            _emonBox.SetStyle("width:30px;padding-right:0px");
            _emonBox.SetRequired();
            _emonBox.SetHtmlAttributes(new { isMonth = true });//自定义jquery validate
            _emonBox.SetMin(1);
            _emonBox.SetMax(12);
        }