Example #1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Tbdos::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $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;
     }
     // grid filtering conditions
     $query->andFilterWhere(['IDTBDOS' => $this->IDTBDOS, 'TGENTTBDOS' => $this->TGENTTBDOS, 'TGTUPTBDOS' => $this->TGTUPTBDOS, 'TGLHRTBDOS' => $this->TGLHRTBDOS]);
     $query->andFilterWhere(['like', 'JAENTTBDOS', $this->JAENTTBDOS])->andFilterWhere(['like', 'JATUPTBDOS', $this->JATUPTBDOS])->andFilterWhere(['like', 'KDKOPTBDOS', $this->KDKOPTBDOS])->andFilterWhere(['like', 'NIDNNTBDOS', $this->NIDNNTBDOS])->andFilterWhere(['like', 'NOKTPTBDOS', $this->NOKTPTBDOS])->andFilterWhere(['like', 'NMDOSTBDOS', $this->NMDOSTBDOS])->andFilterWhere(['like', 'TPLHRTBDOS', $this->TPLHRTBDOS])->andFilterWhere(['like', 'KDJEKTBDOS', $this->KDJEKTBDOS])->andFilterWhere(['like', 'NIPNSTBDOS', $this->NIPNSTBDOS])->andFilterWhere(['like', 'KDWILTBDOS', $this->KDWILTBDOS])->andFilterWhere(['like', 'KDJANTBDOS', $this->KDJANTBDOS])->andFilterWhere(['like', 'KDPDATBDOS', $this->KDPDATBDOS])->andFilterWhere(['like', 'KDSTATBDOS', $this->KDSTATBDOS])->andFilterWhere(['like', 'KDGOLTBDOS', $this->KDGOLTBDOS])->andFilterWhere(['like', 'STDOSTBDOS', $this->STDOSTBDOS])->andFilterWhere(['like', 'PTINDTBDOS', $this->PTINDTBDOS])->andFilterWhere(['like', 'KDJENTBDOS', $this->KDJENTBDOS])->andFilterWhere(['like', 'KDPSTTBDOS', $this->KDPSTTBDOS])->andFilterWhere(['like', 'NORUTTBDOS', $this->NORUTTBDOS])->andFilterWhere(['like', 'NIPPPTBDOS', $this->NIPPPTBDOS])->andFilterWhere(['like', 'KDPNSTBDOS', $this->KDPNSTBDOS])->andFilterWhere(['like', 'FLJANTBDOS', $this->FLJANTBDOS])->andFilterWhere(['like', 'FLPDATBDOS', $this->FLPDATBDOS])->andFilterWhere(['like', 'FLGOLTBDOS', $this->FLGOLTBDOS])->andFilterWhere(['like', 'FLAGGTBDOS', $this->FLAGGTBDOS])->andFilterWhere(['like', 'GELARTBDOS', $this->GELARTBDOS])->andFilterWhere(['like', 'NIDNLTBDOS', $this->NIDNLTBDOS])->andFilterWhere(['like', 'NIPNBTBDOS', $this->NIPNBTBDOS])->andFilterWhere(['like', 'NIPPBTBDOS', $this->NIPPBTBDOS]);
     return $dataProvider;
 }
Example #2
0
 /**
  * Finds the Tbdos model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Tbdos the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Tbdos::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }