Show native resolution in screen list.

This commit is contained in:
2019-06-01 23:55:06 +01:00
parent 366e27917c
commit 01713e087f
4 changed files with 9 additions and 7 deletions

View File

@@ -17,6 +17,7 @@ namespace Cicm.Database.Models
[DisplayName("Diagonal (inches)")] [DisplayName("Diagonal (inches)")]
public double Diagonal { get; set; } public double Diagonal { get; set; }
[Required] [Required]
[DisplayName("Native resolution")]
public virtual Resolution NativeResolution { get; set; } public virtual Resolution NativeResolution { get; set; }
[Range(2, 281474976710656)] [Range(2, 281474976710656)]
[DisplayName("Effective colors")] [DisplayName("Effective colors")]

View File

@@ -20,8 +20,9 @@ namespace cicm_web.Areas.Admin.Controllers
// GET: Screens // GET: Screens
public async Task<IActionResult> Index() => public async Task<IActionResult> Index() =>
View(await _context.Screens.OrderBy(s => s.Diagonal).ThenBy(s => s.EffectiveColors).ThenBy(s => s.Type) View(await _context.Screens.OrderBy(s => s.Diagonal).ThenBy(s => s.EffectiveColors)
.ThenBy(s => s.Size).ToListAsync()); .ThenBy(s => s.NativeResolution.ToString()).ThenBy(s => s.Type).ThenBy(s => s.Size)
.ToListAsync());
// GET: Screens/Details/5 // GET: Screens/Details/5
public async Task<IActionResult> Details(int? id) public async Task<IActionResult> Details(int? id)

View File

@@ -20,7 +20,7 @@
@Html.DisplayNameFor(model => model.Diagonal) @Html.DisplayNameFor(model => model.Diagonal)
</th> </th>
<th> <th>
@Html.DisplayNameFor(model => model.Size) @Html.DisplayNameFor(model => model.NativeResolution)
</th> </th>
<th> <th>
@Html.DisplayNameFor(model => model.EffectiveColors) @Html.DisplayNameFor(model => model.EffectiveColors)
@@ -38,9 +38,9 @@
<td> <td>
@Html.DisplayFor(modelItem => item.Diagonal) @Html.DisplayFor(modelItem => item.Diagonal)
</td> </td>
<td> <th>
@Html.DisplayFor(modelItem => item.Size) @Html.DisplayFor(modelItem => item.NativeResolution)
</td> </th>
<td> <td>
@Html.DisplayFor(modelItem => item.EffectiveColors) @Html.DisplayFor(modelItem => item.EffectiveColors)
</td> </td>

View File

@@ -2,7 +2,7 @@
<Project Sdk="Microsoft.NET.Sdk.Web"> <Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup> <PropertyGroup>
<TargetFramework>netcoreapp2.2</TargetFramework> <TargetFramework>netcoreapp2.2</TargetFramework>
<Version>3.0.99.721</Version> <Version>3.0.99.722</Version>
<Company>Canary Islands Computer Museum</Company> <Company>Canary Islands Computer Museum</Company>
<Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright> <Copyright>Copyright © 2003-2018 Natalia Portillo</Copyright>
<Product>Canary Islands Computer Museum Website</Product> <Product>Canary Islands Computer Museum Website</Product>