public function execute() { $config = $this->getConfig(); $tercero = new terceroTable($config); $id = filter_input(INPUT_GET, 'id'); $tercero->setId($id); $tercero->delete(); header('Location: ' . $config->getUrl() . 'index.php/tercero/index'); }
public function execute() { $config = $this->getConfig(); $formtercero = filter_input_array(INPUT_POST)['tercero']; $tercero = new terceroTable($config); $tercero->setId($formtercero['id']); $tercero->setNombre($formtercero['nombre']); $tercero->setApellido($formtercero['apellido']); $tercero->setTelefono($formtercero['telefono']); $tercero->setDireccion($formtercero['direccion']); $tercero->setCorreo($formtercero['correo']); $tercero->setCargoId($formtercero['cargoId']); $tercero->setTipoId($formtercero['tipoId']); $tercero->setTipoTerceroId($formtercero['tipoTerceroId']); $this->objtercero = $tercero->update(); header('Location: ' . $config->getUrl() . 'index.php/tercero/index'); exit; }