示例#1
0
 /**
  * Returns the data model based on the primary key given in the GET variable.
  * If the data model is not found, an HTTP exception will be raised.
  * @param integer $id the ID of the model to be loaded
  * @return Paraqueva the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Paraqueva::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#2
0
?>
		<?php 
$datos1 = CHtml::listData(Embarcaciones::model()->findAll(array('order' => 'nomep')), 'codep', 'nomep');
echo $form->DropDownList($model, 'c_codep', $datos1, array('empty' => '--Seleccione una referencia--', 'disabled' => $habilitado, 'options' => array(isset(Yii::app()->session['c_codep']) ? Yii::app()->session['c_codep'] : $model->c_codep => array('selected' => true))));
?>
		<?php 
echo $form->error($model, 'c_codep');
?>
	</div>

	<div class="row">
		<?php 
echo $form->labelEx($model, 'c_edgui');
?>
		<?php 
$datos11 = CHtml::listData(Paraqueva::model()->findAll(array('order' => 'motivo')), 'cmotivo', 'motivo');
echo $form->DropDownList($model, 'c_edgui', $datos11, array('empty' => '--Seleccione un destino--', 'disabled' => $habilitado, 'options' => array(isset(Yii::app()->session['c_edgui']) ? Yii::app()->session['c_edgui'] : $model->c_edgui => array('selected' => true))));
?>
		<?php 
echo $form->error($model, 'c_edgui');
?>
	</div>
	
<div class="row">

	
		<?php 
echo $form->labelEx($model, 'codlugar');
//$documento='032';
$criterial = new CDbCriteria();
$criterial->condition = 'n_direc=:direc';