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


PHP Orders::search方法代码示例

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


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

示例1: actionList

 /**
  * List all orders and
  */
 public function actionList()
 {
     $this->layout = "column2";
     $model = new Orders();
     $model->unsetAttributes();
     $listDataProvider = null;
     if (isset($_POST['Orders'])) {
         $model->attributes = $_POST['Orders'];
     }
     if (isset($_POST['searchWhat'])) {
         $criteria = new CDbCriteria();
         if ($_POST['searchWhat'] === 'name') {
             $criteria->compare("concat(tbl_customer.title,' ',tbl_customer.firstname,' ',tbl_customer.lastname)", $_POST['searchName'], true, "OR");
             $criteria->join = "left join tbl_customer on tbl_customer.id = t.customer_id";
             $criteria->order = "t.order_date DESC";
             // $criteria->compare
         } else {
             if ($_POST['searchWhat'] === 'order_date') {
                 $dateFormatted = date("Y-m-d", strtotime($_POST['searchOrderDate']));
                 $criteria->addCondition("date(order_date) = '" . $dateFormatted . "'");
                 $criteria->order = "t.order_date DESC";
             }
         }
         $listDataProvider = new CActiveDataProvider('Orders', array('criteria' => $criteria, 'pagination' => false));
         // print_r($listDataProvider->criteria);
         // print_r($listDataProvider->data);
         // die();
     } else {
         $listDataProvider = $model->search();
     }
     $this->render('list', array('model' => $model, 'listDataProvider' => $listDataProvider));
 }
开发者ID:kevindaus,项目名称:Order-Billing-Inventory-System-Marcials-Furniture,代码行数:35,代码来源:InvoiceController.php

示例2: validateAccess

 public function validateAccess()
 {
     $objOrder = new Orders();
     $objOrder->setCompany(request_var("company"));
     $objOrder->setOffice(DEFAULT_ID);
     $objOrder->setUserWeb(request_var("username"));
     $objOrder->setPassWeb(request_var("password"));
     $objOrder->setInitDate("01/01/2000");
     $objOrder->setEndDate("01/01/2020");
     $_response = $objOrder->search();
     if (is_array($_response) && count($_response)) {
         $_response = $_response["ConsultarOrdenWebSigLabResult"]["ClsOrdenes"];
         $objOrder->setOffice($_response["OficinaId"]);
         $objOrder->setOrderId($_response["OrdId"]);
         $objOrder->setTable(TEMP_TABLE_RESULTS . $objOrder->getOrderId());
         $_response = $objOrder->viewResult();
         if (is_array($_response) && count($_response)) {
             $objOrder->saveResult($_response);
             $header = $objOrder->generateHeader();
             $menu = $objOrder->generateMenu();
             $resultados = $objOrder->viewResultDetail();
             $printer = $objOrder->generatePrinter();
             $footer = CLIENT_FOOTER . " " . date('Y') . " -  Todos los Derechos Reservados.";
             include "../view/lab_results.php";
         } else {
             echo "<b>No hay detalle a mostrar.</b>";
         }
     }
 }
开发者ID:atoledov,项目名称:siglab,代码行数:29,代码来源:controlPatient.php

示例3: actionExport

 public function actionExport()
 {
     $model = new Orders();
     $model->unsetAttributes();
     // clear any default values
     if (isset($_POST['Orders'])) {
         $model->attributes = $_POST['Orders'];
     }
     $exportType = $_POST['fileType'];
     $this->widget('ext.heart.export.EHeartExport', array('title' => 'List of Orders', 'dataProvider' => $model->search(), 'filter' => $model, 'grid_mode' => 'export', 'exportType' => $exportType, 'columns' => array('order_id', 'expense_id', 'just_id', 'type', 'count', 'table_id')));
 }
开发者ID:azizbekvahidov,项目名称:foods,代码行数:11,代码来源:OrdersController.php


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