Remove details and edit from SCSI MODE SENSE.

This commit is contained in:
2019-11-16 02:38:55 +00:00
parent 22b24c07e2
commit 4408f153a7
4 changed files with 0 additions and 236 deletions

View File

@@ -18,78 +18,6 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
// GET: Admin/ScsiModes
public async Task<IActionResult> Index() => View(await _context.ScsiMode.ToListAsync());
// GET: Admin/ScsiModes/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null)
{
return NotFound();
}
ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id);
if(scsiMode == null)
{
return NotFound();
}
return View(scsiMode);
}
// GET: Admin/ScsiModes/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null)
{
return NotFound();
}
ScsiMode scsiMode = await _context.ScsiMode.FindAsync(id);
if(scsiMode == null)
{
return NotFound();
}
return View(scsiMode);
}
// POST: Admin/ScsiModes/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,MediumType,WriteProtected,Speed,BufferedMode,BlankCheckEnabled,DPOandFUA")]
ScsiMode scsiMode)
{
if(id != scsiMode.Id)
{
return NotFound();
}
if(ModelState.IsValid)
{
try
{
_context.Update(scsiMode);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!ScsiModeExists(scsiMode.Id))
{
return NotFound();
}
throw;
}
return RedirectToAction(nameof(Index));
}
return View(scsiMode);
}
// GET: Admin/ScsiModes/Delete/5
public async Task<IActionResult> Delete(int? id)
{
@@ -118,7 +46,5 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
return RedirectToAction(nameof(Index));
}
bool ScsiModeExists(int id) => _context.ScsiMode.Any(e => e.Id == id);
}
}