/**
  * 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 Operacionesbarra the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Operacionesbarra::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Beispiel #2
0
<?php 
$form = $this->beginWidget('CActiveForm', array('id' => 'opcionesbarra-form', 'enableAjaxValidation' => false));
?>



	<?php 
echo $form->errorSummary($model);
?>


	<?php 
echo $form->labelEx($model, 'idope');
?>
	<?php 
$datos1 = CHtml::listData(Operacionesbarra::model()->findAll(), 'id', 'nameop');
echo $form->DropDownList($model, 'idope', $datos1, array('empty' => '--Seleccione un emisor--'));
?>
	<?php 
echo $form->error($model, 'idope');
?>



	<div class="row">
		<?php 
echo $form->labelEx($model, 'codocu');
?>
		<?php 
if (!isset($this->controladorpadre)) {
    ?>