diff --git a/Controllers/ProfileReportController.cs b/Controllers/ProfileReportController.cs index a05fd7a..a1dffaa 100644 --- a/Controllers/ProfileReportController.cs +++ b/Controllers/ProfileReportController.cs @@ -281,38 +281,39 @@ namespace BMA.EHR.Report.Service.Controllers } report.DataSource = org.result; CitizenId = org.result.CitizenId; + var tblEducation = (Telerik.Reporting.Table)report.Items["groupHeaderSection"].Items["tblEducation"]; + Console.WriteLine("ssssssssssssssssssssss"); + Console.WriteLine(org.result.Education); + tblEducation.DataSource = org.result.Education; + Console.WriteLine("aaaaaaaaaaaaaaaaaaaaaa"); + // report.DataSource = data; + + // if (profile.AvatarId != "") + // { + // try + // { + // // Get avatar Image + // var picContent = (await _minioService.DownloadFileAsync(Guid.Parse("00000000-0000-0000-0000-000000000000"))).FileContent; + // var pictureBox = (Telerik.Reporting.PictureBox)report.Items["groupHeaderSection"].Items["picAvatar"]; + // pictureBox.Value = Image.FromStream(new MemoryStream(picContent)); + // } + // catch { } + // } + + System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable(); + + InstanceReportSource instanceReportSource = new InstanceReportSource() + { + ReportDocument = report + }; + + + ReportProcessor reportProcessor = new ReportProcessor(_configuration); + RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo); + + var content = result.DocumentBytes; + return File(content, "application/pdf", $"ประวัติการรับราชการอย่างย่อ_.pdf"); } - - // report.DataSource = data; - - // if (profile.AvatarId != "") - // { - // try - // { - // // Get avatar Image - // var picContent = (await _minioService.DownloadFileAsync(Guid.Parse("00000000-0000-0000-0000-000000000000"))).FileContent; - // var pictureBox = (Telerik.Reporting.PictureBox)report.Items["groupHeaderSection"].Items["picAvatar"]; - // pictureBox.Value = Image.FromStream(new MemoryStream(picContent)); - // } - // catch { } - // } - - System.Collections.Hashtable deviceInfo = new System.Collections.Hashtable(); - - InstanceReportSource instanceReportSource = new InstanceReportSource() - { - ReportDocument = report - }; - - - ReportProcessor reportProcessor = new ReportProcessor(_configuration); - RenderingResult result = reportProcessor.RenderReport("PDF", instanceReportSource, deviceInfo); - - var content = result.DocumentBytes; - return File(content, "application/pdf", $"ประวัติการรับราชการอย่างย่อ_{CitizenId}.pdf"); - - - } catch (Exception ex) { diff --git a/Report/Profile/rptKK1_Page1.trdp b/Report/Profile/rptKK1_Page1.trdp index 924f8a1..dc9a705 100644 Binary files a/Report/Profile/rptKK1_Page1.trdp and b/Report/Profile/rptKK1_Page1.trdp differ diff --git a/Report/Profile/rptKK1_Page2.trdp b/Report/Profile/rptKK1_Page2.trdp index fb0495e..e0a0c1f 100644 Binary files a/Report/Profile/rptKK1_Page2.trdp and b/Report/Profile/rptKK1_Page2.trdp differ diff --git a/Report/Profile/rptShortKp7.trdp b/Report/Profile/rptShortKp7.trdp index ca7f2d4..f77d6b2 100644 Binary files a/Report/Profile/rptShortKp7.trdp and b/Report/Profile/rptShortKp7.trdp differ diff --git a/Report/Recruit/rptCandidateList.trdp b/Report/Recruit/rptCandidateList.trdp index c5d1983..9a1a243 100644 Binary files a/Report/Recruit/rptCandidateList.trdp and b/Report/Recruit/rptCandidateList.trdp differ diff --git a/Responses/kp7ShortRequest.cs b/Responses/kp7ShortRequest.cs index 535eeee..83df103 100644 --- a/Responses/kp7ShortRequest.cs +++ b/Responses/kp7ShortRequest.cs @@ -16,7 +16,7 @@ namespace BMA.EHR.Report.Service.Responses public string? DateRetire { get; set; } public string? RegistrationAddress { get; set; } public string? SalaryAmount { get; set; } - public string? Education { get; set; } + public List Education { get; set; } public string? AppointText { get; set; } public string? SalaryDate { get; set; } public string? PositionName { get; set; }