53 lines
1.3 KiB
C#
53 lines
1.3 KiB
C#
using Microsoft.AspNetCore.Authorization;
|
|
using Microsoft.AspNetCore.Mvc;
|
|
using PSTW_CentralSystem.DBContext;
|
|
using PSTW_CentralSystem.Models;
|
|
using System.Diagnostics;
|
|
|
|
namespace PSTW_CentralSystem.Controllers
|
|
{
|
|
//[Authorize(Policy = "RoleModulePolicy")]
|
|
public class AdminController : Controller
|
|
{
|
|
private readonly IdentityDBContext _authDbContext;
|
|
private readonly ILogger<HomeController> _logger;
|
|
|
|
public AdminController(ILogger<HomeController> logger, IdentityDBContext authDbContext)
|
|
{
|
|
_logger = logger;
|
|
_authDbContext = authDbContext;
|
|
}
|
|
|
|
public IActionResult Index()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
public IActionResult ModuleAdmin()
|
|
{
|
|
return View();
|
|
}
|
|
public IActionResult ModuleSetting(int? id)
|
|
{
|
|
if (id == null)
|
|
{
|
|
return NotFound();
|
|
}
|
|
|
|
var moduleSettings = _authDbContext.ModuleSettings.Find(id);
|
|
if (moduleSettings == null)
|
|
{
|
|
return NotFound();
|
|
}
|
|
|
|
return View(moduleSettings);
|
|
}
|
|
|
|
public IActionResult ModuleCreate()
|
|
{
|
|
return View();
|
|
}
|
|
|
|
}
|
|
}
|