/** * 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 = Sclasesobjventa::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'La pagina solicitada no existe.'); } return $model; }
<p class="help-block">Los campos con <span class="required">*</span> son requeridos.</p> <?php echo $form->errorSummary($model); ?> <?php echo $form->textFieldRow($model, 'desc_cod_obj_venta', array('class' => 'span5', 'maxlength' => 999)); ?> <b><?php echo $form->labelEx($model, 'id_clase_obj_venta'); ?> </b> <?php echo $form->dropDownList($model, 'id_clase_obj_venta', CHtml::listData(Sclasesobjventa::model()->findAll(), 'id_clase_obj_venta', 'desc_clase_obj_venta'), array('empty' => '-- Seleccionar --')); ?> <b><?php echo $form->labelEx($model, 'doc_requeridos'); ?> </b> <?php echo $form->checkBox($model, 'doc_requeridos'); ?> <?php echo $form->textFieldRow($model, 'placa_cod', array('style' => 'width:60px')); ?> <?php