bajar cambios
This commit is contained in:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user