function addAction()
 {
     $_model = new Foundation_Model_DbTable_DbNewStudent();
     if ($this->getRequest()->isPost()) {
         try {
             $_data = $this->getRequest()->getPost();
             $_model->addNewStudent($_data);
             if (!empty($_data['save_close'])) {
                 Application_Form_FrmMessage::Sucessfull("INSERT_SUCCESS", "/foundation/index");
             }
             Application_Form_FrmMessage::message("INSERT_SUCCESS");
         } catch (Exception $e) {
             Application_Form_FrmMessage::message("INSERT_FAIL");
             $err = $e->getMessage();
             Application_Model_DbTable_DbUserLog::writeMessageError($err);
         }
     }
     $_frm = new Foundation_Form_FrmStudent();
     $_frmstudent = $_frm->FrmStudent();
     Application_Model_Decorator::removeAllDecorator($_frmstudent);
     $this->view->frm_student = $_frmstudent;
     // 		$_db = new Application_Model_DbTable_DbGlobal();
     // 		$comp = $_db->getallComposition();
     // 		array_unshift($comp, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី') );
     // 		$this->view->compo=$comp;
     // 		$situation = $_db->getallSituation();
     // 		array_unshift($situation, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី') );
     // 		$this->view->situation=$situation;
     // 		$school = $_db->getAllHighSchool();
     // 		array_unshift($school, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី','province_id'=>-1) );
     // 		$this->view->highschool=$school;
     // 		$scholarship = $_db->getallScholarship();
     // 		array_unshift($scholarship, array ( 'id' => -1, 'name' => 'បន្�ែម​អ្នក​ទទួល​�្មី','province_id'=>-1) );
     // 		$this->view->scholarship=$scholarship;
 }
 function editStudentAction()
 {
     $id = $this->getRequest()->getParam("id");
     if ($this->getRequest()->isPost()) {
         $_data = $this->getRequest()->getPost();
         $_model = new Foundation_Model_DbTable_DbNewStudent();
         //print_r($_data);exit();
         $_model->updateStudentINfo($_data, $id);
     }
     if (!empty($id)) {
         $_model = new Foundation_Model_DbTable_DbNewStudent();
         $row = $_model->getStudentInfoById($id);
         $_frm = new Foundation_Form_FrmStudent();
         $_frmstudent = $_frm->FrmStudent($row);
         Application_Model_Decorator::removeAllDecorator($_frmstudent);
         $this->view->frm_student = $_frmstudent;
     } else {
         Application_Form_FrmMessage::Sucessfull("GET_STUDNET_INFO_FAILED", "/foundation/newstudent/index");
     }
 }