using System.Linq.Expressions; using QMAPP.Common.Web; using System.Web.Routing; namespace System.Web.Mvc.Html { /// /// 智能感知文本框 /// 创建者:李炳海 /// 创建日期:2013.4.8 /// public static class MyQPerceptTextbox { /// /// 智能感知文本框 /// /// 实体类型 /// 属性 /// htmlHelper /// 字段表达式 /// 数据类别 /// 回调 /// html代码 public static MvcHtmlString QMyPerceptTextboxFor(this HtmlHelper htmlHelper, Expression> expression, string kind, string callBackFunc) { return QMyPerceptTextboxFor(htmlHelper, expression, kind, callBackFunc, null); } /// /// 智能感知文本框 /// /// 实体类型 /// 属性 /// htmlHelper /// 字段表达式 /// 数据类别 /// 回调 /// 属性 /// 参数 /// html代码 public static MvcHtmlString QMyPerceptTextboxFor(this HtmlHelper htmlHelper, Expression> expression, string kind, string callBackFunc, object htmlAttributes, params string[] ps) { if (QPerceptTextbox.MyDataGeter == null) QPerceptTextbox.MyDataGeter = new AppDataGeter(); return QPerceptTextbox.QPerceptTextboxFor(htmlHelper, expression, null, kind, callBackFunc, htmlAttributes, ps); } /// /// 智能感知文本框 /// /// 实体类型 /// 属性 /// htmlHelper /// 字段表达式 /// 字段显示表达式 /// 数据类别 /// 回调 /// 属性 /// html代码 public static MvcHtmlString QMyPerceptTextboxFor(this HtmlHelper htmlHelper, Expression> expression, Expression> expressionName, string kind, string callBackFunc, params string[] ps) { return QMyPerceptTextboxFor(htmlHelper, expression, expressionName, kind, callBackFunc, null, ps); } /// /// 智能感知文本框 /// /// 实体类型 /// 属性 /// htmlHelper /// 字段表达式 /// 字段显示表达式 /// 数据类别 /// 回调 /// 属性 /// html代码 public static MvcHtmlString QMyPerceptTextboxFor(this HtmlHelper htmlHelper, Expression> expression, Expression> expressionName, string kind, string callBackFunc, object htmlAttributes, params string[] ps) { if (QPerceptTextbox.MyDataGeter == null) QPerceptTextbox.MyDataGeter = new AppDataGeter(); return QPerceptTextbox.QPerceptTextboxFor(htmlHelper, expression, expressionName, kind, callBackFunc, htmlAttributes, ps); } #region public static MvcHtmlString QMyPerceptTextboxForD(this HtmlHelper htmlHelper, Expression> expression, Expression> expressionName, string kind, string callBackFunc, object htmlAttributes, string idName, string contentName, string text, params string[] ps) { if (QPerceptTextboxD.MyDataGeter == null) QPerceptTextboxD.MyDataGeter = new AppDataGeter(); return QPerceptTextboxD.QPerceptTextboxForD(htmlHelper, expression, expressionName, kind, callBackFunc, new RouteValueDictionary(htmlAttributes), idName, contentName, text, ps); } #endregion } }