本文整理汇总了PHP中DAOFactory::getFacturaReservaDAO方法的典型用法代码示例。如果您正苦于以下问题:PHP DAOFactory::getFacturaReservaDAO方法的具体用法?PHP DAOFactory::getFacturaReservaDAO怎么用?PHP DAOFactory::getFacturaReservaDAO使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类DAOFactory
的用法示例。
在下文中一共展示了DAOFactory::getFacturaReservaDAO方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: deleteReserva
function deleteReserva($idReserva, $inTransaction = true)
{
try {
if ($inTransaction) {
$transaction = new Transaction();
}
DAOFactory::getReservaProductoDAO()->deleteByReservaId($idReserva);
DAOFactory::getReservaPagoDAO()->deleteByReservaId($idReserva);
$facturas = DAOFactory::getFacturaReservaDAO()->queryByReservaId($idReserva);
if ($facturas) {
foreach ($facturas as $factura_reserva) {
DAOFactory::getFacturaReservaDAO()->delete($factura_reserva->id);
DAOFactory::getFacturaDAO()->delete($factura_reserva->facturaId);
}
}
DAOFactory::getReservaDAO()->delete($idReserva);
if ($inTransaction) {
$transaction->commit();
}
return $idReserva;
} catch (Exception $e) {
var_dump($e);
if ($inTransaction) {
$transaction->rollback();
}
return false;
}
}
示例2: getFacturaByIdReserva
function getFacturaByIdReserva($idReserva)
{
try {
$frs = DAOFactory::getFacturaReservaDAO()->queryByReservaId($idReserva);
$factura = false;
if ($frs) {
foreach ($frs as $fr) {
$factura = DAOFactory::getFacturaDAO()->load($fr->facturaId);
break;
}
}
return $factura;
} catch (Exception $e) {
var_dump($e);
return false;
}
}