Ejemplo n.º 1
0
 public function apagar(Permissao $objPermissao)
 {
     $v = $this->_getValidacao();
     $v->setRules($objPermissao->getId(), 'required', 'ID');
     $v->validar();
     return $this->_getRepositorio()->alterar($objPermissao);
 }
Ejemplo n.º 2
0
 public function visualizar(Permissao $objPermissao)
 {
     try {
         $this->_stat = $this->_getConn()->prepare('SELECT * FROM tblpermissao WHERE per_id = :per_id AND per_excluido = 0 AND per_status = 1');
         $this->_stat->bindValue(':per_id', $objPermissao->getId(), \PDO::PARAM_INT);
         $this->_stat->execute();
         return $this->_getPermissao($this->_stat->fetch(\PDO::FETCH_ASSOC));
     } catch (\PDOException $e) {
         throw new \model\conexao\Excecao($e->getMessage());
     }
 }