D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso_ant
/
adm
/
app
/
cpgre
/
Controllers
/
Filename :
CarregarResidLancServJs.php
back
Copy
<?php namespace App\cpgre\Controllers; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of CarregarResidLancServServJs * * @copyright (c) year, Carlos Marques - */ class CarregarResidLancServJs { private $Dados; private $PageId; private $TipoResultado; private $PesqResid; private $PesqFilial; public function listar($PageId = null) { $this->TipoResultado = filter_input(INPUT_GET, 'tiporesult'); $this->PageId = (int) $PageId ? $PageId : 1; $botao = ['cad_resid_lanc_serv' => ['menu_controller' => 'cadastrar-resid-lanc-serv', 'menu_metodo' => 'cad-lanc-serv'], 'vis_resid_lanc_serv' => ['menu_controller' => 'ver-resid-lanc-modal', 'menu_metodo' => 'ver-resid-lanc'], 'lis_resid_list_lanc_serv' => ['menu_controller' => 'listar-resid-lanc-serv', 'menu_metodo' => 'listar'], 'del_resid_lanc_serv' => ['menu_controller' => 'apagar-resid-lanc', 'menu_metodo' => 'apagar-resid-lanc']]; $listarBotao = new \App\adms\Models\AdmsBotao(); $this->Dados['botao'] = $listarBotao->valBotao($botao); if (!empty($this->TipoResultado) AND ( $this->TipoResultado == 1)) { $this->PesqResid = filter_input(INPUT_POST, 'palavraPesq'); $this->PesqFilial = filter_input(INPUT_POST, 'pesqfilial'); // echo $this->pesqResidLancServ; $this->pesqResidLancServPriv(); } elseif (!empty($this->TipoResultado) AND ( $this->TipoResultado == 2)) { $this->PesqResid = filter_input(INPUT_POST, 'palavraPesq'); $this->PesqFilial = filter_input(INPUT_POST, 'pesqfilial'); // echo $this->pesqResidLancServ; // print_r($_POST); $this->pesqResidLancServPriv(); } else { $listarMenu = new \App\adms\Models\AdmsMenu(); $this->Dados['menu'] = $listarMenu->itemMenu(); $listarSelect = new \App\cpgre\Models\CpGreListarResidLancServ(); $this->Dados['select'] = $listarSelect->listarCadastrar(); $carregarView = new \App\cpgre\core\ConfigView("cpgre/Views/LancamentoServico/carregarResidLancServJs", $this->Dados); $carregarView->renderizar(); } } private function listarResidLancServPriv() { $listarResidLancServ = new \App\cpgre\Models\CpGreListarResidLancServ(); $this->Dados['listResidLancServ'] = $listarResidLancServ->listarResidLancServ($this->PageId); $this->Dados['paginacao'] = $listarResidLancServ->getResultadoPg(); $carregarView = new \App\cpgre\core\ConfigView("cpgre/Views/LancamentoServico/listarResidLancServJs", $this->Dados); $carregarView->renderizarListar(); } private function pesqResidLancServPriv() { $listarResidLancServ = new \App\cpgre\Models\CpGrePesqResidLancServ(); $this->Dados['listResidLancServ'] = $listarResidLancServ->pesqResidLancServ($this->PesqResid, $this->PesqFilial ); $this->Dados['paginacao'] = $listarResidLancServ->getResultadoPg(); $carregarView = new \App\cpgre\core\ConfigView("cpgre/Views/LancamentoServico/listarResidLancServJs", $this->Dados); $carregarView->renderizarListar(); } }