/// <summary> /// 构建表格时的处理 /// </summary> public void OnBuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.ExtraOptions["pageSize"] = int.MaxValue; table.ExtraOptions["hidePagination"] = true; table.MenuItems.AddToggleAllForAjaxTableTree("Level"); table.MenuItems.AddDivider(); table.MenuItems.AddEditAction( Builder.Type, Builder.EditUrl, dialogParameters: new { size = "size-wide" }); table.MenuItems.AddAddAction( Builder.Type, Builder.AddUrl, name: new T("Add Top Level Class"), dialogParameters: new { size = "size-wide" }); table.MenuItems.AddRemoteModalForSelectedRow( new T("Add Same Level Class"), "fa fa-plus", string.Format(new T("Add {0}"), new T(Builder.Type)), Builder.AddUrl + "?parentId=<%-row.ParentId%>", new { size = "size-wide" }); table.MenuItems.AddRemoteModalForSelectedRow( new T("Add Child Class"), "fa fa-plus", string.Format(new T("Add {0}"), new T(Builder.Type)), Builder.AddUrl + "?parentId=<%-row.Id%>", new { size = "size-wide" }); searchBar.KeywordPlaceHolder = "Name/Remark"; searchBar.MenuItems.AddDivider(); searchBar.MenuItems.AddRecycleBin(); searchBar.MenuItems.AddAddAction( Builder.Type, Builder.AddUrl, name: new T("Add Top Level Class"), dialogParameters: new { size = "size-wide" }); searchBar.BeforeItems.AddAddAction( Builder.Type, Builder.AddUrl, name: new T("Add Top Level Class"), dialogParameters: new { size = "size-wide" }); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <PaymentTransactionCrudController>(); searchBar.StandardSetupFor <PaymentTransactionCrudController>( "Serial/Payer/Payee/Description/Remark"); }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <PaymentTransactionRecordsApp>(); searchBar.StandardSetupForCrudPage <PaymentTransactionRecordsApp>( "Serial/Payer/Payee/Description/Remark"); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <ProductPropertyCrudController>(); searchBar.StandardSetupFor <ProductPropertyCrudController>("Name/Remark"); searchBar.Conditions.Add(new FormField(new CheckBoxFieldAttribute("IsSalesProperty"))); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <BuyerOrderCrudController>(); table.Template = "/static/shopping.order.tmpl/orderTable.tmpl"; searchBar.StandardSetupFor <BuyerOrderCrudController>("Serial/Remark"); searchBar.BeforeItems.AddOrderFilterBar(); searchBar.Conditions.Add(new FormField(new TextBoxFieldAttribute("Seller"))); searchBar.Conditions.Add(new FormField(new DropdownListFieldAttribute( "RemarkFlags", typeof(ListItemsWithOptional <ListItemFromEnum <OrderRemarkFlags> >)))); }
public IActionResult AjaxTable() { var table = new AjaxTableBuilder(); table.Id = "ExampleTable"; table.Target = "/example/ajax_table_search"; var searchBar = new AjaxTableSearchBarBuilder(); searchBar.TableId = table.Id; searchBar.Conditions.Add(new FormField(new CheckBoxFieldAttribute("Deleted"))); return(new TemplateResult("zkweb.examples/ajax_table.html", new { table, searchBar })); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <ProductCrudController>(); searchBar.StandardSetupFor <ProductCrudController>("Name/Remark"); searchBar.Conditions.Add(new FormField(new DropdownListFieldAttribute( "ProductType", typeof(ListItemsWithOptional <ProductTypeListItemProvider>)))); searchBar.Conditions.Add(new FormField(new DropdownListFieldAttribute( "ProductState", typeof(ListItemsWithOptional <ProductStateListItemProvider>)))); searchBar.Conditions.Add(new FormField(new DropdownListFieldAttribute( "ProductClass", typeof(ListItemsWithOptional <GenericClassListItemProvider <ProductClassController> >)))); searchBar.Conditions.Add(new FormField(new DropdownListFieldAttribute( "ProductTag", typeof(ListItemsWithOptional <GenericTagListItemProvider <ProductTagController> >)))); }
/// <summary> /// 构建表格时的处理 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { var app = new TController(); var dialogParameters = new { size = "size-wide" }; table.MenuItems.AddDivider(); table.MenuItems.AddEditAction(app.Type, app.EditUrl, dialogParameters: dialogParameters); table.MenuItems.AddAddAction(app.Type, app.AddUrl, dialogParameters: dialogParameters); searchBar.KeywordPlaceHolder = "Name/Remark"; searchBar.MenuItems.AddDivider(); searchBar.MenuItems.AddRecycleBin(); searchBar.MenuItems.AddAddAction(app.Type, app.AddUrl, dialogParameters: dialogParameters); searchBar.BeforeItems.AddAddAction(app.Type, app.AddUrl, dialogParameters: dialogParameters); }
/// <summary> /// 构建表格时的处理 /// </summary> public void OnBuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.MenuItems.AddDivider(); table.MenuItems.AddEditAction( Builder.Type, Builder.EditUrl, dialogParameters: new { size = "size-wide" }); table.MenuItems.AddAddAction( Builder.Type, Builder.AddUrl, dialogParameters: new { size = "size-wide" }); searchBar.KeywordPlaceHolder = "Name/Remark"; searchBar.MenuItems.AddDivider(); searchBar.MenuItems.AddRecycleBin(); searchBar.MenuItems.AddAddAction( Builder.Type, Builder.AddUrl, dialogParameters: new { size = "size-wide" }); searchBar.BeforeItems.AddAddAction( Builder.Type, Builder.AddUrl, dialogParameters: new { size = "size-wide" }); }
/// <summary> /// 对增删查改页面使用的表格构建器进行标准的设置 /// 添加以下菜单项 /// - 编辑菜单(如果编辑Url不是空) /// - 添加菜单(如果添加Url不是空) /// </summary> /// <typeparam name="TCrudController">构建器的类型</typeparam> /// <param name="table">Ajax表格</param> public static void StandardSetupFor <TCrudController>(this AjaxTableBuilder table) where TCrudController : class, ICrudController, new() { var app = new TCrudController(); var addDividerOnce = new Lazy <Action>( () => { table.MenuItems.AddDivider(); return(() => { }); }); if (!string.IsNullOrEmpty(app.EditUrl)) { addDividerOnce.Value(); table.MenuItems.AddEditActionFor <TCrudController>(); } if (!string.IsNullOrEmpty(app.AddUrl)) { addDividerOnce.Value(); table.MenuItems.AddAddActionFor <TCrudController>(); } }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <PaymentApiManageApp>(); searchBar.StandardSetupForCrudPage <PaymentApiManageApp>("Name/Owner/Remark"); }
/// <summary> /// 构建表格时的处理 /// </summary> public void OnBuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <UserManageApp>(); searchBar.StandardSetupForCrudPage <UserManageApp>("Username"); }
/// <summary> /// 构建表格时的处理 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <UserCrudController>(); searchBar.StandardSetupFor <UserCrudController>("Username"); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <ArticleCrudController>(); searchBar.StandardSetupFor <ArticleCrudController>("Title/Summary/Author"); }
public void OnBuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <UserShippingAddressManage>(); searchBar.StandardSetupForCrudPage <UserShippingAddressManage>("Address/Name/Tel"); }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <ProductCategoryManageApp>(); searchBar.StandardSetupForCrudPage <ProductCategoryManageApp>("Name/Remark"); }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <LogisticsManageApp>(); searchBar.StandardSetupForCrudPage <LogisticsManageApp>("Name/Remark"); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <ShippingAddressCrudController>(); searchBar.StandardSetupFor <ShippingAddressCrudController>("Address/Name/Tel"); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <PaymentApiCrudController>(); searchBar.StandardSetupFor <PaymentApiCrudController>("Name/Owner/Remark"); }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <ArticleManageApp>(); searchBar.StandardSetupForCrudPage <ArticleManageApp>("Title/Summary/Author"); }
public void BuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { searchBar.Conditions.Add(new FormField(new TextBoxFieldAttribute("Contact Information"))); }
/// <summary> /// 构建表格 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <ProductBookmarkCrudController>(); searchBar.StandardSetupFor <ProductBookmarkCrudController>("Name/Seller"); }
/// <summary> /// 构建表格时的处理 /// </summary> public override void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <UserRoleCrudController>(); searchBar.StandardSetupFor <UserRoleCrudController>("Name/Remark"); }
public override void BuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupFor <ExampleCrudController>(); // 设置表格 searchBar.StandardSetupFor <ExampleCrudController>("Name"); // 设置搜索栏 }
/// <summary> /// 构建表格时的处理 /// </summary> public virtual void BuildTable( AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { }
/// <summary> /// 构建表格 /// </summary> public void OnBuildTable(AjaxTableBuilder table, AjaxTableSearchBarBuilder searchBar) { table.StandardSetupForCrudPage <ProductPropertyManageApp>(); searchBar.StandardSetupForCrudPage <ProductPropertyManageApp>("Name/Remark"); searchBar.Conditions.Add(new FormField(new CheckBoxFieldAttribute("IsSalesProperty"))); }