mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Remove edit and detail from PCMCIA.
This commit is contained in:
@@ -18,78 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
// GET: Admin/Pcmcias
|
||||
public async Task<IActionResult> Index() => View(await _context.Pcmcia.ToListAsync());
|
||||
|
||||
// GET: Admin/Pcmcias/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(pcmcia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FindAsync(id);
|
||||
|
||||
if(pcmcia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// POST: Admin/Pcmcias/Edit/5
|
||||
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
|
||||
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,CIS,Compliance,ManufacturerCode,CardCode,Manufacturer,ProductName")]
|
||||
Pcmcia pcmcia)
|
||||
{
|
||||
if(id != pcmcia.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(pcmcia);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!PcmciaExists(pcmcia.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
@@ -118,7 +46,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool PcmciaExists(int id) => _context.Pcmcia.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user