Пример #1
0
        /// <summary>
        /// Builds a Twitter Bootstrap style checkbox control group.
        /// </summary>
        public static BootstrapCheckBoxFormGroupBuilder <TModel> BuildCheckBoxGroupFor <TModel>(
            this HtmlHelper <TModel> html,
            Expression <Func <TModel, bool> > expression,
            Action <CheckBoxFormGroupConfig <TModel> > groupConfig = null)
        {
            var config = new CheckBoxFormGroupConfig <TModel>(html)
            {
                InitExpression = expression
            };

            if (groupConfig != null)
            {
                groupConfig(config);
            }

            return(new BootstrapCheckBoxFormGroupBuilder <TModel>(html, config));
        }
Пример #2
0
        /// <summary>
        /// Builds a Twitter Bootstrap style checkbox control group.
        /// </summary>
        public static BootstrapCheckBoxFormGroupBuilder BuildCheckBoxGroup(
            this HtmlHelper html,
            string expression,
            Action <CheckBoxFormGroupConfig> groupConfig = null)
        {
            var config = new CheckBoxFormGroupConfig(html)
            {
                InitExpression = expression
            };

            if (groupConfig != null)
            {
                groupConfig(config);
            }

            return(new BootstrapCheckBoxFormGroupBuilder(html, config));
        }