/**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = ClnBoundaryInj::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(['BOND_GEN_NO' => $this->BOND_GEN_NO, 'CREATE_DATE' => $this->CREATE_DATE, 'UPDATE_DATE' => $this->UPDATE_DATE, 'VERSION' => $this->VERSION]);
     $query->andFilterWhere(['like', 'BOND_CODE', $this->BOND_CODE])->andFilterWhere(['like', 'BOND_NAME', $this->BOND_NAME])->andFilterWhere(['like', 'CREATE_BY', $this->CREATE_BY])->andFilterWhere(['like', 'UPDATE_BY', $this->UPDATE_BY]);
     return $dataProvider;
 }
Exemplo n.º 2
0
 /**
  * Updates an existing ClnTranInj model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id
  * @return mixed
  */
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     $modelClnDiagnose = ClnDiagnose::findOne(['TRAN_INJ_GEN_NO' => $id]);
     $sportItems = ArrayHelper::map(ClnSport::find()->all(), 'SPORT_GEN_NO', 'SPORT_NAME');
     $causeItems = ArrayHelper::map(ClnCauseInj::find()->all(), 'CAUSE_GEN_NO', 'CAUSE_NAME');
     $bondItems = ArrayHelper::map(ClnBoundaryInj::find()->all(), 'BOND_GEN_NO', 'BOND_NAME');
     $searchClnMedicineTestSearchModel = new \app\models\ClnMedicineTestSearch();
     $queryParams = array();
     $queryParams = Yii::$app->request->queryParams;
     $queryParams['ClnMedicineTestSearch']['TRAN_INJ_GEN_NO'] = $id;
     $dataClnMedicineTestProvider = $searchClnMedicineTestSearchModel->search($queryParams);
     //Yii::$app->request->queryParams);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->TRAN_INJ_GEN_NO]);
     } else {
         return $this->render('update', ['model' => $model, 'modelClnDiagnose' => $modelClnDiagnose, 'sportItems' => $sportItems, 'causeItems' => $causeItems, 'bondItems' => $bondItems, 'searchClnMedicineTestSearchModel' => $searchClnMedicineTestSearchModel, 'dataClnMedicineTestProvider' => $dataClnMedicineTestProvider]);
     }
 }
Exemplo n.º 3
0
 /**
  * Finds the ClnBoundaryInj model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return ClnBoundaryInj the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = ClnBoundaryInj::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Exemplo n.º 4
0
                </div>
            </div>
            <div class="row">
                <div class="col-md-6">
                    <div class="form-group">
                            
                            <?php 
echo $form->field($model, 'SPORT_GEN_NO')->widget(Select2::classname(), ['data' => ArrayHelper::map(ClnSport::find()->all(), 'SPORT_GEN_NO', 'SPORT_NAME'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
                            <?php 
echo $form->field($model, 'CAUSE_GEN_NO')->widget(Select2::classname(), ['data' => ArrayHelper::map(ClnCauseInj::find()->all(), 'CAUSE_GEN_NO', 'CAUSE_NAME'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
   

                            <?php 
echo $form->field($model, 'BOND_GEN_NO')->widget(Select2::classname(), ['data' => ArrayHelper::map(ClnBoundaryInj::find()->all(), 'BOND_GEN_NO', 'BOND_NAME'), 'options' => ['placeholder' => 'Select a state ...'], 'pluginOptions' => ['allowClear' => true]]);
?>
                                                                                      
                    </div>
                </div>
                <div class="col-md-6">
                    <div class="form-group">
                            <?php 
echo $form->field($model, 'CAUSE_OTHER')->textInput(['maxlength' => true]);
?>
                            
                            <?php 
echo $form->field($model, 'DIAGNOSE')->textInput(['maxlength' => true]);
?>
                            
                            <?php