Example #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Opduser::find();
     $dataProvider = new ActiveDataProvider(['query' => $query, 'pagination' => ['pageSize' => 500]]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['drug_access_level' => $this->drug_access_level, 'hospital_department_id' => $this->hospital_department_id, 'max_station' => $this->max_station, 'password_expire_date' => $this->password_expire_date, 'password_recheck_date' => $this->password_recheck_date, 'new_password_date' => $this->new_password_date, 'announce_read_count' => $this->announce_read_count, 'auto_logout_minute' => $this->auto_logout_minute]);
     $query->andFilterWhere(['like', 'loginname', $this->loginname])->andFilterWhere(['like', 'name', $this->name])->andFilterWhere(['like', 'password', $this->password])->andFilterWhere(['like', 'passweb', $this->passweb])->andFilterWhere(['like', 'accessright', $this->accessright])->andFilterWhere(['like', 'department', $this->department])->andFilterWhere(['like', 'departmentposition', $this->departmentposition])->andFilterWhere(['like', 'entryposition', $this->entryposition])->andFilterWhere(['like', 'picture', $this->picture])->andFilterWhere(['like', 'startfullscreen', $this->startfullscreen])->andFilterWhere(['like', 'doctorcode', $this->doctorcode])->andFilterWhere(['like', 'groupname', $this->groupname])->andFilterWhere(['like', 'visible_menu', $this->visible_menu])->andFilterWhere(['like', 'viewallmenu', $this->viewallmenu])->andFilterWhere(['like', 'lab_staff', $this->lab_staff])->andFilterWhere(['like', 'nhso_user', $this->nhso_user])->andFilterWhere(['like', 'nhso_password', $this->nhso_password])->andFilterWhere(['like', 'show_tip', $this->show_tip])->andFilterWhere(['like', 'check_lab_password', $this->check_lab_password])->andFilterWhere(['like', 'pcu_user', $this->pcu_user])->andFilterWhere(['like', 'account_disable', $this->account_disable])->andFilterWhere(['like', 'restrict_ward_access', $this->restrict_ward_access])->andFilterWhere(['like', 'real_staff', $this->real_staff])->andFilterWhere(['like', 'restrict_clinic_access', $this->restrict_clinic_access])->andFilterWhere(['like', 'no_lab_result_display', $this->no_lab_result_display])->andFilterWhere(['like', 'no_doctor_consult_display', $this->no_doctor_consult_display])->andFilterWhere(['like', 'no_announce_display', $this->no_announce_display])->andFilterWhere(['like', 'xray_staff', $this->xray_staff])->andFilterWhere(['like', 'hos_guid', $this->hos_guid])->andFilterWhere(['like', 'lab_check_password', $this->lab_check_password])->andFilterWhere(['like', 'cid', $this->cid])->andFilterWhere(['like', 'hos_guid_ext', $this->hos_guid_ext]);
     return $dataProvider;
 }
Example #2
0
 /**
  * Finds the Opduser model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param string $id
  * @return Opduser the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Opduser::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }