diff --git a/Controllers/DisableController.cs b/Controllers/DisableController.cs index 21883db..73f98f2 100644 --- a/Controllers/DisableController.cs +++ b/Controllers/DisableController.cs @@ -1909,19 +1909,19 @@ namespace BMA.EHR.Recurit.Exam.Service.Controllers profileID = dr["profileID"].ToString(), prefix = dr["prefix"].ToString(), fullName = dr["fullName"].ToString(), - dateOfBirth = dr["dateofbirth"] == null ? "" : Convert.ToDateTime(dr["dateofbirth"]).ToThaiShortDate(), + dateOfBirth = dr["dateofbirth"] == null || Convert.ToDateTime(dr["dateofbirth"]) == DateTime.MinValue ? "" : Convert.ToDateTime(dr["dateofbirth"]).ToThaiShortDate(), gender = dr["gender"].ToString(), degree = dr["degree"].ToString(), major = dr["major"].ToString(), majorgroup = dr["majorgroup"].ToString(), certificateNo = dr["certificateno"].ToString(), - certificateIssueDate = dr["certificateIssueDate"] == null ? "" : Convert.ToDateTime(dr["certificateIssueDate"]).ToThaiShortDate(), + certificateIssueDate = dr["certificateIssueDate"] == null || Convert.ToDateTime(dr["certificateIssueDate"]) == DateTime.MinValue ? "" : Convert.ToDateTime(dr["certificateIssueDate"]).ToThaiShortDate(), ExamScore = dr["score"] == null ? 0 : dr["score"].ToString().ToInteger(), ExamResult = dr["result"].ToString(), ExamAttribute = dr["examAttribute"].ToString(), Remark = dr["remark"].ToString(), IsSpecial = dr["isspecial"].ToString(), - applyDate = dr["applydate"] == null ? "" : Convert.ToDateTime(dr["applydate"]).ToThaiShortDate(), + applyDate = dr["applydate"] == null || Convert.ToDateTime(dr["applydate"]) == DateTime.MinValue ? "" : Convert.ToDateTime(dr["applydate"]).ToThaiShortDate(), university = dr["university"].ToString(), position_name = dr["position_name"].ToString(), hddPosition = dr["hddPosition"].ToString(),