v9.6.2017.0808   重构正向工程,基于映射表查找数据库字段类型到实体类型的映射
大石头 authored at 2017-08-08 21:38:06
1.55 KiB
X
@using System.Diagnostics;
@using NewLife.Common;
@using NewLife.Cube.Admin;
@{
    Layout = NewLife.Cube.Setting.Current.Layout;

    //ViewBag.Title = "服务器信息";
    var dbs = Model as IList<DbItem>;
}
<table class="table table-bordered table-hover table-striped table-condensed">
    <thead>
        <tr>
            <th class="text-center">名称</th>
            <th class="text-center">类型</th>
            <th class="text-center">连接字符串</th>
            <th class="text-center">版本</th>
            <th class="text-center">动态</th>
            <th class="text-center">备份</th>
            <th class="text-center">下载</th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in dbs)
        {
            <tr>
                <td>@item.Name</td>
                <td>@item.Type</td>
                <td>@item.ConnStr</td>
                <td>@item.Version</td>
                <td>
                    @if (item.Dynamic)
                    {
                        <text>是,</text>@Html.ActionLink("静态化", "SetStatic", new { Name = item.Name })
                    }
                    else
                    {
                        <text>否</text>
                    }
                </td>
                <td>@Html.ActionLink("备份", "Backup", new { Name = item.Name }),共 @item.Backups.ToString("n0")个</td>
                <td class="text-center">@Html.ActionLink("下载", "Download", new { Name = item.Name })</td>
            </tr>
        }
    </tbody>
</table>