Ejemplo n.º 1
0
 public function search($params)
 {
     $query = CategoryModel::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     if (!($this->load($params) && $this->validate())) {
         return $dataProvider;
     }
     $query->andFilterWhere(['id_category' => $this->id_category, 'create_by' => $this->create_by, 'update_by' => $this->update_by]);
     $query->andFilterWhere(['like', 'cd_category', $this->cd_category])->andFilterWhere(['like', 'nm_category', $this->nm_category])->andFilterWhere(['like', 'create_date', $this->create_date])->andFilterWhere(['like', 'update_date', $this->update_date]);
     return $dataProvider;
 }
Ejemplo n.º 2
0
    <div class="panel panel-primary">
        <div class="panel-heading">
            Product
        </div>
        <div class="panel-body">

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

            <?php 
echo $form->field($model, 'nm_product')->textInput(['maxlength' => 64]);
?>

            <?php 
echo $form->field($model, 'id_category')->dropDownList(ArrayHelper::map(Category::find()->all(), 'id_category', 'nm_category'), ['style' => 'width:200px;']);
?>

            <?php 
echo $form->field($model, 'id_group')->dropDownList(ArrayHelper::map(ProductGroup::find()->all(), 'id_group', 'nm_group'), ['style' => 'width:200px;']);
?>

        </div>   

    </div>

</div>

<style>
    .tab-content {
        border: 1px #e0e0e0 solid;