Exemplo n.º 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;
 }
Exemplo n.º 2
0
		  <div class="form-group">
			<input type="text" class="form-control" name="ServTransportDeliv[hour][]" placeholder="">
		  </div>

		</div>

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

	</div>


<?php 
if ($service_id) {
    $allDeliv = ServTransportDeliv::model()->findAllByAttributes(array('serv_transport_id' => $service_id));
    if ($allDeliv) {
        foreach ($allDeliv as $deliv) {
            ?>
	<input type="hidden" class="form-control" name="editServTransportDeliv[<?php 
            echo $deliv->id;
            ?>
][id]" value="<?php 
            echo $deliv->id;
            ?>
">

	<div class="row ">

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