本文整理汇总了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();
}
}
}
示例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();
}
}
示例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();
}
}
}
示例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');
}