errores menores

This commit is contained in:
carlos
2024-01-29 22:16:00 -06:00
parent b0ed85d947
commit 50722c2234
9 changed files with 20 additions and 2 deletions
+17
View File
@@ -51,6 +51,7 @@ namespace compabetov2
private void llenarLayout()
{
flowLayoutPanel3.Controls.Clear();
foreach (Producto producto in productos)
{
@@ -429,6 +430,8 @@ namespace compabetov2
if (service.crearVentaDAO(ventaModel, detalleVentas))
{
MessageBox.Show("Venta hecha");
eliminarProductosTocket();
llenarLayout();
}
}
else
@@ -614,6 +617,8 @@ namespace compabetov2
if (service.crearCuenta(ventaModel, detallesCuenta))
{
MessageBox.Show("Fiado");
eliminarProductosTocket();
llenarLayout();
}
}
else
@@ -725,6 +730,8 @@ namespace compabetov2
if (service.crearEnvio(envio, detallesEnvio))
{
MessageBox.Show("Envio hecho");
eliminarProductosTocket();
llenarLayout();
}
else
{
@@ -733,5 +740,15 @@ namespace compabetov2
}
}
private void eliminarProductosTocket()
{
for (int i = flowLayoutPanel2.Controls.Count -1; i > 2; i--)
{
Control c = flowLayoutPanel2.Controls[i];
c.Dispose();
flowLayoutPanel1.Controls.Remove(c);
}
label1.Text = "Total: 0";
}
}
}