mirror of
https://gitee.com/dotnetchina/OpenAuth.Net.git
synced 2025-04-05 17:38:01 +08:00
ru
This commit is contained in:
parent
5346f5eb4d
commit
742df41a61
CodeSmith/CSharp
@ -28,7 +28,7 @@ Description="连接的数据库" %>
|
||||
</div>
|
||||
@Html.Action("MenuHeader", "Home")
|
||||
@*<button class="layui-btn " data-type="refresh">刷新</button>
|
||||
<button class="layui-btn " data-type="addData">添加用户</button>
|
||||
<button class="layui-btn " data-type="addData">添加</button>
|
||||
<button class="layui-btn layui-btn-danger" data-type="del">批量删除</button>*@
|
||||
</blockquote>
|
||||
|
||||
|
@ -20,8 +20,12 @@
|
||||
|
||||
<%@ Import Namespace="SchemaMapper" %>
|
||||
|
||||
<%@ Property Name="SourceTable" Type="SchemaExplorer.TableSchema" Category="Context"
|
||||
Description="连接的数据库" %>
|
||||
<%@ Property Name="SourceTable"
|
||||
Type="SchemaExplorer.TableSchema"
|
||||
Category="Context"
|
||||
Description="连接的数据库"
|
||||
OnChanged="OnSourceDatabaseChanged"%>
|
||||
|
||||
<%@ Property Name="ModuleName"
|
||||
Type="System.String"
|
||||
Description="模块名称,如:User"%>
|
||||
@ -83,7 +87,7 @@ Generating Entities ...
|
||||
Response.WriteLine("Generate Time: " + watch.ElapsedMilliseconds + " ms");
|
||||
}
|
||||
|
||||
//创建APP层,如UserApp.cs
|
||||
//创建APP层,如UserManagerApp.cs
|
||||
public void CreateApplicationClass()
|
||||
{
|
||||
ApplicationGenerateClass generatedClass = this.Create<ApplicationGenerateClass>();
|
||||
@ -125,10 +129,18 @@ Generating Entities ...
|
||||
string generatedFile = Path.GetFullPath(directory) + "/js/"+ModuleName+"Manager.js";
|
||||
|
||||
generatedClass.ModuleName = ModuleName;
|
||||
generatedClass.SourceTable = SourceTable;
|
||||
|
||||
Response.WriteLine(generatedFile);
|
||||
generatedClass.RenderToFile(generatedFile, generatedFile, true);
|
||||
}
|
||||
|
||||
|
||||
//更换数据源时,改变ModuleName
|
||||
private void OnSourceDatabaseChanged(object sender, EventArgs e)
|
||||
{
|
||||
if (SourceTable == null)
|
||||
return;
|
||||
ModuleName = SourceTable.Name;
|
||||
}
|
||||
|
||||
</script>
|
Loading…
Reference in New Issue
Block a user