fix download report error

This commit is contained in:
harid 2025-10-27 11:24:40 +07:00
parent c0c75e7dcb
commit 3b46a1bcde
4 changed files with 14 additions and 10 deletions

View file

@ -230,7 +230,9 @@ namespace BMA.EHR.Report.Service.Controllers
CitizenId = p.CitizenId == null ? "-" : (p.CitizenId),
p.Prefix,
FullName = $"{p.Prefix}{p.FirstName} {p.LastName}",
DateOfBirth = (p.DateOfBirth.ToThaiShortDate()),
DateOfBirth = p.DateOfBirth.HasValue && p.DateOfBirth.Value != DateTime.MinValue
? p.DateOfBirth.Value.ToThaiShortDate()
: "",
Gender = p.Gendor,
Degree = p.Educations.First().Degree,
Major = p.Educations.First().Major,

View file

@ -192,7 +192,9 @@ namespace BMA.EHR.Report.Service.Controllers
CitizenId = p.CitizenId,
p.Prefix,
FullName = $"{p.Prefix}{p.FirstName} {p.LastName}",
DateOfBirth = p.DateOfBirth.ToThaiShortDate(),
DateOfBirth = p.DateOfBirth.HasValue && p.DateOfBirth.Value != DateTime.MinValue
? p.DateOfBirth.Value.ToThaiShortDate()
: "",
Gender = p.Gendor,
Degree = p.Educations.First().Degree,
Major = p.Educations.First().Major,

View file

@ -35,7 +35,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models.Disables
public string Religion { get; set; } = string.Empty;
[Required]
public DateTime DateOfBirth { get; set; }
public DateTime? DateOfBirth { get; set; }
[MaxLength(20)]
public string Marry { get; set; } = string.Empty;
@ -49,7 +49,7 @@ namespace BMA.EHR.Recurit.Exam.Service.Models.Disables
[MaxLength(200)]
public string CitizenCardIssuer { get; set; } = string.Empty;
public DateTime CitizenCardExpireDate { get; set; }
public DateTime? CitizenCardExpireDate { get; set; }
[MaxLength(200)]
public string Remark { get; set; } = string.Empty;
@ -73,9 +73,9 @@ namespace BMA.EHR.Recurit.Exam.Service.Models.Disables
public DateTime CreatedDate { get; set; } = DateTime.Now;
public DateTime ModifiedDate { get; set; }
public DateTime? ModifiedDate { get; set; }
public DateTime ApplyDate { get; set; }
public DateTime? ApplyDate { get; set; }
public string? PositionName { get; set; }
public string? PositionType { get; set; }

View file

@ -35,7 +35,7 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
public string Religion { get; set; } = string.Empty;
[Required]
public DateTime DateOfBirth { get; set; }
public DateTime? DateOfBirth { get; set; }
[MaxLength(20)]
public string Marry { get; set; } = string.Empty;
@ -49,7 +49,7 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
[MaxLength(200)]
public string CitizenCardIssuer { get; set; } = string.Empty;
public DateTime CitizenCardExpireDate { get; set; }
public DateTime? CitizenCardExpireDate { get; set; }
[MaxLength(200)]
public string Remark { get; set; } = string.Empty;
@ -73,9 +73,9 @@ namespace BMA.EHR.Recruit.Service.Models.Recruits
public DateTime CreatedDate { get; set; } = DateTime.Now;
public DateTime ModifiedDate { get; set; }
public DateTime? ModifiedDate { get; set; }
public DateTime ApplyDate { get; set; }
public DateTime? ApplyDate { get; set; }
public string? PositionName { get; set; }
public string? PositionType { get; set; }