agrega cliente cuenta
This commit is contained in:
+2
-1
@@ -942,7 +942,7 @@ namespace compabetov2.database
|
||||
{
|
||||
try
|
||||
{
|
||||
string sqlCuenta = "INSERT INTO cuenta (total, fecha, estado, descripcion,cliente) VALUES(@total, @fecha, 'ACTIVO', @descripcion,'');";
|
||||
string sqlCuenta = "INSERT INTO cuenta (total, fecha, estado, descripcion,cliente) VALUES(@total, @fecha, 'ACTIVO', @descripcion,@cliente);";
|
||||
string sqlDetalle = "INSERT INTO detalle_cuenta (fk_cuenta, fk_producto, cantidad) VALUES(@fk_cuenta, @fk_producto, @cantidad);";
|
||||
string sqlIdCuenta = "SELECT idCuenta FROM cuenta ORDER BY idCuenta DESC LIMIT 1";
|
||||
string sqlProductoStock = "SELECT stock FROM Producto WHERE idproducto = @idproducto";
|
||||
@@ -952,6 +952,7 @@ namespace compabetov2.database
|
||||
commandCuenta.Parameters.AddWithValue("@fecha", DateTime.Now.ToString());
|
||||
commandCuenta.Parameters.AddWithValue("@total", cuenta.total);
|
||||
commandCuenta.Parameters.AddWithValue("@descripcion", cuenta.descripcion);
|
||||
commandCuenta.Parameters.AddWithValue("@cliente", cuenta.cliente);
|
||||
commandCuenta.ExecuteNonQuery();
|
||||
|
||||
SQLiteCommand commandConsulta = new SQLiteCommand(sqlIdCuenta, conexion);
|
||||
|
||||
Reference in New Issue
Block a user