mirror of
https://github.com/aaru-dps/Aaru.Server.git
synced 2025-12-16 19:24:27 +00:00
Reformat.
This commit is contained in:
@@ -1,43 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class AtasController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public AtasController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public AtasController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Atas
|
||||
public IActionResult Index()
|
||||
{
|
||||
return View(_context.Ata.AsEnumerable().Where(m=>m.IdentifyDevice?.Model != null).OrderBy(m => m.IdentifyDevice.Value.Model));
|
||||
}
|
||||
public IActionResult Index() => View(_context.Ata.AsEnumerable().Where(m => m.IdentifyDevice?.Model != null).
|
||||
OrderBy(m => m.IdentifyDevice.Value.Model));
|
||||
|
||||
// GET: Admin/Atas/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var ata = await _context.Ata
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (ata == null)
|
||||
CommonTypes.Metadata.Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ata == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -46,38 +37,36 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Atas/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Atas/Create
|
||||
// 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> Create([Bind("Id,Identify")] DiscImageChef.CommonTypes.Metadata.Ata ata)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,Identify")] CommonTypes.Metadata.Ata ata)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(ata);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(ata);
|
||||
}
|
||||
|
||||
// GET: Admin/Atas/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var ata = await _context.Ata
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (ata == null)
|
||||
CommonTypes.Metadata.Ata ata = await _context.Ata.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ata == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -86,19 +75,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Atas/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var ata = await _context.Ata.FindAsync(id);
|
||||
CommonTypes.Metadata.Ata ata = await _context.Ata.FindAsync(id);
|
||||
_context.Ata.Remove(ata);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool AtaExists(int id)
|
||||
{
|
||||
return _context.Ata.Any(e => e.Id == id);
|
||||
}
|
||||
bool AtaExists(int id) => _context.Ata.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class BlockDescriptorsController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public BlockDescriptorsController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public BlockDescriptorsController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/BlockDescriptors
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.BlockDescriptor.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.BlockDescriptor.ToListAsync());
|
||||
|
||||
// GET: Admin/BlockDescriptors/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var blockDescriptor = await _context.BlockDescriptor
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (blockDescriptor == null)
|
||||
BlockDescriptor blockDescriptor = await _context.BlockDescriptor.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(blockDescriptor == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,90 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/BlockDescriptors/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/BlockDescriptors/Create
|
||||
// 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> Create([Bind("Id,Density,Blocks,BlockLength")] BlockDescriptor blockDescriptor)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,Density,Blocks,BlockLength")]
|
||||
BlockDescriptor blockDescriptor)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(blockDescriptor);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(blockDescriptor);
|
||||
}
|
||||
|
||||
// GET: Admin/BlockDescriptors/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var blockDescriptor = await _context.BlockDescriptor.FindAsync(id);
|
||||
if (blockDescriptor == null)
|
||||
BlockDescriptor blockDescriptor = await _context.BlockDescriptor.FindAsync(id);
|
||||
|
||||
if(blockDescriptor == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(blockDescriptor);
|
||||
}
|
||||
|
||||
// POST: Admin/BlockDescriptors/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,Density,Blocks,BlockLength")] BlockDescriptor blockDescriptor)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,Density,Blocks,BlockLength")]
|
||||
BlockDescriptor blockDescriptor)
|
||||
{
|
||||
if (id != blockDescriptor.Id)
|
||||
if(id != blockDescriptor.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(blockDescriptor);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!BlockDescriptorExists(blockDescriptor.Id))
|
||||
if(!BlockDescriptorExists(blockDescriptor.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(blockDescriptor);
|
||||
}
|
||||
|
||||
// GET: Admin/BlockDescriptors/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var blockDescriptor = await _context.BlockDescriptor
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (blockDescriptor == null)
|
||||
BlockDescriptor blockDescriptor = await _context.BlockDescriptor.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(blockDescriptor == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +129,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/BlockDescriptors/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var blockDescriptor = await _context.BlockDescriptor.FindAsync(id);
|
||||
BlockDescriptor blockDescriptor = await _context.BlockDescriptor.FindAsync(id);
|
||||
_context.BlockDescriptor.Remove(blockDescriptor);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool BlockDescriptorExists(int id)
|
||||
{
|
||||
return _context.BlockDescriptor.Any(e => e.Id == id);
|
||||
}
|
||||
bool BlockDescriptorExists(int id) => _context.BlockDescriptor.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class ChsController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public ChsController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public ChsController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Chs
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Chs.ToListAsync());
|
||||
}
|
||||
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)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var chs = await _context.Chs
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (chs == null)
|
||||
Chs chs = await _context.Chs.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(chs == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,88 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Chs/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Chs/Create
|
||||
// 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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,Cylinders,Heads,Sectors")] Chs chs)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(chs);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(chs);
|
||||
}
|
||||
|
||||
// GET: Admin/Chs/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var chs = await _context.Chs.FindAsync(id);
|
||||
if (chs == null)
|
||||
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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,Cylinders,Heads,Sectors")] Chs chs)
|
||||
{
|
||||
if (id != chs.Id)
|
||||
if(id != chs.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(chs);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!ChsExists(chs.Id))
|
||||
if(!ChsExists(chs.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(chs);
|
||||
}
|
||||
|
||||
// GET: Admin/Chs/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var chs = await _context.Chs
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (chs == null)
|
||||
Chs chs = await _context.Chs.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(chs == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +127,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Chs/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var chs = await _context.Chs.FindAsync(id);
|
||||
Chs chs = await _context.Chs.FindAsync(id);
|
||||
_context.Chs.Remove(chs);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool ChsExists(int id)
|
||||
{
|
||||
return _context.Chs.Any(e => e.Id == id);
|
||||
}
|
||||
bool ChsExists(int id) => _context.Chs.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class CommandsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class CompactDiscOffsetsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class DensityCodesController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public DensityCodesController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public DensityCodesController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/DensityCodes
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.DensityCode.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.DensityCode.ToListAsync());
|
||||
|
||||
// GET: Admin/DensityCodes/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var densityCode = await _context.DensityCode
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (densityCode == null)
|
||||
DensityCode densityCode = await _context.DensityCode.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(densityCode == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,88 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/DensityCodes/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/DensityCodes/Create
|
||||
// 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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,Code")] DensityCode densityCode)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(densityCode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(densityCode);
|
||||
}
|
||||
|
||||
// GET: Admin/DensityCodes/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var densityCode = await _context.DensityCode.FindAsync(id);
|
||||
if (densityCode == null)
|
||||
DensityCode densityCode = await _context.DensityCode.FindAsync(id);
|
||||
|
||||
if(densityCode == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(densityCode);
|
||||
}
|
||||
|
||||
// POST: Admin/DensityCodes/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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,Code")] DensityCode densityCode)
|
||||
{
|
||||
if (id != densityCode.Id)
|
||||
if(id != densityCode.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(densityCode);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!DensityCodeExists(densityCode.Id))
|
||||
if(!DensityCodeExists(densityCode.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(densityCode);
|
||||
}
|
||||
|
||||
// GET: Admin/DensityCodes/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var densityCode = await _context.DensityCode
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (densityCode == null)
|
||||
DensityCode densityCode = await _context.DensityCode.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(densityCode == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +127,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/DensityCodes/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var densityCode = await _context.DensityCode.FindAsync(id);
|
||||
DensityCode densityCode = await _context.DensityCode.FindAsync(id);
|
||||
_context.DensityCode.Remove(densityCode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool DensityCodeExists(int id)
|
||||
{
|
||||
return _context.DensityCode.Any(e => e.Id == id);
|
||||
}
|
||||
bool DensityCodeExists(int id) => _context.DensityCode.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class DeviceStatsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class DevicesController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class FilesystemsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class FiltersController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class FireWiresController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public FireWiresController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public FireWiresController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/FireWires
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.FireWire.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.FireWire.ToListAsync());
|
||||
|
||||
// GET: Admin/FireWires/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var fireWire = await _context.FireWire
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (fireWire == null)
|
||||
FireWire fireWire = await _context.FireWire.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(fireWire == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,91 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/FireWires/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/FireWires/Create
|
||||
// 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> Create([Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] FireWire fireWire)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")]
|
||||
FireWire fireWire)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(fireWire);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// GET: Admin/FireWires/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var fireWire = await _context.FireWire.FindAsync(id);
|
||||
if (fireWire == null)
|
||||
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
||||
|
||||
if(fireWire == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// POST: Admin/FireWires/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,VendorID,ProductID,Manufacturer,Product,RemovableMedia")] FireWire fireWire)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia")]
|
||||
FireWire fireWire)
|
||||
{
|
||||
if (id != fireWire.Id)
|
||||
if(id != fireWire.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(fireWire);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!FireWireExists(fireWire.Id))
|
||||
if(!FireWireExists(fireWire.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(fireWire);
|
||||
}
|
||||
|
||||
// GET: Admin/FireWires/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var fireWire = await _context.FireWire
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (fireWire == null)
|
||||
FireWire fireWire = await _context.FireWire.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(fireWire == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +130,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/FireWires/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var fireWire = await _context.FireWire.FindAsync(id);
|
||||
FireWire fireWire = await _context.FireWire.FindAsync(id);
|
||||
_context.FireWire.Remove(fireWire);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool FireWireExists(int id)
|
||||
{
|
||||
return _context.FireWire.Any(e => e.Id == id);
|
||||
}
|
||||
bool FireWireExists(int id) => _context.FireWire.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -11,7 +11,7 @@
|
||||
//
|
||||
// Provides documentation data for razor views.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This library is free software; you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Lesser General Public License as
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class MediaFormatsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class MediasController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class MmcController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public MmcController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public MmcController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Mmc
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Mmc.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.Mmc.ToListAsync());
|
||||
|
||||
// GET: Admin/Mmc/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmc = await _context.Mmc
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (mmc == null)
|
||||
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmc == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,88 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Mmc/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Mmc/Create
|
||||
// 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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,ModeSense2AData")] Mmc mmc)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(mmc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmc);
|
||||
}
|
||||
|
||||
// GET: Admin/Mmc/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmc = await _context.Mmc.FindAsync(id);
|
||||
if (mmc == null)
|
||||
Mmc mmc = await _context.Mmc.FindAsync(id);
|
||||
|
||||
if(mmc == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(mmc);
|
||||
}
|
||||
|
||||
// POST: Admin/Mmc/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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,ModeSense2AData")] Mmc mmc)
|
||||
{
|
||||
if (id != mmc.Id)
|
||||
if(id != mmc.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(mmc);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!MmcExists(mmc.Id))
|
||||
if(!MmcExists(mmc.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmc);
|
||||
}
|
||||
|
||||
// GET: Admin/Mmc/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmc = await _context.Mmc
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (mmc == null)
|
||||
Mmc mmc = await _context.Mmc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmc == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +127,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Mmc/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var mmc = await _context.Mmc.FindAsync(id);
|
||||
Mmc mmc = await _context.Mmc.FindAsync(id);
|
||||
_context.Mmc.Remove(mmc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool MmcExists(int id)
|
||||
{
|
||||
return _context.Mmc.Any(e => e.Id == id);
|
||||
}
|
||||
bool MmcExists(int id) => _context.Mmc.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class MmcFeaturesController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public MmcFeaturesController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public MmcFeaturesController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MmcFeatures
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.MmcFeatures.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.MmcFeatures.ToListAsync());
|
||||
|
||||
// GET: Admin/MmcFeatures/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmcFeatures = await _context.MmcFeatures
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (mmcFeatures == null)
|
||||
MmcFeatures mmcFeatures = await _context.MmcFeatures.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcFeatures == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,93 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/MmcFeatures/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/MmcFeatures/Create
|
||||
// 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> Create([Bind("Id,AACSVersion,AGIDs,BindingNonceBlocks,BlocksPerReadableUnit,BufferUnderrunFreeInDVD,BufferUnderrunFreeInSAO,BufferUnderrunFreeInTAO,CanAudioScan,CanEject,CanEraseSector,CanExpandBDRESpareArea,CanFormat,CanFormatBDREWithoutSpare,CanFormatCert,CanFormatFRF,CanFormatQCert,CanFormatRRM,CanGenerateBindingNonce,CanLoad,CanMuteSeparateChannels,CanOverwriteSAOTrack,CanOverwriteTAOTrack,CanPlayCDAudio,CanPseudoOverwriteBDR,CanReadAllDualR,CanReadAllDualRW,CanReadBD,CanReadBDR,CanReadBDRE1,CanReadBDRE2,CanReadBDROM,CanReadBluBCA,CanReadCD,CanReadCDMRW,CanReadCPRM_MKB,CanReadDDCD,CanReadDVD,CanReadDVDPlusMRW,CanReadDVDPlusR,CanReadDVDPlusRDL,CanReadDVDPlusRW,CanReadDVDPlusRWDL,CanReadDriveAACSCertificate,CanReadHDDVD,CanReadHDDVDR,CanReadHDDVDRAM,CanReadLeadInCDText,CanReadOldBDR,CanReadOldBDRE,CanReadOldBDROM,CanReadSpareAreaInformation,CanReportDriveSerial,CanReportMediaSerial,CanTestWriteDDCDR,CanTestWriteDVD,CanTestWriteInSAO,CanTestWriteInTAO,CanUpgradeFirmware,CanWriteBD,CanWriteBDR,CanWriteBDRE1,CanWriteBDRE2,CanWriteBusEncryptedBlocks,CanWriteCDMRW,CanWriteCDRW,CanWriteCDRWCAV,CanWriteCDSAO,CanWriteCDTAO,CanWriteCSSManagedDVD,CanWriteDDCDR,CanWriteDDCDRW,CanWriteDVDPlusMRW,CanWriteDVDPlusR,CanWriteDVDPlusRDL,CanWriteDVDPlusRW,CanWriteDVDPlusRWDL,CanWriteDVDR,CanWriteDVDRDL,CanWriteDVDRW,CanWriteHDDVDR,CanWriteHDDVDRAM,CanWriteOldBDR,CanWriteOldBDRE,CanWritePackedSubchannelInTAO,CanWriteRWSubchannelInSAO,CanWriteRWSubchannelInTAO,CanWriteRaw,CanWriteRawMultiSession,CanWriteRawSubchannelInTAO,ChangerIsSideChangeCapable,ChangerSlots,ChangerSupportsDiscPresent,CPRMVersion,CSSVersion,DBML,DVDMultiRead,EmbeddedChanger,ErrorRecoveryPage,FirmwareDate,LoadingMechanismType,Locked,LogicalBlockSize,MultiRead,PhysicalInterfaceStandardNumber,PreventJumper,SupportsAACS,SupportsBusEncryption,SupportsC2,SupportsCPRM,SupportsCSS,SupportsDAP,SupportsDeviceBusyEvent,SupportsHybridDiscs,SupportsModePage1Ch,SupportsOSSC,SupportsPWP,SupportsSWPP,SupportsSecurDisc,SupportsSeparateVolume,SupportsVCPS,SupportsWriteInhibitDCB,SupportsWriteProtectPAC,VolumeLevels,BinaryData")] MmcFeatures mmcFeatures)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind(
|
||||
"Id,AACSVersion,AGIDs,BindingNonceBlocks,BlocksPerReadableUnit,BufferUnderrunFreeInDVD,BufferUnderrunFreeInSAO,BufferUnderrunFreeInTAO,CanAudioScan,CanEject,CanEraseSector,CanExpandBDRESpareArea,CanFormat,CanFormatBDREWithoutSpare,CanFormatCert,CanFormatFRF,CanFormatQCert,CanFormatRRM,CanGenerateBindingNonce,CanLoad,CanMuteSeparateChannels,CanOverwriteSAOTrack,CanOverwriteTAOTrack,CanPlayCDAudio,CanPseudoOverwriteBDR,CanReadAllDualR,CanReadAllDualRW,CanReadBD,CanReadBDR,CanReadBDRE1,CanReadBDRE2,CanReadBDROM,CanReadBluBCA,CanReadCD,CanReadCDMRW,CanReadCPRM_MKB,CanReadDDCD,CanReadDVD,CanReadDVDPlusMRW,CanReadDVDPlusR,CanReadDVDPlusRDL,CanReadDVDPlusRW,CanReadDVDPlusRWDL,CanReadDriveAACSCertificate,CanReadHDDVD,CanReadHDDVDR,CanReadHDDVDRAM,CanReadLeadInCDText,CanReadOldBDR,CanReadOldBDRE,CanReadOldBDROM,CanReadSpareAreaInformation,CanReportDriveSerial,CanReportMediaSerial,CanTestWriteDDCDR,CanTestWriteDVD,CanTestWriteInSAO,CanTestWriteInTAO,CanUpgradeFirmware,CanWriteBD,CanWriteBDR,CanWriteBDRE1,CanWriteBDRE2,CanWriteBusEncryptedBlocks,CanWriteCDMRW,CanWriteCDRW,CanWriteCDRWCAV,CanWriteCDSAO,CanWriteCDTAO,CanWriteCSSManagedDVD,CanWriteDDCDR,CanWriteDDCDRW,CanWriteDVDPlusMRW,CanWriteDVDPlusR,CanWriteDVDPlusRDL,CanWriteDVDPlusRW,CanWriteDVDPlusRWDL,CanWriteDVDR,CanWriteDVDRDL,CanWriteDVDRW,CanWriteHDDVDR,CanWriteHDDVDRAM,CanWriteOldBDR,CanWriteOldBDRE,CanWritePackedSubchannelInTAO,CanWriteRWSubchannelInSAO,CanWriteRWSubchannelInTAO,CanWriteRaw,CanWriteRawMultiSession,CanWriteRawSubchannelInTAO,ChangerIsSideChangeCapable,ChangerSlots,ChangerSupportsDiscPresent,CPRMVersion,CSSVersion,DBML,DVDMultiRead,EmbeddedChanger,ErrorRecoveryPage,FirmwareDate,LoadingMechanismType,Locked,LogicalBlockSize,MultiRead,PhysicalInterfaceStandardNumber,PreventJumper,SupportsAACS,SupportsBusEncryption,SupportsC2,SupportsCPRM,SupportsCSS,SupportsDAP,SupportsDeviceBusyEvent,SupportsHybridDiscs,SupportsModePage1Ch,SupportsOSSC,SupportsPWP,SupportsSWPP,SupportsSecurDisc,SupportsSeparateVolume,SupportsVCPS,SupportsWriteInhibitDCB,SupportsWriteProtectPAC,VolumeLevels,BinaryData")]
|
||||
MmcFeatures mmcFeatures)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(mmcFeatures);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmcFeatures);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcFeatures/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmcFeatures = await _context.MmcFeatures.FindAsync(id);
|
||||
if (mmcFeatures == null)
|
||||
MmcFeatures mmcFeatures = await _context.MmcFeatures.FindAsync(id);
|
||||
|
||||
if(mmcFeatures == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(mmcFeatures);
|
||||
}
|
||||
|
||||
// POST: Admin/MmcFeatures/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,AACSVersion,AGIDs,BindingNonceBlocks,BlocksPerReadableUnit,BufferUnderrunFreeInDVD,BufferUnderrunFreeInSAO,BufferUnderrunFreeInTAO,CanAudioScan,CanEject,CanEraseSector,CanExpandBDRESpareArea,CanFormat,CanFormatBDREWithoutSpare,CanFormatCert,CanFormatFRF,CanFormatQCert,CanFormatRRM,CanGenerateBindingNonce,CanLoad,CanMuteSeparateChannels,CanOverwriteSAOTrack,CanOverwriteTAOTrack,CanPlayCDAudio,CanPseudoOverwriteBDR,CanReadAllDualR,CanReadAllDualRW,CanReadBD,CanReadBDR,CanReadBDRE1,CanReadBDRE2,CanReadBDROM,CanReadBluBCA,CanReadCD,CanReadCDMRW,CanReadCPRM_MKB,CanReadDDCD,CanReadDVD,CanReadDVDPlusMRW,CanReadDVDPlusR,CanReadDVDPlusRDL,CanReadDVDPlusRW,CanReadDVDPlusRWDL,CanReadDriveAACSCertificate,CanReadHDDVD,CanReadHDDVDR,CanReadHDDVDRAM,CanReadLeadInCDText,CanReadOldBDR,CanReadOldBDRE,CanReadOldBDROM,CanReadSpareAreaInformation,CanReportDriveSerial,CanReportMediaSerial,CanTestWriteDDCDR,CanTestWriteDVD,CanTestWriteInSAO,CanTestWriteInTAO,CanUpgradeFirmware,CanWriteBD,CanWriteBDR,CanWriteBDRE1,CanWriteBDRE2,CanWriteBusEncryptedBlocks,CanWriteCDMRW,CanWriteCDRW,CanWriteCDRWCAV,CanWriteCDSAO,CanWriteCDTAO,CanWriteCSSManagedDVD,CanWriteDDCDR,CanWriteDDCDRW,CanWriteDVDPlusMRW,CanWriteDVDPlusR,CanWriteDVDPlusRDL,CanWriteDVDPlusRW,CanWriteDVDPlusRWDL,CanWriteDVDR,CanWriteDVDRDL,CanWriteDVDRW,CanWriteHDDVDR,CanWriteHDDVDRAM,CanWriteOldBDR,CanWriteOldBDRE,CanWritePackedSubchannelInTAO,CanWriteRWSubchannelInSAO,CanWriteRWSubchannelInTAO,CanWriteRaw,CanWriteRawMultiSession,CanWriteRawSubchannelInTAO,ChangerIsSideChangeCapable,ChangerSlots,ChangerSupportsDiscPresent,CPRMVersion,CSSVersion,DBML,DVDMultiRead,EmbeddedChanger,ErrorRecoveryPage,FirmwareDate,LoadingMechanismType,Locked,LogicalBlockSize,MultiRead,PhysicalInterfaceStandardNumber,PreventJumper,SupportsAACS,SupportsBusEncryption,SupportsC2,SupportsCPRM,SupportsCSS,SupportsDAP,SupportsDeviceBusyEvent,SupportsHybridDiscs,SupportsModePage1Ch,SupportsOSSC,SupportsPWP,SupportsSWPP,SupportsSecurDisc,SupportsSeparateVolume,SupportsVCPS,SupportsWriteInhibitDCB,SupportsWriteProtectPAC,VolumeLevels,BinaryData")] MmcFeatures mmcFeatures)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind(
|
||||
"Id,AACSVersion,AGIDs,BindingNonceBlocks,BlocksPerReadableUnit,BufferUnderrunFreeInDVD,BufferUnderrunFreeInSAO,BufferUnderrunFreeInTAO,CanAudioScan,CanEject,CanEraseSector,CanExpandBDRESpareArea,CanFormat,CanFormatBDREWithoutSpare,CanFormatCert,CanFormatFRF,CanFormatQCert,CanFormatRRM,CanGenerateBindingNonce,CanLoad,CanMuteSeparateChannels,CanOverwriteSAOTrack,CanOverwriteTAOTrack,CanPlayCDAudio,CanPseudoOverwriteBDR,CanReadAllDualR,CanReadAllDualRW,CanReadBD,CanReadBDR,CanReadBDRE1,CanReadBDRE2,CanReadBDROM,CanReadBluBCA,CanReadCD,CanReadCDMRW,CanReadCPRM_MKB,CanReadDDCD,CanReadDVD,CanReadDVDPlusMRW,CanReadDVDPlusR,CanReadDVDPlusRDL,CanReadDVDPlusRW,CanReadDVDPlusRWDL,CanReadDriveAACSCertificate,CanReadHDDVD,CanReadHDDVDR,CanReadHDDVDRAM,CanReadLeadInCDText,CanReadOldBDR,CanReadOldBDRE,CanReadOldBDROM,CanReadSpareAreaInformation,CanReportDriveSerial,CanReportMediaSerial,CanTestWriteDDCDR,CanTestWriteDVD,CanTestWriteInSAO,CanTestWriteInTAO,CanUpgradeFirmware,CanWriteBD,CanWriteBDR,CanWriteBDRE1,CanWriteBDRE2,CanWriteBusEncryptedBlocks,CanWriteCDMRW,CanWriteCDRW,CanWriteCDRWCAV,CanWriteCDSAO,CanWriteCDTAO,CanWriteCSSManagedDVD,CanWriteDDCDR,CanWriteDDCDRW,CanWriteDVDPlusMRW,CanWriteDVDPlusR,CanWriteDVDPlusRDL,CanWriteDVDPlusRW,CanWriteDVDPlusRWDL,CanWriteDVDR,CanWriteDVDRDL,CanWriteDVDRW,CanWriteHDDVDR,CanWriteHDDVDRAM,CanWriteOldBDR,CanWriteOldBDRE,CanWritePackedSubchannelInTAO,CanWriteRWSubchannelInSAO,CanWriteRWSubchannelInTAO,CanWriteRaw,CanWriteRawMultiSession,CanWriteRawSubchannelInTAO,ChangerIsSideChangeCapable,ChangerSlots,ChangerSupportsDiscPresent,CPRMVersion,CSSVersion,DBML,DVDMultiRead,EmbeddedChanger,ErrorRecoveryPage,FirmwareDate,LoadingMechanismType,Locked,LogicalBlockSize,MultiRead,PhysicalInterfaceStandardNumber,PreventJumper,SupportsAACS,SupportsBusEncryption,SupportsC2,SupportsCPRM,SupportsCSS,SupportsDAP,SupportsDeviceBusyEvent,SupportsHybridDiscs,SupportsModePage1Ch,SupportsOSSC,SupportsPWP,SupportsSWPP,SupportsSecurDisc,SupportsSeparateVolume,SupportsVCPS,SupportsWriteInhibitDCB,SupportsWriteProtectPAC,VolumeLevels,BinaryData")]
|
||||
MmcFeatures mmcFeatures)
|
||||
{
|
||||
if (id != mmcFeatures.Id)
|
||||
if(id != mmcFeatures.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(mmcFeatures);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!MmcFeaturesExists(mmcFeatures.Id))
|
||||
if(!MmcFeaturesExists(mmcFeatures.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmcFeatures);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcFeatures/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmcFeatures = await _context.MmcFeatures
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (mmcFeatures == null)
|
||||
MmcFeatures mmcFeatures = await _context.MmcFeatures.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcFeatures == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +132,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/MmcFeatures/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var mmcFeatures = await _context.MmcFeatures.FindAsync(id);
|
||||
MmcFeatures mmcFeatures = await _context.MmcFeatures.FindAsync(id);
|
||||
_context.MmcFeatures.Remove(mmcFeatures);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool MmcFeaturesExists(int id)
|
||||
{
|
||||
return _context.MmcFeatures.Any(e => e.Id == id);
|
||||
}
|
||||
bool MmcFeaturesExists(int id) => _context.MmcFeatures.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class MmcSdsController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public MmcSdsController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public MmcSdsController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MmcSds
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.MmcSd.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.MmcSd.ToListAsync());
|
||||
|
||||
// GET: Admin/MmcSds/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmcSd = await _context.MmcSd
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (mmcSd == null)
|
||||
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcSd == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,90 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/MmcSds/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/MmcSds/Create
|
||||
// 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> Create([Bind("Id,CID,CSD,OCR,SCR,ExtendedCSD")] MmcSd mmcSd)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,CID,CSD,OCR,SCR,ExtendedCSD")]
|
||||
MmcSd mmcSd)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(mmcSd);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcSds/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmcSd = await _context.MmcSd.FindAsync(id);
|
||||
if (mmcSd == null)
|
||||
MmcSd mmcSd = await _context.MmcSd.FindAsync(id);
|
||||
|
||||
if(mmcSd == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// POST: Admin/MmcSds/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,CID,CSD,OCR,SCR,ExtendedCSD")] MmcSd mmcSd)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,CID,CSD,OCR,SCR,ExtendedCSD")]
|
||||
MmcSd mmcSd)
|
||||
{
|
||||
if (id != mmcSd.Id)
|
||||
if(id != mmcSd.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(mmcSd);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!MmcSdExists(mmcSd.Id))
|
||||
if(!MmcSdExists(mmcSd.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(mmcSd);
|
||||
}
|
||||
|
||||
// GET: Admin/MmcSds/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var mmcSd = await _context.MmcSd
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (mmcSd == null)
|
||||
MmcSd mmcSd = await _context.MmcSd.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(mmcSd == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +129,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/MmcSds/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var mmcSd = await _context.MmcSd.FindAsync(id);
|
||||
MmcSd mmcSd = await _context.MmcSd.FindAsync(id);
|
||||
_context.MmcSd.Remove(mmcSd);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool MmcSdExists(int id)
|
||||
{
|
||||
return _context.MmcSd.Any(e => e.Id == id);
|
||||
}
|
||||
bool MmcSdExists(int id) => _context.MmcSd.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class OperatingSystemsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class PartitionsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class PcmciasController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public PcmciasController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public PcmciasController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Pcmcias
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Pcmcia.ToListAsync());
|
||||
}
|
||||
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)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var pcmcia = await _context.Pcmcia
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (pcmcia == null)
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(pcmcia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,92 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Pcmcias/Create
|
||||
// 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> Create([Bind("Id,CIS,Compliance,ManufacturerCode,CardCode,Manufacturer,ProductName")] Pcmcia pcmcia)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind("Id,CIS,Compliance,ManufacturerCode,CardCode,Manufacturer,ProductName")]
|
||||
Pcmcia pcmcia)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(pcmcia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var pcmcia = await _context.Pcmcia.FindAsync(id);
|
||||
if (pcmcia == null)
|
||||
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)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,CIS,Compliance,ManufacturerCode,CardCode,Manufacturer,ProductName")]
|
||||
Pcmcia pcmcia)
|
||||
{
|
||||
if (id != pcmcia.Id)
|
||||
if(id != pcmcia.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(pcmcia);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!PcmciaExists(pcmcia.Id))
|
||||
if(!PcmciaExists(pcmcia.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(pcmcia);
|
||||
}
|
||||
|
||||
// GET: Admin/Pcmcias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var pcmcia = await _context.Pcmcia
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (pcmcia == null)
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(pcmcia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +131,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Pcmcias/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var pcmcia = await _context.Pcmcia.FindAsync(id);
|
||||
Pcmcia pcmcia = await _context.Pcmcia.FindAsync(id);
|
||||
_context.Pcmcia.Remove(pcmcia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool PcmciaExists(int id)
|
||||
{
|
||||
return _context.Pcmcia.Any(e => e.Id == id);
|
||||
}
|
||||
bool PcmciaExists(int id) => _context.Pcmcia.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class ReportsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class ScsiModesController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public ScsiModesController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public ScsiModesController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/ScsiModes
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.ScsiMode.ToListAsync());
|
||||
}
|
||||
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)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsiMode = await _context.ScsiMode
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (scsiMode == null)
|
||||
ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiMode == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,92 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiModes/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/ScsiModes/Create
|
||||
// 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> Create([Bind("Id,MediumType,WriteProtected,Speed,BufferedMode,BlankCheckEnabled,DPOandFUA")] ScsiMode scsiMode)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind("Id,MediumType,WriteProtected,Speed,BufferedMode,BlankCheckEnabled,DPOandFUA")]
|
||||
ScsiMode scsiMode)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(scsiMode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiMode);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiModes/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsiMode = await _context.ScsiMode.FindAsync(id);
|
||||
if (scsiMode == null)
|
||||
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)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,MediumType,WriteProtected,Speed,BufferedMode,BlankCheckEnabled,DPOandFUA")]
|
||||
ScsiMode scsiMode)
|
||||
{
|
||||
if (id != scsiMode.Id)
|
||||
if(id != scsiMode.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(scsiMode);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!ScsiModeExists(scsiMode.Id))
|
||||
if(!ScsiModeExists(scsiMode.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiMode);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiModes/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsiMode = await _context.ScsiMode
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (scsiMode == null)
|
||||
ScsiMode scsiMode = await _context.ScsiMode.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiMode == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +131,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/ScsiModes/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var scsiMode = await _context.ScsiMode.FindAsync(id);
|
||||
ScsiMode scsiMode = await _context.ScsiMode.FindAsync(id);
|
||||
_context.ScsiMode.Remove(scsiMode);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool ScsiModeExists(int id)
|
||||
{
|
||||
return _context.ScsiMode.Any(e => e.Id == id);
|
||||
}
|
||||
bool ScsiModeExists(int id) => _context.ScsiMode.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class ScsiPagesController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public ScsiPagesController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public ScsiPagesController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/ScsiPages
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.ScsiPage.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.ScsiPage.ToListAsync());
|
||||
|
||||
// GET: Admin/ScsiPages/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsiPage = await _context.ScsiPage
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (scsiPage == null)
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiPage == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,88 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/ScsiPages/Create
|
||||
// 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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,page,subpage,value")] ScsiPage scsiPage)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(scsiPage);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||
if (scsiPage == null)
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||
|
||||
if(scsiPage == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// POST: Admin/ScsiPages/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]
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,page,subpage,value")] ScsiPage scsiPage)
|
||||
{
|
||||
if (id != scsiPage.Id)
|
||||
if(id != scsiPage.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(scsiPage);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!ScsiPageExists(scsiPage.Id))
|
||||
if(!ScsiPageExists(scsiPage.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsiPage);
|
||||
}
|
||||
|
||||
// GET: Admin/ScsiPages/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsiPage = await _context.ScsiPage
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (scsiPage == null)
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsiPage == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +127,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/ScsiPages/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||
ScsiPage scsiPage = await _context.ScsiPage.FindAsync(id);
|
||||
_context.ScsiPage.Remove(scsiPage);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool ScsiPageExists(int id)
|
||||
{
|
||||
return _context.ScsiPage.Any(e => e.Id == id);
|
||||
}
|
||||
bool ScsiPageExists(int id) => _context.ScsiPage.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class ScsisController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public ScsisController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public ScsisController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Scsis
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Scsi.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.Scsi.ToListAsync());
|
||||
|
||||
// GET: Admin/Scsis/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsi = await _context.Scsi
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (scsi == null)
|
||||
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsi == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,94 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Scsis/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Scsis/Create
|
||||
// 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> Create([Bind("Id,InquiryData,SupportsModeSense6,SupportsModeSense10,SupportsModeSubpages,ModeSense6Data,ModeSense10Data,ModeSense6CurrentData,ModeSense10CurrentData,ModeSense6ChangeableData,ModeSense10ChangeableData")] Scsi scsi)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind(
|
||||
"Id,InquiryData,SupportsModeSense6,SupportsModeSense10,SupportsModeSubpages,ModeSense6Data,ModeSense10Data,ModeSense6CurrentData,ModeSense10CurrentData,ModeSense6ChangeableData,ModeSense10ChangeableData")]
|
||||
Scsi scsi)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(scsi);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// GET: Admin/Scsis/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsi = await _context.Scsi.FindAsync(id);
|
||||
if (scsi == null)
|
||||
Scsi scsi = await _context.Scsi.FindAsync(id);
|
||||
|
||||
if(scsi == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// POST: Admin/Scsis/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,InquiryData,SupportsModeSense6,SupportsModeSense10,SupportsModeSubpages,ModeSense6Data,ModeSense10Data,ModeSense6CurrentData,ModeSense10CurrentData,ModeSense6ChangeableData,ModeSense10ChangeableData")] Scsi scsi)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind(
|
||||
"Id,InquiryData,SupportsModeSense6,SupportsModeSense10,SupportsModeSubpages,ModeSense6Data,ModeSense10Data,ModeSense6CurrentData,ModeSense10CurrentData,ModeSense6ChangeableData,ModeSense10ChangeableData")]
|
||||
Scsi scsi)
|
||||
{
|
||||
if (id != scsi.Id)
|
||||
if(id != scsi.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(scsi);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!ScsiExists(scsi.Id))
|
||||
if(!ScsiExists(scsi.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(scsi);
|
||||
}
|
||||
|
||||
// GET: Admin/Scsis/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var scsi = await _context.Scsi
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (scsi == null)
|
||||
Scsi scsi = await _context.Scsi.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(scsi == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +133,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Scsis/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var scsi = await _context.Scsi.FindAsync(id);
|
||||
Scsi scsi = await _context.Scsi.FindAsync(id);
|
||||
_context.Scsi.Remove(scsi);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool ScsiExists(int id)
|
||||
{
|
||||
return _context.Scsi.Any(e => e.Id == id);
|
||||
}
|
||||
bool ScsiExists(int id) => _context.Scsi.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class SscsController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public SscsController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public SscsController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Sscs
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Ssc.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.Ssc.ToListAsync());
|
||||
|
||||
// GET: Admin/Sscs/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var ssc = await _context.Ssc
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (ssc == null)
|
||||
Ssc ssc = await _context.Ssc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ssc == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,90 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Sscs/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Sscs/Create
|
||||
// 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> Create([Bind("Id,BlockSizeGranularity,MaxBlockLength,MinBlockLength")] Ssc ssc)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create([Bind("Id,BlockSizeGranularity,MaxBlockLength,MinBlockLength")]
|
||||
Ssc ssc)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(ssc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(ssc);
|
||||
}
|
||||
|
||||
// GET: Admin/Sscs/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var ssc = await _context.Ssc.FindAsync(id);
|
||||
if (ssc == null)
|
||||
Ssc ssc = await _context.Ssc.FindAsync(id);
|
||||
|
||||
if(ssc == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(ssc);
|
||||
}
|
||||
|
||||
// POST: Admin/Sscs/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,BlockSizeGranularity,MaxBlockLength,MinBlockLength")] Ssc ssc)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind("Id,BlockSizeGranularity,MaxBlockLength,MinBlockLength")]
|
||||
Ssc ssc)
|
||||
{
|
||||
if (id != ssc.Id)
|
||||
if(id != ssc.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(ssc);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!SscExists(ssc.Id))
|
||||
if(!SscExists(ssc.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(ssc);
|
||||
}
|
||||
|
||||
// GET: Admin/Sscs/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var ssc = await _context.Ssc
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (ssc == null)
|
||||
Ssc ssc = await _context.Ssc.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ssc == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +129,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Sscs/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var ssc = await _context.Ssc.FindAsync(id);
|
||||
Ssc ssc = await _context.Ssc.FindAsync(id);
|
||||
_context.Ssc.Remove(ssc);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool SscExists(int id)
|
||||
{
|
||||
return _context.Ssc.Any(e => e.Id == id);
|
||||
}
|
||||
bool SscExists(int id) => _context.Ssc.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class SupportedDensitiesController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public SupportedDensitiesController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public SupportedDensitiesController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/SupportedDensities
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.SupportedDensity.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.SupportedDensity.ToListAsync());
|
||||
|
||||
// GET: Admin/SupportedDensities/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var supportedDensity = await _context.SupportedDensity
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (supportedDensity == null)
|
||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(supportedDensity == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,94 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/SupportedDensities/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/SupportedDensities/Create
|
||||
// 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> Create([Bind("Id,PrimaryCode,SecondaryCode,Writable,Duplicate,DefaultDensity,BitsPerMm,Width,Tracks,Capacity,Organization,Name,Description")] SupportedDensity supportedDensity)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind(
|
||||
"Id,PrimaryCode,SecondaryCode,Writable,Duplicate,DefaultDensity,BitsPerMm,Width,Tracks,Capacity,Organization,Name,Description")]
|
||||
SupportedDensity supportedDensity)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(supportedDensity);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(supportedDensity);
|
||||
}
|
||||
|
||||
// GET: Admin/SupportedDensities/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
||||
if (supportedDensity == null)
|
||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
||||
|
||||
if(supportedDensity == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(supportedDensity);
|
||||
}
|
||||
|
||||
// POST: Admin/SupportedDensities/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,PrimaryCode,SecondaryCode,Writable,Duplicate,DefaultDensity,BitsPerMm,Width,Tracks,Capacity,Organization,Name,Description")] SupportedDensity supportedDensity)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind(
|
||||
"Id,PrimaryCode,SecondaryCode,Writable,Duplicate,DefaultDensity,BitsPerMm,Width,Tracks,Capacity,Organization,Name,Description")]
|
||||
SupportedDensity supportedDensity)
|
||||
{
|
||||
if (id != supportedDensity.Id)
|
||||
if(id != supportedDensity.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(supportedDensity);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!SupportedDensityExists(supportedDensity.Id))
|
||||
if(!SupportedDensityExists(supportedDensity.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(supportedDensity);
|
||||
}
|
||||
|
||||
// GET: Admin/SupportedDensities/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var supportedDensity = await _context.SupportedDensity
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (supportedDensity == null)
|
||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(supportedDensity == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +133,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/SupportedDensities/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
||||
SupportedDensity supportedDensity = await _context.SupportedDensity.FindAsync(id);
|
||||
_context.SupportedDensity.Remove(supportedDensity);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool SupportedDensityExists(int id)
|
||||
{
|
||||
return _context.SupportedDensity.Any(e => e.Id == id);
|
||||
}
|
||||
bool SupportedDensityExists(int id) => _context.SupportedDensity.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class TestedMediasController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public TestedMediasController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public TestedMediasController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/TestedMedias
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.TestedMedia.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.TestedMedia.ToListAsync());
|
||||
|
||||
// GET: Admin/TestedMedias/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var testedMedia = await _context.TestedMedia
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (testedMedia == null)
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedMedia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,93 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/TestedMedias/Create
|
||||
// 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> Create([Bind("Id,IdentifyData,Blocks,BlockSize,CanReadAACS,CanReadADIP,CanReadATIP,CanReadBCA,CanReadC2Pointers,CanReadCMI,CanReadCorrectedSubchannel,CanReadCorrectedSubchannelWithC2,CanReadDCB,CanReadDDS,CanReadDMI,CanReadDiscInformation,CanReadFullTOC,CanReadHDCMI,CanReadLayerCapacity,CanReadFirstTrackPreGap,CanReadLeadIn,CanReadLeadOut,CanReadMediaID,CanReadMediaSerial,CanReadPAC,CanReadPFI,CanReadPMA,CanReadPQSubchannel,CanReadPQSubchannelWithC2,CanReadPRI,CanReadRWSubchannel,CanReadRWSubchannelWithC2,CanReadRecordablePFI,CanReadSpareAreaInformation,CanReadTOC,Density,LongBlockSize,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,SupportsHLDTSTReadRawDVD,SupportsNECReadCDDA,SupportsPioneerReadCDDA,SupportsPioneerReadCDDAMSF,SupportsPlextorReadCDDA,SupportsPlextorReadRawDVD,SupportsRead10,SupportsRead12,SupportsRead16,SupportsRead6,SupportsReadCapacity16,SupportsReadCapacity,SupportsReadCd,SupportsReadCdMsf,SupportsReadCdRaw,SupportsReadCdMsfRaw,SupportsReadLong16,SupportsReadLong,ModeSense6Data,ModeSense10Data,LBASectors,LBA48Sectors,LogicalAlignment,NominalRotationRate,PhysicalBlockSize,SolidStateDevice,UnformattedBPT,UnformattedBPS,SupportsReadDmaLba,SupportsReadDmaRetryLba,SupportsReadLba,SupportsReadRetryLba,SupportsReadLongLba,SupportsReadLongRetryLba,SupportsSeekLba,SupportsReadDmaLba48,SupportsReadLba48,SupportsReadDma,SupportsReadDmaRetry,SupportsReadRetry,SupportsReadSectors,SupportsReadLongRetry,SupportsSeek,CanReadingIntersessionLeadIn,CanReadingIntersessionLeadOut,IntersessionLeadInData,IntersessionLeadOutData,Read6Data,Read10Data,Read12Data,Read16Data,ReadLong10Data,ReadLong16Data,ReadSectorsData,ReadSectorsRetryData,ReadDmaData,ReadDmaRetryData,ReadLbaData,ReadRetryLbaData,ReadDmaLbaData,ReadDmaRetryLbaData,ReadLba48Data,ReadDmaLba48Data,ReadLongData,ReadLongRetryData,ReadLongLbaData,ReadLongRetryLbaData,TocData,FullTocData,AtipData,PmaData,ReadCdData,ReadCdMsfData,ReadCdFullData,ReadCdMsfFullData,Track1PregapData,LeadInData,LeadOutData,C2PointersData,PQSubchannelData,RWSubchannelData,CorrectedSubchannelData,PQSubchannelWithC2Data,RWSubchannelWithC2Data,CorrectedSubchannelWithC2Data,PfiData,DmiData,CmiData,DvdBcaData,DvdAacsData,DvdDdsData,DvdSaiData,PriData,EmbossedPfiData,AdipData,DcbData,HdCmiData,DvdLayerData,BluBcaData,BluDdsData,BluSaiData,BluDiData,BluPacData,PlextorReadCddaData,PioneerReadCddaData,PioneerReadCddaMsfData,NecReadCddaData,PlextorReadRawDVDData,HLDTSTReadRawDVDData")] TestedMedia testedMedia)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind(
|
||||
"Id,IdentifyData,Blocks,BlockSize,CanReadAACS,CanReadADIP,CanReadATIP,CanReadBCA,CanReadC2Pointers,CanReadCMI,CanReadCorrectedSubchannel,CanReadCorrectedSubchannelWithC2,CanReadDCB,CanReadDDS,CanReadDMI,CanReadDiscInformation,CanReadFullTOC,CanReadHDCMI,CanReadLayerCapacity,CanReadFirstTrackPreGap,CanReadLeadIn,CanReadLeadOut,CanReadMediaID,CanReadMediaSerial,CanReadPAC,CanReadPFI,CanReadPMA,CanReadPQSubchannel,CanReadPQSubchannelWithC2,CanReadPRI,CanReadRWSubchannel,CanReadRWSubchannelWithC2,CanReadRecordablePFI,CanReadSpareAreaInformation,CanReadTOC,Density,LongBlockSize,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,SupportsHLDTSTReadRawDVD,SupportsNECReadCDDA,SupportsPioneerReadCDDA,SupportsPioneerReadCDDAMSF,SupportsPlextorReadCDDA,SupportsPlextorReadRawDVD,SupportsRead10,SupportsRead12,SupportsRead16,SupportsRead6,SupportsReadCapacity16,SupportsReadCapacity,SupportsReadCd,SupportsReadCdMsf,SupportsReadCdRaw,SupportsReadCdMsfRaw,SupportsReadLong16,SupportsReadLong,ModeSense6Data,ModeSense10Data,LBASectors,LBA48Sectors,LogicalAlignment,NominalRotationRate,PhysicalBlockSize,SolidStateDevice,UnformattedBPT,UnformattedBPS,SupportsReadDmaLba,SupportsReadDmaRetryLba,SupportsReadLba,SupportsReadRetryLba,SupportsReadLongLba,SupportsReadLongRetryLba,SupportsSeekLba,SupportsReadDmaLba48,SupportsReadLba48,SupportsReadDma,SupportsReadDmaRetry,SupportsReadRetry,SupportsReadSectors,SupportsReadLongRetry,SupportsSeek,CanReadingIntersessionLeadIn,CanReadingIntersessionLeadOut,IntersessionLeadInData,IntersessionLeadOutData,Read6Data,Read10Data,Read12Data,Read16Data,ReadLong10Data,ReadLong16Data,ReadSectorsData,ReadSectorsRetryData,ReadDmaData,ReadDmaRetryData,ReadLbaData,ReadRetryLbaData,ReadDmaLbaData,ReadDmaRetryLbaData,ReadLba48Data,ReadDmaLba48Data,ReadLongData,ReadLongRetryData,ReadLongLbaData,ReadLongRetryLbaData,TocData,FullTocData,AtipData,PmaData,ReadCdData,ReadCdMsfData,ReadCdFullData,ReadCdMsfFullData,Track1PregapData,LeadInData,LeadOutData,C2PointersData,PQSubchannelData,RWSubchannelData,CorrectedSubchannelData,PQSubchannelWithC2Data,RWSubchannelWithC2Data,CorrectedSubchannelWithC2Data,PfiData,DmiData,CmiData,DvdBcaData,DvdAacsData,DvdDdsData,DvdSaiData,PriData,EmbossedPfiData,AdipData,DcbData,HdCmiData,DvdLayerData,BluBcaData,BluDdsData,BluSaiData,BluDiData,BluPacData,PlextorReadCddaData,PioneerReadCddaData,PioneerReadCddaMsfData,NecReadCddaData,PlextorReadRawDVDData,HLDTSTReadRawDVDData")]
|
||||
TestedMedia testedMedia)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(testedMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||
if (testedMedia == null)
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||
|
||||
if(testedMedia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// POST: Admin/TestedMedias/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,IdentifyData,Blocks,BlockSize,CanReadAACS,CanReadADIP,CanReadATIP,CanReadBCA,CanReadC2Pointers,CanReadCMI,CanReadCorrectedSubchannel,CanReadCorrectedSubchannelWithC2,CanReadDCB,CanReadDDS,CanReadDMI,CanReadDiscInformation,CanReadFullTOC,CanReadHDCMI,CanReadLayerCapacity,CanReadFirstTrackPreGap,CanReadLeadIn,CanReadLeadOut,CanReadMediaID,CanReadMediaSerial,CanReadPAC,CanReadPFI,CanReadPMA,CanReadPQSubchannel,CanReadPQSubchannelWithC2,CanReadPRI,CanReadRWSubchannel,CanReadRWSubchannelWithC2,CanReadRecordablePFI,CanReadSpareAreaInformation,CanReadTOC,Density,LongBlockSize,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,SupportsHLDTSTReadRawDVD,SupportsNECReadCDDA,SupportsPioneerReadCDDA,SupportsPioneerReadCDDAMSF,SupportsPlextorReadCDDA,SupportsPlextorReadRawDVD,SupportsRead10,SupportsRead12,SupportsRead16,SupportsRead6,SupportsReadCapacity16,SupportsReadCapacity,SupportsReadCd,SupportsReadCdMsf,SupportsReadCdRaw,SupportsReadCdMsfRaw,SupportsReadLong16,SupportsReadLong,ModeSense6Data,ModeSense10Data,LBASectors,LBA48Sectors,LogicalAlignment,NominalRotationRate,PhysicalBlockSize,SolidStateDevice,UnformattedBPT,UnformattedBPS,SupportsReadDmaLba,SupportsReadDmaRetryLba,SupportsReadLba,SupportsReadRetryLba,SupportsReadLongLba,SupportsReadLongRetryLba,SupportsSeekLba,SupportsReadDmaLba48,SupportsReadLba48,SupportsReadDma,SupportsReadDmaRetry,SupportsReadRetry,SupportsReadSectors,SupportsReadLongRetry,SupportsSeek,CanReadingIntersessionLeadIn,CanReadingIntersessionLeadOut,IntersessionLeadInData,IntersessionLeadOutData,Read6Data,Read10Data,Read12Data,Read16Data,ReadLong10Data,ReadLong16Data,ReadSectorsData,ReadSectorsRetryData,ReadDmaData,ReadDmaRetryData,ReadLbaData,ReadRetryLbaData,ReadDmaLbaData,ReadDmaRetryLbaData,ReadLba48Data,ReadDmaLba48Data,ReadLongData,ReadLongRetryData,ReadLongLbaData,ReadLongRetryLbaData,TocData,FullTocData,AtipData,PmaData,ReadCdData,ReadCdMsfData,ReadCdFullData,ReadCdMsfFullData,Track1PregapData,LeadInData,LeadOutData,C2PointersData,PQSubchannelData,RWSubchannelData,CorrectedSubchannelData,PQSubchannelWithC2Data,RWSubchannelWithC2Data,CorrectedSubchannelWithC2Data,PfiData,DmiData,CmiData,DvdBcaData,DvdAacsData,DvdDdsData,DvdSaiData,PriData,EmbossedPfiData,AdipData,DcbData,HdCmiData,DvdLayerData,BluBcaData,BluDdsData,BluSaiData,BluDiData,BluPacData,PlextorReadCddaData,PioneerReadCddaData,PioneerReadCddaMsfData,NecReadCddaData,PlextorReadRawDVDData,HLDTSTReadRawDVDData")] TestedMedia testedMedia)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(int id, [Bind(
|
||||
"Id,IdentifyData,Blocks,BlockSize,CanReadAACS,CanReadADIP,CanReadATIP,CanReadBCA,CanReadC2Pointers,CanReadCMI,CanReadCorrectedSubchannel,CanReadCorrectedSubchannelWithC2,CanReadDCB,CanReadDDS,CanReadDMI,CanReadDiscInformation,CanReadFullTOC,CanReadHDCMI,CanReadLayerCapacity,CanReadFirstTrackPreGap,CanReadLeadIn,CanReadLeadOut,CanReadMediaID,CanReadMediaSerial,CanReadPAC,CanReadPFI,CanReadPMA,CanReadPQSubchannel,CanReadPQSubchannelWithC2,CanReadPRI,CanReadRWSubchannel,CanReadRWSubchannelWithC2,CanReadRecordablePFI,CanReadSpareAreaInformation,CanReadTOC,Density,LongBlockSize,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,SupportsHLDTSTReadRawDVD,SupportsNECReadCDDA,SupportsPioneerReadCDDA,SupportsPioneerReadCDDAMSF,SupportsPlextorReadCDDA,SupportsPlextorReadRawDVD,SupportsRead10,SupportsRead12,SupportsRead16,SupportsRead6,SupportsReadCapacity16,SupportsReadCapacity,SupportsReadCd,SupportsReadCdMsf,SupportsReadCdRaw,SupportsReadCdMsfRaw,SupportsReadLong16,SupportsReadLong,ModeSense6Data,ModeSense10Data,LBASectors,LBA48Sectors,LogicalAlignment,NominalRotationRate,PhysicalBlockSize,SolidStateDevice,UnformattedBPT,UnformattedBPS,SupportsReadDmaLba,SupportsReadDmaRetryLba,SupportsReadLba,SupportsReadRetryLba,SupportsReadLongLba,SupportsReadLongRetryLba,SupportsSeekLba,SupportsReadDmaLba48,SupportsReadLba48,SupportsReadDma,SupportsReadDmaRetry,SupportsReadRetry,SupportsReadSectors,SupportsReadLongRetry,SupportsSeek,CanReadingIntersessionLeadIn,CanReadingIntersessionLeadOut,IntersessionLeadInData,IntersessionLeadOutData,Read6Data,Read10Data,Read12Data,Read16Data,ReadLong10Data,ReadLong16Data,ReadSectorsData,ReadSectorsRetryData,ReadDmaData,ReadDmaRetryData,ReadLbaData,ReadRetryLbaData,ReadDmaLbaData,ReadDmaRetryLbaData,ReadLba48Data,ReadDmaLba48Data,ReadLongData,ReadLongRetryData,ReadLongLbaData,ReadLongRetryLbaData,TocData,FullTocData,AtipData,PmaData,ReadCdData,ReadCdMsfData,ReadCdFullData,ReadCdMsfFullData,Track1PregapData,LeadInData,LeadOutData,C2PointersData,PQSubchannelData,RWSubchannelData,CorrectedSubchannelData,PQSubchannelWithC2Data,RWSubchannelWithC2Data,CorrectedSubchannelWithC2Data,PfiData,DmiData,CmiData,DvdBcaData,DvdAacsData,DvdDdsData,DvdSaiData,PriData,EmbossedPfiData,AdipData,DcbData,HdCmiData,DvdLayerData,BluBcaData,BluDdsData,BluSaiData,BluDiData,BluPacData,PlextorReadCddaData,PioneerReadCddaData,PioneerReadCddaMsfData,NecReadCddaData,PlextorReadRawDVDData,HLDTSTReadRawDVDData")]
|
||||
TestedMedia testedMedia)
|
||||
{
|
||||
if (id != testedMedia.Id)
|
||||
if(id != testedMedia.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(testedMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!TestedMediaExists(testedMedia.Id))
|
||||
if(!TestedMediaExists(testedMedia.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedMedias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var testedMedia = await _context.TestedMedia
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (testedMedia == null)
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedMedia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +132,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/TestedMedias/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||
TestedMedia testedMedia = await _context.TestedMedia.FindAsync(id);
|
||||
_context.TestedMedia.Remove(testedMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool TestedMediaExists(int id)
|
||||
{
|
||||
return _context.TestedMedia.Any(e => e.Id == id);
|
||||
}
|
||||
bool TestedMediaExists(int id) => _context.TestedMedia.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,44 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class TestedSequentialMediasController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public TestedSequentialMediasController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public TestedSequentialMediasController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/TestedSequentialMedias
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.TestedSequentialMedia.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.TestedSequentialMedia.ToListAsync());
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var testedSequentialMedia = await _context.TestedSequentialMedia
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (testedSequentialMedia == null)
|
||||
TestedSequentialMedia testedSequentialMedia =
|
||||
await _context.TestedSequentialMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedSequentialMedia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +38,95 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/Create
|
||||
// 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> Create([Bind("Id,CanReadMediaSerial,Density,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,ModeSense6Data,ModeSense10Data")] TestedSequentialMedia testedSequentialMedia)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind(
|
||||
"Id,CanReadMediaSerial,Density,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,ModeSense6Data,ModeSense10Data")]
|
||||
TestedSequentialMedia testedSequentialMedia)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(testedSequentialMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||
if (testedSequentialMedia == null)
|
||||
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||
|
||||
if(testedSequentialMedia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/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,CanReadMediaSerial,Density,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,ModeSense6Data,ModeSense10Data")] TestedSequentialMedia testedSequentialMedia)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind(
|
||||
"Id,CanReadMediaSerial,Density,Manufacturer,MediaIsRecognized,MediumType,MediumTypeName,Model,ModeSense6Data,ModeSense10Data")]
|
||||
TestedSequentialMedia testedSequentialMedia)
|
||||
{
|
||||
if (id != testedSequentialMedia.Id)
|
||||
if(id != testedSequentialMedia.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(testedSequentialMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!TestedSequentialMediaExists(testedSequentialMedia.Id))
|
||||
if(!TestedSequentialMediaExists(testedSequentialMedia.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(testedSequentialMedia);
|
||||
}
|
||||
|
||||
// GET: Admin/TestedSequentialMedias/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var testedSequentialMedia = await _context.TestedSequentialMedia
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (testedSequentialMedia == null)
|
||||
TestedSequentialMedia testedSequentialMedia =
|
||||
await _context.TestedSequentialMedia.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(testedSequentialMedia == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +135,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/TestedSequentialMedias/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||
TestedSequentialMedia testedSequentialMedia = await _context.TestedSequentialMedia.FindAsync(id);
|
||||
_context.TestedSequentialMedia.Remove(testedSequentialMedia);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool TestedSequentialMediaExists(int id)
|
||||
{
|
||||
return _context.TestedSequentialMedia.Any(e => e.Id == id);
|
||||
}
|
||||
bool TestedSequentialMediaExists(int id) => _context.TestedSequentialMedia.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -9,8 +9,7 @@ using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class UsbProductsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class UsbVendorsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -1,44 +1,34 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using DiscImageChef.CommonTypes.Metadata;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using DiscImageChef.Server.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class UsbsController : Controller
|
||||
{
|
||||
private readonly DicServerContext _context;
|
||||
readonly DicServerContext _context;
|
||||
|
||||
public UsbsController(DicServerContext context)
|
||||
{
|
||||
_context = context;
|
||||
}
|
||||
public UsbsController(DicServerContext context) => _context = context;
|
||||
|
||||
// GET: Admin/Usbs
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
return View(await _context.Usb.ToListAsync());
|
||||
}
|
||||
public async Task<IActionResult> Index() => View(await _context.Usb.ToListAsync());
|
||||
|
||||
// GET: Admin/Usbs/Details/5
|
||||
public async Task<IActionResult> Details(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var usb = await _context.Usb
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (usb == null)
|
||||
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(usb == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -47,89 +37,92 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// GET: Admin/Usbs/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
public IActionResult Create() => View();
|
||||
|
||||
// POST: Admin/Usbs/Create
|
||||
// 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> Create([Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia,Descriptors")] Usb usb)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Create(
|
||||
[Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia,Descriptors")]
|
||||
Usb usb)
|
||||
{
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(usb);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// GET: Admin/Usbs/Edit/5
|
||||
public async Task<IActionResult> Edit(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var usb = await _context.Usb.FindAsync(id);
|
||||
if (usb == null)
|
||||
Usb usb = await _context.Usb.FindAsync(id);
|
||||
|
||||
if(usb == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// POST: Admin/Usbs/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,VendorID,ProductID,Manufacturer,Product,RemovableMedia,Descriptors")] Usb usb)
|
||||
[HttpPost, ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> Edit(
|
||||
int id, [Bind("Id,VendorID,ProductID,Manufacturer,Product,RemovableMedia,Descriptors")]
|
||||
Usb usb)
|
||||
{
|
||||
if (id != usb.Id)
|
||||
if(id != usb.Id)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
if (ModelState.IsValid)
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(usb);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch (DbUpdateConcurrencyException)
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if (!UsbExists(usb.Id))
|
||||
if(!UsbExists(usb.Id))
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
else
|
||||
{
|
||||
throw;
|
||||
}
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
return View(usb);
|
||||
}
|
||||
|
||||
// GET: Admin/Usbs/Delete/5
|
||||
public async Task<IActionResult> Delete(int? id)
|
||||
{
|
||||
if (id == null)
|
||||
if(id == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
var usb = await _context.Usb
|
||||
.FirstOrDefaultAsync(m => m.Id == id);
|
||||
if (usb == null)
|
||||
Usb usb = await _context.Usb.FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(usb == null)
|
||||
{
|
||||
return NotFound();
|
||||
}
|
||||
@@ -138,19 +131,16 @@ namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
}
|
||||
|
||||
// POST: Admin/Usbs/Delete/5
|
||||
[HttpPost, ActionName("Delete")]
|
||||
[ValidateAntiForgeryToken]
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(int id)
|
||||
{
|
||||
var usb = await _context.Usb.FindAsync(id);
|
||||
Usb usb = await _context.Usb.FindAsync(id);
|
||||
_context.Usb.Remove(usb);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
private bool UsbExists(int id)
|
||||
{
|
||||
return _context.Usb.Any(e => e.Id == id);
|
||||
}
|
||||
bool UsbExists(int id) => _context.Usb.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -7,8 +7,7 @@ using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace DiscImageChef.Server.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
[Authorize]
|
||||
[Area("Admin"), Authorize]
|
||||
public class VersionsController : Controller
|
||||
{
|
||||
readonly DicServerContext _context;
|
||||
|
||||
@@ -45,13 +45,11 @@
|
||||
<span asp-validation-for="Identify" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -38,17 +38,16 @@
|
||||
<h4>Ata</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Identify)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Identify)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,15 +37,15 @@
|
||||
<h4>Ata</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Identify)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Identify)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -34,18 +34,18 @@
|
||||
// ****************************************************************************/
|
||||
}
|
||||
ATA IDENTIFY DEVICE responses
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.Model)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.IdentifyDevice.Value.Model)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.IdentifyDevice.Value.Model)
|
||||
@@ -55,6 +55,6 @@ ATA IDENTIFY DEVICE responses
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -55,13 +55,11 @@
|
||||
<span asp-validation-for="BlockLength" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -38,29 +38,28 @@
|
||||
<h4>BlockDescriptor</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Density)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Density)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Blocks)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Blocks)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BlockLength)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BlockLength)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,27 +37,27 @@
|
||||
<h4>BlockDescriptor</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Density)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Density)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Blocks)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Blocks)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.BlockLength)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.BlockLength)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -56,9 +56,9 @@
|
||||
<span asp-validation-for="BlockLength" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,8 +65,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -55,13 +55,11 @@
|
||||
<span asp-validation-for="Sectors" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -38,29 +38,28 @@
|
||||
<h4>Chs</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Cylinders)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Cylinders)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Heads)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Heads)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Sectors)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Sectors)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,27 +37,27 @@
|
||||
<h4>Chs</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Cylinders)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Cylinders)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Heads)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Heads)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Sectors)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Sectors)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -56,9 +56,9 @@
|
||||
<span asp-validation-for="Sectors" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,21 +35,22 @@
|
||||
}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Cylinders)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Heads)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Sectors)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Cylinders)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Heads)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Sectors)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Cylinders)
|
||||
@@ -64,8 +65,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -57,4 +57,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +54,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,5 +53,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -51,10 +51,9 @@
|
||||
<span asp-validation-for="Count" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -59,8 +59,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -82,4 +82,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -84,6 +84,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -83,5 +83,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -76,10 +76,9 @@
|
||||
<span asp-validation-for="Agreement" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -89,8 +89,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -45,13 +45,11 @@
|
||||
<span asp-validation-for="Code" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -38,17 +38,16 @@
|
||||
<h4>DensityCode</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Code)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Code)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,15 +37,15 @@
|
||||
<h4>DensityCode</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Code)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Code)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -46,9 +46,9 @@
|
||||
<span asp-validation-for="Code" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,15 +35,16 @@
|
||||
}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Code)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Code)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Code)
|
||||
@@ -52,8 +53,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -67,4 +67,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -66,6 +66,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,5 +65,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -61,10 +61,9 @@
|
||||
<span asp-validation-for="Bus" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -71,8 +71,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -87,4 +87,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -90,6 +90,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -89,5 +89,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -81,10 +81,9 @@
|
||||
<span asp-validation-for="Type" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -95,8 +95,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -57,4 +57,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +54,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,5 +53,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -51,10 +51,9 @@
|
||||
<span asp-validation-for="Count" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -59,8 +59,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -57,4 +57,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +54,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,5 +53,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -51,10 +51,9 @@
|
||||
<span asp-validation-for="Count" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -59,8 +59,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -59,19 +59,17 @@
|
||||
<input asp-for="Product" class="form-control" />
|
||||
<span asp-validation-for="Product" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group form-check">
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="RemovableMedia" /> @Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -38,41 +38,40 @@
|
||||
<h4>FireWire</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.VendorID)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.VendorID)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ProductID)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ProductID)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manufacturer)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Product)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Product)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.RemovableMedia)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,39 +37,39 @@
|
||||
<h4>FireWire</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.VendorID)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.VendorID)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ProductID)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ProductID)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manufacturer)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Product)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Product)
|
||||
</dd>
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.RemovableMedia)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -60,15 +60,15 @@
|
||||
<input asp-for="Product" class="form-control" />
|
||||
<span asp-validation-for="Product" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group form-check">
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="RemovableMedia" /> @Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -35,27 +35,28 @@
|
||||
}
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.VendorID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Product)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.VendorID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.ProductID)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Manufacturer)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Product)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.RemovableMedia)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model) {
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.VendorID)
|
||||
@@ -76,8 +77,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -57,4 +57,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -54,6 +54,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -53,5 +53,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -51,10 +51,9 @@
|
||||
<span asp-validation-for="Count" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -59,8 +59,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -62,4 +62,4 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
</div>
|
||||
@@ -60,6 +60,6 @@
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -59,5 +59,5 @@
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -56,10 +56,9 @@
|
||||
<span asp-validation-for="Count" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -65,8 +65,8 @@
|
||||
<a asp-action="Details" asp-route-id="@item.Id" class="btn btn-primary">Details</a>
|
||||
<a asp-action="Edit" asp-route-id="@item.Id" class="btn btn-secondary">Edit</a>
|
||||
<a asp-action="Delete" asp-route-id="@item.Id" class="btn btn-danger">Delete</a>
|
||||
</td>
|
||||
</td>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
</table>
|
||||
@@ -45,13 +45,11 @@
|
||||
<span asp-validation-for="ModeSense2AData" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Create" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div>
|
||||
<a asp-action="Index">Back to List</a>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -38,17 +38,16 @@
|
||||
<h4>Mmc</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ModeSense2AData)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ModeSense2AData)
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<a asp-action="Index" class="btn btn-primary">Back to List</a>
|
||||
<input type="submit" value="Delete" class="btn btn-danger" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -37,15 +37,15 @@
|
||||
<h4>Mmc</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class = "col-sm-2">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.ModeSense2AData)
|
||||
</dt>
|
||||
<dd class = "col-sm-10">
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.ModeSense2AData)
|
||||
</dd>
|
||||
</dl>
|
||||
</div>
|
||||
<div>
|
||||
<a asp-action="Edit" asp-route-id="@Model.Id" class="btn btn-primary">Edit</a>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
@@ -46,9 +46,9 @@
|
||||
<span asp-validation-for="ModeSense2AData" class="text-danger"></span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input type="submit" value="Save" class="btn btn-primary" />
|
||||
<input class="btn btn-primary" type="submit" value="Save" />
|
||||
<a asp-action="Index" class="btn btn-secondary">Back to List</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user