Beispiel #1
0
 public function editar($conds = null)
 {
     $data = array('descricao' => $this->temperos->getDescricao());
     try {
         $this->database->update($this->tabela, $conds, $data);
         return true;
     } catch (\Simplon\Mysql\MysqlException $ex) {
         \Delivery\Utils\Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
Beispiel #2
0
 public function editar($conds = null)
 {
     $data = array('descricao' => $this->prato->getDescricao(), 'nome' => $this->prato->getNome(), 'tipo_prato_id' => $this->prato->getTipo_prato_id(), 'tamanho_prato_id' => $this->prato->getTamanho_prato_id(), 'preco' => $this->prato->getPreco(), 'imagem_prato_id' => $this->prato->getImagem_prato_id(), 'status_prato_id' => $this->prato->getStatus_prato_id());
     try {
         $this->database->update($this->tabela, $conds, $data);
         return true;
     } catch (\Simplon\Mysql\MysqlException $ex) {
         \Delivery\Utils\Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
Beispiel #3
0
 public function editar($conds)
 {
     $data = array('bairro' => $this->pessoa->getBairro(), 'cidade_id' => $this->pessoa->getCidade_id(), 'nome' => $this->pessoa->getNome(), 'idade' => $this->pessoa->getIdade(), 'data_nascimento' => $this->pessoa->getData_nascimento(), 'cpf' => $this->pessoa->getCpf(), 'rg' => $this->pessoa->getRg(), 'nome_mae' => $this->pessoa->getNome_mae(), 'sexo' => $this->pessoa->getSexo(), 'telefone' => $this->pessoa->getTelefone(), 'celular' => $this->pessoa->getCelular(), 'email' => $this->pessoa->getEmail(), 'endereco' => $this->pessoa->getEndereco());
     try {
         $this->database->update($this->tabela, $conds, $data);
         return true;
     } catch (\Simplon\Mysql\MysqlException $ex) {
         \Delivery\Utils\Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
 public function editar($conds = null)
 {
     $data = array('cardapio_id' => $this->cardapioPrato->getCardapio_id(), 'prato_id' => $this->cardapioPrato->getPrato_id());
     try {
         $this->database->update($this->tabela, $conds, $data);
         return true;
     } catch (\Simplon\Mysql\MysqlException $ex) {
         \Delivery\Utils\Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
Beispiel #5
0
 public function editar($conds = null)
 {
     $data = array('data' => $this->pedido->getData(), 'valor' => $this->pedido->getValor(), 'cliente_id' => $this->pedido->getCliente_id(), 'status_pedido_id' => $this->pedido->getStatus_pedido_id());
     try {
         $this->database->update($this->tabela, $conds, $data);
         return true;
     } catch (\Simplon\Mysql\MysqlException $ex) {
         \Delivery\Utils\Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
Beispiel #6
0
 public function editar($conds = null)
 {
     $data = array('senha' => $this->login->getSenha(), 'usuario' => $this->login->getUsuario(), 'funcionario_id' => $this->login->getFuncionario_id());
     try {
         $this->database->update($this->tabela, $conds, $data);
         return true;
     } catch (MysqlException $ex) {
         Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
Beispiel #7
0
 public function editar($conds = null)
 {
     $data = array('salario' => $this->funcionario->getSalario(), 'data_admissao' => $this->funcionario->getData_admissao(), 'data_desligamento' => $this->funcionario->getData_desligamento(), 'pessoa_id' => $this->funcionario->getPessoa_id());
     $dataLogin = array('usuario' => $this->login->getUsuario(), 'senha' => $this->login->getSenha(), 'funcionario_id' => $this->funcionario->getId());
     $condsLogin = array('funcionario_id' => $conds['id']);
     try {
         $this->database->update($this->tabela, $conds, $data);
         $this->database->update('login', $condsLogin, $dataLogin);
         return true;
     } catch (MysqlException $ex) {
         Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }
Beispiel #8
0
 public function editar($cond)
 {
     $data = array('bairro' => $this->cliente->getBairro(), 'cidade_id' => $this->cliente->getCidade_id(), 'nome' => $this->cliente->getNome(), 'idade' => $this->cliente->getIdade(), 'data_nascimento' => $this->cliente->getData_nascimento(), 'cpf' => $this->cliente->getCpf(), 'rg' => $this->cliente->getRg(), 'nome_mae' => $this->cliente->getNome_mae(), 'sexo' => $this->cliente->getSexo(), 'telefone' => $this->cliente->getTelefone(), 'celular' => $this->cliente->getCelular(), 'email' => $this->cliente->getEmail(), 'endereco' => $this->cliente->getEndereco());
     try {
         if ($id = $this->database->update('pessoa', $cond, $data)) {
             $dadoscliente = array('pessoa_id' => $id, 'senha' => $this->cliente->getSenha());
             //                if ($idCliente = $this->database->update('cliente', $dadoscliente)) {
             //
             //                    return $idCliente;
             //                }
         }
         return true;
     } catch (\Simplon\Mysql\MysqlException $ex) {
         \Delivery\Utils\Utils::displayErrorMessage($ex->getMessage());
         return false;
     }
 }