Ejemplo n.º 1
0
    public function addAction()
    {
    	if($this->getRequest()->isPost()){
			$data=$this->getRequest()->getPost();
			$db = new Other_Model_DbTable_DbLoanType();
			try {
				if(isset($data['btn_save'])){
					$db->addViewType($data);
					Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
				}
				if(isset($data['btn_save_close'])){
					$db->addViewType($data);
					Application_Form_FrmMessage::message('ការ​បញ្ចូល​​ជោគ​ជ័យ');
					Application_Form_FrmMessage::redirectUrl('/other/LoanType');
				}
			} catch (Exception $e) {
				Application_Form_FrmMessage::message("INSERT_FAIL");
				$err = $e->getMessage();
				Application_Model_DbTable_DbUserLog::writeMessageError($err);
			}
		}
       $fm = new Other_Form_FrmVeiwType();
	   $frm = $fm->FrmViewType(); 
	   Application_Model_Decorator::removeAllDecorator($frm);
	   $this->view->Form_Frmcallecterall = $frm;
    }
Ejemplo n.º 2
0
 function insertDocumentTypeAction()
 {
     //At callecteral when click client
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $data['status'] = 1;
         $data['display_by'] = 1;
         //$data['type']=24;
         $db = new Other_Model_DbTable_DbLoanType();
         $id = $db->addViewType($data);
         print_r(Zend_Json::encode($id));
         exit;
     }
 }
Ejemplo n.º 3
0
function addNewloantypeAction(){
	if($this->getRequest()->isPost()){
			$data = $this->getRequest()->getPost();
			$data['status']=1;
			$data['display_by']=1;
			$db = new Other_Model_DbTable_DbLoanType();
			$id = $db->addViewType($data);
			print_r(Zend_Json::encode($id));
			exit();
		}
	}