mirror of
https://github.com/claunia/marechai.git
synced 2025-12-16 19:14:25 +00:00
Update DB to version 14: Computers and consoles are now machines with different type.
This commit is contained in:
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user