Beispiel #1
0
 public function search($params)
 {
     $query = OrgnModel::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id_orgn' => $this->id_orgn, 'create_by' => $this->create_by, 'update_by' => $this->update_by]);
     $query->andFilterWhere(['like', 'cd_orgn', $this->cd_orgn])->andFilterWhere(['like', 'nm_orgn', $this->nm_orgn])->andFilterWhere(['like', 'create_at', $this->create_at])->andFilterWhere(['like', 'update_at', $this->update_at]);
     return $dataProvider;
 }
Beispiel #2
0
 public static function getOrgnList($id_orgn = null)
 {
     if ($id_orgn === null) {
         return ArrayHelper::map(Orgn::find()->all(), 'id_orgn', 'nm_orgn');
     }
 }
Beispiel #3
0
 * @var yii\widgets\ActiveForm $form
 */
?>

<div class="branch-form col-lg-6" style="padding-left: 0px;">

    <?php 
$form = ActiveForm::begin();
?>
    <div class="panel panel-primary">
        <div class="panel-heading">
            Branch
        </div>
        <div class="panel-body">
            <?php 
echo $form->field($model, 'id_orgn')->dropDownList(ArrayHelper::map(Orgn::find()->all(), 'id_orgn', 'nm_orgn'), ['style' => 'width:200px;']);
?>

            <?php 
echo $form->field($model, 'cd_branch')->textInput(['maxlength' => 4, 'style' => 'width:120px;']);
?>

            <?php 
echo $form->field($model, 'nm_branch')->textInput(['maxlength' => 32]);
?>
        </div>
    </div>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);