From 60054dc94fb6609b4360b91d9cdd04054435b814 Mon Sep 17 00:00:00 2001 From: Bright Date: Mon, 8 Sep 2025 14:08:49 +0700 Subject: [PATCH] filter data null --- Controllers/RecruitReportController.cs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Controllers/RecruitReportController.cs b/Controllers/RecruitReportController.cs index 040b5a5..4999e2a 100644 --- a/Controllers/RecruitReportController.cs +++ b/Controllers/RecruitReportController.cs @@ -113,6 +113,8 @@ namespace BMA.EHR.Report.Service.Controllers AuthPosition = position }) .FirstOrDefaultAsync(); + if (data == null) + return Error("ไม่พบข้อมูลในระบบ"); var rptFile = Path.Combine(_hostingEnvironment.ContentRootPath, "Report", "Recruit", $"rptCertificate{type}.trdp"); ReportPackager reportPackager = new ReportPackager();