153 lines
3.2 KiB
C#
153 lines
3.2 KiB
C#
using ComputerHardwareStoreContracts.ViewModels;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using System.Diagnostics;
|
|
using StoreKeeperClient.Models;
|
|
|
|
namespace StoreKeeperClient.Controllers
|
|
{
|
|
public class HomeController : Controller
|
|
{
|
|
private readonly ILogger<HomeController> _logger;
|
|
|
|
public HomeController(ILogger<HomeController> logger)
|
|
{
|
|
_logger = logger;
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Privacy()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Enter()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Register()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult AddBuildToPurchase()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Builds()
|
|
{
|
|
return View(new List<BuildViewModel>());
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult BuildCreate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult BuildDelete()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult BuildUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult CommentCreate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult CommentDelete()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult CommentUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Comments()
|
|
{
|
|
return View(new List<CommentViewModel>());
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult ProductsList()
|
|
{
|
|
return View(new List<BuildViewModel>());
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult PurchaseCreate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult PurchaseDelete()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Purchases()
|
|
{
|
|
return View(new List<PurchaseViewModel>());
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult PurchaseUpdate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
[HttpGet]
|
|
public IActionResult Report()
|
|
{
|
|
return View(new List<PurchaseViewModel>());
|
|
}
|
|
|
|
[HttpPost]
|
|
public void Report(string password)
|
|
{
|
|
Response.Redirect("ReportOnly");
|
|
}
|
|
|
|
public IActionResult Mails()
|
|
{
|
|
if (APIClient.Client == null)
|
|
{
|
|
return Redirect("~/Home/Enter");
|
|
}
|
|
return View(APIClient.GetRequest<List<MessageInfoViewModel>>($"api/client/getmessages?clientId={APIClient.Client.Id}"));
|
|
}
|
|
|
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|
public IActionResult Error()
|
|
{
|
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|
}
|
|
}
|
|
}
|