public function deletar(ProdutoMarca $m)
 {
     parent::deletar($m);
     $where = "WHERE " . self::ID . " = '" . $m->getId() . "'";
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataProdutoMarcas . $m->getImagem()->nome . '.' . $m->getImagem()->extensao);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
Beispiel #2
0
 public function deletar(Musica $t)
 {
     parent::deletar($t);
     $where = "WHERE " . self::ID . " = '" . $t->getId() . "'";
     $arquivo = $t->getMusica()->nome . "." . $t->getMusica()->extensao;
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataDiscografia . $arquivo);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
 public function deletar(UploadDownloadArquivo $t)
 {
     parent::deletar($t);
     $where = "WHERE " . self::ID . " = '" . $t->getId() . "'";
     $arquivo = $t->getArquivo()->nome . "." . $t->getArquivo()->extensao;
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataUploadsDownloads . $arquivo);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
Beispiel #4
0
 public function deletar(Slide $t)
 {
     parent::deletar($t);
     $where = "WHERE " . self::ID . " = '" . $t->getId() . "'";
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataSlides . $t->getImagem()->nome . "." . $t->getImagem()->extensao);
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataSlides . $t->getFlash());
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
 public function deletar(ProdutoOpcaoValor $obj)
 {
     $where = "WHERE " . self::ID . " = '" . $obj->getId() . "'";
     $lPOV = new ListaProdutoOpcaoValores();
     $lPOG = new ListaProdutoOpcaoGerados();
     $lPOG->condicoes('', $obj->getId(), ListaProdutoOpcaoGerados::VALOR);
     if ($lPOG->getTotal() == 0) {
         Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataProdutoOpcoes . $m->getImagem()->nome . '.' . $m->getImagem()->extensao);
         $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
         $this->con->deletar(Sistema::$BDPrefixo . $lPOV->getTabela(), "WHERE " . ListProdutoOpcaoValores::OPCAO . " = '" . $obj->getId() . "'");
     } else {
         throw new Exception('Produtos cadastrados com este valor');
     }
 }
Beispiel #6
0
 public function deletar(Idioma $i)
 {
     $where = "WHERE " . self::ID . " = '" . $i->getId() . "'";
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataIdiomas . $i->getImagem()->nome . '.' . $i->getImagem()->extensao);
     $lT = new ListaTraducoes();
     $lT->condicoes('', $i->getId(), ListaTraducoes::IDIOMA);
     while ($t = $lT->listar()) {
         $lT->deletar($t);
         $lT->setParametros(0);
     }
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
 public function deletar(Usuario $u)
 {
     $where = "WHERE " . self::ID . " = '" . $u->getId() . "'";
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataUsuarios . $u->getImagem()->nome . "." . $u->getImagem()->extensao);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
 public function deletar(ProdutoCategoria $pC)
 {
     parent::deletar($pC);
     $where = "WHERE " . self::ID . " = '" . $pC->getId() . "'";
     if ($pC->getSubCategorias()->getTotal() > 0) {
         throw new Exception("Está categoria possui subcategorias, não pode ser removida!");
     }
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataProdutoCategorias . $pC->getImagem()->nome . '.' . $pC->getImagem()->extensao);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
 public function deletar($pes)
 {
     parent::deletar($pes);
     $where = "WHERE id = '" . $pes->getId() . "'";
     while ($end = $pes->getEndereco()->listar()) {
         $pes->getEndereco()->deletar($end);
         $pes->getEndereco()->setParametros(0);
     }
     while ($tel = $pes->getTelefone()->listar()) {
         $pes->getTelefone()->deletar($tel);
         $pes->getTelefone()->setParametros(0);
     }
     while ($email = $pes->getEmail()->listar()) {
         $pes->getEmail()->deletar($email);
         $pes->getEmail()->setParametros(0);
     }
     Arquivos::__DeleteArquivo(Sistema::$caminhoDiretorio . Sistema::$caminhoDataPessoasPerfil . $pes->getFoto()->nome . "." . $pes->getFoto()->extensao);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }
Beispiel #10
0
 public function deletar(Imagem $img)
 {
     $where = "WHERE " . self::ID . " = '" . $img->getId() . "'";
     Arquivos::__DeleteArquivo($this->caminhoEscrita . $img->getImage()->nome . '.' . $img->getImage()->extensao);
     $this->con->deletar(Sistema::$BDPrefixo . $this->tabela, $where);
 }