コード例 #1
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 = JaharatTypeMaster::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
コード例 #2
0
ファイル: _form.php プロジェクト: ravithanki/patidar
			    padding-left: 4px;width:168px;')));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'jaharat_bill_date');
?>
		
	</div>
</div>
	<div class="row">
		<div class="row-left">
		<?php 
echo $form->labelEx($model, 'jaharat_type');
?>
		<?php 
echo $form->dropDownList($model, 'jaharat_type', CHtml::listData(JaharatTypeMaster::model()->findAll(), 'id', 'jaharat_type_name'), array('empty' => 'Select Jaharat Type'));
?>
<span class="status">&nbsp;</span>
		<?php 
echo $form->error($model, 'jaharat_type');
?>
		</div>
	

	<div class="row-right">
		<?php 
echo $form->labelEx($model, 'jaharat_type_color');
?>
		<?php 
echo $form->dropdownList($model, 'jaharat_type_color', array("" => "---------Select---------", "2 Color" => "2 Color", "4 Color" => "4 Color", 'Black & White' => 'Black & White'));
?>