Exemplo n.º 1
0
 /**
  * Finds the Resume model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Resume the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Resume::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 2
0
 /**
  * 删除基本简历信息
  */
 public function actionDel_resume()
 {
     $id = $_REQUEST['id'];
     $resume = Resume::findOne($id);
     if ($resume->delete()) {
         $data['status'] = '200';
         $data['msg'] = 'success';
         $data['data'] = '';
     } else {
         $data['status'] = '100';
         $data['msg'] = 'err';
         $data['data'] = '';
     }
     echo json_encode($data);
 }