Ejemplo n.º 1
0
 public function fetchAll($where = null, $orderby = null)
 {
     $resultSet = $this->getDbTable()->fetchAll($where, $orderby);
     $entries = array();
     foreach ($resultSet as $row) {
         $entry = new Default_Model_Expectation();
         $entry->setResExpectationId($row->res_expectation_id);
         $entry->setResumeId($row->resume_id);
         $entry->setEstimatedSalaryTo($row->estimated_salary_to);
         $entry->setEstimatedSalaryFrom($row->estimated_salary_from);
         $entry->setCurrentSalary($row->current_salary);
         $entry->setNote($row->note);
         $entries[] = $entry;
     }
     return $entries;
 }
Ejemplo n.º 2
0
 public function saveExpectationAction()
 {
     $post = $this->getRequest()->getPost();
     $expectation = new Default_Model_Expectation();
     $expectation->setResExpectationId($post['expecid']);
     $expectation->setResumeId($post['resume_id']);
     $expectation->setEstimatedSalaryTo(intval($post['estimated_salary_to']));
     $expectation->setEstimatedSalaryFrom(intval($post['estimated_salary_from']));
     $expectation->setCurrentSalary(intval($post['current_salary']));
     $expectation->setNote($post['note']);
     $expectationMapper = new Default_Model_ExpectationMapper();
     $expectationId = $expectationMapper->save($expectation);
     if ($expectationId) {
         $resumeMapper = new Default_Model_ResumeMapper();
         $resumeMapper->updateResumDate($post['resume_id']);
     }
     $expectationMapper->delExProvince($expectationId);
     foreach ($post['option'] as $provinceId) {
         $expectationMapper->saveExProvince($expectationId, $provinceId);
     }
     if ($post['button'] == 'Complete') {
         $this->_redirect('/resume');
     } else {
         if ($post['button'] == 'Review') {
             $resumeRowSet = new Default_Model_Resume();
             $resumeMapper = new Default_Model_ResumeMapper();
             $resumeMapper->find($post['resume_id'], $resumeRowSet);
             $this->view->resume = $resumeRowSet;
             $this->_helper->layout->disableLayout();
             $this->render('detail-resume');
         } else {
             $this->_redirect('/resume/experience/id/' . $post['resume_id']);
         }
     }
     //$this->_redirect('resume/expectation/id/' . $post['resume_id']);
 }