public function execute() { $config = $this->getConfig(); $hacienda = new haciendaTable($config); $this->objHacienda = $hacienda->getAll(); $this->defineView('hacienda', 'index', 'html'); }
public function execute() { $id = filter_input(INPUT_GET, 'id'); $config = $this->getConfig(); $update = new haciendaTable($config); $resul = $update->getById(1); $this->objHacienda = $resul; $this->defineView('hacienda', 'actualizar', 'html'); }
public function execute() { $config = $this->getConfig(); $hacienda = new haciendaTable($config); $boton = filter_input(INPUT_POST, 'boton'); $resp = $hacienda->filtrar($boton); print_r($resp); echo json_encode($resp); // $this->defineView('hacienda', 'index', 'html'); }
public function execute() { $config = $this->getConfig(); $descripcion = filter_input(INPUT_POST, 'descripcion'); $ubicacion = filter_input(INPUT_POST, 'ubicacion'); $repLegal = filter_input(INPUT_POST, 'RepLegal'); $insertar = new haciendaTable($config); $insertar->setDescripcion($descripcion); $insertar->setUbicacion($ubicacion); $insertar->setRepresentanteLegal($repLegal); $insertar->save(); header('Location: ' . $config->getUrl() . 'index.php/hacienda/index'); }
public function execute() { $desc = filter_input(INPUT_POST, 'descripcion'); $id = filter_input(INPUT_POST, 'id'); $ubicacion = filter_input(INPUT_POST, 'ubicacion'); $repLegal = filter_input(INPUT_POST, 'repLegal'); $config = $this->getConfig(); $update = new haciendaTable($config); $update->setDescripcion($desc); $update->setId($id); $update->setUbicacion($ubicacion); $update->setRepresentanteLegal($repLegal); $update->update(); header('Location: ' . $config->getUrl() . 'index.php/hacienda/index'); }