示例#1
0
 public static function Del($id)
 {
     $transport = ServTransport::model()->findAll('service_id=' . $id);
     if ($transport) {
         foreach ($transport as $mTrans) {
             ServTransportDeliv::model()->deleteAllByAttributes(array('serv_transport_id' => $mTrans->id));
             ServTransportExtra::model()->deleteAllByAttributes(array('serv_transport_id' => $mTrans->id));
             ServTransportTrip::model()->deleteAllByAttributes(array('serv_transport_id' => $mTrans->id));
         }
     }
     ServTransport::model()->deleteAllByAttributes(array('service_id' => $id));
     return true;
 }
示例#2
0
文件: _form.php 项目: dmitryplus/gb
		</div>

		<div class="col-md-2 butBlock">
			<a href="#" class="btn btn-success btn-plus copy" id="btnAddServTransportTrip" data-copy="addServTransportTrip"><span class="glyphicon glyphicon-plus"></span></a>
		</div>


	</div>





<?php 
if ($service_id) {
    $allTrip = ServTransportTrip::model()->findAllByAttributes(array('serv_transport_id' => $service_id));
    if ($allTrip) {
        foreach ($allTrip as $trip) {
            ?>

	<input type="hidden" class="form-control" name="editServTransportTrip[<?php 
            echo $trip->id;
            ?>
][id]" value="<?php 
            echo $trip->id;
            ?>
">

	<div class="row ">

		<div class="col-md-11">