Add CRUD for secondary database tables.

This commit is contained in:
2019-11-08 00:03:43 +00:00
parent bae387df50
commit 239165b57d
104 changed files with 15150 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
@model DiscImageChef.CommonTypes.Metadata.BlockDescriptor
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Create</title>
</head>
<body>
<h4>BlockDescriptor</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Density" class="control-label"></label>
<input asp-for="Density" class="form-control" />
<span asp-validation-for="Density" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Blocks" class="control-label"></label>
<input asp-for="Blocks" class="form-control" />
<span asp-validation-for="Blocks" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="BlockLength" class="control-label"></label>
<input asp-for="BlockLength" class="form-control" />
<span asp-validation-for="BlockLength" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
</body>
</html>

View File

@@ -0,0 +1,48 @@
@model DiscImageChef.CommonTypes.Metadata.BlockDescriptor
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Delete</title>
</head>
<body>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>BlockDescriptor</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Density)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Density)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Blocks)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Blocks)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.BlockLength)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.BlockLength)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-danger" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>
</body>
</html>

View File

@@ -0,0 +1,45 @@
@model DiscImageChef.CommonTypes.Metadata.BlockDescriptor
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Details</title>
</head>
<body>
<div>
<h4>BlockDescriptor</h4>
<hr />
<dl class="row">
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Density)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Density)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.Blocks)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.Blocks)
</dd>
<dt class = "col-sm-2">
@Html.DisplayNameFor(model => model.BlockLength)
</dt>
<dd class = "col-sm-10">
@Html.DisplayFor(model => model.BlockLength)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>
</body>
</html>

View File

@@ -0,0 +1,50 @@
@model DiscImageChef.CommonTypes.Metadata.BlockDescriptor
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="width=device-width" />
<title>Edit</title>
</head>
<body>
<h4>BlockDescriptor</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Density" class="control-label"></label>
<input asp-for="Density" class="form-control" />
<span asp-validation-for="Density" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Blocks" class="control-label"></label>
<input asp-for="Blocks" class="form-control" />
<span asp-validation-for="Blocks" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="BlockLength" class="control-label"></label>
<input asp-for="BlockLength" class="form-control" />
<span asp-validation-for="BlockLength" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-primary" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
</body>
</html>

View File

@@ -0,0 +1,55 @@
@model IEnumerable<DiscImageChef.CommonTypes.Metadata.BlockDescriptor>
@{
Layout = null;
}
<!DOCTYPE html>
<html>
<head>
<meta content="width=device-width" name="viewport" />
<title>Index</title>
</head>
<body>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Density)
</th>
<th>
@Html.DisplayNameFor(model => model.Blocks)
</th>
<th>
@Html.DisplayNameFor(model => model.BlockLength)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model)
{
<tr>
<td>
@Html.DisplayFor(modelItem => item.Density)
</td>
<td>
@Html.DisplayFor(modelItem => item.Blocks)
</td>
<td>
@Html.DisplayFor(modelItem => item.BlockLength)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>
</body>
</html>