หนังสือเวียน set noti ทุกอัน

This commit is contained in:
Kittapath 2023-09-12 23:17:25 +07:00
parent 0da46a261d
commit b1afd72503
2 changed files with 35 additions and 35 deletions

View file

@ -414,44 +414,44 @@ namespace BMA.EHR.Placement.Service.Controllers
uppdated.Prefix = save;
}
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.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.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.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;
}
// if (req.GenderId != null)
// {
// var save = await _context.Genders.FindAsync(req.GenderId);
// if (save == null)
// return Error(GlobalMessages.GenderNotFound, 404);
// uppdated.Gender = save;
// }
uppdated.CitizenId = req.CitizenId;
uppdated.Firstname = req.Firstname;
uppdated.Lastname = req.Lastname;
uppdated.DateOfBirth = req.DateOfBirth;
uppdated.Nationality = req.Nationality;
uppdated.Race = req.Race;
uppdated.TelephoneNumber = req.TelephoneNumber;
// uppdated.DateOfBirth = req.DateOfBirth;
// uppdated.Nationality = req.Nationality;
// uppdated.Race = req.Race;
// uppdated.TelephoneNumber = req.TelephoneNumber;
uppdated.EducationOld = req.EducationOld;
uppdated.Reason = req.Reason;
uppdated.OrganizationPositionOld = req.OrganizationPositionOld;