Add administrative views and controllers.

This commit is contained in:
2018-08-11 10:50:22 +01:00
parent 5933aef723
commit 97d8c11fe4
96 changed files with 9897 additions and 2 deletions

View File

@@ -0,0 +1,163 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : BrowserTestsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Browser test admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class BrowserTestsController : Controller
{
readonly cicmContext _context;
public BrowserTestsController(cicmContext context)
{
_context = context;
}
// GET: Admin/BrowserTests
public async Task<IActionResult> Index()
{
return View(await _context.BrowserTests.ToListAsync());
}
// GET: Admin/BrowserTests/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
BrowserTest browserTest = await _context.BrowserTests.FirstOrDefaultAsync(m => m.Id == id);
if(browserTest == null) return NotFound();
return View(browserTest);
}
// GET: Admin/BrowserTests/Create
public IActionResult Create()
{
return View();
}
// POST: Admin/BrowserTests/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind(
"Id,UserAgent,Browser,Version,Os,Platform,Gif87,Gif89,Jpeg,Png,Pngt,Agif,Table,Colors,Js,Frames,Flash")]
BrowserTest browserTest)
{
if(ModelState.IsValid)
{
_context.Add(browserTest);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(browserTest);
}
// GET: Admin/BrowserTests/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
BrowserTest browserTest = await _context.BrowserTests.FindAsync(id);
if(browserTest == null) return NotFound();
return View(browserTest);
}
// POST: Admin/BrowserTests/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(
int id, [Bind(
"Id,UserAgent,Browser,Version,Os,Platform,Gif87,Gif89,Jpeg,Png,Pngt,Agif,Table,Colors,Js,Frames,Flash")]
BrowserTest browserTest)
{
if(id != browserTest.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(browserTest);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!BrowserTestExists(browserTest.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
return View(browserTest);
}
// GET: Admin/BrowserTests/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
BrowserTest browserTest = await _context.BrowserTests.FirstOrDefaultAsync(m => m.Id == id);
if(browserTest == null) return NotFound();
return View(browserTest);
}
// POST: Admin/BrowserTests/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
BrowserTest browserTest = await _context.BrowserTests.FindAsync(id);
_context.BrowserTests.Remove(browserTest);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool BrowserTestExists(int id)
{
return _context.BrowserTests.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,177 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : CompaniesController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Companies admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class CompaniesController : Controller
{
readonly cicmContext _context;
public CompaniesController(cicmContext context)
{
_context = context;
}
// GET: Admin/Companies
public async Task<IActionResult> Index()
{
IIncludableQueryable<Company, Company> cicmContext =
_context.Companies.Include(c => c.Country).Include(c => c.SoldTo);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/Companies/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
Company company = await _context.Companies.Include(c => c.Country).Include(c => c.SoldTo)
.FirstOrDefaultAsync(m => m.Id == id);
if(company == null) return NotFound();
return View(company);
}
// GET: Admin/Companies/Create
public IActionResult Create()
{
ViewData["CountryId"] = new SelectList(_context.Iso31661Numeric, "Id", "Name");
ViewData["SoldToId"] = new SelectList(_context.Companies, "Id", "Name");
return View();
}
// POST: Admin/Companies/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind(
"Id,Name,Founded,Website,Twitter,Facebook,Sold,SoldToId,Address,City,Province,PostalCode,CountryId,Status")]
Company company)
{
if(ModelState.IsValid)
{
_context.Add(company);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["CountryId"] = new SelectList(_context.Iso31661Numeric, "Id", "Name", company.CountryId);
ViewData["SoldToId"] = new SelectList(_context.Companies, "Id", "Name", company.SoldToId);
return View(company);
}
// GET: Admin/Companies/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
Company company = await _context.Companies.FindAsync(id);
if(company == null) return NotFound();
ViewData["CountryId"] = new SelectList(_context.Iso31661Numeric, "Id", "Name", company.CountryId);
ViewData["SoldToId"] = new SelectList(_context.Companies, "Id", "Name", company.SoldToId);
return View(company);
}
// POST: Admin/Companies/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(
int id, [Bind(
"Id,Name,Founded,Website,Twitter,Facebook,Sold,SoldToId,Address,City,Province,PostalCode,CountryId,Status")]
Company company)
{
if(id != company.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(company);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!CompanyExists(company.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["CountryId"] = new SelectList(_context.Iso31661Numeric, "Id", "Name", company.CountryId);
ViewData["SoldToId"] = new SelectList(_context.Companies, "Id", "Name", company.SoldToId);
return View(company);
}
// GET: Admin/Companies/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
Company company = await _context.Companies.Include(c => c.Country).Include(c => c.SoldTo)
.FirstOrDefaultAsync(m => m.Id == id);
if(company == null) return NotFound();
return View(company);
}
// POST: Admin/Companies/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
Company company = await _context.Companies.FindAsync(id);
_context.Companies.Remove(company);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool CompanyExists(int id)
{
return _context.Companies.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,167 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : CompanyDescriptionsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Company descriptions admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class CompanyDescriptionsController : Controller
{
readonly cicmContext _context;
public CompanyDescriptionsController(cicmContext context)
{
_context = context;
}
// GET: Admin/CompanyDescriptions
public async Task<IActionResult> Index()
{
IIncludableQueryable<CompanyDescription, Company> cicmContext =
_context.CompanyDescriptions.Include(c => c.Company);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/CompanyDescriptions/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
CompanyDescription companyDescription =
await _context.CompanyDescriptions.Include(c => c.Company).FirstOrDefaultAsync(m => m.Id == id);
if(companyDescription == null) return NotFound();
return View(companyDescription);
}
// GET: Admin/CompanyDescriptions/Create
public IActionResult Create()
{
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name");
return View();
}
// POST: Admin/CompanyDescriptions/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,CompanyId,Text")] CompanyDescription companyDescription)
{
if(ModelState.IsValid)
{
_context.Add(companyDescription);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.Id);
return View(companyDescription);
}
// GET: Admin/CompanyDescriptions/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
CompanyDescription companyDescription = await _context.CompanyDescriptions.FindAsync(id);
if(companyDescription == null) return NotFound();
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.Id);
return View(companyDescription);
}
// POST: Admin/CompanyDescriptions/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,CompanyId,Text")] CompanyDescription companyDescription)
{
if(id != companyDescription.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(companyDescription);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!CompanyDescriptionExists(companyDescription.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["Id"] = new SelectList(_context.Companies, "Id", "Name", companyDescription.Id);
return View(companyDescription);
}
// GET: Admin/CompanyDescriptions/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
CompanyDescription companyDescription =
await _context.CompanyDescriptions.Include(c => c.Company).FirstOrDefaultAsync(m => m.Id == id);
if(companyDescription == null) return NotFound();
return View(companyDescription);
}
// POST: Admin/CompanyDescriptions/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
CompanyDescription companyDescription = await _context.CompanyDescriptions.FindAsync(id);
_context.CompanyDescriptions.Remove(companyDescription);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool CompanyDescriptionExists(int id)
{
return _context.CompanyDescriptions.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,168 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : GpusController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// GPUs admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class GpusController : Controller
{
readonly cicmContext _context;
public GpusController(cicmContext context)
{
_context = context;
}
// GET: Admin/Gpus
public async Task<IActionResult> Index()
{
IIncludableQueryable<Gpu, Company> cicmContext = _context.Gpus.Include(g => g.Company);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/Gpus/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
Gpu gpu = await _context.Gpus.Include(g => g.Company).FirstOrDefaultAsync(m => m.Id == id);
if(gpu == null) return NotFound();
return View(gpu);
}
// GET: Admin/Gpus/Create
public IActionResult Create()
{
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
return View();
}
// POST: Admin/Gpus/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind("Id,Name,CompanyId,ModelCode,Introduced,Package,Process,ProcessNm,DieSize,Transistors")]
Gpu gpu)
{
if(ModelState.IsValid)
{
_context.Add(gpu);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", gpu.CompanyId);
return View(gpu);
}
// GET: Admin/Gpus/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
Gpu gpu = await _context.Gpus.FindAsync(id);
if(gpu == null) return NotFound();
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", gpu.CompanyId);
return View(gpu);
}
// POST: Admin/Gpus/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(
int id, [Bind("Id,Name,CompanyId,ModelCode,Introduced,Package,Process,ProcessNm,DieSize,Transistors")]
Gpu gpu)
{
if(id != gpu.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(gpu);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!GpuExists(gpu.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", gpu.CompanyId);
return View(gpu);
}
// GET: Admin/Gpus/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
Gpu gpu = await _context.Gpus.Include(g => g.Company).FirstOrDefaultAsync(m => m.Id == id);
if(gpu == null) return NotFound();
return View(gpu);
}
// POST: Admin/Gpus/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
Gpu gpu = await _context.Gpus.FindAsync(id);
_context.Gpus.Remove(gpu);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool GpuExists(int id)
{
return _context.Gpus.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,160 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : InstructionSetExtensionsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Instruction set extensions admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class InstructionSetExtensionsController : Controller
{
readonly cicmContext _context;
public InstructionSetExtensionsController(cicmContext context)
{
_context = context;
}
// GET: Admin/InstructionSetExtensions
public async Task<IActionResult> Index()
{
return View(await _context.InstructionSetExtensions.ToListAsync());
}
// GET: Admin/InstructionSetExtensions/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
InstructionSetExtension instructionSetExtension =
await _context.InstructionSetExtensions.FirstOrDefaultAsync(m => m.Id == id);
if(instructionSetExtension == null) return NotFound();
return View(instructionSetExtension);
}
// GET: Admin/InstructionSetExtensions/Create
public IActionResult Create()
{
return View();
}
// POST: Admin/InstructionSetExtensions/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,Extension")] InstructionSetExtension instructionSetExtension)
{
if(ModelState.IsValid)
{
_context.Add(instructionSetExtension);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(instructionSetExtension);
}
// GET: Admin/InstructionSetExtensions/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
InstructionSetExtension instructionSetExtension = await _context.InstructionSetExtensions.FindAsync(id);
if(instructionSetExtension == null) return NotFound();
return View(instructionSetExtension);
}
// POST: Admin/InstructionSetExtensions/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(
int id, [Bind("Id,Extension")] InstructionSetExtension instructionSetExtension)
{
if(id != instructionSetExtension.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(instructionSetExtension);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!InstructionSetExtensionExists(instructionSetExtension.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
return View(instructionSetExtension);
}
// GET: Admin/InstructionSetExtensions/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
InstructionSetExtension instructionSetExtension =
await _context.InstructionSetExtensions.FirstOrDefaultAsync(m => m.Id == id);
if(instructionSetExtension == null) return NotFound();
return View(instructionSetExtension);
}
// POST: Admin/InstructionSetExtensions/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
InstructionSetExtension instructionSetExtension = await _context.InstructionSetExtensions.FindAsync(id);
_context.InstructionSetExtensions.Remove(instructionSetExtension);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool InstructionSetExtensionExists(int id)
{
return _context.InstructionSetExtensions.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,157 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : InstructionSetsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Instruction sets admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class InstructionSetsController : Controller
{
readonly cicmContext _context;
public InstructionSetsController(cicmContext context)
{
_context = context;
}
// GET: Admin/InstructionSets
public async Task<IActionResult> Index()
{
return View(await _context.InstructionSets.ToListAsync());
}
// GET: Admin/InstructionSets/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
InstructionSet instructionSet = await _context.InstructionSets.FirstOrDefaultAsync(m => m.Id == id);
if(instructionSet == null) return NotFound();
return View(instructionSet);
}
// GET: Admin/InstructionSets/Create
public IActionResult Create()
{
return View();
}
// POST: Admin/InstructionSets/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,Name")] InstructionSet instructionSet)
{
if(ModelState.IsValid)
{
_context.Add(instructionSet);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(instructionSet);
}
// GET: Admin/InstructionSets/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
InstructionSet instructionSet = await _context.InstructionSets.FindAsync(id);
if(instructionSet == null) return NotFound();
return View(instructionSet);
}
// POST: Admin/InstructionSets/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,Name")] InstructionSet instructionSet)
{
if(id != instructionSet.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(instructionSet);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!InstructionSetExists(instructionSet.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
return View(instructionSet);
}
// GET: Admin/InstructionSets/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
InstructionSet instructionSet = await _context.InstructionSets.FirstOrDefaultAsync(m => m.Id == id);
if(instructionSet == null) return NotFound();
return View(instructionSet);
}
// POST: Admin/InstructionSets/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
InstructionSet instructionSet = await _context.InstructionSets.FindAsync(id);
_context.InstructionSets.Remove(instructionSet);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool InstructionSetExists(int id)
{
return _context.InstructionSets.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,166 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : MachineFamiliesController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Machine families admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class MachineFamiliesController : Controller
{
readonly cicmContext _context;
public MachineFamiliesController(cicmContext context)
{
_context = context;
}
// GET: Admin/MachineFamilies
public async Task<IActionResult> Index()
{
IIncludableQueryable<MachineFamily, Company> cicmContext = _context.MachineFamilies.Include(m => m.Company);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/MachineFamilies/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
MachineFamily machineFamily =
await _context.MachineFamilies.Include(m => m.Company).FirstOrDefaultAsync(m => m.Id == id);
if(machineFamily == null) return NotFound();
return View(machineFamily);
}
// GET: Admin/MachineFamilies/Create
public IActionResult Create()
{
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
return View();
}
// POST: Admin/MachineFamilies/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,CompanyId,Name")] MachineFamily machineFamily)
{
if(ModelState.IsValid)
{
_context.Add(machineFamily);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", machineFamily.CompanyId);
return View(machineFamily);
}
// GET: Admin/MachineFamilies/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
MachineFamily machineFamily = await _context.MachineFamilies.FindAsync(id);
if(machineFamily == null) return NotFound();
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", machineFamily.CompanyId);
return View(machineFamily);
}
// POST: Admin/MachineFamilies/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,CompanyId,Name")] MachineFamily machineFamily)
{
if(id != machineFamily.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(machineFamily);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!MachineFamilyExists(machineFamily.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", machineFamily.CompanyId);
return View(machineFamily);
}
// GET: Admin/MachineFamilies/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
MachineFamily machineFamily =
await _context.MachineFamilies.Include(m => m.Company).FirstOrDefaultAsync(m => m.Id == id);
if(machineFamily == null) return NotFound();
return View(machineFamily);
}
// POST: Admin/MachineFamilies/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
MachineFamily machineFamily = await _context.MachineFamilies.FindAsync(id);
_context.MachineFamilies.Remove(machineFamily);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool MachineFamilyExists(int id)
{
return _context.MachineFamilies.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,173 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : MachinesController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Machines admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class MachinesController : Controller
{
readonly cicmContext _context;
public MachinesController(cicmContext context)
{
_context = context;
}
// GET: Admin/Machines
public async Task<IActionResult> Index()
{
IIncludableQueryable<Machine, MachineFamily> cicmContext =
_context.Machines.Include(m => m.Company).Include(m => m.Family);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/Machines/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
Machine machine = await _context.Machines.Include(m => m.Company).Include(m => m.Family)
.FirstOrDefaultAsync(m => m.Id == id);
if(machine == null) return NotFound();
return View(machine);
}
// GET: Admin/Machines/Create
public IActionResult Create()
{
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
ViewData["FamilyId"] = new SelectList(_context.MachineFamilies, "Id", "Name");
return View();
}
// POST: Admin/Machines/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,CompanyId,Name,Type,Introduced,FamilyId,Model")]
Machine machine)
{
if(ModelState.IsValid)
{
_context.Add(machine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", machine.CompanyId);
ViewData["FamilyId"] = new SelectList(_context.MachineFamilies, "Id", "Name", machine.FamilyId);
return View(machine);
}
// GET: Admin/Machines/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
Machine machine = await _context.Machines.FindAsync(id);
if(machine == null) return NotFound();
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", machine.CompanyId);
ViewData["FamilyId"] = new SelectList(_context.MachineFamilies, "Id", "Name", machine.FamilyId);
return View(machine);
}
// POST: Admin/Machines/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,CompanyId,Name,Type,Introduced,FamilyId,Model")]
Machine machine)
{
if(id != machine.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(machine);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!MachineExists(machine.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", machine.CompanyId);
ViewData["FamilyId"] = new SelectList(_context.MachineFamilies, "Id", "Name", machine.FamilyId);
return View(machine);
}
// GET: Admin/Machines/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
Machine machine = await _context.Machines.Include(m => m.Company).Include(m => m.Family)
.FirstOrDefaultAsync(m => m.Id == id);
if(machine == null) return NotFound();
return View(machine);
}
// POST: Admin/Machines/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
Machine machine = await _context.Machines.FindAsync(id);
_context.Machines.Remove(machine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool MachineExists(int id)
{
return _context.Machines.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,169 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : MemoryByMachinesController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Memory by machines admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class MemoryByMachinesController : Controller
{
readonly cicmContext _context;
public MemoryByMachinesController(cicmContext context)
{
_context = context;
}
// GET: Admin/MemoryByMachines
public async Task<IActionResult> Index()
{
IIncludableQueryable<MemoryByMachine, Machine> cicmContext =
_context.MemoryByMachine.Include(m => m.Machine);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/MemoryByMachines/Details/5
public async Task<IActionResult> Details(long? id)
{
if(id == null) return NotFound();
MemoryByMachine memoryByMachine =
await _context.MemoryByMachine.Include(m => m.Machine).FirstOrDefaultAsync(m => m.Id == id);
if(memoryByMachine == null) return NotFound();
return View(memoryByMachine);
}
// GET: Admin/MemoryByMachines/Create
public IActionResult Create()
{
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name");
return View();
}
// POST: Admin/MemoryByMachines/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("MachineId,Type,Usage,Size,Speed,Id")]
MemoryByMachine memoryByMachine)
{
if(ModelState.IsValid)
{
_context.Add(memoryByMachine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", memoryByMachine.MachineId);
return View(memoryByMachine);
}
// GET: Admin/MemoryByMachines/Edit/5
public async Task<IActionResult> Edit(long? id)
{
if(id == null) return NotFound();
MemoryByMachine memoryByMachine = await _context.MemoryByMachine.FindAsync(id);
if(memoryByMachine == null) return NotFound();
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", memoryByMachine.MachineId);
return View(memoryByMachine);
}
// POST: Admin/MemoryByMachines/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(long id, [Bind("MachineId,Type,Usage,Size,Speed,Id")]
MemoryByMachine memoryByMachine)
{
if(id != memoryByMachine.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(memoryByMachine);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!MemoryByMachineExists(memoryByMachine.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", memoryByMachine.MachineId);
return View(memoryByMachine);
}
// GET: Admin/MemoryByMachines/Delete/5
public async Task<IActionResult> Delete(long? id)
{
if(id == null) return NotFound();
MemoryByMachine memoryByMachine =
await _context.MemoryByMachine.Include(m => m.Machine).FirstOrDefaultAsync(m => m.Id == id);
if(memoryByMachine == null) return NotFound();
return View(memoryByMachine);
}
// POST: Admin/MemoryByMachines/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(long id)
{
MemoryByMachine memoryByMachine = await _context.MemoryByMachine.FindAsync(id);
_context.MemoryByMachine.Remove(memoryByMachine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool MemoryByMachineExists(long id)
{
return _context.MemoryByMachine.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,157 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : NewsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// News admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class NewsController : Controller
{
readonly cicmContext _context;
public NewsController(cicmContext context)
{
_context = context;
}
// GET: Admin/News
public async Task<IActionResult> Index()
{
return View(await _context.News.ToListAsync());
}
// GET: Admin/News/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
News news = await _context.News.FirstOrDefaultAsync(m => m.Id == id);
if(news == null) return NotFound();
return View(news);
}
// GET: Admin/News/Create
public IActionResult Create()
{
return View();
}
// POST: Admin/News/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,Date,Type,AddedId")] News news)
{
if(ModelState.IsValid)
{
_context.Add(news);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(news);
}
// GET: Admin/News/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
News news = await _context.News.FindAsync(id);
if(news == null) return NotFound();
return View(news);
}
// POST: Admin/News/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,Date,Type,AddedId")] News news)
{
if(id != news.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(news);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!NewsExists(news.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
return View(news);
}
// GET: Admin/News/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
News news = await _context.News.FirstOrDefaultAsync(m => m.Id == id);
if(news == null) return NotFound();
return View(news);
}
// POST: Admin/News/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
News news = await _context.News.FindAsync(id);
_context.News.Remove(news);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool NewsExists(int id)
{
return _context.News.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,178 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : ProcessorsByMachinesController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Processors by machine admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class ProcessorsByMachinesController : Controller
{
readonly cicmContext _context;
public ProcessorsByMachinesController(cicmContext context)
{
_context = context;
}
// GET: Admin/ProcessorsByMachines
public async Task<IActionResult> Index()
{
IIncludableQueryable<ProcessorsByMachine, Processor> cicmContext =
_context.ProcessorsByMachine.Include(p => p.Machine).Include(p => p.Processor);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/ProcessorsByMachines/Details/5
public async Task<IActionResult> Details(long? id)
{
if(id == null) return NotFound();
ProcessorsByMachine processorsByMachine =
await _context.ProcessorsByMachine.Include(p => p.Machine).Include(p => p.Processor)
.FirstOrDefaultAsync(m => m.Id == id);
if(processorsByMachine == null) return NotFound();
return View(processorsByMachine);
}
// GET: Admin/ProcessorsByMachines/Create
public IActionResult Create()
{
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name");
ViewData["ProcessorId"] = new SelectList(_context.Processors, "Id", "Name");
return View();
}
// POST: Admin/ProcessorsByMachines/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("ProcessorId,MachineId,Speed,Id")]
ProcessorsByMachine processorsByMachine)
{
if(ModelState.IsValid)
{
_context.Add(processorsByMachine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", processorsByMachine.MachineId);
ViewData["ProcessorId"] =
new SelectList(_context.Processors, "Id", "Name", processorsByMachine.ProcessorId);
return View(processorsByMachine);
}
// GET: Admin/ProcessorsByMachines/Edit/5
public async Task<IActionResult> Edit(long? id)
{
if(id == null) return NotFound();
ProcessorsByMachine processorsByMachine = await _context.ProcessorsByMachine.FindAsync(id);
if(processorsByMachine == null) return NotFound();
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", processorsByMachine.MachineId);
ViewData["ProcessorId"] =
new SelectList(_context.Processors, "Id", "Name", processorsByMachine.ProcessorId);
return View(processorsByMachine);
}
// POST: Admin/ProcessorsByMachines/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(long id, [Bind("ProcessorId,MachineId,Speed,Id")]
ProcessorsByMachine processorsByMachine)
{
if(id != processorsByMachine.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(processorsByMachine);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!ProcessorsByMachineExists(processorsByMachine.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", processorsByMachine.MachineId);
ViewData["ProcessorId"] =
new SelectList(_context.Processors, "Id", "Name", processorsByMachine.ProcessorId);
return View(processorsByMachine);
}
// GET: Admin/ProcessorsByMachines/Delete/5
public async Task<IActionResult> Delete(long? id)
{
if(id == null) return NotFound();
ProcessorsByMachine processorsByMachine =
await _context.ProcessorsByMachine.Include(p => p.Machine).Include(p => p.Processor)
.FirstOrDefaultAsync(m => m.Id == id);
if(processorsByMachine == null) return NotFound();
return View(processorsByMachine);
}
// POST: Admin/ProcessorsByMachines/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(long id)
{
ProcessorsByMachine processorsByMachine = await _context.ProcessorsByMachine.FindAsync(id);
_context.ProcessorsByMachine.Remove(processorsByMachine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool ProcessorsByMachineExists(long id)
{
return _context.ProcessorsByMachine.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,180 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : ProcessorsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Processors admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class ProcessorsController : Controller
{
readonly cicmContext _context;
public ProcessorsController(cicmContext context)
{
_context = context;
}
// GET: Admin/Processors
public async Task<IActionResult> Index()
{
IIncludableQueryable<Processor, InstructionSet> cicmContext =
_context.Processors.Include(p => p.Company).Include(p => p.InstructionSet);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/Processors/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
Processor processor = await _context.Processors.Include(p => p.Company).Include(p => p.InstructionSet)
.FirstOrDefaultAsync(m => m.Id == id);
if(processor == null) return NotFound();
return View(processor);
}
// GET: Admin/Processors/Create
public IActionResult Create()
{
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
ViewData["InstructionSetId"] = new SelectList(_context.InstructionSets, "Id", "Name");
return View();
}
// POST: Admin/Processors/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind(
"Id,Name,CompanyId,ModelCode,Introduced,InstructionSetId,Speed,Package,Gprs,GprSize,Fprs,FprSize,Cores,ThreadsPerCore,Process,ProcessNm,DieSize,Transistors,DataBus,AddrBus,SimdRegisters,SimdSize,L1Instruction,L1Data,L2,L3")]
Processor processor)
{
if(ModelState.IsValid)
{
_context.Add(processor);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", processor.CompanyId);
ViewData["InstructionSetId"] =
new SelectList(_context.InstructionSets, "Id", "Name", processor.InstructionSetId);
return View(processor);
}
// GET: Admin/Processors/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
Processor processor = await _context.Processors.FindAsync(id);
if(processor == null) return NotFound();
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", processor.CompanyId);
ViewData["InstructionSetId"] =
new SelectList(_context.InstructionSets, "Id", "Name", processor.InstructionSetId);
return View(processor);
}
// POST: Admin/Processors/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(
int id, [Bind(
"Id,Name,CompanyId,ModelCode,Introduced,InstructionSetId,Speed,Package,Gprs,GprSize,Fprs,FprSize,Cores,ThreadsPerCore,Process,ProcessNm,DieSize,Transistors,DataBus,AddrBus,SimdRegisters,SimdSize,L1Instruction,L1Data,L2,L3")]
Processor processor)
{
if(id != processor.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(processor);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!ProcessorExists(processor.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", processor.CompanyId);
ViewData["InstructionSetId"] =
new SelectList(_context.InstructionSets, "Id", "Name", processor.InstructionSetId);
return View(processor);
}
// GET: Admin/Processors/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
Processor processor = await _context.Processors.Include(p => p.Company).Include(p => p.InstructionSet)
.FirstOrDefaultAsync(m => m.Id == id);
if(processor == null) return NotFound();
return View(processor);
}
// POST: Admin/Processors/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
Processor processor = await _context.Processors.FindAsync(id);
_context.Processors.Remove(processor);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool ProcessorExists(int id)
{
return _context.Processors.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,159 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : ResolutionsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Resolutions admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class ResolutionsController : Controller
{
readonly cicmContext _context;
public ResolutionsController(cicmContext context)
{
_context = context;
}
// GET: Admin/Resolutions
public async Task<IActionResult> Index()
{
return View(await _context.Resolutions.ToListAsync());
}
// GET: Admin/Resolutions/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
Resolution resolution = await _context.Resolutions.FirstOrDefaultAsync(m => m.Id == id);
if(resolution == null) return NotFound();
return View(resolution);
}
// GET: Admin/Resolutions/Create
public IActionResult Create()
{
return View();
}
// POST: Admin/Resolutions/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("Id,Width,Height,Colors,Palette,Chars")]
Resolution resolution)
{
if(ModelState.IsValid)
{
_context.Add(resolution);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
return View(resolution);
}
// GET: Admin/Resolutions/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
Resolution resolution = await _context.Resolutions.FindAsync(id);
if(resolution == null) return NotFound();
return View(resolution);
}
// POST: Admin/Resolutions/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(int id, [Bind("Id,Width,Height,Colors,Palette,Chars")]
Resolution resolution)
{
if(id != resolution.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(resolution);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!ResolutionExists(resolution.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
return View(resolution);
}
// GET: Admin/Resolutions/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
Resolution resolution = await _context.Resolutions.FirstOrDefaultAsync(m => m.Id == id);
if(resolution == null) return NotFound();
return View(resolution);
}
// POST: Admin/Resolutions/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
Resolution resolution = await _context.Resolutions.FindAsync(id);
_context.Resolutions.Remove(resolution);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool ResolutionExists(int id)
{
return _context.Resolutions.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,170 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : SoundSynthsController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Sound synths admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class SoundSynthsController : Controller
{
readonly cicmContext _context;
public SoundSynthsController(cicmContext context)
{
_context = context;
}
// GET: Admin/SoundSynths
public async Task<IActionResult> Index()
{
IIncludableQueryable<SoundSynth, Company> cicmContext = _context.SoundSynths.Include(s => s.Company);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/SoundSynths/Details/5
public async Task<IActionResult> Details(int? id)
{
if(id == null) return NotFound();
SoundSynth soundSynth =
await _context.SoundSynths.Include(s => s.Company).FirstOrDefaultAsync(m => m.Id == id);
if(soundSynth == null) return NotFound();
return View(soundSynth);
}
// GET: Admin/SoundSynths/Create
public IActionResult Create()
{
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name");
return View();
}
// POST: Admin/SoundSynths/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create(
[Bind("Id,Name,CompanyId,ModelCode,Introduced,Voices,Frequency,Depth,SquareWave,WhiteNoise,Type")]
SoundSynth soundSynth)
{
if(ModelState.IsValid)
{
_context.Add(soundSynth);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", soundSynth.CompanyId);
return View(soundSynth);
}
// GET: Admin/SoundSynths/Edit/5
public async Task<IActionResult> Edit(int? id)
{
if(id == null) return NotFound();
SoundSynth soundSynth = await _context.SoundSynths.FindAsync(id);
if(soundSynth == null) return NotFound();
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", soundSynth.CompanyId);
return View(soundSynth);
}
// POST: Admin/SoundSynths/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(
int id, [Bind("Id,Name,CompanyId,ModelCode,Introduced,Voices,Frequency,Depth,SquareWave,WhiteNoise,Type")]
SoundSynth soundSynth)
{
if(id != soundSynth.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(soundSynth);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!SoundSynthExists(soundSynth.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["CompanyId"] = new SelectList(_context.Companies, "Id", "Name", soundSynth.CompanyId);
return View(soundSynth);
}
// GET: Admin/SoundSynths/Delete/5
public async Task<IActionResult> Delete(int? id)
{
if(id == null) return NotFound();
SoundSynth soundSynth =
await _context.SoundSynths.Include(s => s.Company).FirstOrDefaultAsync(m => m.Id == id);
if(soundSynth == null) return NotFound();
return View(soundSynth);
}
// POST: Admin/SoundSynths/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(int id)
{
SoundSynth soundSynth = await _context.SoundSynths.FindAsync(id);
_context.SoundSynths.Remove(soundSynth);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool SoundSynthExists(int id)
{
return _context.SoundSynths.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,169 @@
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : StorageByMachinesController.cs
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Storage by machines admin controller
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
using System.Linq;
using System.Threading.Tasks;
using Cicm.Database.Models;
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.Rendering;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Query;
namespace cicm_web.Areas.Admin.Controllers
{
[Area("Admin")]
public class StorageByMachinesController : Controller
{
readonly cicmContext _context;
public StorageByMachinesController(cicmContext context)
{
_context = context;
}
// GET: Admin/StorageByMachines
public async Task<IActionResult> Index()
{
IIncludableQueryable<StorageByMachine, Machine> cicmContext =
_context.StorageByMachine.Include(s => s.Machine);
return View(await cicmContext.ToListAsync());
}
// GET: Admin/StorageByMachines/Details/5
public async Task<IActionResult> Details(long? id)
{
if(id == null) return NotFound();
StorageByMachine storageByMachine =
await _context.StorageByMachine.Include(s => s.Machine).FirstOrDefaultAsync(m => m.Id == id);
if(storageByMachine == null) return NotFound();
return View(storageByMachine);
}
// GET: Admin/StorageByMachines/Create
public IActionResult Create()
{
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name");
return View();
}
// POST: Admin/StorageByMachines/Create
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Create([Bind("MachineId,Type,Interface,Capacity,Id")]
StorageByMachine storageByMachine)
{
if(ModelState.IsValid)
{
_context.Add(storageByMachine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", storageByMachine.MachineId);
return View(storageByMachine);
}
// GET: Admin/StorageByMachines/Edit/5
public async Task<IActionResult> Edit(long? id)
{
if(id == null) return NotFound();
StorageByMachine storageByMachine = await _context.StorageByMachine.FindAsync(id);
if(storageByMachine == null) return NotFound();
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", storageByMachine.MachineId);
return View(storageByMachine);
}
// POST: Admin/StorageByMachines/Edit/5
// To protect from overposting attacks, please enable the specific properties you want to bind to, for
// more details see http://go.microsoft.com/fwlink/?LinkId=317598.
[HttpPost]
[ValidateAntiForgeryToken]
public async Task<IActionResult> Edit(long id, [Bind("MachineId,Type,Interface,Capacity,Id")]
StorageByMachine storageByMachine)
{
if(id != storageByMachine.Id) return NotFound();
if(ModelState.IsValid)
{
try
{
_context.Update(storageByMachine);
await _context.SaveChangesAsync();
}
catch(DbUpdateConcurrencyException)
{
if(!StorageByMachineExists(storageByMachine.Id)) return NotFound();
throw;
}
return RedirectToAction(nameof(Index));
}
ViewData["MachineId"] = new SelectList(_context.Machines, "Id", "Name", storageByMachine.MachineId);
return View(storageByMachine);
}
// GET: Admin/StorageByMachines/Delete/5
public async Task<IActionResult> Delete(long? id)
{
if(id == null) return NotFound();
StorageByMachine storageByMachine =
await _context.StorageByMachine.Include(s => s.Machine).FirstOrDefaultAsync(m => m.Id == id);
if(storageByMachine == null) return NotFound();
return View(storageByMachine);
}
// POST: Admin/StorageByMachines/Delete/5
[HttpPost]
[ActionName("Delete")]
[ValidateAntiForgeryToken]
public async Task<IActionResult> DeleteConfirmed(long id)
{
StorageByMachine storageByMachine = await _context.StorageByMachine.FindAsync(id);
_context.StorageByMachine.Remove(storageByMachine);
await _context.SaveChangesAsync();
return RedirectToAction(nameof(Index));
}
bool StorageByMachineExists(long id)
{
return _context.StorageByMachine.Any(e => e.Id == id);
}
}
}

View File

@@ -0,0 +1,59 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.BrowserTest
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>BrowserTest</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,148 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.BrowserTest
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>BrowserTest</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.UserAgent)
</dt>
<dd>
@Html.DisplayFor(model => model.UserAgent)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Browser)
</dt>
<dd>
@Html.DisplayFor(model => model.Browser)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Version)
</dt>
<dd>
@Html.DisplayFor(model => model.Version)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Os)
</dt>
<dd>
@Html.DisplayFor(model => model.Os)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Platform)
</dt>
<dd>
@Html.DisplayFor(model => model.Platform)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gif87)
</dt>
<dd>
@Html.DisplayFor(model => model.Gif87)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gif89)
</dt>
<dd>
@Html.DisplayFor(model => model.Gif89)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Jpeg)
</dt>
<dd>
@Html.DisplayFor(model => model.Jpeg)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Png)
</dt>
<dd>
@Html.DisplayFor(model => model.Png)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Pngt)
</dt>
<dd>
@Html.DisplayFor(model => model.Pngt)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Agif)
</dt>
<dd>
@Html.DisplayFor(model => model.Agif)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Table)
</dt>
<dd>
@Html.DisplayFor(model => model.Table)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Colors)
</dt>
<dd>
@Html.DisplayFor(model => model.Colors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Js)
</dt>
<dd>
@Html.DisplayFor(model => model.Js)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Frames)
</dt>
<dd>
@Html.DisplayFor(model => model.Frames)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Flash)
</dt>
<dd>
@Html.DisplayFor(model => model.Flash)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,145 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.BrowserTest
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>BrowserTest</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.UserAgent)
</dt>
<dd>
@Html.DisplayFor(model => model.UserAgent)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Browser)
</dt>
<dd>
@Html.DisplayFor(model => model.Browser)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Version)
</dt>
<dd>
@Html.DisplayFor(model => model.Version)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Os)
</dt>
<dd>
@Html.DisplayFor(model => model.Os)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Platform)
</dt>
<dd>
@Html.DisplayFor(model => model.Platform)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gif87)
</dt>
<dd>
@Html.DisplayFor(model => model.Gif87)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gif89)
</dt>
<dd>
@Html.DisplayFor(model => model.Gif89)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Jpeg)
</dt>
<dd>
@Html.DisplayFor(model => model.Jpeg)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Png)
</dt>
<dd>
@Html.DisplayFor(model => model.Png)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Pngt)
</dt>
<dd>
@Html.DisplayFor(model => model.Pngt)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Agif)
</dt>
<dd>
@Html.DisplayFor(model => model.Agif)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Table)
</dt>
<dd>
@Html.DisplayFor(model => model.Table)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Colors)
</dt>
<dd>
@Html.DisplayFor(model => model.Colors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Js)
</dt>
<dd>
@Html.DisplayFor(model => model.Js)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Frames)
</dt>
<dd>
@Html.DisplayFor(model => model.Frames)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Flash)
</dt>
<dd>
@Html.DisplayFor(model => model.Flash)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,192 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.BrowserTest
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>BrowserTest</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly"
class="text-danger">
</div>
<input type="hidden"
asp-for="Id" />
<div class="form-group">
<label asp-for="UserAgent"
class="control-label">
</label>
<input asp-for="UserAgent"
class="form-control" />
<span asp-validation-for="UserAgent"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Browser"
class="control-label">
</label>
<input asp-for="Browser"
class="form-control" />
<span asp-validation-for="Browser"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Version"
class="control-label">
</label>
<input asp-for="Version"
class="form-control" />
<span asp-validation-for="Version"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Os"
class="control-label">
</label>
<input asp-for="Os"
class="form-control" />
<span asp-validation-for="Os"
class="text-danger">
</span>
</div>
<div class="form-group">
<label asp-for="Platform"
class="control-label">
</label>
<input asp-for="Platform"
class="form-control" />
<span asp-validation-for="Platform"
class="text-danger">
</span>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Gif87" /> @Html.DisplayNameFor(model => model.Gif87)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Gif89" /> @Html.DisplayNameFor(model => model.Gif89)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Jpeg" /> @Html.DisplayNameFor(model => model.Jpeg)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Png" /> @Html.DisplayNameFor(model => model.Png)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Pngt" /> @Html.DisplayNameFor(model => model.Pngt)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Agif" /> @Html.DisplayNameFor(model => model.Agif)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Table" /> @Html.DisplayNameFor(model => model.Table)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Colors" /> @Html.DisplayNameFor(model => model.Colors)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Js" /> @Html.DisplayNameFor(model => model.Js)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Frames" /> @Html.DisplayNameFor(model => model.Frames)
</label>
</div>
</div>
<div class="form-group">
<div class="checkbox">
<label>
<input asp-for="Flash" /> @Html.DisplayNameFor(model => model.Flash)
</label>
</div>
</div>
<div class="form-group">
<input class="btn btn-default"
type="submit"
value="Save" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{ await Html.RenderPartialAsync("_ValidationScriptsPartial"); }
}

View File

@@ -0,0 +1,156 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.BrowserTest>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.UserAgent)
</th>
<th>
@Html.DisplayNameFor(model => model.Browser)
</th>
<th>
@Html.DisplayNameFor(model => model.Version)
</th>
<th>
@Html.DisplayNameFor(model => model.Os)
</th>
<th>
@Html.DisplayNameFor(model => model.Platform)
</th>
<th>
@Html.DisplayNameFor(model => model.Gif87)
</th>
<th>
@Html.DisplayNameFor(model => model.Gif89)
</th>
<th>
@Html.DisplayNameFor(model => model.Jpeg)
</th>
<th>
@Html.DisplayNameFor(model => model.Png)
</th>
<th>
@Html.DisplayNameFor(model => model.Pngt)
</th>
<th>
@Html.DisplayNameFor(model => model.Agif)
</th>
<th>
@Html.DisplayNameFor(model => model.Table)
</th>
<th>
@Html.DisplayNameFor(model => model.Colors)
</th>
<th>
@Html.DisplayNameFor(model => model.Js)
</th>
<th>
@Html.DisplayNameFor(model => model.Frames)
</th>
<th>
@Html.DisplayNameFor(model => model.Flash)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.UserAgent)
</td>
<td>
@Html.DisplayFor(modelItem => item.Browser)
</td>
<td>
@Html.DisplayFor(modelItem => item.Version)
</td>
<td>
@Html.DisplayFor(modelItem => item.Os)
</td>
<td>
@Html.DisplayFor(modelItem => item.Platform)
</td>
<td>
@Html.DisplayFor(modelItem => item.Gif87)
</td>
<td>
@Html.DisplayFor(modelItem => item.Gif89)
</td>
<td>
@Html.DisplayFor(modelItem => item.Jpeg)
</td>
<td>
@Html.DisplayFor(modelItem => item.Png)
</td>
<td>
@Html.DisplayFor(modelItem => item.Pngt)
</td>
<td>
@Html.DisplayFor(modelItem => item.Agif)
</td>
<td>
@Html.DisplayFor(modelItem => item.Table)
</td>
<td>
@Html.DisplayFor(modelItem => item.Colors)
</td>
<td>
@Html.DisplayFor(modelItem => item.Js)
</td>
<td>
@Html.DisplayFor(modelItem => item.Frames)
</td>
<td>
@Html.DisplayFor(modelItem => item.Flash)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,117 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Company
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>Company</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Founded" class="control-label"></label>
<input asp-for="Founded" class="form-control" />
<span asp-validation-for="Founded" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Website" class="control-label"></label>
<input asp-for="Website" class="form-control" />
<span asp-validation-for="Website" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Twitter" class="control-label"></label>
<input asp-for="Twitter" class="form-control" />
<span asp-validation-for="Twitter" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Facebook" class="control-label"></label>
<input asp-for="Facebook" class="form-control" />
<span asp-validation-for="Facebook" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Sold" class="control-label"></label>
<input asp-for="Sold" class="form-control" />
<span asp-validation-for="Sold" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SoldToId" class="control-label"></label>
<select asp-for="SoldToId" class ="form-control" asp-items="ViewBag.SoldToId"></select>
</div>
<div class="form-group">
<label asp-for="Address" class="control-label"></label>
<input asp-for="Address" class="form-control" />
<span asp-validation-for="Address" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="City" class="control-label"></label>
<input asp-for="City" class="form-control" />
<span asp-validation-for="City" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Province" class="control-label"></label>
<input asp-for="Province" class="form-control" />
<span asp-validation-for="Province" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="PostalCode" class="control-label"></label>
<input asp-for="PostalCode" class="form-control" />
<span asp-validation-for="PostalCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="CountryId" class="control-label"></label>
<select asp-for="CountryId" class ="form-control" asp-items="ViewBag.CountryId"></select>
</div>
<div class="form-group">
<label asp-for="Status" class="control-label"></label>
<select asp-for="Status" class="form-control"></select>
<span asp-validation-for="Status" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,130 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Company
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Company</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Founded)
</dt>
<dd>
@Html.DisplayFor(model => model.Founded)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Website)
</dt>
<dd>
@Html.DisplayFor(model => model.Website)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Twitter)
</dt>
<dd>
@Html.DisplayFor(model => model.Twitter)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Facebook)
</dt>
<dd>
@Html.DisplayFor(model => model.Facebook)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Sold)
</dt>
<dd>
@Html.DisplayFor(model => model.Sold)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Address)
</dd>
<dt>
@Html.DisplayNameFor(model => model.City)
</dt>
<dd>
@Html.DisplayFor(model => model.City)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Province)
</dt>
<dd>
@Html.DisplayFor(model => model.Province)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PostalCode)
</dt>
<dd>
@Html.DisplayFor(model => model.PostalCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Status)
</dt>
<dd>
@Html.DisplayFor(model => model.Status)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Country)
</dt>
<dd>
@Html.DisplayFor(model => model.Country.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SoldTo)
</dt>
<dd>
@Html.DisplayFor(model => model.SoldTo.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,127 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Company
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>Company</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Founded)
</dt>
<dd>
@Html.DisplayFor(model => model.Founded)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Website)
</dt>
<dd>
@Html.DisplayFor(model => model.Website)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Twitter)
</dt>
<dd>
@Html.DisplayFor(model => model.Twitter)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Facebook)
</dt>
<dd>
@Html.DisplayFor(model => model.Facebook)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Sold)
</dt>
<dd>
@Html.DisplayFor(model => model.Sold)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Address)
</dt>
<dd>
@Html.DisplayFor(model => model.Address)
</dd>
<dt>
@Html.DisplayNameFor(model => model.City)
</dt>
<dd>
@Html.DisplayFor(model => model.City)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Province)
</dt>
<dd>
@Html.DisplayFor(model => model.Province)
</dd>
<dt>
@Html.DisplayNameFor(model => model.PostalCode)
</dt>
<dd>
@Html.DisplayFor(model => model.PostalCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Status)
</dt>
<dd>
@Html.DisplayFor(model => model.Status)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Country)
</dt>
<dd>
@Html.DisplayFor(model => model.Country.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SoldTo)
</dt>
<dd>
@Html.DisplayFor(model => model.SoldTo.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,125 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Company
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>Company</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Founded" class="control-label"></label>
<input asp-for="Founded" class="form-control" />
<span asp-validation-for="Founded" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Website" class="control-label"></label>
<input asp-for="Website" class="form-control" />
<span asp-validation-for="Website" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Twitter" class="control-label"></label>
<input asp-for="Twitter" class="form-control" />
<span asp-validation-for="Twitter" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Facebook" class="control-label"></label>
<input asp-for="Facebook" class="form-control" />
<span asp-validation-for="Facebook" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Sold" class="control-label"></label>
<input asp-for="Sold" class="form-control" />
<span asp-validation-for="Sold" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SoldToId" class="control-label"></label>
<select asp-for="SoldToId" class="form-control" asp-items="ViewBag.SoldToId"></select>
<span asp-validation-for="SoldToId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Address" class="control-label"></label>
<input asp-for="Address" class="form-control" />
<span asp-validation-for="Address" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="City" class="control-label"></label>
<input asp-for="City" class="form-control" />
<span asp-validation-for="City" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Province" class="control-label"></label>
<input asp-for="Province" class="form-control" />
<span asp-validation-for="Province" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="PostalCode" class="control-label"></label>
<input asp-for="PostalCode" class="form-control" />
<span asp-validation-for="PostalCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="CountryId" class="control-label"></label>
<select asp-for="CountryId" class="form-control" asp-items="ViewBag.CountryId"></select>
<span asp-validation-for="CountryId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Status" class="control-label"></label>
<select asp-for="Status" class="form-control"></select>
<span asp-validation-for="Status" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,138 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.Company>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-area="Admin" asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Founded)
</th>
<th>
@Html.DisplayNameFor(model => model.Website)
</th>
<th>
@Html.DisplayNameFor(model => model.Twitter)
</th>
<th>
@Html.DisplayNameFor(model => model.Facebook)
</th>
<th>
@Html.DisplayNameFor(model => model.Sold)
</th>
<th>
@Html.DisplayNameFor(model => model.Address)
</th>
<th>
@Html.DisplayNameFor(model => model.City)
</th>
<th>
@Html.DisplayNameFor(model => model.Province)
</th>
<th>
@Html.DisplayNameFor(model => model.PostalCode)
</th>
<th>
@Html.DisplayNameFor(model => model.Status)
</th>
<th>
@Html.DisplayNameFor(model => model.Country)
</th>
<th>
@Html.DisplayNameFor(model => model.SoldTo)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Founded)
</td>
<td>
@Html.DisplayFor(modelItem => item.Website)
</td>
<td>
@Html.DisplayFor(modelItem => item.Twitter)
</td>
<td>
@Html.DisplayFor(modelItem => item.Facebook)
</td>
<td>
@Html.DisplayFor(modelItem => item.Sold)
</td>
<td>
@Html.DisplayFor(modelItem => item.Address)
</td>
<td>
@Html.DisplayFor(modelItem => item.City)
</td>
<td>
@Html.DisplayFor(modelItem => item.Province)
</td>
<td>
@Html.DisplayFor(modelItem => item.PostalCode)
</td>
<td>
@Html.DisplayFor(modelItem => item.Status)
</td>
<td>
@Html.DisplayFor(modelItem => item.Country.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.SoldTo.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,69 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.CompanyDescription
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>CompanyDescription</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<input asp-for="CompanyId" class="form-control" />
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Text" class="control-label"></label>
<input asp-for="Text" class="form-control" />
<span asp-validation-for="Text" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,70 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.CompanyDescription
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>CompanyDescription</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.CompanyId)
</dt>
<dd>
@Html.DisplayFor(model => model.CompanyId)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Text)
</dt>
<dd>
@Html.DisplayFor(model => model.Text)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,67 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.CompanyDescription
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>CompanyDescription</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.CompanyId)
</dt>
<dd>
@Html.DisplayFor(model => model.CompanyId)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Text)
</dt>
<dd>
@Html.DisplayFor(model => model.Text)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,70 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.CompanyDescription
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>CompanyDescription</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<input asp-for="CompanyId" class="form-control" />
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Text" class="control-label"></label>
<input asp-for="Text" class="form-control" />
<span asp-validation-for="Text" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,78 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.CompanyDescription>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.CompanyId)
</th>
<th>
@Html.DisplayNameFor(model => model.Text)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.CompanyId)
</td>
<td>
@Html.DisplayFor(modelItem => item.Text)
</td>
<td>
@Html.DisplayFor(modelItem => item.Company.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,98 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Gpu
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>Gpu</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class ="form-control" asp-items="ViewBag.CompanyId"></select>
</div>
<div class="form-group">
<label asp-for="ModelCode" class="control-label"></label>
<input asp-for="ModelCode" class="form-control" />
<span asp-validation-for="ModelCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Package" class="control-label"></label>
<input asp-for="Package" class="form-control" />
<span asp-validation-for="Package" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Process" class="control-label"></label>
<input asp-for="Process" class="form-control" />
<span asp-validation-for="Process" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ProcessNm" class="control-label"></label>
<input asp-for="ProcessNm" class="form-control" />
<span asp-validation-for="ProcessNm" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DieSize" class="control-label"></label>
<input asp-for="DieSize" class="form-control" />
<span asp-validation-for="DieSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Transistors" class="control-label"></label>
<input asp-for="Transistors" class="form-control" />
<span asp-validation-for="Transistors" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,106 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Gpu
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Gpu</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModelCode)
</dt>
<dd>
@Html.DisplayFor(model => model.ModelCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Package)
</dt>
<dd>
@Html.DisplayFor(model => model.Package)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Process)
</dt>
<dd>
@Html.DisplayFor(model => model.Process)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ProcessNm)
</dt>
<dd>
@Html.DisplayFor(model => model.ProcessNm)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DieSize)
</dt>
<dd>
@Html.DisplayFor(model => model.DieSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Transistors)
</dt>
<dd>
@Html.DisplayFor(model => model.Transistors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,103 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Gpu
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>Gpu</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModelCode)
</dt>
<dd>
@Html.DisplayFor(model => model.ModelCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Package)
</dt>
<dd>
@Html.DisplayFor(model => model.Package)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Process)
</dt>
<dd>
@Html.DisplayFor(model => model.Process)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ProcessNm)
</dt>
<dd>
@Html.DisplayFor(model => model.ProcessNm)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DieSize)
</dt>
<dd>
@Html.DisplayFor(model => model.DieSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Transistors)
</dt>
<dd>
@Html.DisplayFor(model => model.Transistors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,105 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Gpu
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>Gpu</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class="form-control" asp-items="ViewBag.CompanyId"></select>
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ModelCode" class="control-label"></label>
<input asp-for="ModelCode" class="form-control" />
<span asp-validation-for="ModelCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Package" class="control-label"></label>
<input asp-for="Package" class="form-control" />
<span asp-validation-for="Package" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Process" class="control-label"></label>
<input asp-for="Process" class="form-control" />
<span asp-validation-for="Process" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ProcessNm" class="control-label"></label>
<input asp-for="ProcessNm" class="form-control" />
<span asp-validation-for="ProcessNm" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DieSize" class="control-label"></label>
<input asp-for="DieSize" class="form-control" />
<span asp-validation-for="DieSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Transistors" class="control-label"></label>
<input asp-for="Transistors" class="form-control" />
<span asp-validation-for="Transistors" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,114 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.Gpu>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.ModelCode)
</th>
<th>
@Html.DisplayNameFor(model => model.Introduced)
</th>
<th>
@Html.DisplayNameFor(model => model.Package)
</th>
<th>
@Html.DisplayNameFor(model => model.Process)
</th>
<th>
@Html.DisplayNameFor(model => model.ProcessNm)
</th>
<th>
@Html.DisplayNameFor(model => model.DieSize)
</th>
<th>
@Html.DisplayNameFor(model => model.Transistors)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelCode)
</td>
<td>
@Html.DisplayFor(modelItem => item.Introduced)
</td>
<td>
@Html.DisplayFor(modelItem => item.Package)
</td>
<td>
@Html.DisplayFor(modelItem => item.Process)
</td>
<td>
@Html.DisplayFor(modelItem => item.ProcessNm)
</td>
<td>
@Html.DisplayFor(modelItem => item.DieSize)
</td>
<td>
@Html.DisplayFor(modelItem => item.Transistors)
</td>
<td>
@Html.DisplayFor(modelItem => item.Company.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,64 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSetExtension
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>InstructionSetExtension</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Extension" class="control-label"></label>
<input asp-for="Extension" class="form-control" />
<span asp-validation-for="Extension" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,58 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSetExtension
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>InstructionSetExtension</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Extension)
</dt>
<dd>
@Html.DisplayFor(model => model.Extension)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,55 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSetExtension
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>InstructionSetExtension</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Extension)
</dt>
<dd>
@Html.DisplayFor(model => model.Extension)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,65 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSetExtension
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>InstructionSetExtension</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Extension" class="control-label"></label>
<input asp-for="Extension" class="form-control" />
<span asp-validation-for="Extension" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,66 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.InstructionSetExtension>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Extension)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Extension)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,64 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSet
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>InstructionSet</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,58 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// View start
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSet
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>InstructionSet</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,55 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSet
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>InstructionSet</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,65 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.InstructionSet
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>InstructionSet</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,66 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.InstructionSet>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,68 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MachineFamily
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>MachineFamily</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class ="form-control" asp-items="ViewBag.CompanyId"></select>
</div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,64 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MachineFamily
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>MachineFamily</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,61 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MachineFamily
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>MachineFamily</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,70 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MachineFamily
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>MachineFamily</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class="form-control" asp-items="ViewBag.CompanyId"></select>
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,72 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.MachineFamily>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Company.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,78 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Machine
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>Machine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="FamilyId" class="control-label"></label>
<select asp-for="FamilyId" class ="form-control" asp-items="ViewBag.FamilyId"></select>
</div>
<div class="form-group">
<label asp-for="Model" class="control-label"></label>
<input asp-for="Model" class="form-control" />
<span asp-validation-for="Model" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,88 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Machine
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Machine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Model)
</dt>
<dd>
@Html.DisplayFor(model => model.Model)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Family)
</dt>
<dd>
@Html.DisplayFor(model => model.Family.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,85 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Machine
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>Machine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Model)
</dt>
<dd>
@Html.DisplayFor(model => model.Model)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Family)
</dt>
<dd>
@Html.DisplayFor(model => model.Family.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,90 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Machine
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>Machine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class="form-control" asp-items="ViewBag.CompanyId"></select>
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<select asp-for="Type" class="form-control"></select>
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="FamilyId" class="control-label"></label>
<select asp-for="FamilyId" class="form-control" asp-items="ViewBag.FamilyId"></select>
<span asp-validation-for="FamilyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Model" class="control-label"></label>
<input asp-for="Model" class="form-control" />
<span asp-validation-for="Model" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,96 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.Machine>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.Type)
</th>
<th>
@Html.DisplayNameFor(model => model.Introduced)
</th>
<th>
@Html.DisplayNameFor(model => model.Model)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th>
@Html.DisplayNameFor(model => model.Family)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Introduced)
</td>
<td>
@Html.DisplayFor(modelItem => item.Model)
</td>
<td>
@Html.DisplayFor(modelItem => item.Company.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Family.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,73 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MemoryByMachine
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>MemoryByMachine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="MachineId" class="control-label"></label>
<select asp-for="MachineId" class ="form-control" asp-items="ViewBag.MachineId"></select>
</div>
<div class="form-group">
<label asp-for="Size" class="control-label"></label>
<input asp-for="Size" class="form-control" />
<span asp-validation-for="Size" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Speed" class="control-label"></label>
<input asp-for="Speed" class="form-control" />
<span asp-validation-for="Speed" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,82 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MemoryByMachine
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>MemoryByMachine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Usage)
</dt>
<dd>
@Html.DisplayFor(model => model.Usage)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Size)
</dt>
<dd>
@Html.DisplayFor(model => model.Size)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Speed)
</dt>
<dd>
@Html.DisplayFor(model => model.Speed)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Machine)
</dt>
<dd>
@Html.DisplayFor(model => model.Machine.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,79 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MemoryByMachine
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>MemoryByMachine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Usage)
</dt>
<dd>
@Html.DisplayFor(model => model.Usage)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Size)
</dt>
<dd>
@Html.DisplayFor(model => model.Size)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Speed)
</dt>
<dd>
@Html.DisplayFor(model => model.Speed)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Machine)
</dt>
<dd>
@Html.DisplayFor(model => model.Machine.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,85 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.MemoryByMachine
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>MemoryByMachine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="MachineId" class="control-label"></label>
<select asp-for="MachineId" class="form-control" asp-items="ViewBag.MachineId"></select>
<span asp-validation-for="MachineId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<select asp-for="Type" class="form-control"></select>
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Usage" class="control-label"></label>
<select asp-for="Usage" class="form-control"></select>
<span asp-validation-for="Usage" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Size" class="control-label"></label>
<input asp-for="Size" class="form-control" />
<span asp-validation-for="Size" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Speed" class="control-label"></label>
<input asp-for="Speed" class="form-control" />
<span asp-validation-for="Speed" class="text-danger"></span>
</div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,90 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.MemoryByMachine>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Type)
</th>
<th>
@Html.DisplayNameFor(model => model.Usage)
</th>
<th>
@Html.DisplayNameFor(model => model.Size)
</th>
<th>
@Html.DisplayNameFor(model => model.Speed)
</th>
<th>
@Html.DisplayNameFor(model => model.Machine)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Usage)
</td>
<td>
@Html.DisplayFor(modelItem => item.Size)
</td>
<td>
@Html.DisplayFor(modelItem => item.Speed)
</td>
<td>
@Html.DisplayFor(modelItem => item.Machine.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,59 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.News
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>News</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,70 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.News
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>News</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Date)
</dt>
<dd>
@Html.DisplayFor(model => model.Date)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.AddedId)
</dt>
<dd>
@Html.DisplayFor(model => model.AddedId)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,67 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.News
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>News</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Date)
</dt>
<dd>
@Html.DisplayFor(model => model.Date)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.AddedId)
</dt>
<dd>
@Html.DisplayFor(model => model.AddedId)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,75 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.News
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>News</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Date" class="control-label"></label>
<input asp-for="Date" class="form-control" />
<span asp-validation-for="Date" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<select asp-for="Type" class="form-control"></select>
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="AddedId" class="control-label"></label>
<input asp-for="AddedId" class="form-control" />
<span asp-validation-for="AddedId" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,78 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.News>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Date)
</th>
<th>
@Html.DisplayNameFor(model => model.Type)
</th>
<th>
@Html.DisplayNameFor(model => model.AddedId)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Date)
</td>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.AddedId)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,177 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Processor
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>Processor</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class ="form-control" asp-items="ViewBag.CompanyId"></select>
</div>
<div class="form-group">
<label asp-for="ModelCode" class="control-label"></label>
<input asp-for="ModelCode" class="form-control" />
<span asp-validation-for="ModelCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="InstructionSetId" class="control-label"></label>
<select asp-for="InstructionSetId" class ="form-control" asp-items="ViewBag.InstructionSetId"></select>
</div>
<div class="form-group">
<label asp-for="Speed" class="control-label"></label>
<input asp-for="Speed" class="form-control" />
<span asp-validation-for="Speed" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Package" class="control-label"></label>
<input asp-for="Package" class="form-control" />
<span asp-validation-for="Package" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Gprs" class="control-label"></label>
<input asp-for="Gprs" class="form-control" />
<span asp-validation-for="Gprs" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="GprSize" class="control-label"></label>
<input asp-for="GprSize" class="form-control" />
<span asp-validation-for="GprSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Fprs" class="control-label"></label>
<input asp-for="Fprs" class="form-control" />
<span asp-validation-for="Fprs" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="FprSize" class="control-label"></label>
<input asp-for="FprSize" class="form-control" />
<span asp-validation-for="FprSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Cores" class="control-label"></label>
<input asp-for="Cores" class="form-control" />
<span asp-validation-for="Cores" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ThreadsPerCore" class="control-label"></label>
<input asp-for="ThreadsPerCore" class="form-control" />
<span asp-validation-for="ThreadsPerCore" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Process" class="control-label"></label>
<input asp-for="Process" class="form-control" />
<span asp-validation-for="Process" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ProcessNm" class="control-label"></label>
<input asp-for="ProcessNm" class="form-control" />
<span asp-validation-for="ProcessNm" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DieSize" class="control-label"></label>
<input asp-for="DieSize" class="form-control" />
<span asp-validation-for="DieSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Transistors" class="control-label"></label>
<input asp-for="Transistors" class="form-control" />
<span asp-validation-for="Transistors" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DataBus" class="control-label"></label>
<input asp-for="DataBus" class="form-control" />
<span asp-validation-for="DataBus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="AddrBus" class="control-label"></label>
<input asp-for="AddrBus" class="form-control" />
<span asp-validation-for="AddrBus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SimdRegisters" class="control-label"></label>
<input asp-for="SimdRegisters" class="form-control" />
<span asp-validation-for="SimdRegisters" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SimdSize" class="control-label"></label>
<input asp-for="SimdSize" class="form-control" />
<span asp-validation-for="SimdSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L1Instruction" class="control-label"></label>
<input asp-for="L1Instruction" class="form-control" />
<span asp-validation-for="L1Instruction" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L1Data" class="control-label"></label>
<input asp-for="L1Data" class="form-control" />
<span asp-validation-for="L1Data" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L2" class="control-label"></label>
<input asp-for="L2" class="form-control" />
<span asp-validation-for="L2" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L3" class="control-label"></label>
<input asp-for="L3" class="form-control" />
<span asp-validation-for="L3" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,202 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Processor
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Processor</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModelCode)
</dt>
<dd>
@Html.DisplayFor(model => model.ModelCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Speed)
</dt>
<dd>
@Html.DisplayFor(model => model.Speed)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Package)
</dt>
<dd>
@Html.DisplayFor(model => model.Package)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gprs)
</dt>
<dd>
@Html.DisplayFor(model => model.Gprs)
</dd>
<dt>
@Html.DisplayNameFor(model => model.GprSize)
</dt>
<dd>
@Html.DisplayFor(model => model.GprSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Fprs)
</dt>
<dd>
@Html.DisplayFor(model => model.Fprs)
</dd>
<dt>
@Html.DisplayNameFor(model => model.FprSize)
</dt>
<dd>
@Html.DisplayFor(model => model.FprSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Cores)
</dt>
<dd>
@Html.DisplayFor(model => model.Cores)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ThreadsPerCore)
</dt>
<dd>
@Html.DisplayFor(model => model.ThreadsPerCore)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Process)
</dt>
<dd>
@Html.DisplayFor(model => model.Process)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ProcessNm)
</dt>
<dd>
@Html.DisplayFor(model => model.ProcessNm)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DieSize)
</dt>
<dd>
@Html.DisplayFor(model => model.DieSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Transistors)
</dt>
<dd>
@Html.DisplayFor(model => model.Transistors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DataBus)
</dt>
<dd>
@Html.DisplayFor(model => model.DataBus)
</dd>
<dt>
@Html.DisplayNameFor(model => model.AddrBus)
</dt>
<dd>
@Html.DisplayFor(model => model.AddrBus)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SimdRegisters)
</dt>
<dd>
@Html.DisplayFor(model => model.SimdRegisters)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SimdSize)
</dt>
<dd>
@Html.DisplayFor(model => model.SimdSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L1Instruction)
</dt>
<dd>
@Html.DisplayFor(model => model.L1Instruction)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L1Data)
</dt>
<dd>
@Html.DisplayFor(model => model.L1Data)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L2)
</dt>
<dd>
@Html.DisplayFor(model => model.L2)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L3)
</dt>
<dd>
@Html.DisplayFor(model => model.L3)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.InstructionSet)
</dt>
<dd>
@Html.DisplayFor(model => model.InstructionSet.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,199 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Processor
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>Processor</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModelCode)
</dt>
<dd>
@Html.DisplayFor(model => model.ModelCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Speed)
</dt>
<dd>
@Html.DisplayFor(model => model.Speed)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Package)
</dt>
<dd>
@Html.DisplayFor(model => model.Package)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Gprs)
</dt>
<dd>
@Html.DisplayFor(model => model.Gprs)
</dd>
<dt>
@Html.DisplayNameFor(model => model.GprSize)
</dt>
<dd>
@Html.DisplayFor(model => model.GprSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Fprs)
</dt>
<dd>
@Html.DisplayFor(model => model.Fprs)
</dd>
<dt>
@Html.DisplayNameFor(model => model.FprSize)
</dt>
<dd>
@Html.DisplayFor(model => model.FprSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Cores)
</dt>
<dd>
@Html.DisplayFor(model => model.Cores)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ThreadsPerCore)
</dt>
<dd>
@Html.DisplayFor(model => model.ThreadsPerCore)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Process)
</dt>
<dd>
@Html.DisplayFor(model => model.Process)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ProcessNm)
</dt>
<dd>
@Html.DisplayFor(model => model.ProcessNm)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DieSize)
</dt>
<dd>
@Html.DisplayFor(model => model.DieSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Transistors)
</dt>
<dd>
@Html.DisplayFor(model => model.Transistors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.DataBus)
</dt>
<dd>
@Html.DisplayFor(model => model.DataBus)
</dd>
<dt>
@Html.DisplayNameFor(model => model.AddrBus)
</dt>
<dd>
@Html.DisplayFor(model => model.AddrBus)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SimdRegisters)
</dt>
<dd>
@Html.DisplayFor(model => model.SimdRegisters)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SimdSize)
</dt>
<dd>
@Html.DisplayFor(model => model.SimdSize)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L1Instruction)
</dt>
<dd>
@Html.DisplayFor(model => model.L1Instruction)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L1Data)
</dt>
<dd>
@Html.DisplayFor(model => model.L1Data)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L2)
</dt>
<dd>
@Html.DisplayFor(model => model.L2)
</dd>
<dt>
@Html.DisplayNameFor(model => model.L3)
</dt>
<dd>
@Html.DisplayFor(model => model.L3)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.InstructionSet)
</dt>
<dd>
@Html.DisplayFor(model => model.InstructionSet.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,185 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Processor
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>Processor</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class="form-control" asp-items="ViewBag.CompanyId"></select>
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ModelCode" class="control-label"></label>
<input asp-for="ModelCode" class="form-control" />
<span asp-validation-for="ModelCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="InstructionSetId" class="control-label"></label>
<select asp-for="InstructionSetId" class="form-control" asp-items="ViewBag.InstructionSetId"></select>
<span asp-validation-for="InstructionSetId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Speed" class="control-label"></label>
<input asp-for="Speed" class="form-control" />
<span asp-validation-for="Speed" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Package" class="control-label"></label>
<input asp-for="Package" class="form-control" />
<span asp-validation-for="Package" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Gprs" class="control-label"></label>
<input asp-for="Gprs" class="form-control" />
<span asp-validation-for="Gprs" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="GprSize" class="control-label"></label>
<input asp-for="GprSize" class="form-control" />
<span asp-validation-for="GprSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Fprs" class="control-label"></label>
<input asp-for="Fprs" class="form-control" />
<span asp-validation-for="Fprs" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="FprSize" class="control-label"></label>
<input asp-for="FprSize" class="form-control" />
<span asp-validation-for="FprSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Cores" class="control-label"></label>
<input asp-for="Cores" class="form-control" />
<span asp-validation-for="Cores" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ThreadsPerCore" class="control-label"></label>
<input asp-for="ThreadsPerCore" class="form-control" />
<span asp-validation-for="ThreadsPerCore" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Process" class="control-label"></label>
<input asp-for="Process" class="form-control" />
<span asp-validation-for="Process" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ProcessNm" class="control-label"></label>
<input asp-for="ProcessNm" class="form-control" />
<span asp-validation-for="ProcessNm" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DieSize" class="control-label"></label>
<input asp-for="DieSize" class="form-control" />
<span asp-validation-for="DieSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Transistors" class="control-label"></label>
<input asp-for="Transistors" class="form-control" />
<span asp-validation-for="Transistors" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="DataBus" class="control-label"></label>
<input asp-for="DataBus" class="form-control" />
<span asp-validation-for="DataBus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="AddrBus" class="control-label"></label>
<input asp-for="AddrBus" class="form-control" />
<span asp-validation-for="AddrBus" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SimdRegisters" class="control-label"></label>
<input asp-for="SimdRegisters" class="form-control" />
<span asp-validation-for="SimdRegisters" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SimdSize" class="control-label"></label>
<input asp-for="SimdSize" class="form-control" />
<span asp-validation-for="SimdSize" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L1Instruction" class="control-label"></label>
<input asp-for="L1Instruction" class="form-control" />
<span asp-validation-for="L1Instruction" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L1Data" class="control-label"></label>
<input asp-for="L1Data" class="form-control" />
<span asp-validation-for="L1Data" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L2" class="control-label"></label>
<input asp-for="L2" class="form-control" />
<span asp-validation-for="L2" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="L3" class="control-label"></label>
<input asp-for="L3" class="form-control" />
<span asp-validation-for="L3" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,210 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.Processor>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.ModelCode)
</th>
<th>
@Html.DisplayNameFor(model => model.Introduced)
</th>
<th>
@Html.DisplayNameFor(model => model.Speed)
</th>
<th>
@Html.DisplayNameFor(model => model.Package)
</th>
<th>
@Html.DisplayNameFor(model => model.Gprs)
</th>
<th>
@Html.DisplayNameFor(model => model.GprSize)
</th>
<th>
@Html.DisplayNameFor(model => model.Fprs)
</th>
<th>
@Html.DisplayNameFor(model => model.FprSize)
</th>
<th>
@Html.DisplayNameFor(model => model.Cores)
</th>
<th>
@Html.DisplayNameFor(model => model.ThreadsPerCore)
</th>
<th>
@Html.DisplayNameFor(model => model.Process)
</th>
<th>
@Html.DisplayNameFor(model => model.ProcessNm)
</th>
<th>
@Html.DisplayNameFor(model => model.DieSize)
</th>
<th>
@Html.DisplayNameFor(model => model.Transistors)
</th>
<th>
@Html.DisplayNameFor(model => model.DataBus)
</th>
<th>
@Html.DisplayNameFor(model => model.AddrBus)
</th>
<th>
@Html.DisplayNameFor(model => model.SimdRegisters)
</th>
<th>
@Html.DisplayNameFor(model => model.SimdSize)
</th>
<th>
@Html.DisplayNameFor(model => model.L1Instruction)
</th>
<th>
@Html.DisplayNameFor(model => model.L1Data)
</th>
<th>
@Html.DisplayNameFor(model => model.L2)
</th>
<th>
@Html.DisplayNameFor(model => model.L3)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th>
@Html.DisplayNameFor(model => model.InstructionSet)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelCode)
</td>
<td>
@Html.DisplayFor(modelItem => item.Introduced)
</td>
<td>
@Html.DisplayFor(modelItem => item.Speed)
</td>
<td>
@Html.DisplayFor(modelItem => item.Package)
</td>
<td>
@Html.DisplayFor(modelItem => item.Gprs)
</td>
<td>
@Html.DisplayFor(modelItem => item.GprSize)
</td>
<td>
@Html.DisplayFor(modelItem => item.Fprs)
</td>
<td>
@Html.DisplayFor(modelItem => item.FprSize)
</td>
<td>
@Html.DisplayFor(modelItem => item.Cores)
</td>
<td>
@Html.DisplayFor(modelItem => item.ThreadsPerCore)
</td>
<td>
@Html.DisplayFor(modelItem => item.Process)
</td>
<td>
@Html.DisplayFor(modelItem => item.ProcessNm)
</td>
<td>
@Html.DisplayFor(modelItem => item.DieSize)
</td>
<td>
@Html.DisplayFor(modelItem => item.Transistors)
</td>
<td>
@Html.DisplayFor(modelItem => item.DataBus)
</td>
<td>
@Html.DisplayFor(modelItem => item.AddrBus)
</td>
<td>
@Html.DisplayFor(modelItem => item.SimdRegisters)
</td>
<td>
@Html.DisplayFor(modelItem => item.SimdSize)
</td>
<td>
@Html.DisplayFor(modelItem => item.L1Instruction)
</td>
<td>
@Html.DisplayFor(modelItem => item.L1Data)
</td>
<td>
@Html.DisplayFor(modelItem => item.L2)
</td>
<td>
@Html.DisplayFor(modelItem => item.L3)
</td>
<td>
@Html.DisplayFor(modelItem => item.Company.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.InstructionSet.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,72 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.ProcessorsByMachine
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>ProcessorsByMachine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="ProcessorId" class="control-label"></label>
<select asp-for="ProcessorId" class ="form-control" asp-items="ViewBag.ProcessorId"></select>
</div>
<div class="form-group">
<label asp-for="MachineId" class="control-label"></label>
<select asp-for="MachineId" class ="form-control" asp-items="ViewBag.MachineId"></select>
</div>
<div class="form-group">
<label asp-for="Speed" class="control-label"></label>
<input asp-for="Speed" class="form-control" />
<span asp-validation-for="Speed" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,70 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.ProcessorsByMachine
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>ProcessorsByMachine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Speed)
</dt>
<dd>
@Html.DisplayFor(model => model.Speed)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Machine)
</dt>
<dd>
@Html.DisplayFor(model => model.Machine.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Processor)
</dt>
<dd>
@Html.DisplayFor(model => model.Processor.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,67 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.ProcessorsByMachine
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>ProcessorsByMachine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Speed)
</dt>
<dd>
@Html.DisplayFor(model => model.Speed)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Machine)
</dt>
<dd>
@Html.DisplayFor(model => model.Machine.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Processor)
</dt>
<dd>
@Html.DisplayFor(model => model.Processor.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,75 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.ProcessorsByMachine
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>ProcessorsByMachine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="ProcessorId" class="control-label"></label>
<select asp-for="ProcessorId" class="form-control" asp-items="ViewBag.ProcessorId"></select>
<span asp-validation-for="ProcessorId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="MachineId" class="control-label"></label>
<select asp-for="MachineId" class="form-control" asp-items="ViewBag.MachineId"></select>
<span asp-validation-for="MachineId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Speed" class="control-label"></label>
<input asp-for="Speed" class="form-control" />
<span asp-validation-for="Speed" class="text-danger"></span>
</div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,78 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.ProcessorsByMachine>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Speed)
</th>
<th>
@Html.DisplayNameFor(model => model.Machine)
</th>
<th>
@Html.DisplayNameFor(model => model.Processor)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Speed)
</td>
<td>
@Html.DisplayFor(modelItem => item.Machine.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.Processor.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,69 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Resolution
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>Resolution</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="Colors" class="control-label"></label>
<input asp-for="Colors" class="form-control" />
<span asp-validation-for="Colors" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Palette" class="control-label"></label>
<input asp-for="Palette" class="form-control" />
<span asp-validation-for="Palette" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,82 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Resolution
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>Resolution</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Width)
</dt>
<dd>
@Html.DisplayFor(model => model.Width)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Height)
</dt>
<dd>
@Html.DisplayFor(model => model.Height)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Colors)
</dt>
<dd>
@Html.DisplayFor(model => model.Colors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Palette)
</dt>
<dd>
@Html.DisplayFor(model => model.Palette)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Chars)
</dt>
<dd>
@Html.DisplayFor(model => model.Chars)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,79 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Resolution
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>Resolution</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Width)
</dt>
<dd>
@Html.DisplayFor(model => model.Width)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Height)
</dt>
<dd>
@Html.DisplayFor(model => model.Height)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Colors)
</dt>
<dd>
@Html.DisplayFor(model => model.Colors)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Palette)
</dt>
<dd>
@Html.DisplayFor(model => model.Palette)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Chars)
</dt>
<dd>
@Html.DisplayFor(model => model.Chars)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,85 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.Resolution
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>Resolution</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Width" class="control-label"></label>
<input asp-for="Width" class="form-control" />
<span asp-validation-for="Width" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Height" class="control-label"></label>
<input asp-for="Height" class="form-control" />
<span asp-validation-for="Height" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Colors" class="control-label"></label>
<input asp-for="Colors" class="form-control" />
<span asp-validation-for="Colors" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Palette" class="control-label"></label>
<input asp-for="Palette" class="form-control" />
<span asp-validation-for="Palette" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Chars" class="control-label"></label>
<input asp-for="Chars" class="form-control" />
<span asp-validation-for="Chars" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,90 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.Resolution>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Width)
</th>
<th>
@Html.DisplayNameFor(model => model.Height)
</th>
<th>
@Html.DisplayNameFor(model => model.Colors)
</th>
<th>
@Html.DisplayNameFor(model => model.Palette)
</th>
<th>
@Html.DisplayNameFor(model => model.Chars)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Width)
</td>
<td>
@Html.DisplayFor(modelItem => item.Height)
</td>
<td>
@Html.DisplayFor(modelItem => item.Colors)
</td>
<td>
@Html.DisplayFor(modelItem => item.Palette)
</td>
<td>
@Html.DisplayFor(modelItem => item.Chars)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,53 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Error.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Error page
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model ErrorViewModel
@{
ViewData["Title"] = "Error";
}
<h1 class=text-danger>Error.</h1>
<h2 class=text-danger>An error occurred while processing your request.</h2>
@if(Model.ShowRequestId)
{
<p>
<strong>Request ID:</strong> <code>@Model.RequestId</code>
</p>
}
<h3>Development Mode</h3>
<p>
Swapping to <strong>Development</strong> environment will display more detailed information about the error that occurred.
</p>
<p>
<strong>Development environment should not be enabled in deployed applications</strong>, as it can result in sensitive information from exceptions being displayed to end users. For local debugging, development environment can be enabled by setting the <strong>ASPNETCORE_ENVIRONMENT</strong> environment variable to <strong>Development</strong>, and restarting the application.
</p>

