mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-27 10:17:03 +08:00
42 lines
1.8 KiB
Plaintext
42 lines
1.8 KiB
Plaintext
<%@ Template Language="C#" TargetLanguage="C#" Debug="True" Encoding="UTF-8" %>
|
|
|
|
<%@ Assembly Src="..\..\..\Common\Model.cs" %>
|
|
<%@ Assembly Src="..\..\..\Common\Extensions.cs" %>
|
|
<%@ Import Namespace="System.Collections.Generic" %>
|
|
<%@ Import Namespace="System.Linq" %>
|
|
<%@ Import Namespace="System.Text" %>
|
|
<%@ Import Namespace="System.Text.RegularExpressions" %>
|
|
<%@ Import Namespace="SchemaMapper" %>
|
|
|
|
<%@ Property Name="Entity" Type="SchemaMapper.Entity" %>
|
|
<%@ Property Name="Namespace" Type="System.String" %>
|
|
<%-- Safe类名 --%>
|
|
<% string SafeClassName = Entity.ClassName.ToSafeName(); %>
|
|
<%-- 描述 --%>
|
|
<% string Description = Entity.Description; %>
|
|
<%-- 驼峰形式类名 --%>
|
|
<% string CamelClassName = SafeClassName.ToCamelCase(); %>
|
|
@page
|
|
@model <%=SafeClassName%>Dto
|
|
@*标题*@
|
|
<page-header title="编辑<%=Description%>" [autoBreadcrumb]="false"></page-header>
|
|
@*表单*@
|
|
<util-card show-border="false">
|
|
<util-form id="form" label-span="4" control-span="20" gutter="16">
|
|
<% foreach(Property p in Entity.Properties) { %>
|
|
<% if( p.IsPrimaryKey.SafeValue() ) continue; %>
|
|
<% if( Entity.IsHidden(p) ) continue; %>
|
|
<% if( p.DataType == DbType.Boolean ){%>
|
|
<util-switch for="<%= p.PropertyName.ToSafeName() %>"></util-switch>
|
|
<% }else{ %>
|
|
<util-textbox for="<%= p.PropertyName.ToSafeName() %>"></util-textbox>
|
|
<% } %>
|
|
<% } %>
|
|
<util-form-item justify="End">
|
|
<util-form-control class="w-auto">
|
|
<util-button class="mr-sm" text="取消" on-click="close()"></util-button>
|
|
<util-button id="btnSubmit" validate-form="true" color="Primary" on-click="submit(form,btnSubmit)"></util-button>
|
|
</util-form-control>
|
|
</util-form-item>
|
|
</util-form>
|
|
</util-card> |