public function actionIndex()
 {
     $this->checkLogin();
     $this->layout = 'admin';
     $searchModel = new CustomerSearch();
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
Esempio n. 2
0
 /**
  * Lists all Customer models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new CustomerSearch();
     $dataProvider = $searchModel->search_customer(Yii::$app->request->queryParams);
     $uid = Yii::$app->user->identity->user_id;
     $accessView = Access2::find()->where(['user_id' => $uid, 'sub_module_id' => 14])->one();
     $accessCreate = Access2::find()->where(['user_id' => $uid, 'sub_module_id' => 15])->one();
     $accessUpdate = Access2::find()->where(['user_id' => $uid, 'sub_module_id' => 16])->one();
     $accessDelete = Access2::find()->where(['user_id' => $uid, 'sub_module_id' => 17])->one();
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'accessView' => $accessView, 'accessCreate' => $accessCreate, 'accessUpdate' => $accessUpdate, 'accessDelete' => $accessDelete]);
 }
Esempio n. 3
0
 public function actionGet_customer()
 {
     $model = CustomerSearch::find()->all();
     return $this->renderPartial('list_customer', ['model' => $model]);
 }