public function fetchAll($where = null, $orderby = null)
 {
     $resultSet = $this->getDbTable()->fetchAll($where, $orderby);
     $entries = array();
     foreach ($resultSet as $row) {
         $entry = new Default_Model_Experience();
         $entry->setId($row->res_experience_id);
         $entry->setResumeId($row->resume_id);
         $entry->setStartDate($row->start_date);
         $entry->setEndDate($row->end_date);
         $entry->setJobTitle($row->job_title);
         $entry->setCompanyName($row->company_name);
         $entry->setDuties($row->duties);
         $entry->setExperienceOther($row->experience_other);
         $entry->setSortOrder($row->sort_order);
         $entries[] = $entry;
     }
     return $entries;
 }
 public function saveExperienceAction()
 {
     $post = $this->getRequest()->getPost();
     //$date = new DateTime($post['startdate']);
     //$startDate = $date->format('Y-m-d');
     //$date = new DateTime($post['enddate']);
     //$endDate = $date->format('Y-m-d');
     $experienceRowset = new Default_Model_Experience();
     $experienceRowset->setId($post['experid']);
     $experienceRowset->setResumeId($post['resume_id']);
     $experienceRowset->setStartDate($post['startdate']);
     $experienceRowset->setEndDate($post['enddate']);
     $experienceRowset->setJobTitle($post['job_title']);
     $experienceRowset->setCompanyName($post['company_name']);
     $experienceRowset->setDuties($post['duties']);
     $experienceRowset->setSortOrder(1);
     $experienceMapper = new Default_Model_ExperienceMapper();
     $experienceId = $experienceMapper->save($experienceRowset);
     if ($experienceId) {
         $resumeMapper = new Default_Model_ResumeMapper();
         $resumeMapper->updateResumDate($post['resume_id']);
     }
     $experienceMapper->delExperFunction($experienceId);
     foreach ($post['option'] as $functionId) {
         $experienceMapper->saveExperFunction($experienceId, $functionId);
     }
     if ($post['button'] == 'Next') {
         $this->_redirect('resume/expectation/id/' . $post['resume_id']);
     } else {
         $this->_redirect('/resume/experience/id/' . $post['resume_id']);
     }
 }