From 44e4ab3f9fc39a8adad51d13e16a577fad3ec30d Mon Sep 17 00:00:00 2001 From: Bright Date: Tue, 9 Sep 2025 13:09:30 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B8=AA=E0=B9=88=E0=B8=87=E0=B8=9F=E0=B8=B4?= =?UTF-8?q?=E0=B8=A5=E0=B8=94=E0=B9=8C=20&=20=E0=B9=80=E0=B8=9E=E0=B8=B4?= =?UTF-8?q?=E0=B9=88=E0=B8=A1=20Paging?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Controllers/DisableController.cs | 11 +++++++++-- Request/Disables/DisableExamRequest.cs | 3 +++ 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Controllers/DisableController.cs b/Controllers/DisableController.cs index 15e5b91..dbb77e5 100644 --- a/Controllers/DisableController.cs +++ b/Controllers/DisableController.cs @@ -1933,6 +1933,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers } + if (data != null && data.Count > 0) + data = data.Skip((req.Page - 1) * req.PageSize).Take(req.PageSize).ToList(); + dynamic header = null; using (var cmd = _context.Database.GetDbConnection().CreateCommand()) { @@ -1958,7 +1961,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers { count = 0, pass = 0, - notpass = 0 + notpass = 0, + missed_exam = 0, + other = 0 }; } else @@ -1968,7 +1973,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers { count = dr["count"].ToString().ToInteger(), pass = dr["pass"].ToString().ToInteger(), - notpass = dr["notpass"].ToString().ToInteger() + notpass = dr["notpass"].ToString().ToInteger(), + missed_exam = dr["missed_exam"].ToString().ToInteger(), + other = dr["other"].ToString().ToInteger() }; } } diff --git a/Request/Disables/DisableExamRequest.cs b/Request/Disables/DisableExamRequest.cs index c2ffa2e..9ed586e 100644 --- a/Request/Disables/DisableExamRequest.cs +++ b/Request/Disables/DisableExamRequest.cs @@ -12,5 +12,8 @@ /// ข้อมูลผลการสอบ 'ผ่าน' 'ไม่ผ่าน' /// public string ExamResult { get; set; } + + public int Page { get; set; } = 1; + public int PageSize { get; set; } = 10; } }