/** * Método vincularpropostas() * UC 89 - Fluxo FA8 - Vincular Propostas * @access public * @param void * @return void */ public function vincularprojetosAction() { $tbVinculo = new TbVinculo(); $propostas = new PreProjeto(); $whereProjetos['pp.idAgente = ?'] = $this->idAgenteProponente; $whereProjetos['pp.idUsuario <> ?'] = $this->idResponsavel; $whereProjetos['pr.idProjeto IS NOT NULL'] = ''; $listaProjetos = $propostas->buscarPropostaProjetos($whereProjetos); $this->view->projetos = $listaProjetos; //$this->view->responsaveis = $buscaResponsavel; }
public function listarprojetosAction() { $this->_helper->layout->disableLayout(); $propostas = new PreProjeto(); $whereProjetos['pp.idAgente = ?'] = $this->_request->getParam("idProponente"); //$this->idAgente; $whereProjetos['pr.idProjeto IS NOT NULL'] = ''; $listaProjetos = $propostas->buscarPropostaProjetos($whereProjetos); $procuracaoDAO = new Procuracao(); $listacerta = array(); $i = 0; foreach ($listaProjetos as $pj) { $where['p.siProcuracao IN (0,1)'] = ''; $where['vprp.idPreProjeto = ?'] = $pj->idPreProjeto; $buscaProcuracao = $procuracaoDAO->buscarProcuracaoAceita($where); if (count($buscaProcuracao) > 0) { $listacerta[$i]['visualiza'] = 'N'; } else { $listacerta[$i]['visualiza'] = 'S'; } $listacerta[$i]['PRONAC'] = $pj->PRONAC; $listacerta[$i]['NomeProjeto'] = $pj->NomeProjeto; $listacerta[$i]['idProjeto'] = $pj->idProjeto; $listacerta[$i]['idPreProjeto'] = $pj->idPreProjeto; $i++; } $this->view->projetos = $listacerta; //$this->view->projetos = $listaProjetos; }