Cambio controllo null prima di check virgola/punto

This commit is contained in:
Samuele E. Locatelli
2019-04-12 18:49:46 +02:00
parent 4e221aa8b2
commit 263e2f9bb2
4 changed files with 6 additions and 5 deletions
Binary file not shown.
Binary file not shown.
+4 -3
View File
@@ -293,7 +293,7 @@ namespace SOUR.Core.Services
// SOLO SE ho un valore...
try
{
if (newValues[i].ToString() != "")
if (!newValues[i].IsNull && newValues[i].ToString() != "")
{
// se è numerico --> cambio valori "," --> "."
if ((currItem.NodeDataType.IndexOf("Double") >= 0) || (currItem.NodeDataType.IndexOf("Float") >= 0))
@@ -302,10 +302,11 @@ namespace SOUR.Core.Services
}
}
}
catch(Exception exc)
catch (Exception exc)
{
_printer.Print($"***** EXCEPTION: float/double fix cycle, newValues.Length = {newValues.Length} | newValues[i] = {newValues[i]} *****");
_printer.Print($"EXCEPTION: float/double fix cycle, newValues.Length = {newValues.Length} | newValues[i] = {newValues[i]} |");
_printer.Print(exc.ToString());
newValues[i] = "0";
}
}
+2 -2
View File
@@ -15,7 +15,7 @@
[assembly: System.Reflection.AssemblyCopyright("Copyright © Steamware 2018+")]
[assembly: System.Reflection.AssemblyTrademark("_")]
[assembly: System.Runtime.InteropServices.ComVisible(false)]
[assembly: System.Reflection.AssemblyVersion("2.1.1904.227")]
[assembly: System.Reflection.AssemblyFileVersion("2.1.1904.227")]
[assembly: System.Reflection.AssemblyVersion("2.1.1904.229")]
[assembly: System.Reflection.AssemblyFileVersion("2.1.1904.229")]