function editAction() { $_db = new Other_Model_DbTable_DbInstruction(); if ($this->getRequest()->isPost()) { //check condition return true click submit button $_data = $this->getRequest()->getPost(); try { $_db->updateInstruction($_data); Application_Form_FrmMessage::Sucessfull("EDIT_SUCCESS", self::REDIRECT_URL . "/instruction"); } catch (Exception $e) { Application_Form_FrmMessage::message("EDIT_FAIL"); $err = $e->getMessage(); Application_Model_DbTable_DbUserLog::writeMessageError($err); } } $id = $this->getRequest()->getParam("id"); $this->view->row = $_db->getInstructionById($id); }
function instructionAction() { $db = new Other_Model_DbTable_DbInstruction(); $id = $this->getRequest()->getParam("id"); $data = $db->getInstructionDetailById($id); $this->view->detail = $data; $this->view->row = $db->getAllInstructionMenu(); }