Ejemplo n.º 1
0
 public function viewGetBacLuong($bac_luong_id)
 {
     if ($bac_luong_id) {
         $bacluongModel = new Front_Model_BacLuong();
         $bac_luong = $bacluongModel->fetchRow(array('bl_id' => $bac_luong_id));
         if ($bac_luong) {
             return $bac_luong;
         }
         return false;
     }
     return false;
 }
Ejemplo n.º 2
0
 public function deleteAction()
 {
     $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED;
     $option = array('layout' => '1_column/layout', 'layoutPath' => $layoutPath);
     Zend_Layout::startMvc($option);
     $translate = Zend_Registry::get('Zend_Translate');
     $this->view->title = 'Quản lý bậc lương - ' . $translate->_('TEXT_DEFAULT_TITLE');
     $this->view->headTitle($this->view->title);
     $id = $this->_getParam('id', 0);
     $bacluongModel = new Front_Model_BacLuong();
     $error_message = array();
     $bl_info = $bacluongModel->fetchRow('bl_id=' . $id);
     if (!$bl_info) {
         $error_message[] = 'Không tìm thấy thông tin.';
     }
     if ($this->_request->isPost()) {
         $del = $this->getRequest()->getPost('del');
         if ($del == 'Yes') {
             $id = $this->getRequest()->getPost('id');
             $bacluongModel->delete('bl_id=' . $id);
         }
         $this->_redirect('tochuccanbo/bacluong');
     }
     $this->view->bl_info = $bl_info;
     $this->view->error_message = $error_message;
 }
 public function jqbacluongAction()
 {
     $this->_helper->layout()->disableLayout();
     $bl_id = $this->_request->getParam('id', 0);
     $ncc_id = $this->_request->getParam('ncc', 0);
     $bacluongModel = new Front_Model_BacLuong();
     $bac_luong = $bacluongModel->fetchRow('bl_id=' . $bl_id);
     if ($bac_luong) {
         $bac_luong = $bac_luong->toArray();
     }
     $this->view->bac_luong = $bac_luong;
     $this->view->ncc_id = $ncc_id;
 }