/**
  * 
  */
 public function fetchStaffAction()
 {
     $staff = $this->_mapper->fetchStaff($this->_getParam('id'));
     $data = $staff->toArray();
     $data['birth_date'] = $this->view->date($data['birth_date']);
     $this->_helper->json($data);
 }
 /**
  * 
  */
 public function addStaffAction()
 {
     if ($this->getRequest()->isXmlHttpRequest()) {
         $this->_helper->layout()->disableLayout();
     }
     $defaultValues = array('unit_cost' => 0, 'final_cost' => 0, 'training_fund' => 0);
     $row = $this->_getParam('row');
     if (!empty($row)) {
         $defaultValues = $row->toArray();
         $this->view->staff = $row;
     } else {
         $mapperInstitute = new Register_Model_Mapper_EducationInstitute();
         $staff = $mapperInstitute->fetchStaff($this->_getParam('id'));
         $this->view->staff = $staff;
     }
     $this->view->defaultValues = $defaultValues;
 }
 /**
  * 
  */
 public function fetchStaffAction()
 {
     $mapperInstitute = new Register_Model_Mapper_EducationInstitute();
     $staff = $mapperInstitute->fetchStaff($this->_getParam('id'));
     $data = array();
     $data['fk_id_staff'] = $staff['id_staff'];
     $data['beneficiary'] = $staff['staff_name'];
     $this->_helper->json($data);
 }