fix error fecha
This commit is contained in:
parent
30ebaed959
commit
6335ff42e0
3 changed files with 23 additions and 22 deletions
|
@ -23,22 +23,19 @@ namespace DAL
|
|||
return resultado.ToList();
|
||||
}
|
||||
|
||||
public async Task<bool> GuardarMedicionesEnviadasAsync(List<int> medicionesGuardadas)
|
||||
public async Task<bool> GuardarMedicionesEnviadaAsync(int idMedicion)
|
||||
{
|
||||
await using var connection = new SqlConnection(BdConexion.StringConnection);
|
||||
try
|
||||
{
|
||||
var query = @"UPDATE DGA_DATOS SET ENVIADO = 1 WHERE ID IN @Ids";
|
||||
|
||||
await connection.ExecuteAsync(query, new { Ids = medicionesGuardadas });
|
||||
var query = @"UPDATE DGA_DATOS SET ENVIADO = 1 WHERE ID = @Id";
|
||||
await connection.ExecuteAsync(query, new { Id = idMedicion });
|
||||
return true;
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
|
||||
throw new Exception($"Error {ex.Message}");
|
||||
throw new Exception($"Error al actualizar medición ID {idMedicion}: {ex.Message}");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public async Task<int> ObtenerTotalMediciones(DateTime fechaInicio)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue