Esempio n. 1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Udashboard::find();
     $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;
     }
     $query->andFilterWhere(['recid' => $this->recid, 'jobtype' => $this->jobtype, 'jobaction' => $this->jobaction, 'jobdate' => $this->jobdate, 'aproveddate' => $this->aproveddate, 'requestby' => $this->requestby, 'approvedby' => $this->approvedby, 'jobstatus' => $this->jobstatus, 'startdate' => $this->startdate, 'enddate' => $this->enddate, 'operateby' => $this->operateby]);
     $query->andFilterWhere(['like', 'jobtitle', $this->jobtitle])->andFilterWhere(['like', 'comment', $this->comment])->andFilterWhere(['like', 'jobformat', $this->jobformat])->andFilterWhere(['like', 'jobcondition', $this->jobcondition])->andFilterWhere(['like', 'attachfile', $this->attachfile])->andFilterWhere(['like', 'filetype', $this->filetype])->andFilterWhere(['like', 'usdef1', $this->usdef1])->andFilterWhere(['like', 'usdef2', $this->usdef2])->andFilterWhere(['like', 'usdef3', $this->usdef3])->andFilterWhere(['like', 'usdef4', $this->usdef4])->andFilterWhere(['like', 'usdef5', $this->usdef5])->andFilterWhere(['like', 'usdef6', $this->usdef6])->andFilterWhere(['like', 'usdef7', $this->usdef7])->andFilterWhere(['like', 'usdef8', $this->usdef8])->andFilterWhere(['like', 'usdef9', $this->usdef9]);
     return $dataProvider;
 }
Esempio n. 2
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Udashboard::find();
     $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;
     }
     $query->andFilterWhere(['recid' => $this->recid, 'invoicedate' => $this->invoicedate, 'invcurrency' => $this->invcurrency, 'invcurrencyrate' => $this->invcurrencyrate, 'customerid' => $this->customerid, 'createdate' => $this->createdate, 'disper' => $this->disper, 'boxprc' => $this->boxprc]);
     $query->andFilterWhere(['like', 'invoiceno', $this->invoiceno]);
     return $dataProvider;
 }
Esempio n. 3
0
 /**
  * Finds the Udashboard model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Udashboard the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Udashboard::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }