示例#1
0
 public function editAction()
 {
     // action body
     if ($this->getRequest()->isPost()) {
         $agentdata = $this->getRequest()->getPost();
         $db_agent = new Accounting_Model_DbTable_DbIncome();
         try {
             $db = $db_agent->updatasset($agentdata);
             Application_Form_FrmMessage::Sucessfull('ការ​បញ្ចូល​​ជោគ​ជ័យ', self::REDIRECT_URL);
         } catch (Exception $e) {
             $this->view->msg = 'ការ​បញ្ចូល​មិន​ជោគ​ជ័យ';
         }
     }
     $id = $this->getRequest()->getParam('id');
     $db = new Accounting_Model_DbTable_DbIncome();
     $row = $db->getassetbyid($id);
     $pructis = new Accounting_Form_Frmincome();
     $frm = $pructis->FrmIncome($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm_income = $frm;
 }