function agregarProducto(ProductosDTO $productoDTO, PDO $cnn)
 {
     try {
         $sentencia = $cnn->prepare("INSERT INTO productos VALUES(?,?,?,?,?,?,?)");
         $sentencia->bindParam(1, $productoDTO->getIdProducto());
         $sentencia->bindParam(2, $productoDTO->getNombre());
         $sentencia->bindParam(3, $productoDTO->getImagen());
         $sentencia->bindParam(4, $productoDTO->getDescripción());
         $sentencia->bindParam(5, $productoDTO->getEstado());
         $sentencia->bindParam(6, $productoDTO->getPorcentaje());
         $sentencia->bindParam(7, $productoDTO->getIva());
         $sentencia->execute();
         $mensaje = "Producto Registrado con Éxito";
     } catch (Exception $ex) {
         $mensaje = $ex->getMessage();
     }
     $cnn = NULL;
     return $mensaje;
 }
        ?>
 
                               </td>       

                            </tr>
                        
                            <?php 
    }
}
?>
    
                    </table>
                    
                    <?php 
$consecutivo = $facadeProductos->consecutivoProducto();
$estado = $pDTO->getEstado();
?>
            </div>
            </div>
            <div id="panelIzq">
            <div style="text-align:right;font-weight:bold;padding-right:10px">
                <form method="post" action="../controlador/ControladorProductos.php" enctype="multipart/form-data">
                    <label  class="obligatoriosD">Cargue un archivo con sus Productos : </label>
                    <a id="loadArchivo" href="javascript:function()"><img src="../img/subirDatos.png" alt=""></a>   
        <a href="#ModalPregunta" ><img src="../img/question.png" class="iconos" alt="Ayuda"></a>
                    <input type="hidden" name="Change" value="1">  
          <input type="file" id="ArchivoProductos" class="file" name="archivo" onchange="submit();" style="display:none">                 
            </form></div><hr>            
            <script type="text/javascript">
            //bind click
            $('#loadArchivo').click(function(event) {