當前位置: 首頁>>代碼示例>>PHP>>正文


PHP CCurrency::Delete方法代碼示例

本文整理匯總了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")));
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:31,代碼來源:currencies.php

示例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;
 }
開發者ID:mrdeadmouse,項目名稱:u136006,代碼行數:32,代碼來源:crm_currency.php


注:本文中的CCurrency::Delete方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。