report ใบสมัครสอบ
This commit is contained in:
parent
4d634413d0
commit
05a06e6431
7 changed files with 474 additions and 79 deletions
|
|
@ -22,15 +22,15 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
private readonly CandidateReportRepository _service;
|
||||
private readonly IWebHostEnvironment _hostingEnvironment;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly MinIOService _minIOService;
|
||||
private readonly MinIOExamService _minIOExamService;
|
||||
|
||||
public CandidateReportController(CandidateReportRepository service, IWebHostEnvironment hostingEnvironment,
|
||||
MinIOService minIOService, IConfiguration configuration)
|
||||
MinIOExamService minIOExamService, IConfiguration configuration)
|
||||
{
|
||||
_service = service;
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_configuration = configuration;
|
||||
_minIOService = minIOService;
|
||||
_minIOExamService = minIOExamService;
|
||||
}
|
||||
|
||||
#region ใบสมัคร
|
||||
|
|
@ -44,6 +44,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
/// <response code="401">ไม่ได้ Login เข้าระบบ</response>
|
||||
/// <response code="500">เมื่อเกิดข้อผิดพลาดในการทำงาน</response>
|
||||
[HttpGet("{exportType}/{Id}")]
|
||||
[AllowAnonymous]
|
||||
public async Task<ActionResult<ResponseObject>> GetExamCandidate([FromRoute] Guid Id, string exportType = "pdf")
|
||||
{
|
||||
var candidate = await _service.GetExamCandidateAsync(Id);
|
||||
|
|
@ -71,14 +72,15 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
var tblData = (Telerik.Reporting.Table)report.Items["detailSection1"].Items["tblData"];
|
||||
tblData.DataSource = careers;
|
||||
|
||||
Console.WriteLine("000000");
|
||||
if (avatar != Guid.Parse("00000000-0000-0000-0000-000000000000"))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Get avatar Image
|
||||
var picContent = (await _minIOService.DownloadFileAsync(avatar)).FileContent;
|
||||
var picContent = await _minIOExamService.DownloadFileAsync(avatar);
|
||||
var pictureBox = (Telerik.Reporting.PictureBox)report.Items["detailSection1"].Items["picAvatar"];
|
||||
pictureBox.Value = Image.FromStream(new MemoryStream(picContent));
|
||||
pictureBox.Value = Image.FromStream(new MemoryStream(picContent.FileContent));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue