bajar cambios

This commit is contained in:
Carlos Sandoval
2024-06-30 08:28:35 -06:00
parent f04058a7e0
commit dcd64c9880
16 changed files with 6 additions and 8 deletions
+4 -2
View File
@@ -31,12 +31,14 @@ namespace compabetov2.admin
decimal precio = 0;
//valida que se haya colocado alguna imagen
if (!imagePath.Equals("")) {
Producto producto = new Producto(-1, nombre, "", precio, imagePath, 0);
Producto producto = new Producto(-1, nombre, "", precio, Path.GetFileName(imagePath), 0);
if (service.insertarProducto(producto))
{
string destinationFolder = Path.Combine(Application.StartupPath, "Resources");
string destinationFile = Path.Combine(destinationFolder, Path.GetFileName(imagePath));
File.Copy(imagePath, destinationFile, true);
MessageBox.Show($"destinationFile: {destinationFile}");
MessageBox.Show($"destinationFolder: {destinationFolder}");
File.Copy(imagePath, destinationFolder, true);
Close();
ventanaPadre.llenarLayout();