no message

This commit is contained in:
Kittapath 2024-05-23 17:07:55 +07:00
parent 63b02dcc4c
commit afe16503ee
17 changed files with 36169 additions and 139 deletions

View file

@ -197,12 +197,12 @@ namespace BMA.EHR.Placement.Service.Controllers
p.firstName,
p.lastName,
p.DateOfBirth,
Gender = p.Gender == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Gender.Id,
Gender = p.Gender,
p.Nationality,
p.Race,
Religion = p.Religion == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Religion.Id,
BloodGroup = p.BloodGroup == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.BloodGroup.Id,
Relationship = p.Relationship == null ? Guid.Parse("00000000-0000-0000-0000-000000000000") : p.Relationship.Id,
Religion = p.Religion,
BloodGroup = p.BloodGroup,
Relationship = p.Relationship,
p.TelephoneNumber,
p.Status,
p.Amount,
@ -389,12 +389,12 @@ namespace BMA.EHR.Placement.Service.Controllers
firstName = req.firstName,
lastName = req.lastName,
DateOfBirth = req.BirthDate,
Gender = await _context.Genders.FindAsync(req.GenderId),
Gender = req.Gender,
Nationality = req.Nationality,
Race = req.Race,
Religion = await _context.Religions.FindAsync(req.ReligionId),
BloodGroup = await _context.BloodGroups.FindAsync(req.BloodGroupId),
Relationship = await _context.Relationships.FindAsync(req.RelationshipId),
Religion = req.Religion,
BloodGroup = req.BloodGroup,
Relationship = req.Relationship,
TelephoneNumber = req.TelephoneNumber,
Status = "WAITTING",
CreatedFullName = FullName ?? "System Administrator",
@ -700,37 +700,10 @@ namespace BMA.EHR.Placement.Service.Controllers
return Error("ข้อมูลรหัสบัตรประจำตัวประชาชนไม่ถูกต้อง", 500);
}
if (req.RelationshipId != null)
{
var save = await _context.Relationships.FindAsync(req.RelationshipId);
if (save == null)
return Error(GlobalMessages.RelationshipNotFound, 404);
uppdated.Relationship = save;
}
if (req.ReligionId != null)
{
var save = await _context.Religions.FindAsync(req.ReligionId);
if (save == null)
return Error(GlobalMessages.ReligionNotFound, 404);
uppdated.Religion = save;
}
if (req.BloodGroupId != null)
{
var save = await _context.BloodGroups.FindAsync(req.BloodGroupId);
if (save == null)
return Error(GlobalMessages.BloodGroupNotFound, 404);
uppdated.BloodGroup = save;
}
if (req.GenderId != null)
{
var save = await _context.Genders.FindAsync(req.GenderId);
if (save == null)
return Error(GlobalMessages.GenderNotFound, 404);
uppdated.Gender = save;
}
uppdated.Relationship = req.Relationship;
uppdated.Religion = req.Religion;
uppdated.BloodGroup = req.BloodGroup;
uppdated.Gender = req.Gender;
uppdated.citizenId = req.citizenId;
uppdated.prefix = req.prefix;
uppdated.firstName = req.firstName;