/**
  * 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 MastersOutlets the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = MastersOutlets::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Beispiel #2
0
echo at('Base');
?>
</th>
								<th width="10%"><?php 
echo at('Current');
?>
</th>
								<th width="10%"><?php 
echo at('Needed');
?>
</th>
							</tr>
						</thead>
						<tbody>
							<?php 
$outlets = MastersOutlets::model()->findAll();
?>
							<?php 
foreach ($outlets as $outlet) {
    ?>
								<tr>
									<td><strong><?php 
    echo $outlet->name;
    ?>
</strong></td>
									<td><?php 
    echo $outlet->employee_needed;
    ?>
</td>
									<td><?php 
    echo $outlet->employeeCount;
 public function actionFindAreaManager($id)
 {
     $model = MastersOutlets::model()->findByPk($id);
     echo $model->am_id;
 }