using ImplementerApp.Models; using Microsoft.AspNetCore.Mvc; using System.Diagnostics; using BusinessLogic.BusinessLogic; using Contracts.BusinessLogicsContracts; using Contracts.ViewModels; using DataModels.Models; namespace ImplementerApp.Controllers { public class HomeController : Controller { private readonly ILogger _logger; private readonly IDetailLogic _detailLogic; private readonly IImplementerLogic _userLogic; private readonly IProductLogic _productLogic; private readonly IProductionLogic _productionLogic; public HomeController(ILogger logger) { _logger = logger; } public IActionResult Index() { return View(); } public IActionResult Enter() { return View(); } public IActionResult Register() { return View(); } public IActionResult IndexDetail() { var details = new List(); details.Add(new DetailViewModel { Id = 1, Name = "Test", Cost = 55.5, UserId = 1 }); details.Add(new DetailViewModel { Id = 2, Name = "Test1", Cost = 32, UserId = 2 }); return View(details); } public IActionResult CreateDetail() { return View(); } public IActionResult IndexProduct() { return View(new List()); } public IActionResult CreateProduct() { var details = new List(); details.Add(new DetailViewModel { Id = 1, Name = "Test", Cost = 55.5, UserId = 1 }); details.Add(new DetailViewModel { Id = 2, Name = "Test1", Cost = 32, UserId = 2 }); return View(details); } public IActionResult IndexProduction() { return View(new List()); } public IActionResult CreateProduction() { var details = new List(); details.Add(new DetailViewModel { Id = 1, Name = "Test", Cost = 55.5, UserId = 1 }); details.Add(new DetailViewModel { Id = 2, Name = "Test1", Cost = 32, UserId = 2 }); return View(details); } public IActionResult Privacy() { return View(); } public IActionResult DetailTimeReport() { return View(new List()); } public IActionResult DetailWorkshopReport() { return View(new List()); } public IActionResult ReportsMenu() { return View(); } public IActionResult ProductMachineAdd() { List machines = new List { new MachineViewModel { Id = 1, Title = "Токарный станок", Country = "Германия", UserId = 1, WorkerMachines = new() }, new MachineViewModel { Id = 2, Title = "Фрезерный станок", Country = "Япония", UserId = 2, WorkerMachines = new() } }; return View(machines); } [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] public IActionResult Error() { return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); } } }