View File

@@ -0,0 +1,170 @@
@using Microsoft.Extensions.PlatformAbstractions
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : _Layout.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Page layout
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
<!DOCTYPE html>
<html>
<head>
<meta charset=utf-8 />
<meta content="width=device-width, initial-scale=1.0"
name=viewport />
<title>Canary Islands Computer Museum - @ViewData["Title"]</title>
<environment include=Development>
<link href=~/lib/bootstrap/dist/css/bootstrap.css
rel=stylesheet />
<link href=~/css/site.css
rel=stylesheet />
</environment>
<environment exclude=Development>
<link asp-fallback-href=~/lib/bootstrap/dist/css/bootstrap.min.css
asp-fallback-test-class=sr-only
asp-fallback-test-property=position
asp-fallback-test-value=absolute
href=https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/css/bootstrap.min.css
rel=stylesheet />
<link asp-append-version=true
href=~/css/site.min.css
rel=stylesheet />
</environment>
</head>
<body>
<nav class="bg-dark navbar navbar-dark navbar-expand-lg">
<a class=navbar-brand
href=#>
CICM
</a>
<button aria-controls=navbarSupportedContent
aria-expanded=false
aria-label="Toggle navigation"
class=navbar-toggler
data-target=#navbarSupportedContent
data-toggle=collapse
type=button>
<span class=navbar-toggler-icon>
</span>
</button>
<div class="collapse navbar-collapse"
id=navbarSupportedContent>
<ul class="mr-auto navbar-nav">
<li class=nav-item>
<a asp-action=Index
asp-area=""
asp-controller=Home
class=nav-link>
Home
</a>
</li>
<li class="dropdown nav-item">
<a aria-expanded=false
aria-haspopup=true
class="dropdown-toggle nav-link"
data-toggle=dropdown
href=#
id=navbarDropdown
role=button>
Database
</a>
<div aria-labelledby=navbarDropdown
class=dropdown-menu>
<a asp-action=Index
asp-controller=Company
class=dropdown-item>
Companies
</a>
<div class=dropdown-divider>
</div>
<a asp-action=Index
asp-controller=Computer
class=dropdown-item>
Computers
</a>
<div class=dropdown-divider>
</div>
<a asp-action=Index
asp-controller=Console
class=dropdown-item>
Consoles
</a>
</div>
</li>
<li class=nav-item>
<a asp-action=About
asp-area=""
asp-controller=Home
class=nav-link>
About
</a>
</li>
<li class=nav-item>
<a asp-action=Contact
asp-area=""
asp-controller=Home
class=nav-link>
Contact
</a>
</li>
</ul>
</div>
</nav>
<div class="body-content container">
@RenderBody()
<hr />
<footer>
<p>&copy; 2018 Natalia Portillo, @(PlatformServices.Default.Application.ApplicationVersion)</p>
</footer>
</div>
<environment include=Development>
<script src=~/lib/jquery/dist/jquery.js></script>
<script src=~/lib/bootstrap/dist/js/bootstrap.js></script>
<script asp-append-version=true
src=~/js/site.js></script>
</environment>
<environment exclude=Development>
<script asp-fallback-src=~/lib/jquery/dist/jquery.min.js
asp-fallback-test=window.jQuery
crossorigin=anonymous
src=https://ajax.aspnetcdn.com/ajax/jquery/jquery-3.3.1.min.js>
</script>
<script asp-fallback-src=~/lib/bootstrap/dist/js/bootstrap.min.js
asp-fallback-test="window.jQuery && window.jQuery.fn && window.jQuery.fn.modal"
crossorigin=anonymous
src=https://stackpath.bootstrapcdn.com/bootstrap/4.1.0/bootstrap.min.js>
</script>
<script asp-append-version=true
src=~/js/site.min.js></script>
</environment>
@RenderSection("Scripts", false)
</body>
</html>

