UI fejlesztése
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user