示例#1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Blok::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(['Blok_ID' => $this->Blok_ID, 'Gudang_ID' => $this->Gudang_ID]);
     $query->andFilterWhere(['like', 'Nama', $this->Nama]);
     return $dataProvider;
 }
示例#2
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBlok()
 {
     return $this->hasOne(Blok::className(), ['Blok_ID' => 'Blok_ID']);
 }
示例#3
0
 public function actionBlokdelete($id)
 {
     $model = Blok::findOne($id)->delete();
     $this->layout = $this->CheckSession();
     return $this->redirect(['warehouse/blokindex']);
 }
示例#4
0
文件: _form.php 项目: tiyolab/autocom
?>

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

    <?php 
echo $form->field($model, 'Jenis_Barang')->dropDownList(ArrayHelper::map(JenisBarang::find()->all(), 'Jenis_Barang_ID', 'Nama'), ['prompt' => 'Select Jenis Barang']);
?>

    <?php 
echo $form->field($model, 'Kemasan_ID')->dropDownList(ArrayHelper::map(Kemasan::find()->all(), 'Kemasan_ID', 'Qty', 'Nama'), ['prompt' => 'Select Kemasan']);
?>

    <?php 
echo $form->field($model, 'Blok_ID')->dropDownList(ArrayHelper::map(Blok::find()->all(), 'Blok_ID', 'Nama'), ['prompt' => 'Select Blok']);
?>

    <?php 
echo $form->field($model, 'Kadaluarsa')->textInput(['maxlength' => 255, 'class' => 'form-control input-datepicker class'])->label('Kadaluarsa');
?>

    <?php 
echo $form->field($model, 'Status')->textInput();
?>

    <?php 
echo $form->field($model, 'Harga_Satuan')->textInput();
?>

    <?php 
示例#5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getBloks()
 {
     return $this->hasMany(Blok::className(), ['Gudang_ID' => 'Gudang_ID']);
 }