34 lines
1.1 KiB
C#
34 lines
1.1 KiB
C#
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("ItemInformation/{Id}")]
|
|
public async Task<IActionResult> ItemInformation(int Id)
|
|
{
|
|
var item = await _centralDbContext.Items.FindAsync(Id);
|
|
return View(Json(item));
|
|
}
|
|
|
|
[HttpPost("ItemInformation/{id}")]
|
|
public IActionResult ItemInformation(int id, [FromBody] ItemModel item)
|
|
{
|
|
return View();
|
|
}
|
|
}
|
|
}
|