コード例 #1
0
 public function addAction()
 {
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         // 					print_r($data);exit();
         $db = new Tellerandexchange_Model_DbTable_Dbexchange();
         try {
             $db = $db->addXchange($data);
             Application_Form_FrmMessage::Sucessfull('', self::REDIRECT_URL);
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $pructis = new Tellerandexchange_Form_Frmxchange();
     $frm = $pructis->xchange();
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
     $db = new Application_Model_DbTable_DbGlobal();
     $this->view->currency_type = $db->CurruncyTypeOption();
     // 		$db = new Application_Model_DbTable_DbGlobal();
     // 		$this->view->currency_type = $db->CurruncyTypeOption();
 }
コード例 #2
0
ファイル: XchangeController.php プロジェクト: samlanh/lnms
	public function addAction()
	{
		    	if($this->getRequest()->isPost()){
					$data=$this->getRequest()->getPost();
// 					print_r($data);exit();
					try {
						//$db = new tellerandexchange_m();
						$db = $db->addXchangeMoney($data);
						Application_Form_FrmMessage::Sucessfull('', self::REDIRECT_URL);
					} catch (Exception $e) {
						Application_Form_FrmMessage::message("INSERT_FAIL");
						$err = $e->getMessage();
						echo $err;exit();
						Application_Model_DbTable_DbUserLog::writeMessageError($err);
					}
				}
		$pructis=new Tellerandexchange_Form_Frmxchange();
		$frm = $pructis->xchange();
		Application_Model_Decorator::removeAllDecorator($frm);
		$this->view->frm=$frm;
		$db = new Application_Model_DbTable_DbGlobal();
	    $this->view->currency_type = $db->CurruncyTypeOption();
	    
	    $session_user=new Zend_Session_Namespace('auth');
	    $this->view->user_name = $session_user->last_name .' '. $session_user->first_name;
	    
	    $db_keycode = new Application_Model_DbTable_DbKeycode();
	    $this->view->keycode = $db_keycode->getKeyCodeMiniInv();
	    
	    $db_g = new Application_Model_DbTable_DbGlobal();
	    $this->view->inv_no = $db_g ->getNewInvoiceExchange();
	    
	
// 		$db = new Application_Model_DbTable_DbGlobal();
// 		$this->view->currency_type = $db->CurruncyTypeOption();
	}