function editAction(){ $db = new Other_Model_DbTable_DbZone(); if($this->getRequest()->isPost()){ try{ $_data = $this->getRequest()->getPost(); $db->addZone($_data); Application_Form_FrmMessage::Sucessfull($this->tr->translate('EDIT_SUCCESS'),self::REDIRECT_URL.'/zone/index'); }catch(Exception $e){ Application_Form_FrmMessage::message($this->tr->translate('EDIT_FAIL')); $err =$e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($err); } } $id=$this->getRequest()->getParam('id'); $row = $db->getZoneById($id); if(empty($row)){ $this->_redirect('/other/zone'); } $frm = new Other_Form_FrmZone(); $frm_co=$frm->FrmAddZone($row); Application_Model_Decorator::removeAllDecorator($frm_co); $this->view->frm_zone = $frm_co; }
function editAction() { $db = new Other_Model_DbTable_DbZone(); if ($this->getRequest()->isPost()) { try { $_data = $this->getRequest()->getPost(); $db->addZone($_data); Application_Form_FrmMessage::Sucessfull("ការកែប្រែជោគជ័យ !", '/other/Zone'); } catch (Exception $e) { Application_Form_FrmMessage::message("ការកែប្រែមិនជោគជ័យ"); $err = $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($err); } } $id = $this->getRequest()->getParam('id'); $row = $db->getZoneById($id); if (empty($row)) { $this->_redirect('/other/Zone'); } $frm = new Other_Form_FrmZone(); $frm_co = $frm->FrmAddZone($row); Application_Model_Decorator::removeAllDecorator($frm_co); $this->view->frm_zone = $frm_co; }