From 4d634413d09a5d26912fdd96f18ef7913ed001f5 Mon Sep 17 00:00:00 2001 From: Kittapath Date: Fri, 13 Oct 2023 00:39:36 +0700 Subject: [PATCH] =?UTF-8?q?comment=20=E0=B8=84=E0=B8=B3=E0=B8=99=E0=B8=A7?= =?UTF-8?q?=E0=B8=99=20=E0=B8=A3=E0=B8=B0=E0=B8=A2=E0=B8=B0=E0=B9=80?= =?UTF-8?q?=E0=B8=A7=E0=B8=A5=E0=B8=B2=E0=B8=97=E0=B8=B3=E0=B8=87=E0=B8=B2?= =?UTF-8?q?=E0=B8=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Reports/CandidateReportRepository.cs | 44 +++++++++---------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs b/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs index 71fbf4be..fba0d7ca 100644 --- a/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs +++ b/BMA.EHR.Application/Repositories/Reports/CandidateReportRepository.cs @@ -59,28 +59,28 @@ namespace BMA.EHR.Application.Repositories.Reports var monthDiff = 0; var dayDiff = 0; var sb = new StringBuilder(); - foreach (var career in careers) - { - var rangeObj = career.DurationStart.CalculateBetweenDateV2Value(career.DurationEnd); - yearDiff = yearDiff + rangeObj.years; - monthDiff = monthDiff + rangeObj.months; - dayDiff = dayDiff + rangeObj.days; - if (dayDiff >= 30) - { - monthDiff = monthDiff + (int)(dayDiff / 30); - dayDiff = dayDiff % 30; - } - if (monthDiff >= 12) - { - yearDiff = yearDiff + (int)(monthDiff / 12); - monthDiff = monthDiff % 12; - } - sb.Clear(); - sb.Append(yearDiff == 0 ? "" : $"{yearDiff} ปี "); - sb.Append(monthDiff == 0 ? "" : $"{monthDiff} เดือน "); - sb.Append(dayDiff == 0 ? "" : $"{dayDiff} วัน "); - sb.ToString(); - } + // foreach (var career in careers) + // { + // var rangeObj = career.DurationStart.CalculateBetweenDateV2Value(career.DurationEnd); + // yearDiff = yearDiff + rangeObj.years; + // monthDiff = monthDiff + rangeObj.months; + // dayDiff = dayDiff + rangeObj.days; + // if (dayDiff >= 30) + // { + // monthDiff = monthDiff + (int)(dayDiff / 30); + // dayDiff = dayDiff % 30; + // } + // if (monthDiff >= 12) + // { + // yearDiff = yearDiff + (int)(monthDiff / 12); + // monthDiff = monthDiff % 12; + // } + // sb.Clear(); + // sb.Append(yearDiff == 0 ? "" : $"{yearDiff} ปี "); + // sb.Append(monthDiff == 0 ? "" : $"{monthDiff} เดือน "); + // sb.Append(dayDiff == 0 ? "" : $"{dayDiff} วัน "); + // sb.ToString(); + // } var data = await _dbExamContext.Set().AsQueryable() .Where(x => x.Id == id)