Пример #1
0
 protected function delete()
 {
     $id = $this->getRequest()->id;
     if ($this->canDelete()) {
         $aluno = new clsPmieducarAluno();
         $aluno->cod_aluno = $id;
         $aluno->ref_usuario_exc = $this->getSession()->id_pessoa;
         if ($aluno->excluir()) {
             $this->messenger->append('Cadastro removido com sucesso', 'success', false, 'error');
         } else {
             $this->messenger->append('Aparentemente o cadastro não pode ser removido, por favor, verifique.', 'error', false, 'error');
         }
     }
     return array('id' => $id);
 }
Пример #2
0
 function Excluir()
 {
     session_start();
     $this->pessoa_logada = $_SESSION['id_pessoa'];
     session_write_close();
     $obj = new clsPmieducarAluno($this->cod_aluno, $this->ref_cod_aluno_beneficio, $this->ref_cod_religiao, $this->pessoa_logada, $this->pessoa_logada, $this->ref_idpes, $this->data_cadastro, $this->data_exclusao, 0);
     $excluiu = $obj->excluir();
     if ($excluiu) {
         $this->mensagem .= "Exclus&atilde;o efetuada com sucesso.<br>";
         header("Location: educar_aluno_lst.php");
         die;
     }
     $this->mensagem = "Exclus&atilde;o n&atilde;o realizada.<br>";
     echo "<!--\nErro ao excluir clsPmieducarAluno\nvalores obrigatorios\nif( is_numeric( {$this->cod_aluno} ) && is_numeric( {$this->ref_usuario_exc} ) )\n-->";
     return false;
 }