View File

@@ -0,0 +1,49 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : _ValidationScriptsPartial.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Validation scripts
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
<environment include=Development>
<script src=~/lib/jquery-validation/dist/jquery.validate.js></script>
<script src=~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js></script>
</environment>
<environment exclude=Development>
<script asp-fallback-src=~/lib/jquery-validation/dist/jquery.validate.min.js
asp-fallback-test="window.jQuery && window.jQuery.validator"
crossorigin=anonymous
integrity=sha384-Fnqn3nxp3506LP/7Y3j/25BlWeA3PXTyT1l78LjECcPaKCV12TsZP7yyMxOe/G/k
src=https://ajax.aspnetcdn.com/ajax/jquery.validate/1.14.0/jquery.validate.min.js>
</script>
<script asp-fallback-src=~/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js
asp-fallback-test="window.jQuery && window.jQuery.validator && window.jQuery.validator.unobtrusive"
crossorigin=anonymous
integrity=sha384-JrXK+k53HACyavUKOsL+NkmSesD2P+73eDMrbTtTk0h4RmOF8hF8apPlkp26JlyH
src=https://ajax.aspnetcdn.com/ajax/jquery.validation.unobtrusive/3.2.6/jquery.validate.unobtrusive.min.js>
</script>
</environment>

View File

