return false si hay error en ObtenerFichajes
Si hay error al leer fichajes que devuelva FALSE (para que no se borren los fichajes)
This commit is contained in:
parent
3901973729
commit
ac73b8c309
|
@ -110,6 +110,7 @@ namespace LectorVerdnatura
|
|||
int RowsAffected = db.ejecutarsql(SqlInsert);
|
||||
if (RowsAffected == 0) { // = 0 pero sin error de ya existe puede ser que no existe el NIS
|
||||
throw new Exception("Error: Ejecucion SQL no ha insertado datos. ¿No existe NIS: " + sdwEnrollNumber + " ?");
|
||||
retorno = false;
|
||||
}
|
||||
}
|
||||
catch (OdbcException ex) when (ex.Errors[0].NativeError == 1062)
|
||||
|
@ -123,6 +124,7 @@ namespace LectorVerdnatura
|
|||
{
|
||||
logevent.logeventwritefile("error al ejecutar " + SqlInsert);
|
||||
logevent.logeventwritefile("Error: " + ex.ToString());
|
||||
retorno = false;
|
||||
}
|
||||
logevent.logeventwritefile(nuevoregistro);
|
||||
|
||||
|
@ -138,6 +140,7 @@ namespace LectorVerdnatura
|
|||
clector.GetLastError(ref idwErrorCode);
|
||||
if (idwErrorCode != 0)
|
||||
logevent.logeventwritefile("ErrorCode: " + idwErrorCode.ToString());
|
||||
retorno = false;
|
||||
else
|
||||
logevent.logeventwritefile("El terminal " + Lipaddr + " no devuelve registros!");
|
||||
}
|
||||
|
|
Reference in New Issue