daily pastebin goal
54%
SHARE
TWEET

Untitled

a guest Jun 4th, 2014 15 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.                                 $transactionManager = new TransactionManager();
  2.                                 $transaction = $transactionManager->get();
  3.  
  4.                                 $customer = New Client();
  5.                                 $customer->setTransaction($transaction);
  6.                                 $customer->assign($this->request->getPost());
  7.                                 $customer->save();
  8.  
  9.                                 $clientContactType = new ClientContactsType();
  10.                                 $clientContactType->setTransaction($transaction);
  11.                                 $clientContactType->client = $customer;
  12.                                 $clientContactType->name = 'Primary Account Holder';
  13.                                 $clientContactType->description = '';
  14.  
  15.                                 if($clientContactType->save($this->request->getPost())){
  16.                                         $this->flash->success('Saved');
  17.                                 } else {
  18.                                         $this->flash->error($clientContactType->getMessages());
  19.                                         $transaction->rollback('Transaction rolled back');
  20.  
  21.                                 }
  22.  
  23.                                 $transaction->commit();
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top