noti วินัย
This commit is contained in:
parent
9e513d3f1a
commit
ae990c0c5f
21 changed files with 244 additions and 1508 deletions
|
|
@ -52,47 +52,7 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
var avatar = await _service.GetExamAvatarCandidateAsync(Id);
|
||||
if (candidate != null)
|
||||
{
|
||||
//var mimeType = "";
|
||||
//switch (exportType.Trim().ToLower())
|
||||
//{
|
||||
// case "pdf": mimeType = "application/pdf"; break;
|
||||
// case "docx": mimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document"; break;
|
||||
// case "xlsx": mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"; break;
|
||||
//}
|
||||
|
||||
//var rptFile = System.IO.Path.Combine(_hostingEnvironment.ContentRootPath, "Reports", $"ผลสอบคัดเลือกรายบุคคล.trdp");
|
||||
//ReportPackager reportPacker = new ReportPackager();
|
||||
//Telerik.Reporting.Report? report = null;
|
||||
//using (var sourceStream = System.IO.File.OpenRead(rptFile))
|
||||
//{
|
||||
// report = (Telerik.Reporting.Report)reportPacker.UnpackageDocument(sourceStream);
|
||||
//}
|
||||
//report.DataSource = candidate;
|
||||
|
||||
//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 = avatar == null ? null : await _minIOExamService.ImagesPath(avatar);
|
||||
//var pictureBox = (Telerik.Reporting.PictureBox)report.Items["detailSection1"].Items["picAvatar"];
|
||||
//pictureBox.Value = Image.FromStream(new MemoryStream(picContent.FileContent));
|
||||
// }
|
||||
// catch { }
|
||||
//}
|
||||
|
||||
//System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable();
|
||||
//InstanceReportSource instanceReportSource = new InstanceReportSource()
|
||||
//{
|
||||
// ReportDocument = report,
|
||||
//};
|
||||
//ReportProcessor reportProcessor = new ReportProcessor(_configuration);
|
||||
//RenderingResult result = reportProcessor.RenderReport($"{exportType}", instanceReportSource, deviceInfo);
|
||||
//return File(result.DocumentBytes, mimeType, $"ใบสมัครสอบคัดเลือก.{exportType.Trim().ToLower()}");
|
||||
var mapData = new
|
||||
{
|
||||
Id = candidate.GetType().GetProperty("Id").GetValue(candidate),
|
||||
|
|
@ -145,7 +105,8 @@ namespace BMA.EHR.Report.Service.Controllers
|
|||
Careers = careers,
|
||||
};
|
||||
|
||||
var data = new {
|
||||
var data = new
|
||||
{
|
||||
template = "ผลสอบคัดเลือกรายบุคคล",
|
||||
reportName = "docx-report",
|
||||
data = mapData
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue