src/EasyFrameWork/Mvc/TagHelpers/GridTagHelper.cs
(开头部分) 9KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
/* http://www.zkea.net/
* Copyright (c) ZKEASOFT. All rights reserved.
* http://www.zkea.net/licenses */
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Microsoft.AspNetCore.Razor.TagHelpers;
using Microsoft.AspNetCore.Mvc;
using Easy.Extend;
using Easy.MetaData;
using System.Text;
using System.Reflection;
using System.ComponentModel.DataAnnotations;
using System.Net;
using Easy.LINQ;
using Easy.ViewPort.Descriptor;
using Easy.Models;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.Extensions.DependencyInjection;
namespace Easy.Mvc.TagHelpers
{
public class GridTagHelper : TagHelperBase
{
private const string DefaultClass = "dataTable table table-striped table-bordered table-hover";
private const string DefaultSourceAction = "GetList";
public const string DefaultEditAction = "Edit";
public const string DefaultDeleteAction = "Delete";
private const string TableStructure = "<div><table class=\"{0}\" cellspacing=\"0\" width=\"100%\" data-source=\"{1}\"><thead><tr>{2}</tr></thead><tfoot><tr class=\"search\">{3}</tr></tfoot></table></div>";
private const string TableHeadStructure = "<th data-key=\"{0}\" data-template=\"{1}\" data-order=\"{2}\" data-option=\"{4}\" data-search-operator=\"{5}\" data-data-type=\"{6}\" data-format=\"{7}\">{3}</th>";
private const string TableSearchStructure = "<th></th>";
public const string EditLinkTemplate = "<a href=\"{0}\" class=\"glyphicon glyphicon-edit\"></a>";
public const string DeleteLinkTemplate = "<a href=\"{0}\" class=\"glyphicon glyphicon-remove\"></a>";
public const string CheckboxTemplate = "<input type=\"checkbox\" class=\"glyphicon {1}\" value=\"{0}\">";
public string Source { get; set; }
public string Edit { get; set; }
public string EditTemplate { get; set; }
public string Delete { get; set; }
public string DeleteTemplate { get; set; }
public string GridClass { get; set; }
public bool? EditAble { get; set; }
public bool? DeleteAble { get; set; }
public bool? DisplayCheckbox { get; set; }
public string OrderAsc { get; set; }
public string OrderDesc { get; set; }
public string ActionLable { get; set; }
public Type ModelType { get; set; }
public override void Process(TagHelperContext context, TagHelperOutput output)
{
if (Source.IsNullOrWhiteSpace())
{
Source = Url.Action(DefaultSourceAction);
}
if (GridClass.IsNullOrWhiteSpace())
{
GridClass = DefaultClass;
}
后面还有 125 行代码,解锁后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 算力/个。 规则说明
AI 解读 AI
登录后可用,每次 10 算力,解读结果公开显示在下面。
还没有人解读过这个文件。