@@ -0,0 +1,103 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.SoundSynth
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>SoundSynth</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class ="form-control" asp-items="ViewBag.CompanyId"></select>
</div>
<div class="form-group">
<label asp-for="ModelCode" class="control-label"></label>
<input asp-for="ModelCode" class="form-control" />
<span asp-validation-for="ModelCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Voices" class="control-label"></label>
<input asp-for="Voices" class="form-control" />
<span asp-validation-for="Voices" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Frequency" class="control-label"></label>
<input asp-for="Frequency" class="form-control" />
<span asp-validation-for="Frequency" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Depth" class="control-label"></label>
<input asp-for="Depth" class="form-control" />
<span asp-validation-for="Depth" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SquareWave" class="control-label"></label>
<input asp-for="SquareWave" class="form-control" />
<span asp-validation-for="SquareWave" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="WhiteNoise" class="control-label"></label>
<input asp-for="WhiteNoise" class="form-control" />
<span asp-validation-for="WhiteNoise" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<input asp-for="Type" class="form-control" />
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,112 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.SoundSynth
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>SoundSynth</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModelCode)
</dt>
<dd>
@Html.DisplayFor(model => model.ModelCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Voices)
</dt>
<dd>
@Html.DisplayFor(model => model.Voices)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Frequency)
</dt>
<dd>
@Html.DisplayFor(model => model.Frequency)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Depth)
</dt>
<dd>
@Html.DisplayFor(model => model.Depth)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SquareWave)
</dt>
<dd>
@Html.DisplayFor(model => model.SquareWave)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WhiteNoise)
</dt>
<dd>
@Html.DisplayFor(model => model.WhiteNoise)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,109 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.SoundSynth
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>SoundSynth</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Name)
</dt>
<dd>
@Html.DisplayFor(model => model.Name)
</dd>
<dt>
@Html.DisplayNameFor(model => model.ModelCode)
</dt>
<dd>
@Html.DisplayFor(model => model.ModelCode)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Introduced)
</dt>
<dd>
@Html.DisplayFor(model => model.Introduced)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Voices)
</dt>
<dd>
@Html.DisplayFor(model => model.Voices)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Frequency)
</dt>
<dd>
@Html.DisplayFor(model => model.Frequency)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Depth)
</dt>
<dd>
@Html.DisplayFor(model => model.Depth)
</dd>
<dt>
@Html.DisplayNameFor(model => model.SquareWave)
</dt>
<dd>
@Html.DisplayFor(model => model.SquareWave)
</dd>
<dt>
@Html.DisplayNameFor(model => model.WhiteNoise)
</dt>
<dd>
@Html.DisplayFor(model => model.WhiteNoise)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Company)
</dt>
<dd>
@Html.DisplayFor(model => model.Company.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,110 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.SoundSynth
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>SoundSynth</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<label asp-for="Name" class="control-label"></label>
<input asp-for="Name" class="form-control" />
<span asp-validation-for="Name" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="CompanyId" class="control-label"></label>
<select asp-for="CompanyId" class="form-control" asp-items="ViewBag.CompanyId"></select>
<span asp-validation-for="CompanyId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="ModelCode" class="control-label"></label>
<input asp-for="ModelCode" class="form-control" />
<span asp-validation-for="ModelCode" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Introduced" class="control-label"></label>
<input asp-for="Introduced" class="form-control" />
<span asp-validation-for="Introduced" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Voices" class="control-label"></label>
<input asp-for="Voices" class="form-control" />
<span asp-validation-for="Voices" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Frequency" class="control-label"></label>
<input asp-for="Frequency" class="form-control" />
<span asp-validation-for="Frequency" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Depth" class="control-label"></label>
<input asp-for="Depth" class="form-control" />
<span asp-validation-for="Depth" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="SquareWave" class="control-label"></label>
<input asp-for="SquareWave" class="form-control" />
<span asp-validation-for="SquareWave" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="WhiteNoise" class="control-label"></label>
<input asp-for="WhiteNoise" class="form-control" />
<span asp-validation-for="WhiteNoise" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<input asp-for="Type" class="form-control" />
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,120 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.SoundSynth>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Name)
</th>
<th>
@Html.DisplayNameFor(model => model.ModelCode)
</th>
<th>
@Html.DisplayNameFor(model => model.Introduced)
</th>
<th>
@Html.DisplayNameFor(model => model.Voices)
</th>
<th>
@Html.DisplayNameFor(model => model.Frequency)
</th>
<th>
@Html.DisplayNameFor(model => model.Depth)
</th>
<th>
@Html.DisplayNameFor(model => model.SquareWave)
</th>
<th>
@Html.DisplayNameFor(model => model.WhiteNoise)
</th>
<th>
@Html.DisplayNameFor(model => model.Type)
</th>
<th>
@Html.DisplayNameFor(model => model.Company)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Name)
</td>
<td>
@Html.DisplayFor(modelItem => item.ModelCode)
</td>
<td>
@Html.DisplayFor(modelItem => item.Introduced)
</td>
<td>
@Html.DisplayFor(modelItem => item.Voices)
</td>
<td>
@Html.DisplayFor(modelItem => item.Frequency)
</td>
<td>
@Html.DisplayFor(modelItem => item.Depth)
</td>
<td>
@Html.DisplayFor(modelItem => item.SquareWave)
</td>
<td>
@Html.DisplayFor(modelItem => item.WhiteNoise)
</td>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Company.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,68 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Create.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view create
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.StorageByMachine
@{
ViewData["Title"] = "Create";
}
<h2>Create</h2>
<h4>StorageByMachine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Create">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="MachineId" class="control-label"></label>
<select asp-for="MachineId" class ="form-control" asp-items="ViewBag.MachineId"></select>
</div>
<div class="form-group">
<label asp-for="Capacity" class="control-label"></label>
<input asp-for="Capacity" class="form-control" />
<span asp-validation-for="Capacity" class="text-danger"></span>
</div>
<div class="form-group">
<input type="submit" value="Create" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,76 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Delete.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view delete
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.StorageByMachine
@{
ViewData["Title"] = "Delete";
}
<h2>Delete</h2>
<h3>Are you sure you want to delete this?</h3>
<div>
<h4>StorageByMachine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Interface)
</dt>
<dd>
@Html.DisplayFor(model => model.Interface)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Capacity)
</dt>
<dd>
@Html.DisplayFor(model => model.Capacity)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Machine)
</dt>
<dd>
@Html.DisplayFor(model => model.Machine.Name)
</dd>
</dl>
<form asp-action="Delete">
<input type="hidden" asp-for="Id" />
<input type="submit" value="Delete" class="btn btn-default" /> |
<a asp-action="Index">Back to List</a>
</form>
</div>

