errores menores
This commit is contained in:
Generated
+1
-1
@@ -335,7 +335,7 @@
|
|||||||
//
|
//
|
||||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||||
this.ClientSize = new System.Drawing.Size(1300, 627);
|
this.ClientSize = new System.Drawing.Size(1370, 627);
|
||||||
this.ControlBox = false;
|
this.ControlBox = false;
|
||||||
this.Controls.Add(this.btnEnviar);
|
this.Controls.Add(this.btnEnviar);
|
||||||
this.Controls.Add(this.btnFiar);
|
this.Controls.Add(this.btnFiar);
|
||||||
|
|||||||
@@ -51,6 +51,7 @@ namespace compabetov2
|
|||||||
|
|
||||||
private void llenarLayout()
|
private void llenarLayout()
|
||||||
{
|
{
|
||||||
|
flowLayoutPanel3.Controls.Clear();
|
||||||
foreach (Producto producto in productos)
|
foreach (Producto producto in productos)
|
||||||
{
|
{
|
||||||
|
|
||||||
@@ -429,6 +430,8 @@ namespace compabetov2
|
|||||||
if (service.crearVentaDAO(ventaModel, detalleVentas))
|
if (service.crearVentaDAO(ventaModel, detalleVentas))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Venta hecha");
|
MessageBox.Show("Venta hecha");
|
||||||
|
eliminarProductosTocket();
|
||||||
|
llenarLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -614,6 +617,8 @@ namespace compabetov2
|
|||||||
if (service.crearCuenta(ventaModel, detallesCuenta))
|
if (service.crearCuenta(ventaModel, detallesCuenta))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Fiado");
|
MessageBox.Show("Fiado");
|
||||||
|
eliminarProductosTocket();
|
||||||
|
llenarLayout();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -725,6 +730,8 @@ namespace compabetov2
|
|||||||
if (service.crearEnvio(envio, detallesEnvio))
|
if (service.crearEnvio(envio, detallesEnvio))
|
||||||
{
|
{
|
||||||
MessageBox.Show("Envio hecho");
|
MessageBox.Show("Envio hecho");
|
||||||
|
eliminarProductosTocket();
|
||||||
|
llenarLayout();
|
||||||
}
|
}
|
||||||
else
|
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";
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
+2
-1
@@ -1431,7 +1431,7 @@ namespace compabetov2.database
|
|||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
string sqlVenta = "INSERT INTO venta (fecha, total) VALUES(@fecha, @total);";
|
string sqlVenta = "INSERT INTO venta (fecha, total,responzable) VALUES(@fecha, @total,@responzable);";
|
||||||
string sqlDetalle = "INSERT INTO detalle_venta (fk_venta, fk_producto, cantidad) VALUES(@idVenta, @idProducto, @cantidada);";
|
string sqlDetalle = "INSERT INTO detalle_venta (fk_venta, fk_producto, cantidad) VALUES(@idVenta, @idProducto, @cantidada);";
|
||||||
string sqlEnvio = "UPDATE envios SET estado ='CONCLUIDO' WHERE idEnvios = @idEnvios;";
|
string sqlEnvio = "UPDATE envios SET estado ='CONCLUIDO' WHERE idEnvios = @idEnvios;";
|
||||||
string sqlIdVenta = "SELECT idVenta FROM venta ORDER BY idVenta DESC LIMIT 1";
|
string sqlIdVenta = "SELECT idVenta FROM venta ORDER BY idVenta DESC LIMIT 1";
|
||||||
@@ -1440,6 +1440,7 @@ namespace compabetov2.database
|
|||||||
SQLiteCommand commandVenta = new SQLiteCommand(sqlVenta, conexion);
|
SQLiteCommand commandVenta = new SQLiteCommand(sqlVenta, conexion);
|
||||||
commandVenta.Parameters.AddWithValue("@fecha", DateTime.Now.ToString());
|
commandVenta.Parameters.AddWithValue("@fecha", DateTime.Now.ToString());
|
||||||
commandVenta.Parameters.AddWithValue("@total", envio.total);
|
commandVenta.Parameters.AddWithValue("@total", envio.total);
|
||||||
|
commandVenta.Parameters.AddWithValue("@responzable", envio.responsable);
|
||||||
commandVenta.ExecuteNonQuery();
|
commandVenta.ExecuteNonQuery();
|
||||||
|
|
||||||
SQLiteCommand commandEnvio = new SQLiteCommand(sqlEnvio, conexion);
|
SQLiteCommand commandEnvio = new SQLiteCommand(sqlEnvio, conexion);
|
||||||
|
|||||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Reference in New Issue
Block a user