예제 #1
0
        public static MvcHtmlString BuildCheckBox(this HtmlHelper htmlHelper, string name, bool?isChecked = false, Action <PFCheckBox> action = null)
        {
            var component = new PFCheckBox();

            if (action != null)
            {
                action(component);
            }
            return(component.Html(htmlHelper, name, isChecked));
        }
예제 #2
0
        public static MvcHtmlString BuildCheckBoxFor <TModel, TProperty>(this HtmlHelper <TModel> htmlHelper, Expression <Func <TModel, TProperty> > expression, Action <PFCheckBox> action = null)
        {
            var component = new PFCheckBox();

            if (action != null)
            {
                action(component);
            }
            return(component.Html(htmlHelper, expression));
        }