View File

@@ -0,0 +1,73 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Details.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view details
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.StorageByMachine
@{
ViewData["Title"] = "Details";
}
<h2>Details</h2>
<div>
<h4>StorageByMachine</h4>
<hr />
<dl class="dl-horizontal">
<dt>
@Html.DisplayNameFor(model => model.Type)
</dt>
<dd>
@Html.DisplayFor(model => model.Type)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Interface)
</dt>
<dd>
@Html.DisplayFor(model => model.Interface)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Capacity)
</dt>
<dd>
@Html.DisplayFor(model => model.Capacity)
</dd>
<dt>
@Html.DisplayNameFor(model => model.Machine)
</dt>
<dd>
@Html.DisplayFor(model => model.Machine.Name)
</dd>
</dl>
</div>
<div>
<a asp-action="Edit" asp-route-id="@Model.Id">Edit</a> |
<a asp-action="Index">Back to List</a>
</div>

View File

@@ -0,0 +1,80 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Edit.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view edit
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model Cicm.Database.Models.StorageByMachine
@{
ViewData["Title"] = "Edit";
}
<h2>Edit</h2>
<h4>StorageByMachine</h4>
<hr />
<div class="row">
<div class="col-md-4">
<form asp-action="Edit">
<div asp-validation-summary="ModelOnly" class="text-danger"></div>
<div class="form-group">
<label asp-for="MachineId" class="control-label"></label>
<select asp-for="MachineId" class="form-control" asp-items="ViewBag.MachineId"></select>
<span asp-validation-for="MachineId" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Type" class="control-label"></label>
<select asp-for="Type" class="form-control"></select>
<span asp-validation-for="Type" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Interface" class="control-label"></label>
<select asp-for="Interface" class="form-control"></select>
<span asp-validation-for="Interface" class="text-danger"></span>
</div>
<div class="form-group">
<label asp-for="Capacity" class="control-label"></label>
<input asp-for="Capacity" class="form-control" />
<span asp-validation-for="Capacity" class="text-danger"></span>
</div>
<input type="hidden" asp-for="Id" />
<div class="form-group">
<input type="submit" value="Save" class="btn btn-default" />
</div>
</form>
</div>
</div>
<div>
<a asp-action="Index">Back to List</a>
</div>
@section Scripts {
@{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}

View File

@@ -0,0 +1,84 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : Index.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// Admin view index
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@model IEnumerable<Cicm.Database.Models.StorageByMachine>
@{
ViewData["Title"] = "Index";
}
<h2>Index</h2>
<p>
<a asp-action="Create">Create New</a>
</p>
<table class="table">
<thead>
<tr>
<th>
@Html.DisplayNameFor(model => model.Type)
</th>
<th>
@Html.DisplayNameFor(model => model.Interface)
</th>
<th>
@Html.DisplayNameFor(model => model.Capacity)
</th>
<th>
@Html.DisplayNameFor(model => model.Machine)
</th>
<th></th>
</tr>
</thead>
<tbody>
@foreach (var item in Model) {
<tr>
<td>
@Html.DisplayFor(modelItem => item.Type)
</td>
<td>
@Html.DisplayFor(modelItem => item.Interface)
</td>
<td>
@Html.DisplayFor(modelItem => item.Capacity)
</td>
<td>
@Html.DisplayFor(modelItem => item.Machine.Name)
</td>
<td>
<a asp-action="Edit" asp-route-id="@item.Id">Edit</a> |
<a asp-action="Details" asp-route-id="@item.Id">Details</a> |
<a asp-action="Delete" asp-route-id="@item.Id">Delete</a>
</td>
</tr>
}
</tbody>
</table>

View File

@@ -0,0 +1,35 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : _ViewImports.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// View imports
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@using cicm_web
@using cicm_web.Models
@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers

View File

@@ -0,0 +1,34 @@
@{
/******************************************************************************
// Canary Islands Computer Museum Website
// ----------------------------------------------------------------------------
//
// Filename : _ViewStart.cshtml
// Author(s) : Natalia Portillo <claunia@claunia.com>
//
// --[ Description ] ----------------------------------------------------------
//
// View start
//
// --[ License ] --------------------------------------------------------------
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
//
// ----------------------------------------------------------------------------
// Copyright © 2003-2018 Natalia Portillo
*******************************************************************************/
}
@{
Layout = "_Layout";
}

View File

@@ -1,4 +1,4 @@
/****************************************************************************** /******************************************************************************
// Canary Islands Computer Museum Website // Canary Islands Computer Museum Website
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// //
@@ -66,7 +66,10 @@ namespace cicm_web
app.UseStaticFiles(); app.UseStaticFiles();
app.UseMvc(routes => { routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}"); }); app.UseMvc(routes => { routes.MapRoute("default", "{controller=Home}/{action=Index}/{id?}").MapRoute(
name: "areas",
template: "{area:exists}/{controller=Home}/{action=Index}/{id?}"
); });
} }
} }
} }