Ejemplo n.º 1
0
        public static MvcHtmlString DropDownTreeFor <TModel, TProperty>(this HtmlHelper <TModel> helper, Expression <Func <TModel, TProperty> > expression, string actionUrl, string callBackFunc = null)
        {
            var factory = new ExtensionFactory <TModel>(helper);

            var name  = factory.GetName(expression);
            var value = factory.GetValue(expression);

            return(DropDownTreeHelper(helper, name, actionUrl, value, callBackFunc));
        }
Ejemplo n.º 2
0
        public static MvcHtmlString AsyncMultiSelectTreeFor <TModel, TProperty>(this HtmlHelper <TModel> helper, Expression <Func <TModel, TProperty> > expression, string actionUrl, string asyncUrl, string key, string httpMethod = "POST", string callBackFunc = null)
        {
            var factory = new ExtensionFactory <TModel>(helper);

            var name  = factory.GetName(expression);
            var value = factory.GetValue(expression);

            return(MultiSelectTreeHelper(helper, name, actionUrl, asyncUrl, key, value, httpMethod));
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 上传附件
        /// </summary>
        /// <param name="helper">htmlhelper对象</param>
        /// <param name="expression">表达式</param>
        /// <param name="isAutoUpload">是否自动上传</param>
        /// <param name="extensions">文件后缀名(如csv,xls)</param>
        /// <param name="fileNumLimit">最大文件数量</param>
        public static MvcHtmlString UploadFileFor <TModel, TProperty>(this HtmlHelper <TModel> helper, Expression <Func <TModel, TProperty> > expression, bool isAutoUpload = false, string extensions = null, int fileNumLimit = 0)
        {
            var factory = new ExtensionFactory <TModel>(helper);

            var name  = factory.GetName(expression);
            var value = factory.GetValue(expression);

            return(UploadFileHelper(helper, name, isAutoUpload, value, extensions, fileNumLimit));
        }
Ejemplo n.º 4
0
        public static MvcHtmlString DropDownTreeMiltiFor <TModel, TProperty>(this HtmlHelper <TModel> helper, Expression <Func <TModel, TProperty> > expression, string actionUrl, object htmlAttributes = null, string callBackFunc = null, string httpMethod = "GET")
        {
            var factory = new ExtensionFactory <TModel>(helper);

            var name  = factory.GetName(expression);
            var value = factory.GetValue(expression);

            return(DropDownTreeMiltiHelper(helper, name, actionUrl, value, htmlAttributes, callBackFunc, httpMethod));
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 日期控件
        /// </summary>
        /// <param name="helper">htmlhelper对象</param>
        /// <param name="expression">表达式</param>
        /// <param name="htmlAttributes"></param>
        public static MvcHtmlString DatePickerFor <TModel, TProperty>(this HtmlHelper <TModel> helper, Expression <Func <TModel, TProperty> > expression, object htmlAttributes)
        {
            var factory = new ExtensionFactory <TModel>(helper);

            var name  = factory.GetName(expression);
            var value = factory.GetValue(expression);

            return(DatePickerHelper(helper, name, htmlAttributes, value));
        }