示例#1
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = RceExamen::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id, 'procedencia_id' => $this->procedencia_id, 'reserva_id' => $this->reserva_id, 'persona_id_realiza_examen' => $this->persona_id_realiza_examen]);
     return $dataProvider;
 }
示例#2
0
/* @var $model app\models\RceExamen */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="rce-examen-form">

	<?php 
$form = ActiveForm::begin(['id' => 'dynamic-form']);
?>
    
    <?php 
echo $form->field($model, 'procedencia_id')->dropDownList(ArrayHelper::map(Procedencia::find()->all(), 'id', 'descripcion'), ['prompt' => 'Seleccionar Procedencia', 'style' => 'width:300px']);
?>

    <?php 
$rces = RceExamen::find('reserva_id')->all();
$ids = [];
foreach ($rces as $i => $rce) {
    $ids[$i] = $rce->reserva_id;
}
$data = ArrayHelper::map(Reserva::find()->where(['not in', 'id', $ids])->all(), 'id', 'ReservaSelect');
?>

    <?php 
echo $form->field($model, "reserva_id")->widget(Select2::classname(), ['data' => $data, 'options' => ['placeholder' => 'Seleccionar Reserva...', 'id' => 'reservaId'], 'pluginOptions' => ['width' => '300px', 'disabled' => !$model->isNewRecord]]);
?>

    <?php 
$data = ArrayHelper::map(Profesional::find()->all(), 'id', 'Nombres');
?>
        
示例#3
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRceExamens()
 {
     return $this->hasMany(RceExamen::className(), ['reserva_id' => 'id']);
 }
 /**
  * Finds the RceExamen model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return RceExamen the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = RceExamen::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
示例#5
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRceExamens()
 {
     return $this->hasMany(RceExamen::className(), ['persona_id_realiza_examen' => 'id']);
 }
示例#6
0
use yii\widgets\ActiveForm;
use app\models\Examen;
use app\models\RceExamen;
/* @var $this yii\web\View */
/* @var $model app\models\RceExamenExamen */
/* @var $form yii\widgets\ActiveForm */
?>

<div class="rce-examen-examen-form">

    <?php 
$form = ActiveForm::begin();
?>

    <?php 
echo $form->field($model, 'rce_examen_id')->dropDownList(ArrayHelper::map(RceExamen::find()->all(), 'id', 'DatosRce'), ['prompt' => 'Seleccionar RCE Examen', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'examen_id')->dropDownList(ArrayHelper::map(Examen::find()->all(), 'id', 'descripcion'), ['prompt' => 'Seleccionar Examen', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'monto_a_pagar')->textInput(['style' => 'width:300px']);
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Ingresar RCE Examen Examen' : 'Actualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>
示例#7
0
 public function getDescripcionRce()
 {
     $rce_examen = RceExamen::find()->where(['id' => $this->rce_examen_id])->one();
     return $rce_examen->getDatosRce();
 }
示例#8
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRceExamens()
 {
     return $this->hasMany(RceExamen::className(), ['procedencia_id' => 'id']);
 }
示例#9
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getRceExamen()
 {
     return $this->hasOne(RceExamen::className(), ['id' => 'rce_examen_id']);
 }