Update DB to version 14: Computers and consoles are now machines with different type.

This commit is contained in:
2018-04-28 02:10:03 +01:00
parent 40d07af9c5
commit d8127630b3
28 changed files with 1694 additions and 2209 deletions

View File

@@ -33,7 +33,7 @@ using System.Linq;
using cicm_web.Models;
using Microsoft.AspNetCore.Hosting;
using Microsoft.AspNetCore.Mvc;
using Computer = Cicm.Database.Schemas.Computer;
using Machine = Cicm.Database.Schemas.Machine;
namespace cicm_web.Controllers
{
@@ -48,7 +48,7 @@ namespace cicm_web.Controllers
public IActionResult Index()
{
Program.Database.Operations.GetComputers(out List<Computer> computers);
Program.Database.Operations.GetComputers(out List<Machine> computers);
ViewBag.ItemCount = computers.Count;
@@ -67,7 +67,7 @@ namespace cicm_web.Controllers
ViewBag.Letter = id;
ComputerMini[] computers =
MachineMini[] computers =
id == '\0' ? ComputerMini.GetAllItems() : ComputerMini.GetItemsStartingWithLetter(id);
return View(computers);
@@ -79,12 +79,5 @@ namespace cicm_web.Controllers
return View(ComputerMini.GetItemsFromYear(id));
}
public IActionResult View(int id)
{
ViewBag.WebRootPath = hostingEnvironment.WebRootPath;
return View(Models.Computer.GetItem(id));
}
}
}