示例#1
0
?>

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

	<?php 
echo $form->textFieldRow($model, 'CodProducto', array('class' => 'span2', 'maxlength' => 40));
?>

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

	<?php 
echo $form->dropDownListRow($model, 'UniMedida', CHtml::listData(Medida::model()->findAll(), 'Id', 'Descripcion'), array('empty' => ' '));
?>
        <?php 
//  echo $form->dropDownList($model,'UniMedida',CHtml::listData(Medida::model()->findAll(),'Id','Descripcion'),array('empty'=>' '));
?>

        <?php 
echo $form->dropDownListRow($model, 'CodCategoria', CHtml::listData(Categoria::model()->findAll(), 'CodCategoria', 'Descripcion'), array('empty' => ' '));
?>
        
	<?php 
echo $form->textFieldRow($model, 'CanExistencia', array('class' => 'span2'));
?>

	<?php 
// echo $form->textFieldRow($model,'PreCompra',array('class'=>'span5','maxlength'=>10));
示例#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 the ID of the model to be loaded
  */
 public function loadModel($id)
 {
     $model = Medida::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
示例#3
0
 public function getMenuMedida()
 {
     return CHtml::listData(Medida::model()->findAll(), 'Id', 'Descripcion');
 }