แก้ไขแสดงรายชื่อรายงานประกาศเกษียณ

This commit is contained in:
Harid Promsri (Bright) 2023-09-14 17:19:20 +07:00
parent 805c28e745
commit 806eee393b
8 changed files with 99 additions and 62 deletions

View file

@ -42,14 +42,10 @@ namespace BMA.EHR.Report.Service.Controllers
public async Task<ActionResult<ResponseObject>> GetProfileRetirement([FromRoute] Guid Id, string exportType = "pdf")
{
var retire = await _service.GetProfileRetirementdAsync(Id);
if (retire == null)
if (retire != null)
{
return NotFound();
}
else
{
var reportfile = "";
var returnfile = "";
var reportfile = string.Empty;
var returnfile = string.Empty;
exportType = exportType.Trim();
switch (retire.GetType().GetProperty("Type").GetValue(retire))
{
@ -89,9 +85,10 @@ namespace BMA.EHR.Report.Service.Controllers
{
report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
}
//Add Parameter
report.ReportParameters["Year"].Value = retire.GetType().GetProperty("Year").GetValue(retire);
report.ReportParameters["Total"].Value = retire.GetType().GetProperty("Total").GetValue(retire);
report.DataSource = retire;
////Add Parameter
//report.ReportParameters["Year"].Value = retire.GetType().GetProperty("Year").GetValue(retire);
//report.ReportParameters["Total"].Value = retire.GetType().GetProperty("Total").GetValue(retire);
var _profileList = new List<dynamic>();
@ -123,6 +120,10 @@ namespace BMA.EHR.Report.Service.Controllers
var content = result.DocumentBytes;
return File(content, $"application/{exportType}", returnfile);
}
else
{
return NotFound();
}
}
#endregion
}

View file

@ -26,10 +26,10 @@
}
},
"MinIO": {
"Endpoint": "https://s3.frappet.com/",
"Endpoint": "https://s3cluster.frappet.com/",
"AccessKey": "frappet",
"SecretKey": "P@ssw0rd",
"BucketName": "bma-recruit"
"SecretKey": "FPTadmin2357",
"BucketName": "bma-ehr-fpt"
},
"Protocol": "HTTPS",
"telerikReporting": {