<?php $datos1 = CHtml::listData(Sociedades::model()->findAll(array('order' => 'dsocio')), 'socio', 'dsocio'); echo $form->DropDownList($model, 'codsociedad', $datos1, array('ajax' => $opajax1, 'empty' => '--Seleccione un emisor--', 'disabled' => $this->eseditable($model->codestado))); ?> <?php echo $form->error($model, 'codsociedad'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codgrupoventas'); ?> <?php $datos1 = CHtml::listData(Grupocompras::model()->findAll(), 'codgrupo', 'nomgru'); echo $form->DropDownList($model, 'codgrupoventas', $datos1, array('empty' => '--Seleccione grupo compras--', 'disabled' => $this->eseditable($model->codestado))); ?> <?php echo $form->error($model, 'codgrupoventas'); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'codtipocotizacion'); ?> <?php echo $form->textField($model, 'codtipocotizacion', array('size' => 1, 'maxlength' => 1, 'disabled' => $this->eseditablebase($model->codestado))); ?> <?php
/** * 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 Grupocompras the loaded model * @throws CHttpException */ public function loadModel($id) { $model = Grupocompras::model()->findByPk($id); if ($model === null) { throw new CHttpException(404, 'The requested page does not exist.'); } return $model; }