ปรับปรุงกระบวนการตรวจจับการ login

This commit is contained in:
Nakorn Rientrakrunchai
2020-03-01 10:42:42 +07:00
parent 9fe55ebeea
commit c65c179e85
29 changed files with 342 additions and 195 deletions

View File

@@ -16,44 +16,38 @@ namespace TodoAPI2.Controllers
{
private ILogger<eva_adjust_postponement_normalController> _logger;
private Ieva_adjust_postponement_normalService _repository;
private IConfiguration Configuration { get; set; }
private Iexternal_employeeService emp;
private IConfiguration Configuration { get; set; }
/// <summary>
/// Default constructure for dependency injection
/// </summary>
/// <param name="repository"></param>
/// <param name="configuration"></param>
/// <param name="configuration"></param>
/// <param name="inemp"></param>
/// <param name="logger"></param>
public eva_adjust_postponement_normalViewController(ILogger<eva_adjust_postponement_normalController> logger, Ieva_adjust_postponement_normalService repository, IConfiguration configuration)
public eva_adjust_postponement_normalViewController(ILogger<eva_adjust_postponement_normalController> logger, Ieva_adjust_postponement_normalService repository, IConfiguration configuration, Iexternal_employeeService inemp)
{
_logger = logger;
_repository = repository;
Configuration = configuration;
emp = inemp;
}
public IActionResult eva_adjust_postponement_normal()
{
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
MyHelper.get_login(HttpContext, emp, Response);
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
return View();
}
public IActionResult eva_adjust_postponement_normal_d()
{
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
MyHelper.get_login(HttpContext, emp, Response);
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
return View();
}
//public IActionResult eva_adjust_postponement_normal_report()
//{
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
// return View();
//}
//public IActionResult eva_adjust_postponement_normal_inline()
//{
// if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized(); // Or UnauthorizedView
// return View();
//}
[ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)]
public IActionResult Error()