Descargo Cambios de CARLOS010224
This commit is contained in:
Generated
+1
-1
@@ -332,7 +332,7 @@
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(8F, 16F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.ClientSize = new System.Drawing.Size(1885, 772);
|
||||
this.ClientSize = new System.Drawing.Size(1370, 627);
|
||||
this.ControlBox = false;
|
||||
this.Controls.Add(this.btnEnviar);
|
||||
this.Controls.Add(this.btnFiar);
|
||||
|
||||
+21
-2
@@ -38,7 +38,7 @@ namespace compabetov2
|
||||
llenarLayout();
|
||||
llenarComBox();
|
||||
this.loginPrincipal = loginPrincipal;
|
||||
}
|
||||
}
|
||||
|
||||
private void llenarComBox()
|
||||
{
|
||||
@@ -51,6 +51,7 @@ namespace compabetov2
|
||||
|
||||
private void llenarLayout()
|
||||
{
|
||||
flowLayoutPanel3.Controls.Clear();
|
||||
foreach (Producto producto in productos)
|
||||
{
|
||||
|
||||
@@ -422,11 +423,15 @@ namespace compabetov2
|
||||
List<DetalleVentaModel> detalleVentas = listaProductosVenta();
|
||||
if (detalleVentas.Count > 0)
|
||||
{
|
||||
VentaModel ventaModel = new VentaModel(total);
|
||||
VentaModel ventaModel = new VentaModel(total,-1,"",
|
||||
responsablecb.Text.Equals("") ? loginPrincipal.usuario : responsablecb.Text
|
||||
);
|
||||
|
||||
if (service.crearVentaDAO(ventaModel, detalleVentas))
|
||||
{
|
||||
MessageBox.Show("Venta hecha");
|
||||
eliminarProductosTocket();
|
||||
llenarLayout();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -612,6 +617,8 @@ namespace compabetov2
|
||||
if (service.crearCuenta(ventaModel, detallesCuenta))
|
||||
{
|
||||
MessageBox.Show("Fiado");
|
||||
eliminarProductosTocket();
|
||||
llenarLayout();
|
||||
}
|
||||
}
|
||||
else
|
||||
@@ -723,6 +730,8 @@ namespace compabetov2
|
||||
if (service.crearEnvio(envio, detallesEnvio))
|
||||
{
|
||||
MessageBox.Show("Envio hecho");
|
||||
eliminarProductosTocket();
|
||||
llenarLayout();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -731,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";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user