PSTW_CentralizeSystem/Controllers/InventoryController.cs
2024-12-27 16:25:50 +08:00

36 lines
1.1 KiB
C#

using Microsoft.AspNetCore.Authorization;
using Microsoft.AspNetCore.Identity;
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using PSTW_CentralSystem.Areas.Inventory.Models;
using PSTW_CentralSystem.DBContext;
using PSTW_CentralSystem.Models;
namespace PSTW_CentralSystem.Controllers
{
public class InventoryController : Controller
{
private readonly ILogger<InventoryController> _logger;
private readonly CentralSystemContext _centralDbContext;
public InventoryController(ILogger<InventoryController> logger, CentralSystemContext centralDbContext)
{
_logger = logger;
_centralDbContext = centralDbContext;
}
[HttpGet("/i/{Id}")]
public IActionResult ItemInformation(string Id)
{
ViewData["ItemId"] = Id;
return View("ItemInformation");
}
[Authorize]
[HttpPost("/i/{id}")]
public IActionResult ItemInformation(string id, [FromBody] ItemModel item)
{
return View();
}
}
}