diff --git a/Controllers/RecruitController.cs b/Controllers/RecruitController.cs index 3c74673..e00c4d1 100644 --- a/Controllers/RecruitController.cs +++ b/Controllers/RecruitController.cs @@ -1731,6 +1731,9 @@ namespace BMA.EHR.Recruit.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()) { @@ -1756,7 +1759,9 @@ namespace BMA.EHR.Recruit.Service.Controllers { count = 0, pass = 0, - notpass = 0 + notpass = 0, + missed_exam = 0, + other = 0 }; } else @@ -1766,7 +1771,9 @@ namespace BMA.EHR.Recruit.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/Requests/Recruits/RecruitExamRequest.cs b/Requests/Recruits/RecruitExamRequest.cs index 8643208..91f4d92 100644 --- a/Requests/Recruits/RecruitExamRequest.cs +++ b/Requests/Recruits/RecruitExamRequest.cs @@ -12,5 +12,8 @@ /// ข้อมูลผลการสอบ 'ผ่าน' 'ไม่ผ่าน' /// public string ExamResult { get; set; } - } + + public int Page { get; set; } = 1; + public int PageSize { get; set; } = 10; + } }