/**
  * Lists all ServiceRecord models.
  * @return mixed
  */
 public function actionIndex()
 {
     $searchModel = new ServiceSearch();
     if (!Yii::$app->user->identity->isAdmin) {
         $searchModel->Deleted = 0;
     }
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     return $this->render('index', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider]);
 }
 public function actionSelectService($id)
 {
     $model = $this->findModel($id);
     $searchModel = new ServiceSearch();
     $searchModel->Deleted = 0;
     $searchModel->Enabled = 1;
     $dataProvider = $searchModel->search([]);
     return $this->render('selectService', ['model' => $model, 'dataProvider' => $dataProvider]);
 }