本文整理匯總了PHP中CCurrency::Delete方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCurrency::Delete方法的具體用法?PHP CCurrency::Delete怎麽用?PHP CCurrency::Delete使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類CCurrency
的用法示例。
在下文中一共展示了CCurrency::Delete方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: while
}
if ($CURRENCY_RIGHT == "W" && ($arID = $lAdmin->GroupAction())) {
if ($_REQUEST['action_target'] == 'selected') {
$rsData = CCurrency::GetList($by, $order);
while ($arRes = $rsData->Fetch()) {
$arID[] = $arRes['ID'];
}
}
foreach ($arID as $ID) {
if (strlen($ID) <= 0) {
continue;
}
switch ($_REQUEST['action']) {
case "delete":
if ($CURRENCY_RIGHT == "W") {
if (!CCurrency::Delete($ID)) {
if ($ex = $APPLICATION->GetException()) {
$lAdmin->AddGroupError($ex->GetString(), $ID);
} else {
$lAdmin->AddGroupError(GetMessage("currency_err1"), $ID);
}
}
}
break;
}
}
}
$rsData = CCurrency::GetList($by, $order);
$rsData = new CAdminResult($rsData, $sTableID);
$rsData->NavStart();
$lAdmin->NavText($rsData->GetNavPrint(GetMessage("CURRENCY_TITLE")));
示例2: Delete
public static function Delete($ID)
{
if (!CModule::IncludeModule('currency')) {
self::$LAST_ERROR = GetMessage('CRM_CURRERCY_MODULE_IS_NOT_INSTALLED');
return false;
}
IncludeModuleLangFile(__FILE__);
global $APPLICATION;
$ID = strval($ID);
if (strlen($ID) !== 3) {
//Invalid ID is supplied. Are you A.Krasichkov?
//self::$LAST_ERROR = GetMessage('CRM_CURRERCY_MODULE_INVALID_ID');
return false;
}
if ($ID === self::GetBaseCurrencyID()) {
self::$LAST_ERROR = GetMessage('CRM_CURRERCY_ERR_DELETION_OF_BASE_CURRENCY');
return false;
}
if ($ID === self::GetAccountCurrencyID()) {
self::$LAST_ERROR = GetMessage('CRM_CURRERCY_ERR_DELETION_OF_ACCOUNTING_CURRENCY');
return false;
}
if (!CCurrency::Delete($ID)) {
$ex = $APPLICATION->GetException();
if ($ex) {
self::$LAST_ERROR = $ex->GetString();
}
return false;
}
self::ClearCache();
return true;
}