Пример #1
0
 public function getRowOwnerAction()
 {
     if ($this->getRequest()->isPost()) {
         $post = $this->getRequest()->getPost();
         $ids = $post["owner_name"];
         $db = new Other_Model_DbTable_DbOwner();
         $row = $db->getOwnerById($ids);
         print_r(Zend_Json::encode($row));
         exit;
     }
 }
Пример #2
0
 function editAction()
 {
     if ($this->getRequest()->isPost()) {
         try {
             $_data = $this->getRequest()->getPost();
             $db = new Other_Model_DbTable_DbOwner();
             if (!empty($_data['save_close'])) {
                 $db->updateOwner($_data);
                 Application_Form_FrmMessage::Sucessfull($this->tr->translate('INSERT_SUCCESS'), self::REDIRECT_URL . '/ownervehicle/index');
             }
         } catch (Exception $e) {
             Application_Form_FrmMessage::message($this->tr->translate('INSERT_FAIL'));
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $id = $this->getRequest()->getParam('id');
     $db = new Other_Model_DbTable_DbOwner();
     $row = $db->getOwnerById($id);
     $this->view->row_owner = $row;
 }