Remove edit and details from CHS.

This commit is contained in:
2019-11-10 03:11:57 +00:00
parent 0b05086cb0
commit cbc417a67e
4 changed files with 0 additions and 199 deletions

View File

@@ -18,76 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
// GET: Admin/Chs
public async Task<IActionResult> Index() => View(await _context.Chs.ToListAsync());
// GET: Admin/Chs/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null)
{
return NotFound();
}
Chs chs = await _context.Chs.FirstOrDefaultAsync(m => m.Id == id);
if(chs == null)
{
return NotFound();
}
return View(chs);
}
// GET: Admin/Chs/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null)
{
return NotFound();
}
Chs chs = await _context.Chs.FindAsync(id);
if(chs == null)
{
return NotFound();
}
return View(chs);
}
// POST: Admin/Chs/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,Cylinders,Heads,Sectors")] Chs chs)
{
if(id != chs.Id)
{
return NotFound();
}
if(ModelState.IsValid)
{
try
{
_context.Update(chs);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!ChsExists(chs.Id))
{
return NotFound();
}
throw;
}
return RedirectToAction(nameof(Index));
}
return View(chs);
}
// GET: Admin/Chs/Delete/5
public async Task<IActionResult> Delete(int? id)
{