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


PHP QQN::InventoryLocation方法代码示例

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


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

示例1: __construct

 public function __construct($objParentObject, $strSetEditPanelMethod, $strCloseEditPanelMethod, $strControlId = null)
 {
     // Call the Parent
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     // Record Method Callbacks
     $this->strSetEditPanelMethod = $strSetEditPanelMethod;
     $this->strCloseEditPanelMethod = $strCloseEditPanelMethod;
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_CONTROL->ParentControl->dtgInventoryLocation_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colInventoryLocationId = new QDataGridColumn(QApplication::Translate('Inventory Location Id'), '<?= $_ITEM->InventoryLocationId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->InventoryLocationId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->InventoryLocationId, false)));
     $this->colInventoryModelId = new QDataGridColumn(QApplication::Translate('Inventory Model Id'), '<?= $_CONTROL->ParentControl->dtgInventoryLocation_InventoryModel_Render($_ITEM); ?>');
     $this->colLocationId = new QDataGridColumn(QApplication::Translate('Location Id'), '<?= $_CONTROL->ParentControl->dtgInventoryLocation_Location_Render($_ITEM); ?>');
     $this->colQuantity = new QDataGridColumn(QApplication::Translate('Quantity'), '<?= $_ITEM->Quantity; ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->Quantity), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->Quantity, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_CONTROL->ParentControl->dtgInventoryLocation_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_CONTROL->ParentControl->dtgInventoryLocation_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->CreationDate, false)));
     $this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_CONTROL->ParentControl->dtgInventoryLocation_ModifiedByObject_Render($_ITEM); ?>');
     $this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->ModifiedDate, false)));
     // Setup DataGrid
     $this->dtgInventoryLocation = new QDataGrid($this);
     $this->dtgInventoryLocation->CellSpacing = 0;
     $this->dtgInventoryLocation->CellPadding = 4;
     $this->dtgInventoryLocation->BorderStyle = QBorderStyle::Solid;
     $this->dtgInventoryLocation->BorderWidth = 1;
     $this->dtgInventoryLocation->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgInventoryLocation->Paginator = new QPaginator($this->dtgInventoryLocation);
     $this->dtgInventoryLocation->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgInventoryLocation->UseAjax = true;
     // Specify the local databind method this datagrid will use
     $this->dtgInventoryLocation->SetDataBinder('dtgInventoryLocation_Bind', $this);
     $this->dtgInventoryLocation->AddColumn($this->colEditLinkColumn);
     $this->dtgInventoryLocation->AddColumn($this->colInventoryLocationId);
     $this->dtgInventoryLocation->AddColumn($this->colInventoryModelId);
     $this->dtgInventoryLocation->AddColumn($this->colLocationId);
     $this->dtgInventoryLocation->AddColumn($this->colQuantity);
     $this->dtgInventoryLocation->AddColumn($this->colCreatedBy);
     $this->dtgInventoryLocation->AddColumn($this->colCreationDate);
     $this->dtgInventoryLocation->AddColumn($this->colModifiedBy);
     $this->dtgInventoryLocation->AddColumn($this->colModifiedDate);
     // Setup the Create New button
     $this->btnCreateNew = new QButton($this);
     $this->btnCreateNew->Text = QApplication::Translate('Create a New') . ' ' . QApplication::Translate('InventoryLocation');
     $this->btnCreateNew->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'btnCreateNew_Click'));
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:51,代码来源:InventoryLocationListPanelBase.class.php

