本文整理汇总了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;
}