รูปสอบคัดเลือก
This commit is contained in:
parent
4e90ffadb2
commit
b950dde304
6 changed files with 37 additions and 3 deletions
|
|
@ -6,6 +6,8 @@ using Microsoft.AspNetCore.Authorization;
|
|||
using Swashbuckle.AspNetCore.Annotations;
|
||||
using Telerik.Reporting;
|
||||
using Telerik.Reporting.Processing;
|
||||
using BMA.EHR.Application.Repositories;
|
||||
using System.Drawing;
|
||||
|
||||
namespace BMA.EHR.Report.Service.Controllers
|
||||
{
|
||||
|
|
@ -20,12 +22,15 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
private readonly CandidateReportRepository _service;
|
||||
private readonly IWebHostEnvironment _hostingEnvironment;
|
||||
private readonly IConfiguration _configuration;
|
||||
private readonly MinIOService _minIOService;
|
||||
|
||||
public CandidateReportController(CandidateReportRepository service, IWebHostEnvironment hostingEnvironment, IConfiguration configuration)
|
||||
public CandidateReportController(CandidateReportRepository service, IWebHostEnvironment hostingEnvironment,
|
||||
MinIOService minIOService, IConfiguration configuration)
|
||||
{
|
||||
_service = service;
|
||||
_hostingEnvironment = hostingEnvironment;
|
||||
_configuration = configuration;
|
||||
_minIOService = minIOService;
|
||||
}
|
||||
|
||||
#region ใบสมัคร
|
||||
|
|
@ -43,6 +48,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
{
|
||||
var candidate = await _service.GetExamCandidateAsync(Id);
|
||||
var careers = await _service.GetExamCareerCandidateAsync(Id);
|
||||
var avatar = await _service.GetExamAvatarCandidateAsync(Id);
|
||||
if (candidate != null)
|
||||
{
|
||||
var mimeType = "";
|
||||
|
|
@ -65,6 +71,18 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
var tblData = (Telerik.Reporting.Table)report.Items["detailSection1"].Items["tblData"];
|
||||
tblData.DataSource = careers;
|
||||
|
||||
if (avatar != Guid.Parse("00000000-0000-0000-0000-000000000000"))
|
||||
{
|
||||
try
|
||||
{
|
||||
// Get avatar Image
|
||||
var picContent = (await _minIOService.DownloadFileAsync(avatar)).FileContent;
|
||||
var pictureBox = (Telerik.Reporting.PictureBox)report.Items["detailSection1"].Items["picAvatar"];
|
||||
pictureBox.Value = Image.FromStream(new MemoryStream(picContent));
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||
InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||
{
|
||||
|
|
|
|||
Binary file not shown.
Binary file not shown.
Loading…
Add table
Add a link
Reference in a new issue