mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Sort companies in GPU admin pages.
This commit is contained in:
@@ -72,7 +72,7 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
// GET: Admin/Gpus/Create
|
// GET: Admin/Gpus/Create
|
||||||
public IActionResult Create()
|
public IActionResult Create()
|
||||||
{
|
{
|
||||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
|
ViewData["CompanyId"] = new SelectList(_context.Companies.OrderBy(c => c.Name), "Id", "Name");
|
||||||
return View();
|
return View();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -92,7 +92,8 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
return RedirectToAction(nameof(Index));
|
return RedirectToAction(nameof(Index));
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", gpu.CompanyId);
|
ViewData["CompanyId"] =
|
||||||
|
new SelectList(_context.Companies.OrderBy(c => c.Name), "Id", "Name", gpu.CompanyId);
|
||||||
return View(gpu);
|
return View(gpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -104,7 +105,8 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
Gpu gpu = await _context.Gpus.FindAsync(id);
|
Gpu gpu = await _context.Gpus.FindAsync(id);
|
||||||
if(gpu == null) return NotFound();
|
if(gpu == null) return NotFound();
|
||||||
|
|
||||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", gpu.CompanyId);
|
ViewData["CompanyId"] =
|
||||||
|
new SelectList(_context.Companies.OrderBy(c => c.Name), "Id", "Name", gpu.CompanyId);
|
||||||
return View(gpu);
|
return View(gpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -136,7 +138,8 @@ namespace cicm_web.Areas.Admin.Controllers
|
|||||||
return RedirectToAction(nameof(Index));
|
return RedirectToAction(nameof(Index));
|
||||||
}
|
}
|
||||||
|
|
||||||
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", gpu.CompanyId);
|
ViewData["CompanyId"] =
|
||||||
|
new SelectList(_context.Companies.OrderBy(c => c.Name), "Id", "Name", gpu.CompanyId);
|
||||||
return View(gpu);
|
return View(gpu);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.516</Version>
|
<Version>3.0.99.517</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>
|
||||||
|
|||||||
Reference in New Issue
Block a user