mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Remove old MVC admin views that are not needed anymore.
This commit is contained in:
@@ -1,205 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.Areas.Admin.Models;
|
||||
using Marechai.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin"), Authorize]
|
||||
public class GpusByOwnedMachineController : Controller
|
||||
{
|
||||
readonly MarechaiContext _context;
|
||||
|
||||
public GpusByOwnedMachineController(MarechaiContext context) => _context = context;
|
||||
|
||||
// GET: GpusByOwnedMachine
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IIncludableQueryable<GpusByOwnedMachine, OwnedMachine> marechaiContext =
|
||||
_context.GpusByOwnedMachine.Include(g => g.Gpu).Include(g => g.OwnedMachine);
|
||||
|
||||
return View(await marechaiContext.OrderBy(g => g.OwnedMachine.Machine.Name).ThenBy(g => g.Gpu.Name).
|
||||
Select(g => new GpusByMachineViewModel
|
||||
{
|
||||
Id = g.Id, Gpu = g.Gpu.Name,
|
||||
Machine =
|
||||
$"{g.OwnedMachine.Machine.Company.Name} {g.OwnedMachine.Machine.Name} <{g.OwnedMachine.User.UserName}>"
|
||||
}).ToListAsync());
|
||||
}
|
||||
|
||||
// GET: GpusByOwnedMachine/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
GpusByMachineViewModel gpusByOwnedMachine =
|
||||
await _context.GpusByOwnedMachine.Include(g => g.Gpu).Include(g => g.OwnedMachine).
|
||||
Select(o => new GpusByMachineViewModel
|
||||
{
|
||||
Gpu = o.Gpu.Name, Id = o.Id,
|
||||
Machine =
|
||||
$"{o.OwnedMachine.Machine.Company.Name} {o.OwnedMachine.Machine.Name} <{o.OwnedMachine.User.UserName}>"
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(gpusByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(gpusByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: GpusByOwnedMachine/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["GpuId"] = new SelectList(_context.Gpus.OrderBy(g => g.Name), "Id", "Name");
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: GpusByOwnedMachine/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("GpuId,OwnedMachineId,Id")] GpusByOwnedMachine gpusByOwnedMachine)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(gpusByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["GpuId"] =
|
||||
new SelectList(_context.Gpus.OrderBy(g => g.Name), "Id", "Name", gpusByOwnedMachine.GpuId);
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", gpusByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(gpusByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: GpusByOwnedMachine/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
GpusByOwnedMachine gpusByOwnedMachine = await _context.GpusByOwnedMachine.FindAsync(id);
|
||||
|
||||
if(gpusByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
ViewData["GpuId"] =
|
||||
new SelectList(_context.Gpus.OrderBy(g => g.Name), "Id", "Name", gpusByOwnedMachine.GpuId);
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", gpusByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(gpusByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: GpusByOwnedMachine/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(
|
||||
long id, [Bind("GpuId,OwnedMachineId,Id")] GpusByOwnedMachine gpusByOwnedMachine)
|
||||
{
|
||||
if(id != gpusByOwnedMachine.Id)
|
||||
return NotFound();
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(gpusByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!GpusByOwnedMachineExists(gpusByOwnedMachine.Id))
|
||||
return NotFound();
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["GpuId"] =
|
||||
new SelectList(_context.Gpus.OrderBy(g => g.Name), "Id", "Name", gpusByOwnedMachine.GpuId);
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", gpusByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(gpusByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: GpusByOwnedMachine/Delete/5
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
GpusByMachineViewModel gpusByOwnedMachine =
|
||||
await _context.GpusByOwnedMachine.Include(g => g.Gpu).Include(g => g.OwnedMachine).
|
||||
Select(o => new GpusByMachineViewModel
|
||||
{
|
||||
Gpu = o.Gpu.Name, Id = o.Id,
|
||||
Machine =
|
||||
$"{o.OwnedMachine.Machine.Company.Name} {o.OwnedMachine.Machine.Name} <{o.OwnedMachine.User.UserName}>"
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(gpusByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(gpusByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: GpusByOwnedMachine/Delete/5
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
GpusByOwnedMachine gpusByOwnedMachine = await _context.GpusByOwnedMachine.FindAsync(id);
|
||||
_context.GpusByOwnedMachine.Remove(gpusByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool GpusByOwnedMachineExists(long id) => _context.GpusByOwnedMachine.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : HomeController.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin controller
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin")]
|
||||
public class HomeController : Controller
|
||||
{
|
||||
// GET
|
||||
public IActionResult Index() => View();
|
||||
}
|
||||
}
|
||||
@@ -1,229 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : MemoryByOwnedMachinesController.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Memory by machines admin controller
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.Areas.Admin.Models;
|
||||
using Marechai.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin"), Authorize]
|
||||
public class MemoryByOwnedMachinesController : Controller
|
||||
{
|
||||
readonly MarechaiContext _context;
|
||||
|
||||
public MemoryByOwnedMachinesController(MarechaiContext context) => _context = context;
|
||||
|
||||
// GET: Admin/MemoryByOwnedMachines
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IIncludableQueryable<MemoryByOwnedMachine, OwnedMachine> marechaiContext =
|
||||
_context.MemoryByOwnedMachine.Include(m => m.OwnedMachine);
|
||||
|
||||
return View(await marechaiContext.OrderBy(m => m.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(m => m.OwnedMachine.Machine.Name).
|
||||
ThenBy(m => m.OwnedMachine.User.UserName).ThenBy(m => m.Usage).
|
||||
ThenBy(m => m.Size).ThenBy(m => m.Type).
|
||||
Select(m => new MemoryByMachineViewModel
|
||||
{
|
||||
Id = m.Id,
|
||||
Machine =
|
||||
$"{m.OwnedMachine.Machine.Company.Name} {m.OwnedMachine.Machine.Name} <{m.OwnedMachine.User.UserName}>",
|
||||
Size = m.Size, Speed = m.Speed, Type = m.Type, Usage = m.Usage
|
||||
}).ToListAsync());
|
||||
}
|
||||
|
||||
// GET: Admin/MemoryByOwnedMachines/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
IIncludableQueryable<MemoryByOwnedMachine, OwnedMachine> marechaiContext =
|
||||
_context.MemoryByOwnedMachine.Include(m => m.OwnedMachine);
|
||||
|
||||
MemoryByMachineViewModel memoryByOwnedMachine =
|
||||
await marechaiContext.OrderBy(m => m.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(m => m.OwnedMachine.Machine.Name).
|
||||
ThenBy(m => m.OwnedMachine.User.UserName).ThenBy(m => m.Usage).
|
||||
ThenBy(m => m.Size).ThenBy(m => m.Type).Select(m => new MemoryByMachineViewModel
|
||||
{
|
||||
Id = m.Id,
|
||||
Machine =
|
||||
$"{m.OwnedMachine.Machine.Company.Name} {m.OwnedMachine.Machine.Name} <{m.OwnedMachine.User.UserName}>",
|
||||
Size = m.Size, Speed = m.Speed, Type = m.Type, Usage = m.Usage
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(memoryByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(memoryByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/MemoryByOwnedMachines/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Admin/MemoryByOwnedMachines/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("OwnedMachineId,Type,Usage,Size,Speed,Id")]
|
||||
MemoryByOwnedMachine memoryByOwnedMachine)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(memoryByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", memoryByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(memoryByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/MemoryByOwnedMachines/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
MemoryByOwnedMachine memoryByOwnedMachine = await _context.MemoryByOwnedMachine.FindAsync(id);
|
||||
|
||||
if(memoryByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", memoryByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(memoryByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: Admin/MemoryByOwnedMachines/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(long id, [Bind("OwnedMachineId,Type,Usage,Size,Speed,Id")]
|
||||
MemoryByOwnedMachine memoryByOwnedMachine)
|
||||
{
|
||||
if(id != memoryByOwnedMachine.Id)
|
||||
return NotFound();
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(memoryByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!MemoryByOwnedMachineExists(memoryByOwnedMachine.Id))
|
||||
return NotFound();
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", memoryByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(memoryByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/MemoryByOwnedMachines/Delete/5
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
MemoryByOwnedMachine memoryByOwnedMachine =
|
||||
await _context.MemoryByOwnedMachine.Include(m => m.OwnedMachine).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(memoryByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(memoryByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: Admin/MemoryByOwnedMachines/Delete/5
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
MemoryByOwnedMachine memoryByOwnedMachine = await _context.MemoryByOwnedMachine.FindAsync(id);
|
||||
_context.MemoryByOwnedMachine.Remove(memoryByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool MemoryByOwnedMachineExists(long id) => _context.MemoryByOwnedMachine.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -1,218 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.Areas.Admin.Models;
|
||||
using Marechai.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin"), Authorize]
|
||||
public class OwnedMachineController : Controller
|
||||
{
|
||||
readonly MarechaiContext _context;
|
||||
|
||||
public OwnedMachineController(MarechaiContext context) => _context = context;
|
||||
|
||||
// GET: OwnedMachine
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IQueryable<OwnedMachineViewModel> marechaiContext = _context.
|
||||
OwnedMachines.Include(o => o.Machine).
|
||||
OrderBy(o => o.Machine.Company.Name).
|
||||
ThenBy(o => o.Machine.Name).
|
||||
ThenBy(o => o.User.UserName).
|
||||
ThenBy(o => o.AcquisitionDate).
|
||||
Select(o => new OwnedMachineViewModel
|
||||
{
|
||||
AcquisitionDate = o.AcquisitionDate, Id = o.Id,
|
||||
Machine =
|
||||
$"{o.Machine.Company.Name} {o.Machine.Name}",
|
||||
Status = o.Status, User = o.User.UserName
|
||||
});
|
||||
|
||||
return View(await marechaiContext.ToListAsync());
|
||||
}
|
||||
|
||||
// GET: OwnedMachine/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
OwnedMachineViewModel ownedMachine =
|
||||
await _context.OwnedMachines.Include(o => o.Machine).Select(o => new OwnedMachineViewModel
|
||||
{
|
||||
AcquisitionDate = o.AcquisitionDate, Boxed = o.Boxed,
|
||||
LastStatusDate = o.LastStatusDate,
|
||||
LostDate = o.LostDate,
|
||||
Machine = $"{o.Machine.Company.Name} {o.Machine.Name}", Manuals = o.Manuals,
|
||||
SerialNumber = o.SerialNumber, SerialNumberVisible = o.SerialNumberVisible,
|
||||
Status = o.Status,
|
||||
User = o.User.UserName, Id = o.Id
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ownedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(ownedMachine);
|
||||
}
|
||||
|
||||
// GET: OwnedMachine/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["MachineId"] = new SelectList(_context.Machines.OrderBy(m => m.Company.Name).ThenBy(m => m.Name).
|
||||
Select(m => new
|
||||
{
|
||||
m.Id, Name = $"{m.Company.Name} {m.Name}"
|
||||
}), "Id", "Name");
|
||||
|
||||
ViewData["UserId"] = new SelectList(_context.Users.OrderBy(u => u.UserName).Select(u => new
|
||||
{
|
||||
u.Id, u.UserName
|
||||
}), "Id", "UserName");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: OwnedMachine/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("AcquisitionDate,LostDate,Status,LastStatusDate,Trade,Boxed,Manuals,SerialNumber,SerialNumberVisible,MachineId,UserId,Id")]
|
||||
OwnedMachine ownedMachine)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(ownedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["MachineId"] = new SelectList(_context.Machines.OrderBy(m => m.Company.Name).ThenBy(m => m.Name).
|
||||
Select(m => new
|
||||
{
|
||||
m.Id, Name = $"{m.Company.Name} {m.Name}"
|
||||
}), "Id", "Name");
|
||||
|
||||
ViewData["UserId"] = new SelectList(_context.Users.OrderBy(u => u.UserName).Select(u => new
|
||||
{
|
||||
u.Id, u.UserName
|
||||
}), "Id", "UserName");
|
||||
|
||||
return View(ownedMachine);
|
||||
}
|
||||
|
||||
// GET: OwnedMachine/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
OwnedMachine ownedMachine = await _context.OwnedMachines.FindAsync(id);
|
||||
|
||||
if(ownedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
ViewData["MachineId"] = new SelectList(_context.Machines.OrderBy(m => m.Company.Name).ThenBy(m => m.Name).
|
||||
Select(m => new
|
||||
{
|
||||
m.Id, Name = $"{m.Company.Name} {m.Name}"
|
||||
}), "Id", "Name");
|
||||
|
||||
ViewData["UserId"] = new SelectList(_context.Users.OrderBy(u => u.UserName).
|
||||
Where(u => u.Id == ownedMachine.UserId).Select(u => new
|
||||
{
|
||||
u.Id, u.UserName
|
||||
}), "Id", "UserName");
|
||||
|
||||
return View(ownedMachine);
|
||||
}
|
||||
|
||||
// POST: OwnedMachine/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(
|
||||
long id,
|
||||
[Bind("AcquisitionDate,LostDate,Status,LastStatusDate,Trade,Boxed,Manuals,SerialNumber,SerialNumberVisible,MachineId,Id")]
|
||||
OwnedMachine ownedMachine)
|
||||
{
|
||||
if(id != ownedMachine.Id)
|
||||
return NotFound();
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(ownedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!OwnedMachineExists(ownedMachine.Id))
|
||||
return NotFound();
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["MachineId"] = new SelectList(_context.Machines.OrderBy(m => m.Company.Name).ThenBy(m => m.Name).
|
||||
Select(m => new
|
||||
{
|
||||
m.Id, Name = $"{m.Company.Name} {m.Name}"
|
||||
}), "Id", "Name");
|
||||
|
||||
ViewData["UserId"] = new SelectList(_context.Users.OrderBy(u => u.UserName).
|
||||
Where(u => u.Id == ownedMachine.UserId).Select(u => new
|
||||
{
|
||||
u.Id, u.UserName
|
||||
}), "Id", "UserName");
|
||||
|
||||
return View(ownedMachine);
|
||||
}
|
||||
|
||||
// GET: OwnedMachine/Delete/5
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
OwnedMachineViewModel ownedMachine =
|
||||
await _context.OwnedMachines.Include(o => o.Machine).Select(o => new OwnedMachineViewModel
|
||||
{
|
||||
AcquisitionDate = o.AcquisitionDate, Boxed = o.Boxed,
|
||||
LastStatusDate = o.LastStatusDate,
|
||||
LostDate = o.LostDate,
|
||||
Machine = $"{o.Machine.Company.Name} {o.Machine.Name}", Manuals = o.Manuals,
|
||||
SerialNumber = o.SerialNumber, SerialNumberVisible = o.SerialNumberVisible,
|
||||
Status = o.Status,
|
||||
User = o.User.UserName, Id = o.Id
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(ownedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(ownedMachine);
|
||||
}
|
||||
|
||||
// POST: OwnedMachine/Delete/5
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
OwnedMachine ownedMachine = await _context.OwnedMachines.FindAsync(id);
|
||||
_context.OwnedMachines.Remove(ownedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool OwnedMachineExists(long id) => _context.OwnedMachines.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -1,242 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : ProcessorsByOwnedMachinesController.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Processors by machine admin controller
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.Areas.Admin.Models;
|
||||
using Marechai.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin"), Authorize]
|
||||
public class ProcessorsByOwnedMachinesController : Controller
|
||||
{
|
||||
readonly MarechaiContext _context;
|
||||
|
||||
public ProcessorsByOwnedMachinesController(MarechaiContext context) => _context = context;
|
||||
|
||||
// GET: Admin/ProcessorsByOwnedMachines
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IIncludableQueryable<ProcessorsByOwnedMachine, Processor> marechaiContext =
|
||||
_context.ProcessorsByOwnedMachine.Include(p => p.OwnedMachine).Include(p => p.Processor);
|
||||
|
||||
return View(await marechaiContext.OrderBy(p => p.OwnedMachine.Machine.Name).ThenBy(p => p.Processor.Name).
|
||||
Select(p => new ProcessorsByMachineViewModel
|
||||
{
|
||||
Id = p.Id,
|
||||
Machine =
|
||||
$"{p.OwnedMachine.Machine.Company.Name} {p.OwnedMachine.Machine.Name} <{p.OwnedMachine.User.UserName}>",
|
||||
Processor = p.Processor.Name, Speed = p.Speed
|
||||
}).ToListAsync());
|
||||
}
|
||||
|
||||
// GET: Admin/ProcessorsByOwnedMachines/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
ProcessorsByMachineViewModel processorsByOwnedMachine =
|
||||
await _context.ProcessorsByOwnedMachine.OrderBy(p => p.OwnedMachine.Machine.Name).
|
||||
ThenBy(p => p.Processor.Name).Select(p => new ProcessorsByMachineViewModel
|
||||
{
|
||||
Id = p.Id,
|
||||
Machine =
|
||||
$"{p.OwnedMachine.Machine.Company.Name} {p.OwnedMachine.Machine.Name} <{p.OwnedMachine.User.UserName}>",
|
||||
Processor = p.Processor.Name, Speed = p.Speed
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(processorsByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(processorsByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/ProcessorsByOwnedMachines/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name");
|
||||
|
||||
ViewData["ProcessorId"] = new SelectList(_context.Processors, "Id", "Name");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Admin/ProcessorsByOwnedMachines/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("ProcessorId,OwnedMachineId,Speed,Id")]
|
||||
ProcessorsByOwnedMachine processorsByOwnedMachine)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(processorsByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name",
|
||||
processorsByOwnedMachine.OwnedMachineId);
|
||||
|
||||
ViewData["ProcessorId"] =
|
||||
new SelectList(_context.Processors, "Id", "Name", processorsByOwnedMachine.ProcessorId);
|
||||
|
||||
return View(processorsByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/ProcessorsByOwnedMachines/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
ProcessorsByOwnedMachine processorsByOwnedMachine = await _context.ProcessorsByOwnedMachine.FindAsync(id);
|
||||
|
||||
if(processorsByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name",
|
||||
processorsByOwnedMachine.OwnedMachineId);
|
||||
|
||||
ViewData["ProcessorId"] =
|
||||
new SelectList(_context.Processors, "Id", "Name", processorsByOwnedMachine.ProcessorId);
|
||||
|
||||
return View(processorsByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: Admin/ProcessorsByOwnedMachines/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(long id, [Bind("ProcessorId,OwnedMachineId,Speed,Id")]
|
||||
ProcessorsByOwnedMachine processorsByOwnedMachine)
|
||||
{
|
||||
if(id != processorsByOwnedMachine.Id)
|
||||
return NotFound();
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(processorsByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!ProcessorsByOwnedMachineExists(processorsByOwnedMachine.Id))
|
||||
return NotFound();
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name",
|
||||
processorsByOwnedMachine.OwnedMachineId);
|
||||
|
||||
ViewData["ProcessorId"] =
|
||||
new SelectList(_context.Processors, "Id", "Name", processorsByOwnedMachine.ProcessorId);
|
||||
|
||||
return View(processorsByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/ProcessorsByOwnedMachines/Delete/5
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
ProcessorsByMachineViewModel processorsByOwnedMachine =
|
||||
await _context.ProcessorsByOwnedMachine.OrderBy(p => p.OwnedMachine.Machine.Name).
|
||||
ThenBy(p => p.Processor.Name).Select(p => new ProcessorsByMachineViewModel
|
||||
{
|
||||
Id = p.Id,
|
||||
Machine =
|
||||
$"{p.OwnedMachine.Machine.Company.Name} {p.OwnedMachine.Machine.Name} <{p.OwnedMachine.User.UserName}>",
|
||||
Processor = p.Processor.Name, Speed = p.Speed
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(processorsByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(processorsByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: Admin/ProcessorsByOwnedMachines/Delete/5
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
ProcessorsByOwnedMachine processorsByOwnedMachine = await _context.ProcessorsByOwnedMachine.FindAsync(id);
|
||||
_context.ProcessorsByOwnedMachine.Remove(processorsByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool ProcessorsByOwnedMachineExists(long id) => _context.ProcessorsByOwnedMachine.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -1,213 +0,0 @@
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.Areas.Admin.Models;
|
||||
using Marechai.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin"), Authorize]
|
||||
public class SoundByOwnedMachineController : Controller
|
||||
{
|
||||
readonly MarechaiContext _context;
|
||||
|
||||
public SoundByOwnedMachineController(MarechaiContext context) => _context = context;
|
||||
|
||||
// GET: SoundByOwnedMachine
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IIncludableQueryable<SoundByOwnedMachine, SoundSynth> marechaiContext =
|
||||
_context.SoundByOwnedMachine.Include(s => s.OwnedMachine).Include(s => s.SoundSynth);
|
||||
|
||||
return View(await marechaiContext.OrderBy(s => s.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(s => s.OwnedMachine.Machine.Name).
|
||||
ThenBy(s => s.OwnedMachine.User.UserName).ThenBy(s => s.SoundSynth.Name).
|
||||
Select(s => new SoundByMachineViewModel
|
||||
{
|
||||
Id = s.Id,
|
||||
Machine =
|
||||
$"{s.OwnedMachine.Machine.Company.Name} {s.OwnedMachine.Machine.Name} <{s.OwnedMachine.User.UserName}>",
|
||||
SoundSynth = s.SoundSynth.Name
|
||||
}).ToListAsync());
|
||||
}
|
||||
|
||||
// GET: SoundByOwnedMachine/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
SoundByMachineViewModel soundByOwnedMachine =
|
||||
await _context.SoundByOwnedMachine.OrderBy(s => s.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(s => s.OwnedMachine.Machine.Name).ThenBy(s => s.OwnedMachine.User.UserName).
|
||||
ThenBy(s => s.SoundSynth.Name).Select(s => new SoundByMachineViewModel
|
||||
{
|
||||
Id = s.Id,
|
||||
Machine =
|
||||
$"{s.OwnedMachine.Machine.Company.Name} {s.OwnedMachine.Machine.Name} <{s.OwnedMachine.User.UserName}>",
|
||||
SoundSynth = s.SoundSynth.Name
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(soundByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(soundByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: SoundByOwnedMachine/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name");
|
||||
|
||||
ViewData["SoundSynthId"] = new SelectList(_context.SoundSynths, "Id", "Name");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: SoundByOwnedMachine/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("SoundSynthId,OwnedMachineId,Id")]
|
||||
SoundByOwnedMachine soundByOwnedMachine)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(soundByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", soundByOwnedMachine.OwnedMachineId);
|
||||
|
||||
ViewData["SoundSynthId"] =
|
||||
new SelectList(_context.SoundSynths, "Id", "Name", soundByOwnedMachine.SoundSynthId);
|
||||
|
||||
return View(soundByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: SoundByOwnedMachine/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
SoundByOwnedMachine soundByOwnedMachine = await _context.SoundByOwnedMachine.FindAsync(id);
|
||||
|
||||
if(soundByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", soundByOwnedMachine.OwnedMachineId);
|
||||
|
||||
ViewData["SoundSynthId"] =
|
||||
new SelectList(_context.SoundSynths, "Id", "Name", soundByOwnedMachine.SoundSynthId);
|
||||
|
||||
return View(soundByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: SoundByOwnedMachine/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(long id, [Bind("SoundSynthId,OwnedMachineId,Id")]
|
||||
SoundByOwnedMachine soundByOwnedMachine)
|
||||
{
|
||||
if(id != soundByOwnedMachine.Id)
|
||||
return NotFound();
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(soundByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!SoundByOwnedMachineExists(soundByOwnedMachine.Id))
|
||||
return NotFound();
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name", soundByOwnedMachine.OwnedMachineId);
|
||||
|
||||
ViewData["SoundSynthId"] =
|
||||
new SelectList(_context.SoundSynths, "Id", "Name", soundByOwnedMachine.SoundSynthId);
|
||||
|
||||
return View(soundByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: SoundByOwnedMachine/Delete/5
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
SoundByMachineViewModel soundByOwnedMachine =
|
||||
await _context.SoundByOwnedMachine.OrderBy(s => s.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(s => s.OwnedMachine.Machine.Name).ThenBy(s => s.OwnedMachine.User.UserName).
|
||||
ThenBy(s => s.SoundSynth.Name).Select(s => new SoundByMachineViewModel
|
||||
{
|
||||
Id = s.Id,
|
||||
Machine =
|
||||
$"{s.OwnedMachine.Machine.Company.Name} {s.OwnedMachine.Machine.Name} <{s.OwnedMachine.User.UserName}>",
|
||||
SoundSynth = s.SoundSynth.Name
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(soundByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(soundByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: SoundByOwnedMachine/Delete/5
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
SoundByOwnedMachine soundByOwnedMachine = await _context.SoundByOwnedMachine.FindAsync(id);
|
||||
_context.SoundByOwnedMachine.Remove(soundByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool SoundByOwnedMachineExists(long id) => _context.SoundByOwnedMachine.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -1,235 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : StorageByOwnedMachinesController.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Storage by machines admin controller
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using Marechai.Areas.Admin.Models;
|
||||
using Marechai.Database.Models;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.AspNetCore.Mvc.Rendering;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Query;
|
||||
|
||||
namespace Marechai.Areas.Admin.Controllers
|
||||
{
|
||||
[Area("Admin"), Authorize]
|
||||
public class StorageByOwnedMachinesController : Controller
|
||||
{
|
||||
readonly MarechaiContext _context;
|
||||
|
||||
public StorageByOwnedMachinesController(MarechaiContext context) => _context = context;
|
||||
|
||||
// GET: Admin/StorageByOwnedMachines
|
||||
public async Task<IActionResult> Index()
|
||||
{
|
||||
IIncludableQueryable<StorageByOwnedMachine, OwnedMachine> marechaiContext =
|
||||
_context.StorageByOwnedMachine.Include(s => s.OwnedMachine);
|
||||
|
||||
return View(await marechaiContext.OrderBy(s => s.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(s => s.OwnedMachine.Machine.Name).
|
||||
ThenBy(s => s.OwnedMachine.User.UserName).
|
||||
Select(s => new StorageByMachineViewModel
|
||||
{
|
||||
Id = s.Id, Company = s.OwnedMachine.Machine.Company.Name,
|
||||
Machine =
|
||||
$"{s.OwnedMachine.Machine.Company.Name} {s.OwnedMachine.Machine.Name} <{s.OwnedMachine.User.UserName}>",
|
||||
Type = s.Type, Interface = s.Interface, Capacity = s.Capacity
|
||||
}).ToListAsync());
|
||||
}
|
||||
|
||||
// GET: Admin/StorageByOwnedMachines/Details/5
|
||||
public async Task<IActionResult> Details(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
StorageByMachineViewModel storageByOwnedMachine =
|
||||
await _context.StorageByOwnedMachine.OrderBy(s => s.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(s => s.OwnedMachine.Machine.Name).ThenBy(s => s.OwnedMachine.User.UserName).
|
||||
Select(s => new StorageByMachineViewModel
|
||||
{
|
||||
Id = s.Id, Company = s.OwnedMachine.Machine.Company.Name,
|
||||
Machine =
|
||||
$"{s.OwnedMachine.Machine.Company.Name} {s.OwnedMachine.Machine.Name} <{s.OwnedMachine.User.UserName}>",
|
||||
Type = s.Type, Interface = s.Interface, Capacity = s.Capacity
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(storageByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(storageByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/StorageByOwnedMachines/Create
|
||||
public IActionResult Create()
|
||||
{
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name");
|
||||
|
||||
return View();
|
||||
}
|
||||
|
||||
// POST: Admin/StorageByOwnedMachines/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("OwnedMachineId,Type,Interface,Capacity,Id")]
|
||||
StorageByOwnedMachine storageByOwnedMachine)
|
||||
{
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
_context.Add(storageByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name",
|
||||
storageByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(storageByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/StorageByOwnedMachines/Edit/5
|
||||
public async Task<IActionResult> Edit(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
StorageByOwnedMachine storageByOwnedMachine = await _context.StorageByOwnedMachine.FindAsync(id);
|
||||
|
||||
if(storageByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name",
|
||||
storageByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(storageByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: Admin/StorageByOwnedMachines/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(long id, [Bind("OwnedMachineId,Type,Interface,Capacity,Id")]
|
||||
StorageByOwnedMachine storageByOwnedMachine)
|
||||
{
|
||||
if(id != storageByOwnedMachine.Id)
|
||||
return NotFound();
|
||||
|
||||
if(ModelState.IsValid)
|
||||
{
|
||||
try
|
||||
{
|
||||
_context.Update(storageByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
}
|
||||
catch(DbUpdateConcurrencyException)
|
||||
{
|
||||
if(!StorageByOwnedMachineExists(storageByOwnedMachine.Id))
|
||||
return NotFound();
|
||||
|
||||
throw;
|
||||
}
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
ViewData["OwnedMachineId"] = new SelectList(_context.OwnedMachines.OrderBy(m => m.Machine.Company.Name).
|
||||
ThenBy(m => m.Machine.Name).
|
||||
ThenBy(m => m.User.UserName).Select(m => new
|
||||
{
|
||||
m.Id,
|
||||
Name =
|
||||
$"{m.Machine.Company.Name} {m.Machine.Name} <{m.User.UserName}>"
|
||||
}), "Id", "Name",
|
||||
storageByOwnedMachine.OwnedMachineId);
|
||||
|
||||
return View(storageByOwnedMachine);
|
||||
}
|
||||
|
||||
// GET: Admin/StorageByOwnedMachines/Delete/5
|
||||
public async Task<IActionResult> Delete(long? id)
|
||||
{
|
||||
if(id == null)
|
||||
return NotFound();
|
||||
|
||||
StorageByMachineViewModel storageByOwnedMachine =
|
||||
await _context.StorageByOwnedMachine.OrderBy(s => s.OwnedMachine.Machine.Company.Name).
|
||||
ThenBy(s => s.OwnedMachine.Machine.Name).ThenBy(s => s.OwnedMachine.User.UserName).
|
||||
Select(s => new StorageByMachineViewModel
|
||||
{
|
||||
Id = s.Id, Company = s.OwnedMachine.Machine.Company.Name,
|
||||
Machine =
|
||||
$"{s.OwnedMachine.Machine.Company.Name} {s.OwnedMachine.Machine.Name} <{s.OwnedMachine.User.UserName}>",
|
||||
Type = s.Type, Interface = s.Interface, Capacity = s.Capacity
|
||||
}).FirstOrDefaultAsync(m => m.Id == id);
|
||||
|
||||
if(storageByOwnedMachine == null)
|
||||
return NotFound();
|
||||
|
||||
return View(storageByOwnedMachine);
|
||||
}
|
||||
|
||||
// POST: Admin/StorageByOwnedMachines/Delete/5
|
||||
[HttpPost, ActionName("Delete"), ValidateAntiForgeryToken]
|
||||
public async Task<IActionResult> DeleteConfirmed(long id)
|
||||
{
|
||||
StorageByOwnedMachine storageByOwnedMachine = await _context.StorageByOwnedMachine.FindAsync(id);
|
||||
_context.StorageByOwnedMachine.Remove(storageByOwnedMachine);
|
||||
await _context.SaveChangesAsync();
|
||||
|
||||
return RedirectToAction(nameof(Index));
|
||||
}
|
||||
|
||||
bool StorageByOwnedMachineExists(long id) => _context.StorageByOwnedMachine.Any(e => e.Id == id);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +0,0 @@
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class BaseViewModel<TKey>
|
||||
{
|
||||
public TKey Id;
|
||||
}
|
||||
}
|
||||
@@ -1,37 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : CompanyDescription.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Holds company descriptions.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class CompanyDescriptionViewModel : BaseViewModel<int>
|
||||
{
|
||||
public string Company;
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : CompanyLogo.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Describes a company logo and contains the GUID for its file.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class CompanyLogoViewModel : BaseViewModel<int>
|
||||
{
|
||||
public string Company;
|
||||
public int? Year;
|
||||
}
|
||||
}
|
||||
@@ -1,33 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class CompanyViewModel : BaseViewModel<int>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}", ApplyFormatInEditMode = true), DataType(DataType.Date)]
|
||||
public DateTime? Founded { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Sold { get; set; }
|
||||
[DisplayName("Sold to")]
|
||||
public string SoldTo { get; set; }
|
||||
public string Country { get; set; }
|
||||
[Required]
|
||||
public CompanyStatus Status { get; set; }
|
||||
|
||||
[DisplayName("Sold"), NotMapped]
|
||||
public string SoldView => Status != CompanyStatus.Active && Status != CompanyStatus.Unknown
|
||||
? Sold is null
|
||||
? "Unknown"
|
||||
: Sold.Value.ToShortDateString()
|
||||
: Sold is null
|
||||
? SoldTo is null
|
||||
? ""
|
||||
: "Unknown"
|
||||
: Sold.Value.ToShortDateString();
|
||||
}
|
||||
}
|
||||
@@ -1,51 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Gpu.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Describes chips (or chipsets) whose primary function is to generate
|
||||
// graphics (raster, vectorial, 3D, etc).
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class GpuViewModel : BaseViewModel<int>
|
||||
{
|
||||
public string Company;
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced;
|
||||
public string Name;
|
||||
[DisplayName("Model code")]
|
||||
public string ModelCode { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : GpusByMachine.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction betweeen GPU and machine.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class GpusByMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
[DisplayName("GPU")]
|
||||
public string Gpu { get; set; }
|
||||
public string Machine { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class InstructionSetExtensionsByProcessorViewModel : BaseViewModel<int>
|
||||
{
|
||||
public string Extension;
|
||||
public string Processor;
|
||||
}
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class MachinePhotoDetailsViewModel : BaseViewModel<Guid>
|
||||
{
|
||||
public string Author { get; set; }
|
||||
[DisplayName("Camera manufacturer")]
|
||||
public string CameraManufacturer { get; set; }
|
||||
[DisplayName("Camera model")]
|
||||
public string CameraModel { get; set; }
|
||||
[DisplayName("Color space")]
|
||||
public ColorSpace? ColorSpace { get; set; }
|
||||
[DisplayName("User comments")]
|
||||
public string Comments { get; set; }
|
||||
public Contrast? Contrast { get; set; }
|
||||
[DisplayName("Date and time of digitizing")]
|
||||
public DateTime? CreationDate { get; set; }
|
||||
[DisplayName("Digital zoom ratio")]
|
||||
public double? DigitalZoomRatio { get; set; }
|
||||
[DisplayName("Exif version")]
|
||||
public string ExifVersion { get; set; }
|
||||
[DisplayName("Exposure time")]
|
||||
public double? Exposure { get; set; }
|
||||
[DisplayName("Exposure mode")]
|
||||
public ExposureMode? ExposureMethod { get; set; }
|
||||
[DisplayName("Exposure Program")]
|
||||
public ExposureProgram? ExposureProgram { get; set; }
|
||||
public Flash? Flash { get; set; }
|
||||
[DisplayName("F-number")]
|
||||
public double? Focal { get; set; }
|
||||
[DisplayName("Lens focal length")]
|
||||
public double? FocalLength { get; set; }
|
||||
[DisplayName("Focal length in 35 mm film")]
|
||||
public double? FocalLengthEquivalent { get; set; }
|
||||
[DisplayName("Horizontal resolution")]
|
||||
public double? HorizontalResolution { get; set; }
|
||||
[DisplayName("ISO speed rating")]
|
||||
public ushort? IsoRating { get; set; }
|
||||
[DisplayName("Lens used")]
|
||||
public string Lens { get; set; }
|
||||
[DisplayName("Light source")]
|
||||
public LightSource? LightSource { get; set; }
|
||||
[DisplayName("Metering mode")]
|
||||
public MeteringMode? MeteringMode { get; set; }
|
||||
[DisplayName("Resolution unit")]
|
||||
public ResolutionUnit? ResolutionUnit { get; set; }
|
||||
public Orientation? Orientation { get; set; }
|
||||
public Saturation? Saturation { get; set; }
|
||||
[DisplayName("Scene capture type")]
|
||||
public SceneCaptureType? SceneCaptureType { get; set; }
|
||||
[DisplayName("Sensing method")]
|
||||
public SensingMethod? SensingMethod { get; set; }
|
||||
public Sharpness? Sharpness { get; set; }
|
||||
[DisplayName("Software used")]
|
||||
public string SoftwareUsed { get; set; }
|
||||
[DisplayName("Subject distance range")]
|
||||
public SubjectDistanceRange? SubjectDistanceRange { get; set; }
|
||||
[Timestamp, DisplayName("Uploaded on")]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Vertical resolution")]
|
||||
public double? VerticalResolution { get; set; }
|
||||
[DisplayName("White balance")]
|
||||
public WhiteBalance? WhiteBalance { get; set; }
|
||||
public string License { get; set; }
|
||||
[DisplayName("Uploaded by")]
|
||||
public string UploadUser { get; set; }
|
||||
public string Machine { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
public string Source { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,26 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
using Microsoft.AspNetCore.Http;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class MachinePhotoViewModel : BaseViewModel<Guid>
|
||||
{
|
||||
public string Author { get; set; }
|
||||
public string License { get; set; }
|
||||
public string Machine { get; set; }
|
||||
[DisplayName("Uploaded")]
|
||||
public DateTime UploadDate { get; set; }
|
||||
[DisplayName("Uploaded by")]
|
||||
public string UploadUser { get; set; }
|
||||
[NotMapped, Required(ErrorMessage = "Image file required"), DisplayName("Upload photo:")]
|
||||
public IFormFile Photo { get; set; }
|
||||
public int MachineId { get; set; }
|
||||
public int LicenseId { get; set; }
|
||||
public string ErrorMessage { get; set; }
|
||||
[Url]
|
||||
public string Source { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class MachineViewModel : BaseViewModel<int>
|
||||
{
|
||||
[StringLength(255)]
|
||||
public string Name { get; set; }
|
||||
public MachineType Type { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
public string Family { get; set; }
|
||||
[StringLength(50)]
|
||||
public string Model { get; set; }
|
||||
public string Company { get; set; }
|
||||
|
||||
[DisplayName("Introduced")]
|
||||
public string IntroducedView =>
|
||||
Introduced == DateTime.MinValue ? "Prototype" : Introduced?.ToShortDateString() ?? "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -1,46 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : MemoryByMachine.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction between memory and machine.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.ComponentModel;
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class MemoryByMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
public MemoryType Type { get; set; }
|
||||
public MemoryUsage Usage { get; set; }
|
||||
public long? Size { get; set; }
|
||||
[DisplayName("Speed (Hz)")]
|
||||
public double? Speed { get; set; }
|
||||
|
||||
public string Machine { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class OwnedMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
[DataType(DataType.Date), DisplayName("Acquired")]
|
||||
public DateTime AcquisitionDate { get; set; }
|
||||
public StatusType Status { get; set; }
|
||||
public string Machine { get; set; }
|
||||
public string User { get; set; }
|
||||
|
||||
[DisplayName("Date when sold, traded, or otherwise lost")]
|
||||
public DateTime? LostDate { get; set; }
|
||||
[DisplayName("Last status check date")]
|
||||
public DateTime? LastStatusDate { get; set; }
|
||||
[DisplayName("Available for trade or sale")]
|
||||
public bool Trade { get; set; }
|
||||
[DisplayName("Has original boxes")]
|
||||
public bool Boxed { get; set; }
|
||||
[DisplayName("Has original manuals")]
|
||||
public bool Manuals { get; set; }
|
||||
[DisplayName("Serial number")]
|
||||
public string SerialNumber { get; set; }
|
||||
[DisplayName("Serial number visible to other users")]
|
||||
public bool SerialNumberVisible { get; set; }
|
||||
|
||||
public string LostDateDisplay => LostDate?.ToLongDateString() ?? "Never";
|
||||
public string LastStatusDateDisplay => LastStatusDate?.ToLongDateString() ?? "Never";
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Processor.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Describes general purpose processors or application specific coprocessors
|
||||
// that are not strictly for graphic or sound generation.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class ProcessorViewModel : BaseViewModel<int>
|
||||
{
|
||||
public string Name { get; set; }
|
||||
public string Company { get; set; }
|
||||
[DisplayName("Model code")]
|
||||
public string ModelCode { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
[DisplayName("Instruction set")]
|
||||
public string InstructionSet { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -1,42 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : ProcessorByMachine.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction of processor and machine.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class ProcessorsByMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
public string Processor { get; set; }
|
||||
public string Machine { get; set; }
|
||||
[DisplayName("Speed (MHz)")]
|
||||
public float? Speed { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : ResolutionsByGpu.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction of resolutions and gpus.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.ComponentModel;
|
||||
using Marechai.Database.Models;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class ResolutionsByGpuViewModel : BaseViewModel<long>
|
||||
{
|
||||
public string GpuCompany;
|
||||
[DisplayName("GPU")]
|
||||
public string Gpu { get; set; }
|
||||
public Resolution Resolution { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,38 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : GpusByMachine.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction betweeen GPU and machine.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class ScreensByMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
public string Machine;
|
||||
public string Screen;
|
||||
}
|
||||
}
|
||||
@@ -1,41 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : SoundByMachine.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction of sound synth and machines.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class SoundByMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
public string Machine { get; set; }
|
||||
[DisplayName("Sound synthetizer")]
|
||||
public string SoundSynth { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,53 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : SoundSynth.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Describes chips that generate sound.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.ComponentModel.DataAnnotations.Schema;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class SoundSynthViewModel : BaseViewModel<int>
|
||||
|
||||
{
|
||||
public string Name { get; set; }
|
||||
[DisplayName("Model code")]
|
||||
public string ModelCode { get; set; }
|
||||
[DisplayFormat(DataFormatString = "{0:d}"), DataType(DataType.Date)]
|
||||
public DateTime? Introduced { get; set; }
|
||||
public int? Type { get; set; }
|
||||
|
||||
public string Company { get; set; }
|
||||
|
||||
[NotMapped]
|
||||
public string IntroducedView => Introduced?.ToShortDateString() ?? "Unknown";
|
||||
}
|
||||
}
|
||||
@@ -1,43 +0,0 @@
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : StorageByMachine.cs
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Junction of storage and machines.
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
using Marechai.Database;
|
||||
|
||||
namespace Marechai.Areas.Admin.Models
|
||||
{
|
||||
public class StorageByMachineViewModel : BaseViewModel<long>
|
||||
{
|
||||
public string Company;
|
||||
public string Machine;
|
||||
public StorageType Type { get; set; }
|
||||
public StorageInterface Interface { get; set; }
|
||||
public long? Capacity { get; set; }
|
||||
}
|
||||
}
|
||||
@@ -1,34 +0,0 @@
|
||||
@model Marechai.Database.Models.GpusByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h1>Create</h1>
|
||||
<h4>GPU by owned machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Gpu" class="control-label">
|
||||
</label>
|
||||
<select asp-for="GpuId" class="form-control" asp-items="ViewBag.GpuId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,32 +0,0 @@
|
||||
@model Marechai.Areas.Admin.Models.GpusByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h1>Delete</h1>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>GPU by owned machine</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Gpu)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Gpu)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,32 +0,0 @@
|
||||
@model Marechai.Areas.Admin.Models.GpusByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<h1>Details</h1>
|
||||
<div>
|
||||
<h4>GPU by owned machine</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Gpu)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Gpu)
|
||||
</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>
|
||||
@@ -1,39 +0,0 @@
|
||||
@model Marechai.Database.Models.GpusByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h1>Edit</h1>
|
||||
<h4>Gpus by owned machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
<span asp-validation-for="OwnedMachineId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Gpu" class="control-label">
|
||||
</label>
|
||||
<select asp-for="GpuId" class="form-control" asp-items="ViewBag.GpuId">
|
||||
</select>
|
||||
<span asp-validation-for="GpuId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<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>
|
||||
@@ -1,48 +0,0 @@
|
||||
@model IEnumerable<Marechai.Areas.Admin.Models.GpusByMachineViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
<h1>GPUs by machine</h1>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">
|
||||
Create new
|
||||
</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Gpu)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Machine)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Gpu)
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,86 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Index.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin page
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
|
||||
ViewData["Title"] = "Admin";
|
||||
}
|
||||
<h2>Administration</h2>
|
||||
<div class="content">
|
||||
<h3>Database administrative pages</h3>
|
||||
<a asp-controller="CompanyDescriptions">Company descriptions</a>
|
||||
<br />
|
||||
<a asp-controller="CompanyLogos">Company logos</a>
|
||||
<br />
|
||||
<a asp-controller="GpusByMachine">GPUs by machine</a>
|
||||
<br />
|
||||
<a asp-controller="InstructionSetExtensionsByProcessor">Instruction set extensions by processor</a>
|
||||
<br />
|
||||
<a asp-controller="MachinePhotos">Machine photos</a>
|
||||
<br />
|
||||
<a asp-controller="MemoryByMachines">Memory by machines</a>
|
||||
<br />
|
||||
<a asp-controller="News">News</a>
|
||||
<br />
|
||||
<a asp-controller="ProcessorsByMachines">Processors by machines</a>
|
||||
<br />
|
||||
<a asp-controller="Processors">Processors</a>
|
||||
<br />
|
||||
<a asp-controller="Resolutions">Resolutions</a>
|
||||
<br />
|
||||
<a asp-controller="ResolutionsByGpu">Resolutions by GPU</a>
|
||||
<br />
|
||||
<a asp-controller="ResolutionsByScreen">Resolutions by screen</a>
|
||||
<br />
|
||||
<a asp-controller="Screens">Screens</a>
|
||||
<br />
|
||||
<a asp-controller="ScreensByMachine">Screens by machine</a>
|
||||
<br />
|
||||
<a asp-controller="SoundSynths">Sound synthesizers</a>
|
||||
<br />
|
||||
<a asp-controller="SoundByMachine">Sound synthesizers by machine</a>
|
||||
<br />
|
||||
<a asp-controller="StorageByMachines">Storage by machines</a>
|
||||
<br />
|
||||
</div>
|
||||
<div class="content">
|
||||
<h3>Administrative pages for owned machines</h3>
|
||||
<a asp-controller="OwnedMachine">Owned machines</a>
|
||||
<br />
|
||||
<a asp-controller="GpusByOwnedMachine">GPUs by owned machine</a>
|
||||
<br />
|
||||
<a asp-controller="MemoryByOwnedMachines">Memory by owned machines</a>
|
||||
<br />
|
||||
<a asp-controller="ProcessorsByOwnedMachines">Processors by owned machines</a>
|
||||
<br />
|
||||
<a asp-controller="SoundByOwnedMachine">Sound synthtetizers by owned machine</a>
|
||||
<br />
|
||||
<a asp-controller="StorageByOwnedMachines">Storage by owned machine</a>
|
||||
<br />
|
||||
</div>
|
||||
@@ -1,94 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Create.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@using Marechai.Database
|
||||
@model Marechai.Database.Models.MemoryByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h2>Create</h2>
|
||||
<h4>Memory by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Usage" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Usage" class="form-control" asp-items="Html.GetEnumSelectList<MemoryUsage>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Usage" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Type" class="form-control" asp-items="Html.GetEnumSelectList<MemoryType>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Type" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Size" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Size" class="form-control" />
|
||||
<span asp-validation-for="Size" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Speed" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Speed" class="form-control" />
|
||||
<span asp-validation-for="Speed" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,81 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view delete
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Database.Models.MemoryByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h2>Delete</h2>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Memory by machine</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.OwnedMachine)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.OwnedMachine.Machine.Name)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Usage)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Usage)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Size)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Size)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Speed)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,81 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view details
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Areas.Admin.Models.MemoryByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<h2>Details</h2>
|
||||
<div>
|
||||
<h4>Memory by machine</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Usage)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Usage)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Size)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Size)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Speed)
|
||||
</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>
|
||||
@@ -1,95 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view edit
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@using Marechai.Database
|
||||
@model Marechai.Database.Models.MemoryByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h2>Edit</h2>
|
||||
<h4>Memory by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Usage" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Usage" class="form-control" asp-items="Html.GetEnumSelectList<MemoryUsage>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Usage" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Type" class="form-control" asp-items="Html.GetEnumSelectList<MemoryType>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Type" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Size" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Size" class="form-control" />
|
||||
<span asp-validation-for="Size" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Speed" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Speed" class="form-control" />
|
||||
<span asp-validation-for="Speed" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Index.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view index
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model IEnumerable<Marechai.Areas.Admin.Models.MemoryByMachineViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Memory by machines (Admin)";
|
||||
}
|
||||
<h2>Memory by machines</h2>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">
|
||||
Create new
|
||||
</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Usage)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Size)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Machine)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Usage)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Type)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Size)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Speed)
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,95 +0,0 @@
|
||||
@using Marechai.Database
|
||||
@model Marechai.Database.Models.OwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h1>Create</h1>
|
||||
<h4>Owned machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AcquisitionDate" class="control-label">
|
||||
</label>
|
||||
<input asp-for="AcquisitionDate" class="form-control" />
|
||||
<span asp-validation-for="AcquisitionDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LostDate" class="control-label">
|
||||
</label>
|
||||
<input asp-for="LostDate" class="form-control" />
|
||||
<span asp-validation-for="LostDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Status" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Status" class="form-control" asp-items="Html.GetEnumSelectList<StatusType>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Status" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LastStatusDate" class="control-label">
|
||||
</label>
|
||||
<input asp-for="LastStatusDate" class="form-control" />
|
||||
<span asp-validation-for="LastStatusDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="Trade" /> @Html.DisplayNameFor(model => model.Trade)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="Boxed" /> @Html.DisplayNameFor(model => model.Boxed)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="Manuals" /> @Html.DisplayNameFor(model => model.Manuals)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SerialNumber" class="control-label">
|
||||
</label>
|
||||
<input asp-for="SerialNumber" class="form-control" />
|
||||
<span asp-validation-for="SerialNumber" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="SerialNumberVisible" checked /> @Html.DisplayNameFor(model => model.SerialNumberVisible)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Machine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="MachineId" class="form-control" asp-items="ViewBag.MachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="User" class="control-label">
|
||||
</label>
|
||||
<select asp-for="UserId" class="form-control" asp-items="ViewBag.UserId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,86 +0,0 @@
|
||||
@model Marechai.Areas.Admin.Models.OwnedMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h1>Delete</h1>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Owned machine</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AcquisitionDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AcquisitionDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LostDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LostDateDisplay)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Status)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Status)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LastStatusDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LastStatusDateDisplay)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Trade)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Trade)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Boxed)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Boxed)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manuals)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manuals)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SerialNumber)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SerialNumber)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SerialNumberVisible)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SerialNumberVisible)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.User)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.User)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,86 +0,0 @@
|
||||
@model Marechai.Areas.Admin.Models.OwnedMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<h1>Details</h1>
|
||||
<div>
|
||||
<h4>Owned machine</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.AcquisitionDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.AcquisitionDate)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LostDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LostDateDisplay)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Status)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Status)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.LastStatusDate)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.LastStatusDateDisplay)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Trade)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Trade)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Boxed)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Boxed)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Manuals)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Manuals)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SerialNumber)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SerialNumber)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SerialNumberVisible)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SerialNumberVisible)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.User)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.User)
|
||||
</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>
|
||||
@@ -1,96 +0,0 @@
|
||||
@using Marechai.Database
|
||||
@model Marechai.Database.Models.OwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h1>Edit</h1>
|
||||
<h4>Owned machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="AcquisitionDate" class="control-label">
|
||||
</label>
|
||||
<input asp-for="AcquisitionDate" class="form-control" />
|
||||
<span asp-validation-for="AcquisitionDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LostDate" class="control-label">
|
||||
</label>
|
||||
<input asp-for="LostDate" class="form-control" />
|
||||
<span asp-validation-for="LostDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Status" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Status" class="form-control" asp-items="Html.GetEnumSelectList<StatusType>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Status" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="LastStatusDate" class="control-label">
|
||||
</label>
|
||||
<input asp-for="LastStatusDate" class="form-control" />
|
||||
<span asp-validation-for="LastStatusDate" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="Trade" /> @Html.DisplayNameFor(model => model.Trade)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="Boxed" /> @Html.DisplayNameFor(model => model.Boxed)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="Manuals" /> @Html.DisplayNameFor(model => model.Manuals)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SerialNumber" class="control-label">
|
||||
</label>
|
||||
<input asp-for="SerialNumber" class="form-control" />
|
||||
<span asp-validation-for="SerialNumber" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-check form-group">
|
||||
<label class="form-check-label">
|
||||
<input class="form-check-input" asp-for="SerialNumberVisible" checked /> @Html.DisplayNameFor(model => model.SerialNumberVisible)
|
||||
</label>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Machine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="MachineId" class="form-control" asp-items="ViewBag.MachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="User" class="control-label">
|
||||
</label>
|
||||
<select asp-for="UserId" class="form-control" asp-items="ViewBag.UserId" readonly>
|
||||
</select>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,52 +0,0 @@
|
||||
@model IEnumerable<Marechai.Areas.Admin.Models.OwnedMachineViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
<h1>Owned machines</h1>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">Create new</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.User)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.AcquisitionDate)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Status)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Machine)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.User)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.AcquisitionDate)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Status)
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,76 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Create.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Database.Models.ProcessorsByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h2>Create</h2>
|
||||
<h4>Processor by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachine" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="ProcessorId" class="control-label">
|
||||
</label>
|
||||
<select asp-for="ProcessorId" class="form-control" asp-items="ViewBag.ProcessorId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Speed" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Speed" class="form-control" />
|
||||
<span asp-validation-for="Speed" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,69 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view delete
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Areas.Admin.Models.ProcessorsByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h2>Delete</h2>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Processors by machine</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Processor)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Processor)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Speed)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,69 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view details
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Areas.Admin.Models.ProcessorsByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<h2>Details</h2>
|
||||
<div>
|
||||
<h4>Processors by machine</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Processor)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Processor)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Speed)
|
||||
</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>
|
||||
@@ -1,81 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view edit
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Database.Models.ProcessorsByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h2>Edit</h2>
|
||||
<h4>Processors by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
<span asp-validation-for="OwnedMachineId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Processor" class="control-label">
|
||||
</label>
|
||||
<select asp-for="ProcessorId" class="form-control" asp-items="ViewBag.ProcessorId">
|
||||
</select>
|
||||
<span asp-validation-for="ProcessorId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Speed" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Speed" class="form-control" />
|
||||
<span asp-validation-for="Speed" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,85 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Index.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view index
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model IEnumerable<Marechai.Areas.Admin.Models.ProcessorsByMachineViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Processors by machine (Admin)";
|
||||
}
|
||||
<h2>Processors by machine</h2>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">
|
||||
Create new
|
||||
</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Processor)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Speed)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Machine)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Processor)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Speed)
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,34 +0,0 @@
|
||||
@model Marechai.Database.Models.SoundByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h1>Create</h1>
|
||||
<h4>Sound by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SoundSynth" class="control-label">
|
||||
</label>
|
||||
<select asp-for="SoundSynthId" class="form-control" asp-items="ViewBag.SoundSynthId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1,32 +0,0 @@
|
||||
@model Marechai.Areas.Admin.Models.SoundByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h1>Delete</h1>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Sound by machine</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SoundSynth)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SoundSynth)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,32 +0,0 @@
|
||||
@model Marechai.Areas.Admin.Models.SoundByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<h1>Details</h1>
|
||||
<div>
|
||||
<h4>Sound by machine</h4>
|
||||
<hr />
|
||||
<dl class="row">
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
<dt class="col-sm-2">
|
||||
@Html.DisplayNameFor(model => model.SoundSynth)
|
||||
</dt>
|
||||
<dd class="col-sm-10">
|
||||
@Html.DisplayFor(model => model.SoundSynth)
|
||||
</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>
|
||||
@@ -1,39 +0,0 @@
|
||||
@model Marechai.Database.Models.SoundByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h1>Edit</h1>
|
||||
<h4>Sound by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="SoundSynth" class="control-label">
|
||||
</label>
|
||||
<select asp-for="SoundSynthId" class="form-control" asp-items="ViewBag.SoundSynthId">
|
||||
</select>
|
||||
<span asp-validation-for="SoundSynthId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
<span asp-validation-for="OwnedMachineId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<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>
|
||||
@@ -1,48 +0,0 @@
|
||||
@model IEnumerable<Marechai.Areas.Admin.Models.SoundByMachineViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Index";
|
||||
}
|
||||
<h1>Sound synthesizers by machine</h1>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">
|
||||
Create new
|
||||
</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.SoundSynth)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Machine)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.SoundSynth)
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,87 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Create.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view create
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@using Marechai.Database
|
||||
@model Marechai.Database.Models.StorageByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Create";
|
||||
}
|
||||
<h2>Create</h2>
|
||||
<h4>Storage by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Create">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachine" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Type" class="form-control" asp-items="Html.GetEnumSelectList<StorageType>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Type" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Interface" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Interface" class="form-control" asp-items="Html.GetEnumSelectList<StorageInterface>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Interface" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Capacity" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Capacity" class="form-control" />
|
||||
<span asp-validation-for="Capacity" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<input class="btn btn-primary" type="submit" value="Create" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,75 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Delete.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view delete
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Areas.Admin.Models.StorageByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Delete";
|
||||
}
|
||||
<h2>Delete</h2>
|
||||
<h3>Are you sure you want to delete this?</h3>
|
||||
<div>
|
||||
<h4>Storage by machine</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Interface)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Interface)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Capacity)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Capacity)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</dd>
|
||||
</dl>
|
||||
<form asp-action="Delete">
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<input class="btn btn-danger" type="submit" value="Delete" />
|
||||
<a asp-action="Index" class="btn btn-secondary">
|
||||
Back to List
|
||||
</a>
|
||||
</form>
|
||||
</div>
|
||||
@@ -1,75 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Details.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view details
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model Marechai.Areas.Admin.Models.StorageByMachineViewModel
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Details";
|
||||
}
|
||||
<h2>Details</h2>
|
||||
<div>
|
||||
<h4>Storage by machine</h4>
|
||||
<hr />
|
||||
<dl class="dl-horizontal">
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Type)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Interface)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Interface)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Capacity)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Capacity)
|
||||
</dd>
|
||||
<dt>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</dt>
|
||||
<dd>
|
||||
@Html.DisplayFor(model => model.Machine)
|
||||
</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>
|
||||
@@ -1,90 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Edit.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view edit
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@using Marechai.Database
|
||||
@model Marechai.Database.Models.StorageByOwnedMachine
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Edit";
|
||||
}
|
||||
<h2>Edit</h2>
|
||||
<h4>Storage by machine</h4>
|
||||
<hr />
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<form asp-action="Edit">
|
||||
<div asp-validation-summary="ModelOnly" class="text-danger">
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="OwnedMachineId" class="control-label">
|
||||
</label>
|
||||
<select asp-for="OwnedMachineId" class="form-control" asp-items="ViewBag.OwnedMachineId">
|
||||
</select>
|
||||
<span asp-validation-for="OwnedMachineId" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Type" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Type" class="form-control" asp-items="Html.GetEnumSelectList<StorageType>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Type" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Interface" class="control-label">
|
||||
</label>
|
||||
<select asp-for="Interface" class="form-control" asp-items="Html.GetEnumSelectList<StorageInterface>().OrderBy(s => s.Text)">
|
||||
</select>
|
||||
<span asp-validation-for="Interface" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label asp-for="Capacity" class="control-label">
|
||||
</label>
|
||||
<input asp-for="Capacity" class="form-control" />
|
||||
<span asp-validation-for="Capacity" class="text-danger">
|
||||
</span>
|
||||
</div>
|
||||
<input type="hidden" asp-for="Id" />
|
||||
<div class="form-group">
|
||||
<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>
|
||||
|
||||
@section Scripts {
|
||||
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
|
||||
}
|
||||
@@ -1,97 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : Index.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// Admin view index
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@model IEnumerable<Marechai.Areas.Admin.Models.StorageByMachineViewModel>
|
||||
|
||||
@{
|
||||
ViewData["Title"] = "Storage by machines (Admin)";
|
||||
}
|
||||
<h2>Storage by machines</h2>
|
||||
<p>
|
||||
<a asp-action="Create" class="btn btn-primary">
|
||||
Create new
|
||||
</a>
|
||||
</p>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Company)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Machine)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Type)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Interface)
|
||||
</th>
|
||||
<th>
|
||||
@Html.DisplayNameFor(model => model.Capacity)
|
||||
</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
@foreach (var item in Model)
|
||||
{
|
||||
<tr>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Company)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Machine)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Type)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Interface)
|
||||
</td>
|
||||
<td>
|
||||
@Html.DisplayFor(modelItem => item.Capacity)
|
||||
</td>
|
||||
<td>
|
||||
<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>
|
||||
</tr>
|
||||
}
|
||||
</tbody>
|
||||
</table>
|
||||
@@ -1,36 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : _ViewImports.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// View imports
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
|
||||
@using Marechai
|
||||
@using Marechai.Database.Models
|
||||
@using Marechai.Areas.Admin.Models
|
||||
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers
|
||||
@@ -1,34 +0,0 @@
|
||||
@{
|
||||
/******************************************************************************
|
||||
// MARECHAI: Master repository of computing history artifacts information
|
||||
// ----------------------------------------------------------------------------
|
||||
//
|
||||
// Filename : _ViewStart.cshtml
|
||||
// Author(s) : Natalia Portillo <claunia@claunia.com>
|
||||
//
|
||||
// --[ Description ] ----------------------------------------------------------
|
||||
//
|
||||
// View start
|
||||
//
|
||||
// --[ License ] --------------------------------------------------------------
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// This program is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
//
|
||||
// ----------------------------------------------------------------------------
|
||||
// Copyright © 2003-2020 Natalia Portillo
|
||||
*******************************************************************************/
|
||||
}
|
||||
@{
|
||||
Layout = "/Views/Shared/_Layout.cshtml";
|
||||
}
|
||||
@@ -216,5 +216,38 @@
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\CompanyDescriptions\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\CompanyDescriptions\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\CompanyDescriptions\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\GpusByOwnedMachine\Create.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\GpusByOwnedMachine\Delete.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\GpusByOwnedMachine\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\GpusByOwnedMachine\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\GpusByOwnedMachine\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\Home\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\MemoryByOwnedMachines\Create.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\MemoryByOwnedMachines\Delete.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\MemoryByOwnedMachines\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\MemoryByOwnedMachines\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\MemoryByOwnedMachines\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\OwnedMachine\Create.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\OwnedMachine\Delete.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\OwnedMachine\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\OwnedMachine\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\OwnedMachine\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\ProcessorsByOwnedMachines\Create.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\ProcessorsByOwnedMachines\Delete.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\ProcessorsByOwnedMachines\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\ProcessorsByOwnedMachines\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\ProcessorsByOwnedMachines\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\SoundByOwnedMachine\Create.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\SoundByOwnedMachine\Delete.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\SoundByOwnedMachine\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\SoundByOwnedMachine\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\SoundByOwnedMachine\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\StorageByOwnedMachines\Create.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\StorageByOwnedMachines\Delete.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\StorageByOwnedMachines\Details.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\StorageByOwnedMachines\Edit.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\StorageByOwnedMachines\Index.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\_ViewImports.cshtml" />
|
||||
<_ContentIncludedByDefault Remove="Areas\Admin\Views\_ViewStart.cshtml" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
Reference in New Issue
Block a user