diff --git a/MapoDb/DataLayer.cs b/MapoDb/DataLayer.cs index 4366bec8..f4e326ac 100644 --- a/MapoDb/DataLayer.cs +++ b/MapoDb/DataLayer.cs @@ -3622,7 +3622,7 @@ namespace MapoDb gestEmail.geAuth.mandaEmail(mittente, destinatario, oggetto, corpo); fatto = true; } - catch(Exception exc) + catch (Exception exc) { logger.lg.scriviLog($"Eccezione in sendEmail{Environment.NewLine}{exc}", tipoLog.ERROR); } @@ -3679,13 +3679,23 @@ namespace MapoDb foreach (var item in currValues) { // se fosse un valore WRITE e mi ha dato un valore vuoto --> mando un fix x riscrittura - if (item.writable && string.IsNullOrEmpty(item.value)) + if (item.writable && (string.IsNullOrEmpty(item.value) || string.IsNullOrEmpty(item.reqValue))) { - logger.lg.scriviLog($"setCurrObjItems | parametro empty | {item.uid} | reqVal: {item.reqValue}"); - taskType currTask = (taskType)Enum.Parse(typeof(taskType), item.uid); - addCheckTask4Machine(idxMacchina, currTask, item.value); + logger.lg.scriviLog($"setCurrObjItems | parametro empty | {item.uid} | Value: {item.value} | reqVal: {item.reqValue}"); + // se รจ un parametro dei "task principali... + try + { + taskType currTask = (taskType)Enum.Parse(typeof(taskType), item.uid); + string newVal = !string.IsNullOrEmpty(item.reqValue) ? item.reqValue : $"{item.value}"; + addCheckTask4Machine(idxMacchina, currTask, newVal); + } + catch (Exception exc) + { + logger.lg.scriviLog($"Eccezione in setCurrObjItems in fase di riaccodamento{Environment.NewLine}{exc}"); + } } } + answ = true; } return answ; }