public function addAction()
 {
     $layoutPath = APPLICATION_PATH . '/templates/' . TEMPLATE_USED;
     $option = array('layout' => 'hethong/layout', 'layoutPath' => $layoutPath);
     Zend_Layout::startMvc($option);
     $translate = Zend_Registry::get('Zend_Translate');
     $this->view->title = 'Quản lý tiêu chí đánh giá cán bộ - ' . $translate->_('TEXT_DEFAULT_TITLE');
     $this->view->headTitle($this->view->title);
     $tieuchiModel = new Front_Model_TieuChiDanhGiaCB();
     $error_message = array();
     $success_message = '';
     if ($this->_request->isPost()) {
         $tcdgcb_name = trim($this->_arrParam['tcdgcb_name']);
         $tcdgcb_order = trim($this->_arrParam['tcdgcb_order']);
         $tcdgcb_status = $this->_arrParam['tcdgcb_status'];
         $validator_length = new Zend_Validate_StringLength(array('min' => 2, 'max' => 100));
         if (!is_numeric($tcdgcb_order)) {
             $tcdgcb_order = 0;
         }
         //kiem tra dữ liệu
         if (!$validator_length->isValid($tcdgcb_name)) {
             $error_message[] = 'Tên tiêu chí phải bằng hoặc hơn 2 ký tự và nhỏ hơn hoặc bằng 100 ký tự.';
         }
         if (!sizeof($error_message)) {
             $current_time = new Zend_Db_Expr('NOW()');
             $tieuchiModel->insert(array('tcdgcb_name' => $tcdgcb_name, 'tcdgcb_status' => $tcdgcb_status, 'tcdgcb_order' => $tcdgcb_order, 'tcdgcb_date_added' => $current_time, 'tcdgcb_date_modified' => $current_time));
             $success_message = 'Đã thêm mới thành công.';
         }
     }
     $this->view->success_message = $success_message;
     $this->view->error_message = $error_message;
 }