/**
  * 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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Stipobus::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #2
0
$sIDCodObjVenta = array_key_exists('id_cod_obj_venta', $_GET) ? $_GET['id_cod_obj_venta'] : $model->id_cod_obj_venta;
?>
	<?php 
echo $form->hiddenField($model, 'id_cod_obj_venta', array('value' => $sIDCodObjVenta));
?>

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

	<b><?php 
echo $form->labelEx($model, 'id_tipo_bus');
?>
</b>
	<?php 
echo $form->dropDownList($model, 'id_tipo_bus', CHtml::listData(Stipobus::model()->findAll(), 'id_tipo_bus', 'desc_tipo_bus'), array('empty' => '-- Seleccionar --'));
?>

	<?php 
echo $form->textFieldRow($model, 'carga_maxima', array('style' => 'width:100px'));
?>
	<?php 
echo $form->fileFieldRow($model, 'imagen', array('class' => 'span5', 'maxlength' => 500));
?>
	<?php 
echo $form->textAreaRow($model, 'observaciones', array('rows' => 4, 'cols' => 35, 'class' => 'span4'));
?>
	<b><?php 
echo $form->labelEx($model, 'configuracion');
?>
</b>