Пример #1
0
 public function actionDetalle()
 {
     PermisosController::permisoDocenteDirectorDecano();
     if (Yii::$app->request->get("ID_SOLICITUD")) {
         $ID_SOLICITUD = Html::encode($_GET["ID_SOLICITUD"]);
         if ((int) $ID_SOLICITUD) {
             $modelsolicitud = Solicitud::findOne($ID_SOLICITUD);
             $modelviaje = Viaje::findOne($modelsolicitud->ID_VIAJE);
             $tabladestino = new Destino();
             $modeldestino = $tabladestino->find()->where(['ID_VIAJE' => $modelsolicitud->ID_VIAJE])->all();
             /*return $this->render('saluda',['dato' => $modelsolicitud]);*/
             return $this->render('detalle', ['modelsolicitud' => $modelsolicitud, 'modelviaje' => $modelviaje, 'modeldestino' => $modeldestino]);
         } else {
             return $this->redirect(["/solicitud"]);
         }
     } else {
         return $this->redirect(["/solicitud"]);
     }
 }
Пример #2
0
 /**
  * Finds the Solicitud model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Solicitud the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Solicitud::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }