_20 enero 1:54pm

main
unknown 2 years ago
parent 66aafcd7fd
commit a5f24b26a9
  1. 15
      Controllers/FacturaController.cs
  2. 13
      Repositorio/Repositoriooo.cs
  3. BIN
      bin/Debug/net6.0/MyFirstAPI.dll
  4. BIN
      bin/Debug/net6.0/MyFirstAPI.pdb
  5. BIN
      obj/Debug/net6.0/MyFirstAPI.dll
  6. BIN
      obj/Debug/net6.0/MyFirstAPI.pdb
  7. BIN
      obj/Debug/net6.0/ref/MyFirstAPI.dll
  8. BIN
      obj/Debug/net6.0/refint/MyFirstAPI.dll

@ -35,7 +35,7 @@ namespace MyFirstAPI.Controllers
public async Task<IActionResult> Create(Factura fac)
{
await repositoriooo.CreateF(fac);
await repositoriooo.CreateF (fac);
return Ok();
}
@ -51,8 +51,19 @@ namespace MyFirstAPI.Controllers
}
// Elimar datos de la tabla factura
[HttpDelete]
[ProducesResponseType(StatusCodes.Status200OK)]
[ProducesResponseType(StatusCodes.Status400BadRequest)]
public async Task<IActionResult> deleleteF (int idff)
{
await repositoriooo.DeleteF(idff);
return Ok();
}
}

@ -145,7 +145,7 @@ namespace MyFirstAPI.Repositorio
{
var detalles = await connection.ExecuteAsync(ProcedimientoAlmacenadoDelete ,
new { ArticuloNumber = id },
new { ArticuloNumber = id },
commandType: CommandType.StoredProcedure);
@ -154,6 +154,17 @@ namespace MyFirstAPI.Repositorio
}
// metodo para eliminar facturas
public async Task DeleteF (int Idff)
{
var procedimientoAlmacenadoDeleteF = "SpEliminarFactura";
using (var connention = new SqlConnection(cn.CadenaSQL()))
{
var factura = await connention.ExecuteAsync(procedimientoAlmacenadoDeleteF,
new { Idf = Idff }, commandType: CommandType.StoredProcedure);
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.
Loading…
Cancel
Save