Esempio n. 1
0
 /**
  * @param OcorrenciaDTO $dto
  * @return bool
  * @throws Exception
  */
 public function gravar(OcorrenciaDTO $dto)
 {
     if ($dto->getCdOcorrencia() == '') {
         if (!($obj = $this->insert($dto))) {
             throw new Exception('Impossível Inserir Ocorrencia');
         }
     } else {
         if (!($obj = $this->update($dto))) {
             throw new Exception('Impossível Atualizar Ocorrencia');
         }
     }
     return $obj;
 }
Esempio n. 2
0
 public function getPessoasEnvolvidas(OcorrenciaPessoaFisicaEnvolvidaModel $pessoas)
 {
     return $pessoas->getPessoasPorOcorrencia(new PessoaFisicaModel(), $this->dto->getCdOcorrencia());
 }