示例#1
0
文件: _form.php 项目: veronin/IMV
<?php echo $form->labelEx($model, 'idAlumno');?>
	<?php echo $form->dropDownList($model,'idAlumno',CHtml::listData(Alumno::model()->findAll(array('order'=>'idAlumno')),'idAlumno', 'nombreCompleto'),array('empty'=>'Seleccionar..' ));?>


        <?php echo $form->labelEx($model, 'Cuenta');?>
	<?php echo $form->dropDownList($model,'idCuenta',CHtml::listData(Persona::model()->findAll(array('order'=>'idPersona')),'idPersona', 'apellido', 'nombre'),array('empty'=>'Seleccionar..' ));?>

	<?php echo $form->datepickerRow($model,'fechaInicio',array('options'=>array(),'htmlOptions'=>array('class'=>'span5')),array('prepend'=>'<i class="icon-calendar"></i>','append'=>'Click on Month/Year at top to select a different year or type in (mm/dd/yyyy).')); ?>

	<?php echo $form->datepickerRow($model,'fechaFin',array('options'=>array(),'htmlOptions'=>array('class'=>'span5')),array('prepend'=>'<i class="icon-calendar"></i>','append'=>'Click on Month/Year at top to select a different year or type in (mm/dd/yyyy).')); ?>

	<?php echo $form->textFieldRow($model,'motivoBaja',array('class'=>'span5','maxlength'=>100)); ?>

	<?php echo $form->labelEx($model,'idCurso'); ?>
        <?php echo $form->dropDownList($model,'idCurso',CHtml::listData(Curso::model()->findAll(array('order'=>'idCurso')),'idCurso', 'descripcion'),array('empty'=>'Seleccionar..' ));?>
	
        <?php echo $form->labelEx($model,'Descuento'); ?>
        <?php echo $form->dropDownList($model,'idDescuento',CHtml::listData(Descuento::model()->findAll(array('order'=>'idDescuento')),'idDescuento', 'descripcion'),array('empty'=>'Seleccionar..' ));?>
	
        <?php echo $form->textFieldRow($model,'ciclo',array('maxlength'=>5)); ?>

<div class="form-actions">
	<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Crear' : 'Guardar',
		)); ?>
</div>

<?php $this->endWidget(); ?>
示例#2
0
 /**
  * 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 Descuento the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Descuento::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#3
0
 public function getMenuDescuentos()
 {
     return CHtml::listData(Descuento::model()->findAll(), "id", "porcentaje", "descripcion");
 }