public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     $UploadFile = new UploadDocFile();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         $searchModelrramat = new RramatDocfilesSearch();
         $dataProviderrramat = $searchModelrramat->search(Yii::$app->request->queryParams);
         $searchModel = new RecoveryrecieveaktmatSearch();
         $dataProvider = $searchModel->searchbase(Yii::$app->request->queryParams);
         return $this->render('update', ['model' => $model, 'UploadFile' => $UploadFile, 'dataProvider' => $dataProvider, 'searchModelrramat' => $searchModelrramat, 'dataProviderrramat' => $dataProviderrramat]);
     }
 }
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         $searchModel = new RecoveryrecieveaktSearch();
         $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
         $searchModelmat = new RecoveryrecieveaktmatSearch();
         $dataProvidermat = $searchModelmat->search(Yii::$app->request->queryParams);
         $generalsettings = Fregatsettings::findOne(1);
         return $this->render('update', ['model' => $model, 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'searchModelmat' => $searchModelmat, 'dataProvidermat' => $dataProvidermat, 'emailfrom' => $generalsettings->fregatsettings_recoverysend_emailfrom, 'emailtheme' => $generalsettings->fregatsettings_recoverysend_emailtheme]);
     }
 }
示例#3
0
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     $Mattraffic = Mattraffic::find()->andWhere(['id_material' => $model->material_id])->andWhere(['in', 'mattraffic_tip', [1, 2]])->orderBy('mattraffic_date desc, mattraffic_id desc')->one();
     $searchModel_mattraffic = new MattrafficSearch();
     $dataProvider_mattraffic = $searchModel_mattraffic->searchformaterialmattraffic(Yii::$app->request->queryParams);
     $searchModel_recovery = new OsmotraktSearch();
     $dataProvider_recovery = $searchModel_recovery->searchformaterialkarta(Yii::$app->request->queryParams);
     $searchModel_recoverymat = new TrMatOsmotrSearch();
     $dataProvider_recoverymat = $searchModel_recoverymat->searchformaterialkarta(Yii::$app->request->queryParams);
     $searchModel_recoverysend = new RecoveryrecieveaktSearch();
     $dataProvider_recoverysend = $searchModel_recoverysend->searchformaterialkarta(Yii::$app->request->queryParams);
     $searchModel_recoverysendmat = new RecoveryrecieveaktmatSearch();
     $dataProvider_recoverysendmat = $searchModel_recoverysendmat->searchformaterialkarta(Yii::$app->request->queryParams);
     $searchModel_mattraffic_contain = new TrMatSearch();
     $dataProvider_mattraffic_contain = $searchModel_mattraffic_contain->searchformaterialcontain(Yii::$app->request->queryParams);
     if (Yii::$app->user->can('MaterialEdit') && $model->load(Yii::$app->request->post()) && $model->save() && $Mattraffic->load(Yii::$app->request->post()) && $Mattraffic->save()) {
         return $this->redirect(Proc::GetPreviousURLBreadcrumbsFromSession());
     } else {
         return $this->render('update', ['model' => $model, 'Mattraffic' => $Mattraffic, 'searchModel_mattraffic' => $searchModel_mattraffic, 'dataProvider_mattraffic' => $dataProvider_mattraffic, 'searchModel_recovery' => $searchModel_recovery, 'dataProvider_recovery' => $dataProvider_recovery, 'searchModel_recoverymat' => $searchModel_recoverymat, 'dataProvider_recoverymat' => $dataProvider_recoverymat, 'searchModel_recoverysend' => $searchModel_recoverysend, 'dataProvider_recoverysend' => $dataProvider_recoverysend, 'searchModel_recoverysendmat' => $searchModel_recoverysendmat, 'dataProvider_recoverysendmat' => $dataProvider_recoverysendmat, 'searchModel_mattraffic_contain' => $searchModel_mattraffic_contain, 'dataProvider_mattraffic_contain' => $dataProvider_mattraffic_contain]);
     }
 }