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


PHP CustomField::DeleteTextValues方法代码示例

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


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

示例1: btnDelete_Click

 protected function btnDelete_Click($strFormId, $strControlId, $strParameter)
 {
     try {
         $objCustomFieldArray = $this->objCompany->objCustomFieldArray;
         $this->objCompany->Delete();
         // Custom Field Values for text fields must be manually deleted because MySQL ON DELETE will not cascade to them
         // The values should not get deleted for select values
         CustomField::DeleteTextValues($objCustomFieldArray);
         $this->RedirectToListPage();
     } catch (QDatabaseExceptionBase $objExc) {
         if ($objExc->ErrorNumber == 1451) {
             $this->btnDelete->Warning = 'This company cannot be deleted because it is associated with one or more shipments or receipts.';
         } else {
             throw new QDatabaseExceptionBase();
         }
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:17,代码来源:company_edit.php

示例2: btnDelete_Click

 protected function btnDelete_Click($strFormId, $strControlId, $strParameter)
 {
     $objCustomFieldArray = $this->objReceipt->objCustomFieldArray;
     $blnError = false;
     if ($this->objAssetTransactionArray) {
         foreach ($this->objAssetTransactionArray as $objAssetTransaction) {
             if ($objAssetTransaction->blnReturnReceivedStatus()) {
                 $blnError = true;
                 $this->btnDelete->Warning = 'All Assets and Inventory must be Pending to delete this receipt.';
             }
         }
     }
     if ($this->objInventoryTransactionArray) {
         foreach ($this->objInventoryTransactionArray as $objInventoryTransaction) {
             if ($objInventoryTransaction->blnReturnReceivedStatus()) {
                 $blnError = true;
                 $this->btnDelete->Warning = 'All Assets and Inventory must be Pending to delete this receipt.';
             }
         }
     }
     if (!$blnError) {
         // Take out the inventory from the TBR InventoryLocation
         if ($this->objInventoryTransactionArray) {
             foreach ($this->objInventoryTransactionArray as $objInventoryTransaction) {
                 $objInventoryTransaction->InventoryLocation->Quantity -= $objInventoryTransaction->Quantity;
                 $objInventoryTransaction->InventoryLocation->Save();
             }
         }
         // Delete any assets that were created while scheduling this receipt
         if ($this->objAssetTransactionArray) {
             foreach ($this->objAssetTransactionArray as $objAssetTransaction) {
                 if ($objAssetTransaction->NewAssetFlag) {
                     $objAssetTransaction->Asset->Delete();
                 }
             }
         }
         // Load the Transaction
         $this->objTransaction = Transaction::Load($this->objReceipt->TransactionId);
         // Delete the Transaction Object and let it MySQL CASCADE down to asset_transaction, inventory_transaction, and receipt
         $this->objTransaction->Delete();
         CustomField::DeleteTextValues($objCustomFieldArray);
         $this->RedirectToListPage();
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:44,代码来源:receipt_edit.php

示例3: btnDelete_Click

 public function btnDelete_Click($strFormId, $strControlId, $strParameter)
 {
     try {
         $objCustomFieldArray = $this->objInventoryModel->objCustomFieldArray;
         $this->objInventoryModel->Delete();
         // Custom Field Values for text fields must be manually deleted because MySQL ON DELETE will not cascade to them
         // The values do not get deleted for select values
         CustomField::DeleteTextValues($objCustomFieldArray);
         QApplication::Redirect('inventory_model_list.php');
     } catch (QDatabaseExceptionBase $objExc) {
         if ($objExc->ErrorNumber == 1451) {
             $this->btnDelete->Warning = 'This inventory model cannot be deleted because it is associated with one or more transactions.';
         } else {
             throw new QDatabaseExceptionBase();
         }
     }
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:17,代码来源:QInventoryEditComposite.class.php

示例4: btnDelete_Click

 protected function btnDelete_Click($strFormId, $strControlId, $strParameter)
 {
     $objCustomFieldArray = $this->objShipment->objCustomFieldArray;
     // Just delete the transaction and MySQL CASCADE down to shipment, asset_transaction, and inventory_transaction
     $this->objTransaction = Transaction::Load($this->objShipment->TransactionId);
     $this->objTransaction->Delete();
     CustomField::DeleteTextValues($objCustomFieldArray);
     QApplication::Redirect('../shipping/shipment_list.php');
 }
开发者ID:heshuai64,项目名称:einv2,代码行数:9,代码来源:shipment_edit.php


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