Ejemplo n.º 1
0
 function editAction()
 {
     $id = $this->getRequest()->getParam("id");
     $db = new Keeping_Model_DbTable_DbKeeping();
     $row = $db->getKeepingbyid($id);
     $fm = new Keeping_Form_FrmSendMoney();
     $frm = $fm->addSendMoney($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_putmoney = $frm;
     $this->view->currency_type = $db->CurruncyTypeOption();
     $db_keeping = new Keeping_Model_DbTable_DbKeeping();
     $this->view->rs_rows = $db_keeping->getKeepingdetail($id);
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         //   print_r($data);exit();
         $db_keeping = new Keeping_Model_DbTable_DbKeeping();
         try {
             $db = $db_keeping->updateKeeping($data);
             Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL);
         } catch (Exception $e) {
             echo $e->getMessage();
             exit;
             $this->view->msg = 'ការ​បញ្ចូល​មិន​ជោគ​ជ័យ';
         }
         $this->_redirect("Keeping/index/index");
     }
 }