当前位置: 首页>>代码示例>>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;未经允许,请勿转载。