示例2: Form_Create

 protected function Form_Create()
 {
     // Setup DataGrid Columns
     $this->colEditLinkColumn = new QDataGridColumn(QApplication::Translate('Edit'), '<?= $_FORM->dtgInventoryLocation_EditLinkColumn_Render($_ITEM) ?>');
     $this->colEditLinkColumn->HtmlEntities = false;
     $this->colInventoryLocationId = new QDataGridColumn(QApplication::Translate('Inventory Location Id'), '<?= $_ITEM->InventoryLocationId; ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->InventoryLocationId), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->InventoryLocationId, false)));
     $this->colInventoryModelId = new QDataGridColumn(QApplication::Translate('Inventory Model Id'), '<?= $_FORM->dtgInventoryLocation_InventoryModel_Render($_ITEM); ?>');
     $this->colLocationId = new QDataGridColumn(QApplication::Translate('Location Id'), '<?= $_FORM->dtgInventoryLocation_Location_Render($_ITEM); ?>');
     $this->colQuantity = new QDataGridColumn(QApplication::Translate('Quantity'), '<?= $_ITEM->Quantity; ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->Quantity), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->Quantity, false)));
     $this->colCreatedBy = new QDataGridColumn(QApplication::Translate('Created By'), '<?= $_FORM->dtgInventoryLocation_CreatedByObject_Render($_ITEM); ?>');
     $this->colCreationDate = new QDataGridColumn(QApplication::Translate('Creation Date'), '<?= $_FORM->dtgInventoryLocation_CreationDate_Render($_ITEM); ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->CreationDate, false)));
     $this->colModifiedBy = new QDataGridColumn(QApplication::Translate('Modified By'), '<?= $_FORM->dtgInventoryLocation_ModifiedByObject_Render($_ITEM); ?>');
     $this->colModifiedDate = new QDataGridColumn(QApplication::Translate('Modified Date'), '<?= QString::Truncate($_ITEM->ModifiedDate, 200); ?>', array('OrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->ModifiedDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::InventoryLocation()->ModifiedDate, false)));
     // Setup DataGrid
     $this->dtgInventoryLocation = new QDataGrid($this);
     $this->dtgInventoryLocation->CellSpacing = 0;
     $this->dtgInventoryLocation->CellPadding = 4;
     $this->dtgInventoryLocation->BorderStyle = QBorderStyle::Solid;
     $this->dtgInventoryLocation->BorderWidth = 1;
     $this->dtgInventoryLocation->GridLines = QGridLines::Both;
     // Datagrid Paginator
     $this->dtgInventoryLocation->Paginator = new QPaginator($this->dtgInventoryLocation);
     $this->dtgInventoryLocation->ItemsPerPage = 10;
     // Specify Whether or Not to Refresh using Ajax
     $this->dtgInventoryLocation->UseAjax = false;
     // Specify the local databind method this datagrid will use
     $this->dtgInventoryLocation->SetDataBinder('dtgInventoryLocation_Bind');
     $this->dtgInventoryLocation->AddColumn($this->colEditLinkColumn);
     $this->dtgInventoryLocation->AddColumn($this->colInventoryLocationId);
     $this->dtgInventoryLocation->AddColumn($this->colInventoryModelId);
     $this->dtgInventoryLocation->AddColumn($this->colLocationId);
     $this->dtgInventoryLocation->AddColumn($this->colQuantity);
     $this->dtgInventoryLocation->AddColumn($this->colCreatedBy);
     $this->dtgInventoryLocation->AddColumn($this->colCreationDate);
     $this->dtgInventoryLocation->AddColumn($this->colModifiedBy);
     $this->dtgInventoryLocation->AddColumn($this->colModifiedDate);
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:37,代码来源:InventoryLocationListFormBase.class.php

示例3: CountByCreatedBy

 /**
  * Count InventoryLocations
  * by CreatedBy Index(es)
  * @param integer $intCreatedBy
  * @return int
  */
 public static function CountByCreatedBy($intCreatedBy, $objOptionalClauses = null)
 {
     // Call InventoryLocation::QueryCount to perform the CountByCreatedBy query
     return InventoryLocation::QueryCount(QQ::Equal(QQN::InventoryLocation()->CreatedBy, $intCreatedBy), $objOptionalClauses);
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:11,代码来源:InventoryLocationGen.class.php

示例4: GetOrderByClause

 protected function GetOrderByClause()
 {
     $objOrderByClause = QQ::Clause(QQ::OrderBy(QQN::InventoryLocation()->Location->ShortDescription, QQN::InventoryLocation()->InventoryModel->ShortDescription));
     return $objOrderByClause;
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:5,代码来源:inventory_location_report.php

示例5: btnSave_Click

 protected function btnSave_Click($strFormId, $strControlId, $strParameter)
 {
     $blnError = false;
     // Do not allow duplicate Location names
     if ($this->blnEditMode) {
         $objLocationDuplicate = Location::QuerySingle(QQ::AndCondition(QQ::Equal(QQN::Location()->ShortDescription, $this->txtShortDescription->Text), QQ::NotEqual(QQN::Location()->LocationId, $this->objLocation->LocationId)));
     } else {
         $objLocationDuplicate = Location::QuerySingle(QQ::Equal(QQN::Location()->ShortDescription, $this->txtShortDescription->Text));
     }
     if ($objLocationDuplicate) {
         $blnError = true;
         $this->txtShortDescription->Warning = 'This Location Name is already in use. Please try another.';
         $this->txtShortDescription->Focus();
     }
     // Check if there is any inventory at this location
     $objInventoryLocation = InventoryLocation::QuerySingle(QQ::Equal(QQN::InventoryLocation()->LocationId, $this->objLocation->LocationId), QQ::Clause(QQ::Sum(QQN::InventoryLocation()->Quantity, 'QuantityTotal')));
     $intInventoryAtLocation = $objInventoryLocation->GetVirtualAttribute('QuantityTotal');
     // Don't allow disabling of locations with assets or inventory quantities
     if ($this->blnEditMode && $this->objLocation->EnabledFlag && !$this->chkEnabled->Checked && (Asset::CountByLocationId($this->objLocation->LocationId) > 0 || $intInventoryAtLocation > 0)) {
         $blnError = true;
         $this->chkEnabled->Warning = 'Location must be empty before disabling.';
         $this->chkEnabled->Focus();
     }
     if (!$blnError) {
         try {
             $this->UpdateLocationFields();
             $this->objLocation->Save();
             $this->RedirectToListPage();
         } catch (QExtendedOptimisticLockingException $objExc) {
             $this->btnCancel->Warning = sprintf('This location has been updated by another user. You must <a href="location_edit.php?intLocationId=%s">Refresh</a> to edit this location.', $this->objLocation->LocationId);
         }
     }
 }
开发者ID:brustj,项目名称:tracmor,代码行数:33,代码来源:location_edit.php

示例6: ResolveContentItem

 /**
  * Used internally by the Meta-based Add Column tools.
  *
  * Given a QQNode or a Text String, this will return a InventoryLocation-based QQNode.
  * It will also verify that it is a proper InventoryLocation-based QQNode, and will throw an exception otherwise.
  *
  * @param mixed $mixContent
  * @return QQNode
  */
 protected function ResolveContentItem($mixContent)
 {
     if ($mixContent instanceof QQNode) {
         if (!$mixContent->_ParentNode) {
             throw new QCallerException('Content QQNode cannot be a Top Level Node');
         }
         if ($mixContent->_RootTableName == 'inventory_location') {
             if ($mixContent instanceof QQReverseReferenceNode && !$mixContent->_PropertyName) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             }
             $objCurrentNode = $mixContent;
             while ($objCurrentNode = $objCurrentNode->_ParentNode) {
                 if (!$objCurrentNode instanceof QQNode) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
                 if ($objCurrentNode instanceof QQReverseReferenceNode && !$objCurrentNode->_PropertyName) {
                     throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
                 }
             }
             return $mixContent;
         } else {
             throw new QCallerException('Content QQNode has a root table of "' . $mixContent->_RootTableName . '". Must be a root of "inventory_location".');
         }
     } else {
         if (is_string($mixContent)) {
             switch ($mixContent) {
                 case 'InventoryLocationId':
                     return QQN::InventoryLocation()->InventoryLocationId;
                 case 'InventoryModelId':
                     return QQN::InventoryLocation()->InventoryModelId;
                 case 'InventoryModel':
                     return QQN::InventoryLocation()->InventoryModel;
                 case 'LocationId':
                     return QQN::InventoryLocation()->LocationId;
                 case 'Location':
                     return QQN::InventoryLocation()->Location;
                 case 'Quantity':
                     return QQN::InventoryLocation()->Quantity;
                 case 'CreatedBy':
                     return QQN::InventoryLocation()->CreatedBy;
                 case 'CreatedByObject':
                     return QQN::InventoryLocation()->CreatedByObject;
                 case 'CreationDate':
                     return QQN::InventoryLocation()->CreationDate;
                 case 'ModifiedBy':
                     return QQN::InventoryLocation()->ModifiedBy;
                 case 'ModifiedByObject':
                     return QQN::InventoryLocation()->ModifiedByObject;
                 case 'ModifiedDate':
                     return QQN::InventoryLocation()->ModifiedDate;
                 default:
                     throw new QCallerException('Simple Property not found in InventoryLocationDataGrid content: ' . $mixContent);
             }
         } else {
             if ($mixContent instanceof QQAssociationNode) {
                 throw new QCallerException('Content QQNode cannot go through any "To Many" association nodes.');
             } else {
                 throw new QCallerException('Invalid Content type');
             }
         }
     }
 }
开发者ID:proxymoron,项目名称:tracmor,代码行数:71,代码来源:InventoryLocationDataGridGen.class.php


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