Example #1
0
	</div>
	<br>

	<div class="row">
		<label>Dokter</label>
		<table class="table table-bordered">
			<thead>
				<th>No.</th>
				<th colspan="2">Nama Dokter</th>
			</thead>
			<tbody>
				<tr ng-repeat="dokter in dokterCollection">
					<td>{{$index+1}}</td>
					<td width="80%">
						<?php 
$dokter = Dokter::model()->findAll();
?>
						<select ng-change="updateDokter($index, dokter.id_dokter)" ng-model="dokter.id_dokter">
							<option value="">--- Pilih ---</option>
							<?php 
for ($i = 0; $i < count($dokter); $i++) {
    echo '<option value="' . $dokter[$i]['id_dokter'] . '">' . $dokter[$i]['nama'] . '</option>';
}
?>
						</select>
					</td>
					<td>
						<span class="btn btn-small btn-warning pull-right" ng-click="deleteRowDokter($index)">x</span>
					</td>
				</tr>
				<tr>
Example #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 Dokter the loaded model
  * @throws CHttpException
  */
 public function loadModel($id)
 {
     $model = Dokter::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
Example #3
0
function tambah_dokter($kodeDokter, $namaDokter, $alamatDokter, $kotaDokter, $telpDokter)
{
    $dokter = new Dokter();
    return $dokter->tambah_dokter($kodeDokter, $namaDokter, $alamatDokter, $kotaDokter, $telpDokter);
}