mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Implement machine photo edit admin page.
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user