mirror of
https://github.com/dotnetcore/Util.git
synced 2026-10-23 07:55:02 +08:00
48 lines
2.0 KiB
Plaintext
48 lines
2.0 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(); %>
|
|
@model <%=SafeClassName%>Query
|
|
|
|
@*查询表单*@
|
|
<util-form layout="Inline" class="search__form">
|
|
<util-row gutter="32">
|
|
<% int i =0; %>
|
|
<% foreach(Property p in Entity.Properties) { %>
|
|
<% if( i > 2 ) break; %>
|
|
<% if( p.IsPrimaryKey.SafeValue() ) continue; %>
|
|
<% if( Entity.IsHidden(p) ) continue; %>
|
|
<% if( i < 2 ) {%>
|
|
<util-column span="8">
|
|
<util-textbox for="<%= p.PropertyName.ToSafeName()%>" show-label="true"></util-textbox>
|
|
</util-column>
|
|
<% }else { %>
|
|
<util-column span="8" ng-if="expand">
|
|
<util-textbox for="<%= p.PropertyName.ToSafeName()%>" show-label="true"></util-textbox>
|
|
</util-column>
|
|
<% } %>
|
|
<% i++;} %>
|
|
<util-column span="8" [class.text-right]="expand">
|
|
<util-button id="btnQuery" text="查询" color="Primary" icon="Search" on-click="query(btnQuery)"></util-button>
|
|
<util-button class="mx-sm" id="btnRefresh" text="刷新" icon="Sync" on-click="refresh(btnRefresh)"></util-button>
|
|
<a (click)="expand=!expand">
|
|
<i class="anticon" [class.anticon-down]="!expand" [class.anticon-up]="expand"></i>
|
|
</a>
|
|
</util-column>
|
|
</util-row>
|
|
</util-form> |