public function deleteAnswerFeedbackImprove($answerFeedbackRow)
 {
     DbTable_Answer::getInstance()->getAdapter()->beginTransaction();
     try {
         $answerFeedbackRow->delete();
         DbTable_AnswerFeedbackImprove::getInstance()->getAdapter()->commit();
         return array('status' => true);
     } catch (Vtx_UserException $e) {
         DbTable_AnswerFeedbackImprove::getInstance()->getAdapter()->rollBack();
         return array('status' => false, 'messageError' => $e->getMessage());
     } catch (Exception $e) {
         DbTable_AnswerFeedbackImprove::getInstance()->getAdapter()->rollBack();
         throw new Exception($e);
     }
 }
Exemple #2
0
 public function deleteAnswer($answerRow)
 {
     DbTable_Answer::getInstance()->getAdapter()->beginTransaction();
     try {
         /* Deletar : 
          * 'AnswerHistory',
          */
         /*
         $whereDeleteAnswerHistory = array('AnswerId = ?' => $answerRow->getId());
         DbTable_AnswerHistory::getInstance()->delete($whereDeleteAnswerHistory);
         */
         $answerRow->delete();
         DbTable_Answer::getInstance()->getAdapter()->commit();
         return array('status' => true);
     } catch (Vtx_UserException $e) {
         DbTable_Answer::getInstance()->getAdapter()->rollBack();
         return array('status' => false, 'messageError' => $e->getMessage());
     } catch (Exception $e) {
         DbTable_Answer::getInstance()->getAdapter()->rollBack();
         throw new Exception($e);
     }
 }