Exemple #1
0
 /// <summary>
 /// 添加查看按钮
 /// 点击后弹出编辑数据的模态框
 /// </summary>
 /// <param name="column">操作列</param>
 /// <param name="typeName">类型名称</param>
 /// <param name="editUrl">编辑使用的Url</param>
 /// <param name="name">名称,不指定时使用默认值</param>
 /// <param name="buttonClass">按钮的Css类,不指定时使用默认值</param>
 /// <param name="iconClass">图标的Css类,不指定时使用默认值</param>
 /// <param name="titleTemplate">标题的模板,格式是underscore.js的格式,参数传入row</param>
 /// <param name="urlTemplate">编辑Url的模板,格式是underscore.js的格式,参数传入row</param>
 /// <param name="dialogParameters">弹出框的参数,不指定时使用默认值</param>
 public static void AddEditAction(
     this AjaxTableActionColumn column, string typeName, string editUrl,
     string name          = null, string buttonClass = null, string iconClass = null,
     string titleTemplate = null, string urlTemplate = null, object dialogParameters = null)
 {
     column.AddRemoteModalForBelongedRow(
         name ?? new T("View"),
         buttonClass ?? "btn btn-xs btn-info",
         iconClass ?? "fa fa-edit",
         titleTemplate ?? string.Format(new T("Edit {0}"), new T(typeName)),
         urlTemplate ?? (editUrl + "?id=<%-row.Id%>"),
         dialogParameters);
 }