当前位置: 首页>>代码示例>>PHP>>正文


PHP OrderDetail::model方法代码示例

本文整理汇总了PHP中OrderDetail::model方法的典型用法代码示例。如果您正苦于以下问题:PHP OrderDetail::model方法的具体用法?PHP OrderDetail::model怎么用?PHP OrderDetail::model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在OrderDetail的用法示例。


在下文中一共展示了OrderDetail::model方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1:

        </div>
        <div class="portlet-body">
            <div class="table-responsive">
               <table class="table table-striped table-hover">
                    <thead>
                        <tr>
                            <th>#</th>
                            <th>Nama Barang</th>
                            <th>Kategori</th>
                            <th>Jumlah</th>
                            <th>Harga</th>
                        </tr>
                    </thead>
                    <tbody>
                    <?php 
$cek = OrderDetail::model()->findAllByAttributes(array('KODE_ORDER' => $model->KODE_ORDER));
foreach ($cek as $dex => $row) {
    ?>
                        <tr>
                            <td><?php 
    echo $dex + 1;
    ?>
</td>
                            <td><?php 
    echo $row->item->NAMA_ITEM;
    ?>
</td>
                            <td><?php 
    echo $row->item->kategori->KATEGORI;
    ?>
</td>
开发者ID:bangphe,项目名称:klinik,代码行数:31,代码来源:view.php

示例2: actionDelete

 /**
  * Deletes a particular model.
  * If deletion is successful, the browser will be redirected to the 'admin' page.
  * @param integer $id the ID of the model to be deleted
  */
 public function actionDelete($id)
 {
     // $this->loadModel($id)->delete();
     $order = $this->loadModel($id);
     $criteria = new CDbCriteria();
     $criteria->condition = 'KODE_ORDER = :order';
     $criteria->params = array(':order' => $id);
     $orderdetail = OrderDetail::model()->deleteAll($criteria);
     //$orderdetail->delete();
     $order->delete();
     // var_dump(); die();
     // if AJAX request (triggered by deletion via admin grid view), we should not redirect the browser
     if (!isset($_GET['ajax'])) {
         Yii::app()->user->setFlash('info', MyFormatter::alertError('<strong>Selamat!</strong> Data telah berhasil dihapus.'));
         $this->redirect(isset($_POST['returnUrl']) ? $_POST['returnUrl'] : array('index'));
     }
 }
开发者ID:bangphe,项目名称:klinik,代码行数:22,代码来源:OrderController.php

示例3: loadOrderDetailByOrder

 public function loadOrderDetailByOrder($orderID, $storeID)
 {
     $models = OrderDetail::model()->findAll('s_order_id = :s_order_id and s_store_id = :s_store_id', array(':s_order_id' => $orderID, ':s_store_id' => $storeID));
     return $models;
 }
开发者ID:hson91,项目名称:posnail,代码行数:5,代码来源:OrderController.php

示例4: getJumlahItem

 public static function getJumlahItem($kdorder)
 {
     $criteria = new CDbCriteria();
     $criteria->condition = 'KODE_ORDER=:kdorder';
     $criteria->params = array(':kdorder' => $kdorder);
     $jumlah = OrderDetail::model()->count($criteria);
     return $jumlah;
 }
开发者ID:bangphe,项目名称:klinik,代码行数:8,代码来源:OrderDetail.php

示例5: loadModel

 /**
  * 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 = OrderDetail::model()->findByPk($id);
     if ($model === null) {
         throw new CHttpException(404, 'The requested page does not exist.');
     }
     return $model;
 }
开发者ID:ndrahawk,项目名称:Biruni-ERP,代码行数:13,代码来源:OrderDetailController.php

示例6: actionGetDetail

 /**
  * Return de Details about an Order
  **/
 public function actionGetDetail($id)
 {
     $return = array();
     if ($id != '') {
         $request = Request::model()->findByPk($id);
         $models = OrderDetail::model()->findAll('request_id=:request_id', array(':request_id' => $id));
         foreach ($models as $item) {
             $temp['StockTime'] = $item->StockTime;
             $temp['ShipTime'] = $item->ShipTime;
             $temp['ManualQty'] = $item->ManualQty;
             $Items[] = Item::model()->findByPk($item->item_id);
             $params[] = $temp;
         }
         $reqDet = RequestDetail::getItemDetails($Items, $request->P1Start, $request->P1End, $request->P2Start, $request->P2End, $params);
         $return['success'] = true;
         // Agregar aca los mismos criterios de busqueda que se apliquen a findAll
         $return['totalCount'] = count($reqDet);
         //$models["totalCount"]; //Item::model()->count();//$criteria
         $return['orderDetails'] = $reqDet;
     } else {
         $return['success'] = false;
         $return['totalCount'] = 0;
         //$models["totalCount"]; //Item::model()->count();//$criteria
         $return['orderDetails'] = array();
     }
     echo CJSON::encode($return);
 }
开发者ID:rralcala,项目名称:importacionesSrv,代码行数:30,代码来源:RequestDetailController.php


注:本文中的OrderDetail::model方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。