importe en venta hecho

This commit is contained in:
carlos
2024-06-09 16:55:52 -06:00
parent 91d1661d9a
commit 7569ef0f5a
27 changed files with 987 additions and 74 deletions
+25 -7
View File
@@ -69,11 +69,6 @@ namespace compabetov2.database
{
return DAO.insertarProductoDAO(producto);
}
public static bool insertarCategoriaDAO(Categoria categoria)
{
return DAO.insertarCategoriaDAO(categoria);
}
public static bool insertarCliente(Cliente cliente)
{
@@ -202,9 +197,14 @@ namespace compabetov2.database
return mermas;
}
public static bool crearVentaDAO(VentaModel venta, List<DetalleVentaModel> detalleVentas)
public static bool crearVentaDAO(VentaModel venta, List<DetalleVentaModel> detalleVentas, List<DetalleImporte> importes)
{
return DAO.crearVentaDAO(venta, detalleVentas);
return DAO.crearVentaDAO(venta, detalleVentas,importes);
}
public static bool devolverImporte(List<DetalleImporte> importes)
{
return DAO.devolverImporteDAO(importes);
}
public static bool insertarMerma(Merma merma)
@@ -520,5 +520,23 @@ namespace compabetov2.database
return variantes;
}
public static List<ImporteModel> conseguirImportes()
{
List<ImporteModel> importes = new List<ImporteModel>();
SQLiteDataReader reader = DAO.conseguirImportesDAO();
while (reader.Read())
{
ImporteModel importe = new ImporteModel(
(int)reader.GetInt64(0), //id
reader.GetString(1), //tipo
reader.GetDecimal(2), //precion
reader.GetString(3) //imagen
);
importes.Add(importe);
}
return importes;
}
}
}