diff --git a/Cicm.Database/Models/MachinePhoto.cs b/Cicm.Database/Models/MachinePhoto.cs index 299c4658..b905acc4 100644 --- a/Cicm.Database/Models/MachinePhoto.cs +++ b/Cicm.Database/Models/MachinePhoto.cs @@ -44,10 +44,11 @@ namespace Cicm.Database.Models [DisplayName("Light source")] public LightSource? LightSource { get; set; } [DisplayName("Metering mode")] - public MeteringMode? MeteringMode { get; set; } + public MeteringMode? MeteringMode { get; set; } + [DisplayName("Resolution unit")] public ResolutionUnit? ResolutionUnit { get; set; } - public Orientation? Orientation { get; set; } - public Saturation? Saturation { get; set; } + public Orientation? Orientation { get; set; } + public Saturation? Saturation { get; set; } [DisplayName("Scene capture type")] public SceneCaptureType? SceneCaptureType { get; set; } [DisplayName("Sensing method")] diff --git a/cicm_web/Areas/Admin/Controllers/MachinePhotosController.cs b/cicm_web/Areas/Admin/Controllers/MachinePhotosController.cs index fd467670..94512653 100644 --- a/cicm_web/Areas/Admin/Controllers/MachinePhotosController.cs +++ b/cicm_web/Areas/Admin/Controllers/MachinePhotosController.cs @@ -378,6 +378,14 @@ namespace cicm_web.Areas.Admin.Controllers MachinePhoto machinePhoto = await _context.MachinePhotos.FindAsync(id); if(machinePhoto == null) return NotFound(); + ViewData["MachineId"] = + new + SelectList(_context.Machines.OrderBy(m => m.Company.Name).ThenBy(m => m.Name).Select(m => new {m.Id, Name = $"{m.Company.Name} {m.Name}"}), + "Id", "Name", machinePhoto.MachineId); + ViewData["LicenseId"] = + new SelectList(_context.Licenses.OrderBy(l => l.Name).Select(l => new {l.Id, l.Name}), "Id", "Name", + machinePhoto.LicenseId); + return View(machinePhoto); } diff --git a/cicm_web/Areas/Admin/Views/MachinePhotos/Edit.cshtml b/cicm_web/Areas/Admin/Views/MachinePhotos/Edit.cshtml index 483b662e..3768d241 100644 --- a/cicm_web/Areas/Admin/Views/MachinePhotos/Edit.cshtml +++ b/cicm_web/Areas/Admin/Views/MachinePhotos/Edit.cshtml @@ -1,3 +1,4 @@ +@using Cicm.Database @model Cicm.Database.Models.MachinePhoto @{ @@ -6,7 +7,7 @@