예제 #1
0
 protected function dtgInventoryModel_Bind()
 {
     // If the search button has been pressed
     if ($this->blnSearch) {
         $this->assignSearchValues();
     }
     $strInventoryModelCode = $this->strInventoryModelCode;
     $intLocationId = $this->intLocationId;
     $intInventoryModelId = $this->intInventoryModelId;
     $intCategoryId = $this->intCategoryId;
     $intManufacturerId = $this->intManufacturerId;
     $strShortDescription = $this->strShortDescription;
     $strDateModifiedFirst = $this->strDateModifiedFirst;
     $strDateModifiedLast = $this->strDateModifiedLast;
     $strDateModified = $this->strDateModified;
     $blnAttachment = $this->blnAttachment;
     $arrCustomFields = $this->arrCustomFields;
     // Enable Profiling
     // QApplication::$Database[1]->EnableProfiling();
     // Expand the Asset object to include the AssetModel, Category, Manufacturer, and Location Objects
     //$objExpansionMap[InventoryModel::ExpandCategory] = true;
     //$objExpansionMap[InventoryModel::ExpandManufacturer] = true;
     $objExpansionMap = array();
     $mc = new Memcache();
     $mc->connect("127.0.0.1", 11211);
     // If the search form has been posted
     $this->dtgInventoryModel->TotalItemCount = InventoryModel::CountBySearch($strInventoryModelCode, $intLocationId, $intInventoryModelId, $intCategoryId, $intManufacturerId, $strShortDescription, $arrCustomFields, $strDateModified, $strDateModifiedFirst, $strDateModifiedLast, $blnAttachment, $objExpansionMap, $mc);
     if ($this->dtgInventoryModel->TotalItemCount == 0) {
         $this->dtgInventoryModel->ShowHeader = false;
     } else {
         $this->dtgInventoryModel->ShowHeader = true;
         $this->dtgInventoryModel->DataSource = InventoryModel::LoadArrayBySearch($strInventoryModelCode, $intLocationId, $intInventoryModelId, $intCategoryId, $intManufacturerId, $strShortDescription, $arrCustomFields, $strDateModified, $strDateModifiedFirst, $strDateModifiedLast, $blnAttachment, $this->dtgInventoryModel->SortInfo, $this->dtgInventoryModel->LimitInfo, $objExpansionMap, $mc);
     }
     $this->blnSearch = false;
 }