Example #1
0
 /**
  * Entrega una lista con todos los tipos de contrato existentes
  * @return CHtml::listData
  */
 public function getList()
 {
     $formatos = FormatoDemanda::model()->findAll();
     $listaFormatos = CHtml::listData($formatos, 'id', 'nombre');
     return $listaFormatos;
 }
 public function actionExportarXLS()
 {
     // generate a resultset
     $data = FormatoDemanda::model()->findAll();
     $this->toExcel($data, array('nombre'), 'Formatos de Demanda', array());
 }
Example #3
0
echo $form->labelEx($model, 'contrato_id');
?>
		<?php 
echo $form->dropDownList($model, 'contrato_id', CHtml::listData(Contrato::model()->getDeUsuario(Yii::app()->user->id), 'id', 'folio'), array('prompt' => 'Seleccione un Contrato'));
?>
		<?php 
echo $form->error($model, 'contrato_id');
?>
	</div>
    
        <div class="row">
		<?php 
echo $form->labelEx($model, 'formato_demanda_id');
?>
		<?php 
echo $form->dropDownList($model, 'formato_demanda_id', CHtml::listData(FormatoDemanda::model()->findAll(), 'id', 'nombre'), array('prompt' => 'Seleccione un Formato de Demanda'));
?>
		<?php 
echo $form->error($model, 'formato_demanda_id');
?>
	</div>

	<div class="row buttons">
		<?php 
echo CHtml::submitButton($model->isNewRecord ? 'Crear' : 'Guardar', array('class' => 'btn'));
?>
	</div>

<?php 
$this->endWidget();
?>