當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。