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


PHP CCatalogDiscountSave::Update方法代碼示例

本文整理匯總了PHP中CCatalogDiscountSave::Update方法的典型用法代碼示例。如果您正苦於以下問題:PHP CCatalogDiscountSave::Update方法的具體用法?PHP CCatalogDiscountSave::Update怎麽用?PHP CCatalogDiscountSave::Update使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在CCatalogDiscountSave的用法示例。


在下文中一共展示了CCatalogDiscountSave::Update方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: ChangeActive

 public function ChangeActive($intID, $boolActive = true)
 {
     $intID = (int) $intID;
     if ($intID <= 0) {
         return false;
     }
     return CCatalogDiscountSave::Update($intID, array('ACTIVE' => $boolActive === true ? 'Y' : 'N'), false);
 }
開發者ID:Satariall,項目名稱:izurit,代碼行數:8,代碼來源:discount_save.php

示例2: usort

            }
        }
        if (!empty($arFormRanges)) {
            usort($arFormRanges, "__cmpRange");
        }
    }
    if (empty($arFormRanges)) {
        $arErrors[] = array('id' => 'RANGES', "text" => GetMessage('BT_CAT_DISC_SAVE_EDIT_ERR_RANGES_EMPTY'));
        $bVarsFromForm = true;
    }
    if (!$bVarsFromForm) {
        $arFields = array("XML_ID" => $_POST['XML_ID'], "SITE_ID" => $_POST['SITE_ID'], "NAME" => $_POST['NAME'], "ACTIVE" => $_POST['ACTIVE'] != "Y" ? "N" : "Y", "SORT" => intval($_POST['SORT']), "CURRENCY" => $_POST['CURRENCY'], "ACTIVE_FROM" => $_POST['ACTIVE_FROM'], "ACTIVE_TO" => $_POST['ACTIVE_TO'], "COUNT_SIZE" => $_POST['COUNT_SIZE'], "COUNT_TYPE" => $_POST['COUNT_TYPE'], "ACTION_SIZE" => $_POST['ACTION_SIZE'], "ACTION_TYPE" => $_POST['ACTION_TYPE'], "COUNT_FROM" => $_POST['COUNT_FROM'], "COUNT_TO" => $_POST['COUNT_TO'], "GROUP_IDS" => $_POST['GROUP_IDS'], "RANGES" => $arFormRanges);
    }
    if (!$bVarsFromForm) {
        if ($ID > 0 && !$boolCopy) {
            $mxRes = $obDiscSave->Update($ID, $arFields);
        } else {
            $ID = $obDiscSave->Add($arFields);
            $mxRes = $ID > 0;
        }
        if ($mxRes) {
            if (!empty($apply)) {
                LocalRedirect("/bitrix/admin/cat_discsave_edit.php?ID=" . $ID . "&mess=ok&lang=" . urlencode(LANGUAGE_ID) . "&" . $tabControl->ActiveTabParam());
            } else {
                LocalRedirect("/bitrix/admin/cat_discsave_admin.php?lang=" . urlencode(LANGUAGE_ID));
            }
        } else {
            $bVarsFromForm = true;
        }
    }
}
開發者ID:k-kalashnikov,項目名稱:geekcon_new,代碼行數:31,代碼來源:cat_discsave_edit.php

示例3:

				}
				else
				{
					$lAdmin->AddGroupError(GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_DELETE"), $ID);
				}
				$DB->Rollback();
			}
			$DB->Commit();
			break;

		case "activate":
		case "deactivate":
			if(($rsDiscSaves = $obDiscSave->GetByID($ID)) && ($arFields = $rsDiscSaves->Fetch()))
			{
				$arFields["ACTIVE"] = ($_REQUEST['action'] == "activate" ? "Y" : "N");
				if(!$obDiscSave->Update($ID, $arFields))
				{
					if ($ex = $APPLICATION->GetException())
					{
						$lAdmin->AddGroupError(str_replace('#ERR#',$ex->GetString(),GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_ERR")), $ID);
					}
					else
					{
						$lAdmin->AddGroupError(GetMessage("BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_UNKNOWN"), $ID);
					}
				}
			}
			else
			{
				$lAdmin->AddGroupError(GetMessage('BT_CAT_DISC_SAVE_ADM_ERR_UPDATE_ABSENT'), $ID);
			}
開發者ID:ASDAFF,項目名稱:entask.ru,代碼行數:31,代碼來源:cat_discsave_admin.php

示例4: ChangeActive

	static public function ChangeActive($intID,$boolActive = true)
	{
		$intID = intval($intID);
		if (0 <= $intID)
			return false;

		return CCatalogDiscountSave::Update($intID,array('ACTIVE' => ($boolActive === true ? 'Y' : 'N')),false);
	}
開發者ID:ASDAFF,項目名稱:bxApiDocs,代碼行數:8,代碼來源:discount_save.php


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