コード例 #1
0
 function editAction()
 {
     $id = $this->getRequest()->getParam("id");
     $db = new Other_Model_DbTable_DbProvince();
     $row = $db->getProvinceById($id);
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Other_Model_DbTable_DbProvince();
         $db->updateProvince($data, $id);
         Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS", "/other/Province/index");
     }
     $frm = new Other_Form_FrmProvince();
     $update = $frm->FrmProvince($row);
     $this->view->frm_province = $update;
     Application_Model_Decorator::removeAllDecorator($update);
 }
コード例 #2
0
ファイル: ProvinceController.php プロジェクト: samlanh/lynacr
 function editAction()
 {
     $id = $this->getRequest()->getParam("id");
     $db = new Other_Model_DbTable_DbProvince();
     $row = $db->getProvinceById($id);
     if ($this->getRequest()->isPost()) {
         $data = $this->getRequest()->getPost();
         $db = new Other_Model_DbTable_DbProvince();
         try {
             $db->updateProvince($data, $id);
             Application_Form_FrmMessage::Sucessfull($this->tr->translate("EDIT_SUCCESS"), self::REDIRECT_URL . "/province/index");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message($this->tr->translate("EDIT_FAIL"));
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $frm = new Other_Form_FrmProvince();
     $update = $frm->FrmProvince($row);
     $this->view->frm_province = $update;
     Application_Model_Decorator::removeAllDecorator($update);
 }