public function modificarGestion(GestionDto $gestionDto, PDO $cnn, $idGestion) { try { $query = $cnn->prepare("CALL modificarGestion (?,?,?,?,?,?,?,?,?,?)"); $query->bindParam(1, $gestionDto->getIdUsuario()); $query->bindParam(2, $gestionDto->getIdCliente()); $query->bindParam(3, $gestionDto->getEstado()); $query->bindParam(4, $gestionDto->getTemaProducto()); $query->bindParam(5, $gestionDto->getAsistentes()); $query->bindParam(6, $gestionDto->getObservaciones()); $query->bindParam(7, $gestionDto->getLugar()); $query->bindParam(8, $gestionDto->getFechaVisita()); $query->bindParam(9, $gestionDto->getTipoVisita()); $query->bindParam(10, $idGestion); $query->execute(); $this->mensaje = "Registro Actualizado"; } catch (Exception $ex) { $this->mensaje = $ex->getMessage(); } $cnn = null; return $this->mensaje; }
public function modificarGestion(GestionDto $gestionDto, PDO $cnn, $idGestion) { try { $query = $cnn->prepare("UPDATE Gestiones SET IdUsuario=1022,IdEmpresa=?,Estado=?,Asunto=?,Asistentes=?,Observaciones=?,Lugar=?,FechaProgramada=?,Tipo=? where IdGestion=?"); //$query->bindParam(1, $gestionDto->getIdUsuario()); $query->bindParam(1, $gestionDto->getIdCliente()); $query->bindParam(2, $gestionDto->getEstado()); $query->bindParam(3, $gestionDto->getTemaProducto()); $query->bindParam(4, $gestionDto->getAsistentes()); $query->bindParam(5, $gestionDto->getObservaciones()); $query->bindParam(6, $gestionDto->getLugar()); $query->bindParam(7, $gestionDto->getFechaVisita()); $query->bindParam(8, $gestionDto->getTipoVisita()); $query->bindParam(9, $idGestion); $query->execute(); $this->mensaje = "Registro Actualizado"; } catch (Exception $ex) { $this->mensaje = $ex->getMessage(); } $cnn = null; return $this->mensaje; }
} if (isset($_GET['idproducto'])) { $mensaje = $fachada->cancelarGestion($_GET['idproducto']); header("Location: ../views/listarGestion.php?mensaje=" . $mensaje); } if (isset($_POST['reload'])) { foreach ($fachada->obtenerEmpresasById($_POST['reload']) as $iterator) { print $iterator['RazonSocial']; } } if (isset($_POST['detail'])) { $rows = $fachada->completeGestion($_POST['detail']); echo json_encode($rows); } if (isset($_POST['modificar'])) { $gestion = new GestionDto(); $idviejo = $_GET['idv']; $gestion->setIdCliente($_POST['idCliente']); $gestion->setTipoVisita($_POST['tipoVisita']); if ($_POST['tipoVisita'] == 'CAPACITACION') { $gestion->setTemaProducto($_POST['temaproducto']); } else { $gestion->setTemaProducto($_POST['tema']); } $gestion->setAsistentes($_POST['asistentes']); $gestion->setObservaciones($_POST['observaciones']); $gestion->setAsunto($_POST['temaproducto']); $gestion->setLugar($_POST['lugar']); $gestion->setFechaVisita($_POST['fechaVisita']); $gestion->setEstado($_POST['estado']); $gestion->setIdUsuario($_SESSION['datosLogin']['id']);
<?php require_once '../models/CotizacionesDAO.php'; require_once '../models/CotizacionesDTO.php'; require_once '../facades/facadeCotizacion.php'; require_once '../utilities/Conexion.php'; $fachada = new FacadeGestion(); if (isset($_POST['idcliente'])) { $gestion = new GestionDto(); $gestion->setIdCliente($_POST['idcliente']); $gestion->setTipoVisita($_POST['tipoVisita']); $gestion->setTemaProducto($_POST['tema']); $gestion->setAsistentes($_POST['asistentes']); $gestion->setObservaciones($_POST['observaciones']); $gestion->setLugar($_POST['lugar']); $gestion->setFechaVisita($_POST['fechaVisita']); $mensaje = $fachada->registrarGestion($gestion); header("Location: ../views/gestion.php?mensaje=" . $mensaje); } if (isset($_GET['idproducto'])) { $fachada->cancelarProducto($_GET['idproducto']); echo 'borre'; }