mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
103 lines
5.2 KiB
Plaintext
103 lines
5.2 KiB
Plaintext
<%--
|
||
Name: 列表页面
|
||
Author: yubaolee
|
||
Description: 列表页面
|
||
--%>
|
||
<%@ CodeTemplate Language="C#" TargetLanguage="C#" Debug="False" Encoding="utf-8" Description="添加模块" %>
|
||
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context"
|
||
Description="连接的数据库" %>
|
||
<%@ Property Name="ModuleName" Type="String" Category="Context" Description="模块名称" %>
|
||
<%@ Map Name="CSharpAlias" Src="System-CSharpAlias" Description="System to C# Type Map" %>
|
||
<%@ Assembly Name="SchemaExplorer" %>
|
||
<%@ Import Namespace="SchemaExplorer" %>
|
||
<%@ Assembly Src="Util.cs" %>
|
||
<%@ Import Namespace="Util" %>
|
||
@{
|
||
Layout = "~/Views/Shared/_BjuiLayout.cshtml";
|
||
}
|
||
|
||
@{ Html.RenderAction("MenuHeader", "Home");}
|
||
<div class="bjui-pageContent tableContent" style="position: relative">
|
||
<div class="clearfix">
|
||
<div style="float: left; width: 220px; overflow: auto;" class="table table-bordered">
|
||
<ul id="tree" class="ztree"></ul>
|
||
</div>
|
||
|
||
<div id="detail" style="margin-left: 225px;">
|
||
<table id="maingrid" class="table table-bordered"></table>
|
||
</div>
|
||
</div>
|
||
</div>
|
||
|
||
<!--编辑对话框-->
|
||
<div class="bjui-dialog hidden bjui-dialog-container" id="editDlg" data-noinit="true">
|
||
<div class="bjui-pageContent">
|
||
<form action="/<%=ModuleName%>/Add" class="pageForm" data-toggle="validate" data-reload="false" id="editForm">
|
||
|
||
<table class="table table-condensed table-hover">
|
||
<tbody>
|
||
<% foreach (ColumnSchema column in this.SourceTable.Columns) {
|
||
if(column.IsPrimaryKeyMember){%>
|
||
<input type="text" id="<%=column.Name%>" name="<%=column.Name%>" value="" class="hidden" />
|
||
<%}else if(CSharpAlias[column.SystemType.FullName] == "bool") {%>
|
||
<tr>
|
||
<td>
|
||
<label for="<%=column.Name%>" class="control-label x120"><%=Tools.GetDescription(column)%>:</label>
|
||
<select name="<%=column.Name%>" id="<%=column.Name%>" data-toggle="selectpicker" data-rule="required">
|
||
<option value="false">否</option>
|
||
<option value="true">是</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<%}else if(CSharpAlias[column.SystemType.FullName] == "int" ) {%>
|
||
<tr>
|
||
<td>
|
||
<label for="<%=column.Name%>" class="control-label x120"><%=Tools.GetDescription(column)%>:</label>
|
||
<select name="<%=column.Name%>" id="<%=column.Name%>" data-toggle="selectpicker" data-rule="required">
|
||
<option value="0">默认</option>
|
||
<option value="1">状态1</option>
|
||
<option value="2">状态2</option>
|
||
</select>
|
||
</td>
|
||
</tr>
|
||
<%}else if(CSharpAlias[column.SystemType.FullName].Contains("DateTime")) {%>
|
||
<tr>
|
||
<td>
|
||
<label for="<%=column.Name%>" class="control-label x120"><%=Tools.GetDescription(column)%>:</label>
|
||
<input type="text" id="<%=column.Name%>" name="<%=column.Name%>" value="" data-toggle="datepicker"/>
|
||
</td>
|
||
</tr>
|
||
<%} else {%>
|
||
<tr>
|
||
<td>
|
||
<label for="<%=column.Name%>" class="control-label x120"><%=Tools.GetDescription(column)%>:</label>
|
||
<input type="text" id="<%=column.Name%>" name="<%=column.Name%>" value=""/>
|
||
</td>
|
||
</tr>
|
||
<%} %>
|
||
<%} %>
|
||
<%if(Tools.NeedCascade(SourceTable)){ %>
|
||
<tr>
|
||
<td>
|
||
<label for="ParentName" class="control-label x120">上级分类:</label>
|
||
<input id="ParentId" name="ParentId" style="display: none" />
|
||
<input type="text" name="ParentName" id="ParentName"
|
||
data-toggle="selectztree" data-tree="#j_select_tree1">
|
||
<ul id="j_select_tree1" class="ztree hide" data-toggle="ztree"></ul>
|
||
</td>
|
||
</tr>
|
||
<%} %>
|
||
</tbody>
|
||
</table>
|
||
</form>
|
||
</div>
|
||
<div class="bjui-pageFooter">
|
||
<ul>
|
||
<li><button type="button" class="btn btn-close">关闭</button></li>
|
||
<li><button type="button" class="btn btn-primary" id="btnSave">保存</button></li>
|
||
</ul>
|
||
</div>
|
||
</div>
|
||
|
||
<script src="~/BllScripts/grid.js"></script>
|
||
<script src="~/BllScripts/<%=ModuleName%>.js"></script> |