Ejemplo n.º 1
0
 public function execute()
 {
     $config = $this->getConfig();
     $hacienda = new haciendaTable($config);
     $this->objHacienda = $hacienda->getAll();
     $this->defineView('hacienda', 'index', 'html');
 }
Ejemplo n.º 2
0
 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');
 }
Ejemplo n.º 3
0
 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');
 }
Ejemplo n.º 4
0
 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');
 }
Ejemplo n.º 5
0
 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');
 }