ปรับให้ระบบอ่านค่าจาก env ทั้งหมด
This commit is contained in:
@@ -158,40 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_adjust_postponement_detail_normal_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_adjust_postponement_detail_normal_report(eva_adjust_postponement_detail_normalReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_adjust_postponement_detail_normal_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
|
||||
@@ -158,40 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_adjust_postponement_detail_normal_02_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_adjust_postponement_detail_normal_02_report(eva_adjust_postponement_detail_normal_02ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_adjust_postponement_detail_normal_02_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
|
||||
@@ -158,40 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_adjust_postponement_detail_quota_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_adjust_postponement_detail_quota_report(eva_adjust_postponement_detail_quotaReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_adjust_postponement_detail_quota_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
|
||||
@@ -158,40 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_adjust_postponement_detail_quota_02_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_adjust_postponement_detail_quota_02_report(eva_adjust_postponement_detail_quota_02ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_adjust_postponement_detail_quota_02_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_adjust_postponement_normal_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_adjust_postponement_normal_report(eva_adjust_postponement_normalReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_adjust_postponement_normal_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_adjust_postponement_quota_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_adjust_postponement_quota_report(eva_adjust_postponement_quotaReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_adjust_postponement_quota_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -157,42 +157,7 @@ namespace TodoAPI2.Controllers
|
||||
return StatusCode(500, $"Exception in IActionResult GetListBySearch. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_report(eva_create_evaluationReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -157,42 +157,7 @@ namespace TodoAPI2.Controllers
|
||||
return StatusCode(500, $"Exception in IActionResult GetListBySearch. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_report(eva_create_evaluation_detailReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -184,40 +184,5 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_agreement_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_agreement_report(eva_create_evaluation_detail_agreementReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_agreement_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_review01_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review01_report(eva_create_evaluation_detail_review01ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_review01_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_review02_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review02_report(eva_create_evaluation_detail_review02ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_review02_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -157,42 +157,7 @@ namespace TodoAPI2.Controllers
|
||||
return StatusCode(500, $"Exception in IActionResult GetListBySearch. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_review03_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review03_report(eva_create_evaluation_detail_review03ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_review03_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_review04_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_review04_report(eva_create_evaluation_detail_review04ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_review04_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -157,42 +157,7 @@ namespace TodoAPI2.Controllers
|
||||
return StatusCode(500, $"Exception in IActionResult GetListBySearch. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_status_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_status_report(eva_create_evaluation_detail_statusReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_status_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_summary1_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_summary1_report(eva_create_evaluation_detail_summary1ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_summary1_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_create_evaluation_detail_summary2_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_create_evaluation_detail_summary2_report(eva_create_evaluation_detail_summary2ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_create_evaluation_detail_summary2_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_achievement_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_achievement_report(eva_evaluation_achievementReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_achievement_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,40 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_achievement_process2_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_achievement_process2_report(eva_evaluation_achievement_process2ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_achievement_process2_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_achievement_process_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_achievement_process_report(eva_evaluation_achievement_processReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_achievement_process_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_behavior_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_behavior_report(eva_evaluation_behaviorReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_behavior_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_behavior_process2_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_behavior_process2_report(eva_evaluation_behavior_process2ReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_behavior_process2_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_behavior_process_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_behavior_process_report(eva_evaluation_behavior_processReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_behavior_process_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_group_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_group_report(eva_evaluation_groupReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_group_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_evaluation_group_detail_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_evaluation_group_detail_report(eva_evaluation_group_detailReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_evaluation_group_detail_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_level_score_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_level_score_report(eva_level_scoreReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_level_score_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_level_score_basic_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_level_score_basic_report(eva_level_score_basicReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_level_score_basic_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_performance_plan_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_performance_plan_report(eva_performance_planReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_performance_plan_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_performance_plan_detail_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_performance_plan_detail_report(eva_performance_plan_detailReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_performance_plan_detail_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_promoted_percentage_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_promoted_percentage_report(eva_promoted_percentageReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_promoted_percentage_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -158,41 +158,6 @@ namespace TodoAPI2.Controllers
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Download Report
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// </remarks>
|
||||
/// <returns>Return list of items by specifced keyword</returns>
|
||||
/// <response code="200">Returns the item</response>
|
||||
/// <response code="500">Error Occurred</response>
|
||||
[HttpGet("eva_salary_cylinder_report")]
|
||||
[ProducesResponseType(typeof(FileStreamResult), 200)]
|
||||
[ProducesResponseType(400)]
|
||||
[ProducesResponseType(500)]
|
||||
//[ValidateAntiForgeryToken]
|
||||
public IActionResult eva_salary_cylinder_report(eva_salary_cylinderReportRequestModel model)
|
||||
{
|
||||
try
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
string mainurl = Configuration["JasperReportServer:MainURL"];
|
||||
|
||||
string url = $"{mainurl}/ro519eva/eva_salary_cylinder_report.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
var stream = new MemoryStream(data);
|
||||
|
||||
return File(stream, model.contentType);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
_logger.LogCritical($"Exception while GetReport.", ex);
|
||||
return StatusCode(500, $"Exception while GetReport. {ex.Message}");
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Create new item
|
||||
/// </summary>
|
||||
|
||||
@@ -97,10 +97,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_eva01.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -97,11 +97,10 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
string url = $"{mainurl}{reportsite}/rep_eva02.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
|
||||
@@ -96,10 +96,10 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_eva03.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -98,11 +98,10 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
string url = $"{mainurl}{reportsite}/rep_family.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
var data = httpclient.DownloadData(url);
|
||||
|
||||
@@ -97,10 +97,10 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_leave_summary.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -98,10 +98,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_leave_total.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -96,15 +96,11 @@ namespace TodoAPI2.Controllers
|
||||
{
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
var httpclient = new WebClient();
|
||||
var env_mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
var env_reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
var env_username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
var env_password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = !string.IsNullOrEmpty(env_mainurl) ? env_mainurl : Configuration["JasperReportServer:MainURL"];
|
||||
string reportsite = !string.IsNullOrEmpty(env_reportsite) ? env_reportsite : Configuration["JasperReportServer:reportsite"];
|
||||
string username = !string.IsNullOrEmpty(env_username) ? env_username : Configuration["JasperReportServer:username"];
|
||||
string password = !string.IsNullOrEmpty(env_password) ? env_password : Configuration["JasperReportServer:password"];
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_leave_total_02.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -98,10 +98,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_position_salary.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -97,10 +97,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_samana.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -98,10 +98,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_study_history.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
@@ -98,10 +98,11 @@ namespace TodoAPI2.Controllers
|
||||
if (!MyHelper.checkAuth(Configuration, HttpContext)) return Unauthorized();
|
||||
//var httpclient = MyHelper.getHttpClient(Configuration);
|
||||
var httpclient = new WebClient();
|
||||
string mainurl = Environment.GetEnvironmentVariable("JasperReportServer_MainURL");
|
||||
string reportsite = Environment.GetEnvironmentVariable("JasperReportServer_reportsite");
|
||||
string username = Environment.GetEnvironmentVariable("JasperReportServer_username");
|
||||
string password = Environment.GetEnvironmentVariable("JasperReportServer_password");
|
||||
|
||||
string mainurl = MyHelper.GetConfig(Configuration, "JasperReportServer:MainURL");
|
||||
string reportsite = MyHelper.GetConfig(Configuration, "JasperReportServer:reportsite");
|
||||
string username = MyHelper.GetConfig(Configuration, "JasperReportServer:username");
|
||||
string password = MyHelper.GetConfig(Configuration, "JasperReportServer:password");
|
||||
|
||||
string url = $"{mainurl}{reportsite}/rep_working_type.{model.filetype}?{MyHelper.GetParameterForJasperReport(model)}&j_username={username}&j_password={password}";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user