BUGFIX
This commit is contained in:
@@ -426,12 +426,14 @@ namespace WorkFlowCheck.BL.Services
|
||||
row.Answer = dtoRow.Answer;
|
||||
if (dtoRow.Photo != null && dtoRow.Photo.Length > 0)
|
||||
{
|
||||
|
||||
string imageDirectory = Path.Combine(Directory.GetCurrentDirectory(), "Images");
|
||||
var timestamp = DateTime.Now.ToString("yyyyMMdd_HHmmss");
|
||||
var fileName = $"PH_{timestamp}_{row.CheckListHeaderId}_{row.Id}.jpeg";
|
||||
row.PhotoFileName = fileName;
|
||||
var filePath = Path.Combine(imageDirectory, fileName);
|
||||
await File.WriteAllBytesAsync(filePath, dtoRow.Photo);
|
||||
row.Answer = fileName;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -480,16 +482,7 @@ namespace WorkFlowCheck.BL.Services
|
||||
retVal = true;
|
||||
break;
|
||||
}
|
||||
if (row.CheckListTemplateRowDTO.AnswerType == "SI-N" && row.Answer == "Igen")
|
||||
{
|
||||
retVal = true;
|
||||
break;
|
||||
}
|
||||
if (row.CheckListTemplateRowDTO.AnswerType == "I-SN" && row.Answer == "Nem")
|
||||
{
|
||||
retVal = true;
|
||||
break;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -501,18 +494,18 @@ namespace WorkFlowCheck.BL.Services
|
||||
{
|
||||
var retVal = false;
|
||||
|
||||
if (checkListHeaderDTO !=null && checkListHeaderDTO.CheckListRowDTO !=null && checkListHeaderDTO.CheckListRowDTO.Count > 0)
|
||||
if (checkListHeaderDTO != null && checkListHeaderDTO.CheckListRowDTO != null && checkListHeaderDTO.CheckListRowDTO.Count > 0)
|
||||
{
|
||||
var totalRowCount = checkListHeaderDTO.CheckListRowDTO.Where(w => w.CheckListTemplateRowDTO.AnswerType != "PN" &&
|
||||
w.CheckListTemplateRowDTO.CheckPointDTO.IsEnabled == true).Count();
|
||||
|
||||
var answeredCount = checkListHeaderDTO.CheckListRowDTO.Where(w => w.CheckListTemplateRowDTO.AnswerType != "PN" &&
|
||||
w.CheckListTemplateRowDTO.CheckPointDTO.IsEnabled == true &&
|
||||
string.IsNullOrEmpty(w.Answer) != false).Count();
|
||||
string.IsNullOrEmpty(w.Answer) != true).Count();
|
||||
|
||||
if (totalRowCount != answeredCount) { retVal = true; }
|
||||
if (totalRowCount == answeredCount) { retVal = true; }
|
||||
}
|
||||
|
||||
|
||||
|
||||
return retVal;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user