/**
  * Pedidos
  * @param integer $ue unidad ejecutora
  * @return mixed
  */
 public function actionPedido($ue, $acc)
 {
     //Datos para el gridview
     $searchModel = new AccionCentralizadaPedidoSearch(['idUnidadEjecutora' => $ue, 'idAcc' => $acc]);
     $dataProvider = $searchModel->search(Yii::$app->request->queryParams);
     $model = AcEspUej::find()->where(['id_ue' => $ue])->andWhere(['id_ac_esp' => $acc])->One();
     //Otros datos
     $ue = UnidadEjecutora::findOne($ue);
     return $this->render('pedido', ['searchModel' => $searchModel, 'dataProvider' => $dataProvider, 'ue' => $ue, 'model' => $model]);
 }
Пример #2
0
 /**
  * Finds the UnidadEjecutora model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return UnidadEjecutora the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = UnidadEjecutora::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }