Beispiel #1
0
 function editAction()
 {
     $db_deposite = new Capital_Model_DbTable_DbCapital();
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         try {
             if (isset($_data["save"])) {
                 $db_deposite->updateCapital($_data);
                 Application_Form_FrmMessage::Sucessfull("ការ​បញ្ចូល​ជោគ​ជ័យ !", '/capital/capital/add');
             } elseif (isset($_data["save_close"])) {
                 $db_deposite->updateCapital($_data);
                 Application_Form_FrmMessage::Sucessfull("ការ​បញ្ចូល​ជោគ​ជ័យ !", '/capital/capital');
             } else {
                 Application_Form_FrmMessage::redirectUrl("/capital/capital");
             }
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("ការ​បញ្ចូល​មិន​ជោគ​ជ័យ");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $id = $this->getRequest()->getParam("id");
     $row = $db_deposite->getpartnerById($id);
     $deposite = new Capital_Form_FrmCapitale();
     $frm = $deposite->frmCapital($row);
     Application_Model_Decorator::removeAllDecorator($frm);
     $this->view->frm = $frm;
 }