예제 #1
0
 public function alterar(Patrimonio $obj)
 {
     $strSQL = "UPDATE PAT_PTM_PATRIMONIOS SET ";
     $strSQL .= " TIP_ID=" . $obj->getTipoPatrimonio()->getId() . ", ";
     $strSQL .= " FRA_ID=" . $obj->getFormaAquisicao()->getId() . ", ";
     $strSQL .= " USU_Alteracao_ID=" . $obj->getUsuarioAlteracao()->getId() . ", ";
     $strSQL .= " IPT_ID = " . $obj->getItemPatrimonio()->getId() . ", ";
     $strSQL .= " UNI_Localizacao_ID=" . $obj->getCongregacao()->getId() . ", ";
     $strSQL .= " PTM_DataAquisicao='" . $obj->getDataAquisicao() . "', ";
     $strSQL .= " PTM_DataHoraAlteracao='" . date("Y-m-d H:m:s") . "', ";
     $strSQL .= " PTM_DataExpiracaoGarantia='" . $obj->getDataExpiracaoGarantia() . "', ";
     $strSQL .= " PTM_Observacao='" . $obj->getObservacao() . "', ";
     $strSQL .= " PTM_Condicao='" . $obj->getCondicao() . "', ";
     $strSQL .= " PTM_ValorEstimado=" . $obj->getValorEstimado() . ", ";
     $strSQL .= " PTM_Descricao='" . $obj->getDescricao() . "', ";
     $strSQL .= " PTM_Quantidade=" . $obj->getQuantidade() . ", ";
     $strSQL .= " PTM_Foto='" . $obj->getFoto() . "', ";
     $strSQL .= " PTM_Fabricante='" . $obj->getFabricante() . "', ";
     $strSQL .= " FOR_ID=" . $obj->getFornecedor()->getId() . ", ";
     $strSQL .= " PTM_NumeroDocumento= '" . $obj->getNumeroDocumento() . "' ";
     $strSQL .= " WHERE PTM_ID = " . $obj->getId();
     //echo $strSQL;
     return Db::getInstance()->executar($strSQL);
 }