Exemplo n.º 1
0
 public function execute()
 {
     $config = $this->getConfig();
     $id = filter_input(INPUT_GET, 'id');
     $cargo = new cargoTable($config);
     $this->objcargo = $cargo->getById($id);
     $this->defineView('cargo', 'editarView', 'html');
 }
 public function execute()
 {
     $config = $this->getConfig();
     $cargo = new cargoTable($config);
     $this->objCargo = $cargo->getAll();
     // así declaramos la vista a usar
     $this->defineView('cargo', 'index', 'html');
 }
Exemplo n.º 3
0
 public function execute()
 {
     $config = $this->getConfig();
     $cargo = new cargoTable($config);
     $id = filter_input(INPUT_GET, 'id');
     $cargo->setId($id);
     $cargo->delete();
     header('Location: ' . $config->getUrl() . 'index.php/cargo/index');
 }
Exemplo n.º 4
0
 public function execute()
 {
     $config = $this->getConfig();
     $formcargo = filter_input_array(INPUT_POST)['cargo'];
     $cargo = new cargoTable($config);
     $cargo->setDescripcion($formcargo['descripcion']);
     $this->objcargo = $cargo->save();
     header('Location: ' . $config->getUrl() . 'index.php/cargo/index');
     exit;
 }
Exemplo n.º 5
0
 public function execute()
 {
     $config = $this->getConfig();
     $cargo = new cargoTable($config);
     $this->objcargo = $cargo->getAll();
     $tipoId = new tipoIdTable($config);
     $this->objTipoId = $tipoId->getAll();
     $tipoTercero = new tipoTerceroTable($config);
     $this->objTipoTercero = $tipoTercero->getAll();
     $this->defineView('tercero', 'nuevoView', 'html');
 }
Exemplo n.º 6
0
 public function execute()
 {
     $config = $this->getConfig();
     $cargo = new cargoTable($config);
     $this->objcargo = $cargo->getAll();
     $tipoId = new tipoIdTable($config);
     $this->objTipoId = $tipoId->getAll();
     $tipoTercero = new tipoTerceroTable($config);
     $this->objTipoTercero = $tipoTercero->getAll();
     $id = filter_input(INPUT_GET, 'id');
     $tercero = new terceroTable($config);
     $this->objtercero = $tercero->getById($id);
     $this->defineView('tercero', 'verView', 'html');
 }
Exemplo n.º 7
0
 public function execute()
 {
     $config = $this->getConfig();
     $cargo = new cargoTable($config);
     $this->objcargo = $cargo->getAll();
     $tipoId = new tipoIdTable($config);
     $this->objTipoId = $tipoId->getAll();
     $tipoTercero = new tipoTerceroTable($config);
     $this->objTipoTercero = $tipoTercero->getAll();
     $id = filter_input(INPUT_GET, 'id');
     $tercero = new terceroTable($config);
     $this->objtercero = $tercero->getById($id);
     //    $variables = array (
     //        'objPersona'=>$objPersona
     //    );
     $this->defineView('tercero', 'editarView', 'html');
 }
Exemplo n.º 8
0
 public function execute()
 {
     $config = $this->getConfig();
     $metodo = new cargoTable($config);
     $paginacion = new Zebra_Pagination();
     $this->objRespuesta = $metodo->total();
     $respuesta = $this->objRespuesta[0];
     $resultado = 5;
     $pagina = ($paginacion->get_page() - 1) * $resultado;
     $indicio = filter_input(INPUT_POST, 'filtro');
     if (empty($indicio)) {
         $this->objMetodo = $metodo->pager($resultado, $pagina);
     } else {
         $this->objFiltro = $metodo->filtro($indicio);
         $this->objMetodo = $this->objFiltro;
     }
     $this->defineView('cargo', 'index', 'html');
 }