UI fejlesztése

This commit is contained in:
2025-03-24 16:47:28 +01:00
parent 29d94c9256
commit 8f38408646
13 changed files with 394 additions and 45 deletions
@@ -220,7 +220,32 @@ namespace WorkFlowCheck.MAUI.Services
_dbContext.CheckListHeaders.AddRange(missingCheckListHeaders);
await _dbContext.SaveChangesAsync();
foreach (var item in missingItems)
{
var checkListHeaderDTO = item as CheckListHeaderDTO;
foreach (var checkListRowDTO in checkListHeaderDTO.CheckListRowDTO)
{
var checkListRow = _dbContext.CheckListRows.Where(w => w.GuidNumber == checkListRowDTO.GuidNumber).FirstOrDefault();
var isAdd = false;
if (checkListRow == null)
{
isAdd = true;
checkListRow = new CheckListRow();
checkListRow.CheckListHeaderId = checkListHeaderDTO.Id;
}
checkListRow.Answer = checkListRowDTO.Answer;
checkListRow.CheckListTemplateRowId = checkListRowDTO.CheckListTemplateRowId;
checkListRow.GuidNumber = checkListRowDTO.GuidNumber;
checkListRow.Photo = checkListRowDTO.Photo;
if (isAdd) _dbContext.CheckListRows.Add(checkListRow);
await _dbContext.SaveChangesAsync();
}
}
}
}
}
catch (Exception ex)