diff --git a/Marechai/Areas/Admin/Controllers/GpusByOwnedMachineController.cs b/Marechai/Areas/Admin/Controllers/GpusByOwnedMachineController.cs deleted file mode 100644 index f3179bc7..00000000 --- a/Marechai/Areas/Admin/Controllers/GpusByOwnedMachineController.cs +++ /dev/null @@ -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 Index() - { - IIncludableQueryable 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 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 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 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 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 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 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); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Controllers/HomeController.cs b/Marechai/Areas/Admin/Controllers/HomeController.cs deleted file mode 100644 index 2ae9f28e..00000000 --- a/Marechai/Areas/Admin/Controllers/HomeController.cs +++ /dev/null @@ -1,41 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : HomeController.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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(); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Controllers/MemoryByOwnedMachinesController.cs b/Marechai/Areas/Admin/Controllers/MemoryByOwnedMachinesController.cs deleted file mode 100644 index cedab24a..00000000 --- a/Marechai/Areas/Admin/Controllers/MemoryByOwnedMachinesController.cs +++ /dev/null @@ -1,229 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : MemoryByOwnedMachinesController.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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 Index() - { - IIncludableQueryable 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 Details(long? id) - { - if(id == null) - return NotFound(); - - IIncludableQueryable 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 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 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 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 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 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); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Controllers/OwnedMachineController.cs b/Marechai/Areas/Admin/Controllers/OwnedMachineController.cs deleted file mode 100644 index e0d6bd85..00000000 --- a/Marechai/Areas/Admin/Controllers/OwnedMachineController.cs +++ /dev/null @@ -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 Index() - { - IQueryable 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 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 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 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 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 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 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); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Controllers/ProcessorsByOwnedMachinesController.cs b/Marechai/Areas/Admin/Controllers/ProcessorsByOwnedMachinesController.cs deleted file mode 100644 index 0ad3090c..00000000 --- a/Marechai/Areas/Admin/Controllers/ProcessorsByOwnedMachinesController.cs +++ /dev/null @@ -1,242 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : ProcessorsByOwnedMachinesController.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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 Index() - { - IIncludableQueryable 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 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 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 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 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 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 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); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Controllers/SoundByOwnedMachineController.cs b/Marechai/Areas/Admin/Controllers/SoundByOwnedMachineController.cs deleted file mode 100644 index e8b216a4..00000000 --- a/Marechai/Areas/Admin/Controllers/SoundByOwnedMachineController.cs +++ /dev/null @@ -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 Index() - { - IIncludableQueryable 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 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 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 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 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 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 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); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Controllers/StorageByOwnedMachinesController.cs b/Marechai/Areas/Admin/Controllers/StorageByOwnedMachinesController.cs deleted file mode 100644 index b6057742..00000000 --- a/Marechai/Areas/Admin/Controllers/StorageByOwnedMachinesController.cs +++ /dev/null @@ -1,235 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : StorageByOwnedMachinesController.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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 Index() - { - IIncludableQueryable 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 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 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 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 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 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 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); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/BaseViewModel.cs b/Marechai/Areas/Admin/Models/BaseViewModel.cs deleted file mode 100644 index da2be780..00000000 --- a/Marechai/Areas/Admin/Models/BaseViewModel.cs +++ /dev/null @@ -1,7 +0,0 @@ -namespace Marechai.Areas.Admin.Models -{ - public class BaseViewModel - { - public TKey Id; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/CompanyDescriptionViewModel.cs b/Marechai/Areas/Admin/Models/CompanyDescriptionViewModel.cs deleted file mode 100644 index cfec7c6b..00000000 --- a/Marechai/Areas/Admin/Models/CompanyDescriptionViewModel.cs +++ /dev/null @@ -1,37 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : CompanyDescription.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -namespace Marechai.Areas.Admin.Models -{ - public class CompanyDescriptionViewModel : BaseViewModel - { - public string Company; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/CompanyLogoViewModel.cs b/Marechai/Areas/Admin/Models/CompanyLogoViewModel.cs deleted file mode 100644 index 03d8081d..00000000 --- a/Marechai/Areas/Admin/Models/CompanyLogoViewModel.cs +++ /dev/null @@ -1,38 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : CompanyLogo.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -namespace Marechai.Areas.Admin.Models -{ - public class CompanyLogoViewModel : BaseViewModel - { - public string Company; - public int? Year; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/CompanyViewModel.cs b/Marechai/Areas/Admin/Models/CompanyViewModel.cs deleted file mode 100644 index 80f60a72..00000000 --- a/Marechai/Areas/Admin/Models/CompanyViewModel.cs +++ /dev/null @@ -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 - { - 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(); - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/GpuViewModel.cs b/Marechai/Areas/Admin/Models/GpuViewModel.cs deleted file mode 100644 index ecea3109..00000000 --- a/Marechai/Areas/Admin/Models/GpuViewModel.cs +++ /dev/null @@ -1,51 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Gpu.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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 - { - 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"; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/GpusByMachineViewModel.cs b/Marechai/Areas/Admin/Models/GpusByMachineViewModel.cs deleted file mode 100644 index 401a3857..00000000 --- a/Marechai/Areas/Admin/Models/GpusByMachineViewModel.cs +++ /dev/null @@ -1,41 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : GpusByMachine.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -using System.ComponentModel; - -namespace Marechai.Areas.Admin.Models -{ - public class GpusByMachineViewModel : BaseViewModel - { - [DisplayName("GPU")] - public string Gpu { get; set; } - public string Machine { get; set; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/InstructionSetExtensionsByProcessorViewModel.cs b/Marechai/Areas/Admin/Models/InstructionSetExtensionsByProcessorViewModel.cs deleted file mode 100644 index 358e79a5..00000000 --- a/Marechai/Areas/Admin/Models/InstructionSetExtensionsByProcessorViewModel.cs +++ /dev/null @@ -1,8 +0,0 @@ -namespace Marechai.Areas.Admin.Models -{ - public class InstructionSetExtensionsByProcessorViewModel : BaseViewModel - { - public string Extension; - public string Processor; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/MachinePhotoDetailsViewModel.cs b/Marechai/Areas/Admin/Models/MachinePhotoDetailsViewModel.cs deleted file mode 100644 index 24f5c9cc..00000000 --- a/Marechai/Areas/Admin/Models/MachinePhotoDetailsViewModel.cs +++ /dev/null @@ -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 - { - 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; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/MachinePhotoViewModel.cs b/Marechai/Areas/Admin/Models/MachinePhotoViewModel.cs deleted file mode 100644 index 80d4e5dc..00000000 --- a/Marechai/Areas/Admin/Models/MachinePhotoViewModel.cs +++ /dev/null @@ -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 - { - 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; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/MachineViewModel.cs b/Marechai/Areas/Admin/Models/MachineViewModel.cs deleted file mode 100644 index a8f52279..00000000 --- a/Marechai/Areas/Admin/Models/MachineViewModel.cs +++ /dev/null @@ -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 - { - [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"; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/MemoryByMachineViewModel.cs b/Marechai/Areas/Admin/Models/MemoryByMachineViewModel.cs deleted file mode 100644 index 5be02c3b..00000000 --- a/Marechai/Areas/Admin/Models/MemoryByMachineViewModel.cs +++ /dev/null @@ -1,46 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : MemoryByMachine.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -using System.ComponentModel; -using Marechai.Database; - -namespace Marechai.Areas.Admin.Models -{ - public class MemoryByMachineViewModel : BaseViewModel - { - 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; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/OwnedMachineViewModel.cs b/Marechai/Areas/Admin/Models/OwnedMachineViewModel.cs deleted file mode 100644 index 0115685b..00000000 --- a/Marechai/Areas/Admin/Models/OwnedMachineViewModel.cs +++ /dev/null @@ -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 - { - [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"; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/ProcessorViewModel.cs b/Marechai/Areas/Admin/Models/ProcessorViewModel.cs deleted file mode 100644 index d77d48ce..00000000 --- a/Marechai/Areas/Admin/Models/ProcessorViewModel.cs +++ /dev/null @@ -1,53 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Processor.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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 - { - 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"; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/ProcessorsByMachineViewModel.cs b/Marechai/Areas/Admin/Models/ProcessorsByMachineViewModel.cs deleted file mode 100644 index 1ea9ddf5..00000000 --- a/Marechai/Areas/Admin/Models/ProcessorsByMachineViewModel.cs +++ /dev/null @@ -1,42 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : ProcessorByMachine.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -using System.ComponentModel; - -namespace Marechai.Areas.Admin.Models -{ - public class ProcessorsByMachineViewModel : BaseViewModel - { - public string Processor { get; set; } - public string Machine { get; set; } - [DisplayName("Speed (MHz)")] - public float? Speed { get; set; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/ResolutionsByGpuViewModel.cs b/Marechai/Areas/Admin/Models/ResolutionsByGpuViewModel.cs deleted file mode 100644 index a1766b3e..00000000 --- a/Marechai/Areas/Admin/Models/ResolutionsByGpuViewModel.cs +++ /dev/null @@ -1,43 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : ResolutionsByGpu.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -using System.ComponentModel; -using Marechai.Database.Models; - -namespace Marechai.Areas.Admin.Models -{ - public class ResolutionsByGpuViewModel : BaseViewModel - { - public string GpuCompany; - [DisplayName("GPU")] - public string Gpu { get; set; } - public Resolution Resolution { get; set; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/ScreensByMachineViewModel.cs b/Marechai/Areas/Admin/Models/ScreensByMachineViewModel.cs deleted file mode 100644 index 2ca7875e..00000000 --- a/Marechai/Areas/Admin/Models/ScreensByMachineViewModel.cs +++ /dev/null @@ -1,38 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : GpusByMachine.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -namespace Marechai.Areas.Admin.Models -{ - public class ScreensByMachineViewModel : BaseViewModel - { - public string Machine; - public string Screen; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/SoundByMachineViewModel.cs b/Marechai/Areas/Admin/Models/SoundByMachineViewModel.cs deleted file mode 100644 index b16b2c45..00000000 --- a/Marechai/Areas/Admin/Models/SoundByMachineViewModel.cs +++ /dev/null @@ -1,41 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : SoundByMachine.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -using System.ComponentModel; - -namespace Marechai.Areas.Admin.Models -{ - public class SoundByMachineViewModel : BaseViewModel - { - public string Machine { get; set; } - [DisplayName("Sound synthetizer")] - public string SoundSynth { get; set; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/SoundSynthViewModel.cs b/Marechai/Areas/Admin/Models/SoundSynthViewModel.cs deleted file mode 100644 index f9f2f7d9..00000000 --- a/Marechai/Areas/Admin/Models/SoundSynthViewModel.cs +++ /dev/null @@ -1,53 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : SoundSynth.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// 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 - - { - 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"; - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Models/StorageByMachineViewModel.cs b/Marechai/Areas/Admin/Models/StorageByMachineViewModel.cs deleted file mode 100644 index 7b62ebe1..00000000 --- a/Marechai/Areas/Admin/Models/StorageByMachineViewModel.cs +++ /dev/null @@ -1,43 +0,0 @@ -/****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : StorageByMachine.cs -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - -using Marechai.Database; - -namespace Marechai.Areas.Admin.Models -{ - public class StorageByMachineViewModel : BaseViewModel - { - public string Company; - public string Machine; - public StorageType Type { get; set; } - public StorageInterface Interface { get; set; } - public long? Capacity { get; set; } - } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Create.cshtml b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Create.cshtml deleted file mode 100644 index 9569604a..00000000 --- a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Create.cshtml +++ /dev/null @@ -1,34 +0,0 @@ -@model Marechai.Database.Models.GpusByOwnedMachine - -@{ - ViewData["Title"] = "Create"; -} -

Create

-

GPU by owned machine

-
-
-
-
-
-
-
- - -
-
- - -
- -
-
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Delete.cshtml b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Delete.cshtml deleted file mode 100644 index fc8310af..00000000 --- a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Delete.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@model Marechai.Areas.Admin.Models.GpusByMachineViewModel - -@{ - ViewData["Title"] = "Delete"; -} -

Delete

-

Are you sure you want to delete this?

-
-

GPU by owned machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.Gpu) -
-
- @Html.DisplayFor(model => model.Gpu) -
-
-
- - - - Back to List - -
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Details.cshtml b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Details.cshtml deleted file mode 100644 index 39b29bc8..00000000 --- a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Details.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@model Marechai.Areas.Admin.Models.GpusByMachineViewModel - -@{ - ViewData["Title"] = "Details"; -} -

Details

-
-

GPU by owned machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.Gpu) -
-
- @Html.DisplayFor(model => model.Gpu) -
-
-
- \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Edit.cshtml b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Edit.cshtml deleted file mode 100644 index ba743186..00000000 --- a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Edit.cshtml +++ /dev/null @@ -1,39 +0,0 @@ -@model Marechai.Database.Models.GpusByOwnedMachine - -@{ - ViewData["Title"] = "Edit"; -} -

Edit

-

Gpus by owned machine

-
-
-
-
-
-
-
- - - - -
-
- - - - -
- - -
-
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml b/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml deleted file mode 100644 index 04c71476..00000000 --- a/Marechai/Areas/Admin/Views/GpusByOwnedMachine/Index.cshtml +++ /dev/null @@ -1,48 +0,0 @@ -@model IEnumerable - -@{ - ViewData["Title"] = "Index"; -} -

GPUs by machine

-

- - Create new - -

- - - - - - - - - - @foreach (var item in Model) - { - - - - - - } - -
- @Html.DisplayNameFor(model => model.Machine) - - @Html.DisplayNameFor(model => model.Gpu) -
- @Html.DisplayFor(modelItem => item.Machine) - - @Html.DisplayFor(modelItem => item.Gpu) - - - Details - - - Edit - - - Delete - -
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/Home/Index.cshtml b/Marechai/Areas/Admin/Views/Home/Index.cshtml deleted file mode 100644 index e5d450b5..00000000 --- a/Marechai/Areas/Admin/Views/Home/Index.cshtml +++ /dev/null @@ -1,86 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Index.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ - - ViewData["Title"] = "Admin"; -} -

Administration

- - \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Create.cshtml b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Create.cshtml deleted file mode 100644 index 5bb304d0..00000000 --- a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Create.cshtml +++ /dev/null @@ -1,94 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Create.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@using Marechai.Database -@model Marechai.Database.Models.MemoryByOwnedMachine - -@{ - ViewData["Title"] = "Create"; -} -

Create

-

Memory by machine

-
-
-
-
-
-
-
- - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
- -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Delete.cshtml b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Delete.cshtml deleted file mode 100644 index 50a6debe..00000000 --- a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Delete.cshtml +++ /dev/null @@ -1,81 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Delete.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Database.Models.MemoryByOwnedMachine - -@{ - ViewData["Title"] = "Delete"; -} -

Delete

-

Are you sure you want to delete this?

-
-

Memory by machine

-
-
-
- @Html.DisplayNameFor(model => model.OwnedMachine) -
-
- @Html.DisplayFor(model => model.OwnedMachine.Machine.Name) -
-
- @Html.DisplayNameFor(model => model.Usage) -
-
- @Html.DisplayFor(model => model.Usage) -
-
- @Html.DisplayNameFor(model => model.Type) -
-
- @Html.DisplayFor(model => model.Type) -
-
- @Html.DisplayNameFor(model => model.Size) -
-
- @Html.DisplayFor(model => model.Size) -
-
- @Html.DisplayNameFor(model => model.Speed) -
-
- @Html.DisplayFor(model => model.Speed) -
-
-
- - - - Back to List - -
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Details.cshtml b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Details.cshtml deleted file mode 100644 index 613775b5..00000000 --- a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Details.cshtml +++ /dev/null @@ -1,81 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Details.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Areas.Admin.Models.MemoryByMachineViewModel - -@{ - ViewData["Title"] = "Details"; -} -

Details

-
-

Memory by machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.Usage) -
-
- @Html.DisplayFor(model => model.Usage) -
-
- @Html.DisplayNameFor(model => model.Type) -
-
- @Html.DisplayFor(model => model.Type) -
-
- @Html.DisplayNameFor(model => model.Size) -
-
- @Html.DisplayFor(model => model.Size) -
-
- @Html.DisplayNameFor(model => model.Speed) -
-
- @Html.DisplayFor(model => model.Speed) -
-
-
- \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Edit.cshtml b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Edit.cshtml deleted file mode 100644 index 5ac3c25a..00000000 --- a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Edit.cshtml +++ /dev/null @@ -1,95 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Edit.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@using Marechai.Database -@model Marechai.Database.Models.MemoryByOwnedMachine - -@{ - ViewData["Title"] = "Edit"; -} -

Edit

-

Memory by machine

-
-
-
-
-
-
-
- - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
- - -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml b/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml deleted file mode 100644 index 4b9de10c..00000000 --- a/Marechai/Areas/Admin/Views/MemoryByOwnedMachines/Index.cshtml +++ /dev/null @@ -1,97 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Index.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model IEnumerable - -@{ - ViewData["Title"] = "Memory by machines (Admin)"; -} -

Memory by machines

-

- - Create new - -

- - - - - - - - - - - - - @foreach (var item in Model) - { - - - - - - - - - } - -
- @Html.DisplayNameFor(model => model.Machine) - - @Html.DisplayNameFor(model => model.Usage) - - @Html.DisplayNameFor(model => model.Type) - - @Html.DisplayNameFor(model => model.Size) - - @Html.DisplayNameFor(model => model.Speed) -
- @Html.DisplayFor(modelItem => item.Machine) - - @Html.DisplayFor(modelItem => item.Usage) - - @Html.DisplayFor(modelItem => item.Type) - - @Html.DisplayFor(modelItem => item.Size) - - @Html.DisplayFor(modelItem => item.Speed) - - - Details - - - Edit - - - Delete - -
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/OwnedMachine/Create.cshtml b/Marechai/Areas/Admin/Views/OwnedMachine/Create.cshtml deleted file mode 100644 index 472dbe68..00000000 --- a/Marechai/Areas/Admin/Views/OwnedMachine/Create.cshtml +++ /dev/null @@ -1,95 +0,0 @@ -@using Marechai.Database -@model Marechai.Database.Models.OwnedMachine - -@{ - ViewData["Title"] = "Create"; -} -

Create

-

Owned machine

-
-
-
-
-
-
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- -
-
- -
-
- -
-
- - - - -
-
- -
-
- - -
-
- - -
- -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/OwnedMachine/Delete.cshtml b/Marechai/Areas/Admin/Views/OwnedMachine/Delete.cshtml deleted file mode 100644 index 3a488659..00000000 --- a/Marechai/Areas/Admin/Views/OwnedMachine/Delete.cshtml +++ /dev/null @@ -1,86 +0,0 @@ -@model Marechai.Areas.Admin.Models.OwnedMachineViewModel - -@{ - ViewData["Title"] = "Delete"; -} -

Delete

-

Are you sure you want to delete this?

-
-

Owned machine

-
-
-
- @Html.DisplayNameFor(model => model.AcquisitionDate) -
-
- @Html.DisplayFor(model => model.AcquisitionDate) -
-
- @Html.DisplayNameFor(model => model.LostDate) -
-
- @Html.DisplayFor(model => model.LostDateDisplay) -
-
- @Html.DisplayNameFor(model => model.Status) -
-
- @Html.DisplayFor(model => model.Status) -
-
- @Html.DisplayNameFor(model => model.LastStatusDate) -
-
- @Html.DisplayFor(model => model.LastStatusDateDisplay) -
-
- @Html.DisplayNameFor(model => model.Trade) -
-
- @Html.DisplayFor(model => model.Trade) -
-
- @Html.DisplayNameFor(model => model.Boxed) -
-
- @Html.DisplayFor(model => model.Boxed) -
-
- @Html.DisplayNameFor(model => model.Manuals) -
-
- @Html.DisplayFor(model => model.Manuals) -
-
- @Html.DisplayNameFor(model => model.SerialNumber) -
-
- @Html.DisplayFor(model => model.SerialNumber) -
-
- @Html.DisplayNameFor(model => model.SerialNumberVisible) -
-
- @Html.DisplayFor(model => model.SerialNumberVisible) -
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.User) -
-
- @Html.DisplayFor(model => model.User) -
-
-
- - - - Back to List - -
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/OwnedMachine/Details.cshtml b/Marechai/Areas/Admin/Views/OwnedMachine/Details.cshtml deleted file mode 100644 index 58e22686..00000000 --- a/Marechai/Areas/Admin/Views/OwnedMachine/Details.cshtml +++ /dev/null @@ -1,86 +0,0 @@ -@model Marechai.Areas.Admin.Models.OwnedMachineViewModel - -@{ - ViewData["Title"] = "Details"; -} -

Details

-
-

Owned machine

-
-
-
- @Html.DisplayNameFor(model => model.AcquisitionDate) -
-
- @Html.DisplayFor(model => model.AcquisitionDate) -
-
- @Html.DisplayNameFor(model => model.LostDate) -
-
- @Html.DisplayFor(model => model.LostDateDisplay) -
-
- @Html.DisplayNameFor(model => model.Status) -
-
- @Html.DisplayFor(model => model.Status) -
-
- @Html.DisplayNameFor(model => model.LastStatusDate) -
-
- @Html.DisplayFor(model => model.LastStatusDateDisplay) -
-
- @Html.DisplayNameFor(model => model.Trade) -
-
- @Html.DisplayFor(model => model.Trade) -
-
- @Html.DisplayNameFor(model => model.Boxed) -
-
- @Html.DisplayFor(model => model.Boxed) -
-
- @Html.DisplayNameFor(model => model.Manuals) -
-
- @Html.DisplayFor(model => model.Manuals) -
-
- @Html.DisplayNameFor(model => model.SerialNumber) -
-
- @Html.DisplayFor(model => model.SerialNumber) -
-
- @Html.DisplayNameFor(model => model.SerialNumberVisible) -
-
- @Html.DisplayFor(model => model.SerialNumberVisible) -
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.User) -
-
- @Html.DisplayFor(model => model.User) -
-
-
- \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/OwnedMachine/Edit.cshtml b/Marechai/Areas/Admin/Views/OwnedMachine/Edit.cshtml deleted file mode 100644 index 26cd895f..00000000 --- a/Marechai/Areas/Admin/Views/OwnedMachine/Edit.cshtml +++ /dev/null @@ -1,96 +0,0 @@ -@using Marechai.Database -@model Marechai.Database.Models.OwnedMachine - -@{ - ViewData["Title"] = "Edit"; -} -

Edit

-

Owned machine

-
-
-
-
-
-
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
-
- -
-
- -
-
- -
-
- - - - -
-
- -
-
- - -
-
- - -
- - -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml b/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml deleted file mode 100644 index b61ba7bf..00000000 --- a/Marechai/Areas/Admin/Views/OwnedMachine/Index.cshtml +++ /dev/null @@ -1,52 +0,0 @@ -@model IEnumerable - -@{ - ViewData["Title"] = "Index"; -} -

Owned machines

-

- Create new -

- - - - - - - - - - - - @foreach (var item in Model) - { - - - - - - - - } - -
- @Html.DisplayNameFor(model => model.Machine) - - @Html.DisplayNameFor(model => model.User) - - @Html.DisplayNameFor(model => model.AcquisitionDate) - - @Html.DisplayNameFor(model => model.Status) -
- @Html.DisplayFor(modelItem => item.Machine) - - @Html.DisplayFor(modelItem => item.User) - - @Html.DisplayFor(modelItem => item.AcquisitionDate) - - @Html.DisplayFor(modelItem => item.Status) - - Details - Edit - Delete -
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Create.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Create.cshtml deleted file mode 100644 index 2eee82d4..00000000 --- a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Create.cshtml +++ /dev/null @@ -1,76 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Create.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Database.Models.ProcessorsByOwnedMachine - -@{ - ViewData["Title"] = "Create"; -} -

Create

-

Processor by machine

-
-
-
-
-
-
-
- - -
-
- - -
-
- - - - -
- -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Delete.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Delete.cshtml deleted file mode 100644 index b5ce6d44..00000000 --- a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Delete.cshtml +++ /dev/null @@ -1,69 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Delete.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Areas.Admin.Models.ProcessorsByMachineViewModel - -@{ - ViewData["Title"] = "Delete"; -} -

Delete

-

Are you sure you want to delete this?

-
-

Processors by machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.Processor) -
-
- @Html.DisplayFor(model => model.Processor) -
-
- @Html.DisplayNameFor(model => model.Speed) -
-
- @Html.DisplayFor(model => model.Speed) -
-
-
- - - - Back to List - -
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Details.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Details.cshtml deleted file mode 100644 index 9ccaa51f..00000000 --- a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Details.cshtml +++ /dev/null @@ -1,69 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Details.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Areas.Admin.Models.ProcessorsByMachineViewModel - -@{ - ViewData["Title"] = "Details"; -} -

Details

-
-

Processors by machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.Processor) -
-
- @Html.DisplayFor(model => model.Processor) -
-
- @Html.DisplayNameFor(model => model.Speed) -
-
- @Html.DisplayFor(model => model.Speed) -
-
-
- \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Edit.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Edit.cshtml deleted file mode 100644 index 87168eda..00000000 --- a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Edit.cshtml +++ /dev/null @@ -1,81 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Edit.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Database.Models.ProcessorsByOwnedMachine - -@{ - ViewData["Title"] = "Edit"; -} -

Edit

-

Processors by machine

-
-
-
-
-
-
-
- - - - -
-
- - - - -
-
- - - - -
- - -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml b/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml deleted file mode 100644 index f2cd7c21..00000000 --- a/Marechai/Areas/Admin/Views/ProcessorsByOwnedMachines/Index.cshtml +++ /dev/null @@ -1,85 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Index.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model IEnumerable - -@{ - ViewData["Title"] = "Processors by machine (Admin)"; -} -

Processors by machine

-

- - Create new - -

- - - - - - - - - - - @foreach (var item in Model) - { - - - - - - - } - -
- @Html.DisplayNameFor(model => model.Machine) - - @Html.DisplayNameFor(model => model.Processor) - - @Html.DisplayNameFor(model => model.Speed) -
- @Html.DisplayFor(modelItem => item.Machine) - - @Html.DisplayFor(modelItem => item.Processor) - - @Html.DisplayFor(modelItem => item.Speed) - - - Details - - - Edit - - - Delete - -
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Create.cshtml b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Create.cshtml deleted file mode 100644 index 38991433..00000000 --- a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Create.cshtml +++ /dev/null @@ -1,34 +0,0 @@ -@model Marechai.Database.Models.SoundByOwnedMachine - -@{ - ViewData["Title"] = "Create"; -} -

Create

-

Sound by machine

-
-
-
-
-
-
-
- - -
-
- - -
- -
-
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Delete.cshtml b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Delete.cshtml deleted file mode 100644 index ed80af62..00000000 --- a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Delete.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@model Marechai.Areas.Admin.Models.SoundByMachineViewModel - -@{ - ViewData["Title"] = "Delete"; -} -

Delete

-

Are you sure you want to delete this?

-
-

Sound by machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.SoundSynth) -
-
- @Html.DisplayFor(model => model.SoundSynth) -
-
-
- - - - Back to List - -
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Details.cshtml b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Details.cshtml deleted file mode 100644 index 31a0542b..00000000 --- a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Details.cshtml +++ /dev/null @@ -1,32 +0,0 @@ -@model Marechai.Areas.Admin.Models.SoundByMachineViewModel - -@{ - ViewData["Title"] = "Details"; -} -

Details

-
-

Sound by machine

-
-
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
- @Html.DisplayNameFor(model => model.SoundSynth) -
-
- @Html.DisplayFor(model => model.SoundSynth) -
-
-
- \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Edit.cshtml b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Edit.cshtml deleted file mode 100644 index da918c8c..00000000 --- a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Edit.cshtml +++ /dev/null @@ -1,39 +0,0 @@ -@model Marechai.Database.Models.SoundByOwnedMachine - -@{ - ViewData["Title"] = "Edit"; -} -

Edit

-

Sound by machine

-
-
-
-
-
-
-
- - - - -
-
- - - - -
- - -
-
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml b/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml deleted file mode 100644 index 38172635..00000000 --- a/Marechai/Areas/Admin/Views/SoundByOwnedMachine/Index.cshtml +++ /dev/null @@ -1,48 +0,0 @@ -@model IEnumerable - -@{ - ViewData["Title"] = "Index"; -} -

Sound synthesizers by machine

-

- - Create new - -

- - - - - - - - - - @foreach (var item in Model) - { - - - - - - } - -
- @Html.DisplayNameFor(model => model.Machine) - - @Html.DisplayNameFor(model => model.SoundSynth) -
- @Html.DisplayFor(modelItem => item.Machine) - - @Html.DisplayFor(modelItem => item.SoundSynth) - - - Details - - - Edit - - - Delete - -
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Create.cshtml b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Create.cshtml deleted file mode 100644 index 8a50c1a4..00000000 --- a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Create.cshtml +++ /dev/null @@ -1,87 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Create.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@using Marechai.Database -@model Marechai.Database.Models.StorageByOwnedMachine - -@{ - ViewData["Title"] = "Create"; -} -

Create

-

Storage by machine

-
-
-
-
-
-
-
- - -
-
- - - - -
-
- - - - -
-
- - - - -
- -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Delete.cshtml b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Delete.cshtml deleted file mode 100644 index 0eaf82aa..00000000 --- a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Delete.cshtml +++ /dev/null @@ -1,75 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Delete.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Areas.Admin.Models.StorageByMachineViewModel - -@{ - ViewData["Title"] = "Delete"; -} -

Delete

-

Are you sure you want to delete this?

-
-

Storage by machine

-
-
-
- @Html.DisplayNameFor(model => model.Type) -
-
- @Html.DisplayFor(model => model.Type) -
-
- @Html.DisplayNameFor(model => model.Interface) -
-
- @Html.DisplayFor(model => model.Interface) -
-
- @Html.DisplayNameFor(model => model.Capacity) -
-
- @Html.DisplayFor(model => model.Capacity) -
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
-
- - - - Back to List - -
-
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Details.cshtml b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Details.cshtml deleted file mode 100644 index 64bcfb19..00000000 --- a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Details.cshtml +++ /dev/null @@ -1,75 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Details.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model Marechai.Areas.Admin.Models.StorageByMachineViewModel - -@{ - ViewData["Title"] = "Details"; -} -

Details

-
-

Storage by machine

-
-
-
- @Html.DisplayNameFor(model => model.Type) -
-
- @Html.DisplayFor(model => model.Type) -
-
- @Html.DisplayNameFor(model => model.Interface) -
-
- @Html.DisplayFor(model => model.Interface) -
-
- @Html.DisplayNameFor(model => model.Capacity) -
-
- @Html.DisplayFor(model => model.Capacity) -
-
- @Html.DisplayNameFor(model => model.Machine) -
-
- @Html.DisplayFor(model => model.Machine) -
-
-
- \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Edit.cshtml b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Edit.cshtml deleted file mode 100644 index fa4f5fea..00000000 --- a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Edit.cshtml +++ /dev/null @@ -1,90 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Edit.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@using Marechai.Database -@model Marechai.Database.Models.StorageByOwnedMachine - -@{ - ViewData["Title"] = "Edit"; -} -

Edit

-

Storage by machine

-
-
-
-
-
-
-
- - - - -
-
- - - - -
-
- - - - -
-
- - - - -
- - -
-
-
- -@section Scripts { - @{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); } -} \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml b/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml deleted file mode 100644 index 089109b6..00000000 --- a/Marechai/Areas/Admin/Views/StorageByOwnedMachines/Index.cshtml +++ /dev/null @@ -1,97 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : Index.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@model IEnumerable - -@{ - ViewData["Title"] = "Storage by machines (Admin)"; -} -

Storage by machines

-

- - Create new - -

- - - - - - - - - - - - - @foreach (var item in Model) - { - - - - - - - - - } - -
- @Html.DisplayNameFor(model => model.Company) - - @Html.DisplayNameFor(model => model.Machine) - - @Html.DisplayNameFor(model => model.Type) - - @Html.DisplayNameFor(model => model.Interface) - - @Html.DisplayNameFor(model => model.Capacity) -
- @Html.DisplayFor(modelItem => item.Company) - - @Html.DisplayFor(modelItem => item.Machine) - - @Html.DisplayFor(modelItem => item.Type) - - @Html.DisplayFor(modelItem => item.Interface) - - @Html.DisplayFor(modelItem => item.Capacity) - - - Details - - - Edit - - - Delete - -
\ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/_ViewImports.cshtml b/Marechai/Areas/Admin/Views/_ViewImports.cshtml deleted file mode 100644 index 8aecdb28..00000000 --- a/Marechai/Areas/Admin/Views/_ViewImports.cshtml +++ /dev/null @@ -1,36 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : _ViewImports.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} - -@using Marechai -@using Marechai.Database.Models -@using Marechai.Areas.Admin.Models -@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers \ No newline at end of file diff --git a/Marechai/Areas/Admin/Views/_ViewStart.cshtml b/Marechai/Areas/Admin/Views/_ViewStart.cshtml deleted file mode 100644 index 2491a1dd..00000000 --- a/Marechai/Areas/Admin/Views/_ViewStart.cshtml +++ /dev/null @@ -1,34 +0,0 @@ -@{ - /****************************************************************************** -// MARECHAI: Master repository of computing history artifacts information -// ---------------------------------------------------------------------------- -// -// Filename : _ViewStart.cshtml -// Author(s) : Natalia Portillo -// -// --[ 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 . -// -// ---------------------------------------------------------------------------- -// Copyright © 2003-2020 Natalia Portillo -*******************************************************************************/ -} -@{ - Layout = "/Views/Shared/_Layout.cshtml"; -} \ No newline at end of file diff --git a/Marechai/Marechai.csproj b/Marechai/Marechai.csproj index 44c12427..c95d001c 100644 --- a/Marechai/Marechai.csproj +++ b/Marechai/Marechai.csproj @@ -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" /> \ No newline at end of file