Elvileg jó, meg a mentés is.

This commit is contained in:
2025-07-02 19:38:33 +02:00
parent 7f3562fb73
commit a646258837
6 changed files with 122 additions and 28 deletions
@@ -167,10 +167,17 @@ namespace WorkFlowCheck.MAUI.Services
.Where(w => w.Id == checkListRowDTO.Id).FirstOrDefaultAsync();
if (checkListRow != null)
{
checkListRow.Answer = checkListRowDTO.Answer;
if (checkListRow.Answer != checkListRowDTO.Answer)
{
checkListRow.Answer = checkListRowDTO.Answer;
}
if (checkListRowDTO.Photo != null && checkListRowDTO.Photo.Length > 0 && withPhoto)
{
checkListRow.Photo = checkListRowDTO.Photo;
if (!checkListRow.Photo.SequenceEqual(checkListRowDTO.Photo ?? Array.Empty<byte>()))
{
checkListRow.Photo = checkListRowDTO.Photo ?? Array.Empty<byte>();
}
}
await _dbContext.SaveChangesAsync();
}