73 lines
1.6 KiB
C#
73 lines
1.6 KiB
C#
|
using CanteenContracts.View;
|
|||
|
using CanteenManagerApp.Models;
|
|||
|
using Microsoft.AspNetCore.Mvc;
|
|||
|
using System.Diagnostics;
|
|||
|
|
|||
|
|
|||
|
namespace CanteenManagerApp.Controllers
|
|||
|
{
|
|||
|
public class HomeController : Controller
|
|||
|
{
|
|||
|
private readonly ILogger<HomeController> _logger;
|
|||
|
|
|||
|
public HomeController(ILogger<HomeController> logger)
|
|||
|
{
|
|||
|
_logger = logger;
|
|||
|
}
|
|||
|
|
|||
|
public IActionResult Index()
|
|||
|
{
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
public IActionResult Cooks()
|
|||
|
{
|
|||
|
|
|||
|
ViewBag.Cooks = APIClient.GetRequest<List<CookViewModel>>("api/main/getcooklist");
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
[HttpGet]
|
|||
|
public IActionResult Products()
|
|||
|
{
|
|||
|
ViewBag.Products = new List<ProductViewModel>();
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
[HttpGet]
|
|||
|
public IActionResult Dishes()
|
|||
|
{
|
|||
|
ViewBag.Dishes = new List<DishViewModel>();
|
|||
|
return View();
|
|||
|
}
|
|||
|
public IActionResult Privacy()
|
|||
|
{
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
[HttpGet]
|
|||
|
public IActionResult CreateCook()
|
|||
|
{
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
[HttpGet]
|
|||
|
public IActionResult CreateProduct()
|
|||
|
{
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
[HttpGet]
|
|||
|
public IActionResult CreateDish()
|
|||
|
{
|
|||
|
return View();
|
|||
|
}
|
|||
|
|
|||
|
|
|||
|
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
|
|||
|
public IActionResult Error()
|
|||
|
{
|
|||
|
return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier });
|
|||
|
}
|
|||
|
}
|
|||
|
}
|