12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- @page
- @model WZExport.Pages.DBConfigs.IndexModel
- @{
- ViewData["Title"] = "DBConfig-Index";
- }
- <h1>Index</h1>
- <p>
- <a asp-page="Create">Create New</a>
- </p>
- <table class="table">
- <thead>
- <tr>
- <th>
- @Html.DisplayNameFor(model => model.dBConfigs[0].DBName)
- </th>
- <th>
- @Html.DisplayNameFor(model => model.dBConfigs[0].ConnectStr)
- </th>
- <th></th>
- </tr>
- </thead>
- <tbody>
- @foreach (var item in Model.dBConfigs) {
- string style=item.Choose == true ? "background:red" : "";
- <tr style="@style">
- <td>
- @Html.DisplayFor(modelItem => item.DBName)
- </td>
- <td>
- @Html.DisplayFor(modelItem => item.ConnectStr)
- </td>
- <td>
- <a asp-page="./Edit" asp-route-id="@item.DBName">Edit</a> |
- <a asp-page="./Delete" asp-route-id="@item.DBName">Delete</a> |
- <a asp-page="./Choose" asp-route-id="@item.DBName">Choose</a>
- </td>
- </tr>
- }
- </tbody>
- </table>
|