Exemplo n.º 1
0
 public function save(Default_Model_Resume $resume)
 {
     $data = array('resume_code' => $resume->getResumeCode(), 'full_name' => $resume->getFullName(), 'birthday' => $resume->getBirthday(), 'gender' => $resume->getGender(), 'marital_status' => $resume->getMaritalStatus(), 'status' => $resume->getStatus(), 'email_1' => $resume->getEmail1(), 'email_2' => $resume->getEmail2(), 'mobile_1' => $resume->getMobile1(), 'mobile_2' => $resume->getMobile2(), 'tel' => $resume->getTel(), 'address' => $resume->getAddress(), 'created_date' => $resume->getCreatedDate(), 'updated_date' => $resume->getUpdatedDate(), 'created_consultant_id' => $resume->getCreatedConsultantId(), 'updated_consultant_id' => $resume->getUpdatedConsultantId());
     //print_r($data);exit;
     if (null == ($id = $resume->getResumeId())) {
         return $this->getDbTable()->insert($data);
     } else {
         unset($data['created_date']);
         unset($data['created_consultant_id']);
         unset($data['resume_code']);
         $this->getDbTable()->update($data, array('resume_id = ?' => $id));
         return $id;
     }
 }