Ejemplo n.º 1
0
 public function Delete($ID)
 {
     $ID = (int) $ID;
     if ($ID <= 0) {
         return false;
     }
     $result = Internals\DiscountTable::delete($ID);
     return $result->isSuccess();
 }
Ejemplo n.º 2
0
        switch ($_REQUEST['action']) {
            case 'activate':
            case 'deactivate':
                $fields = array('ACTIVE' => $_REQUEST['action'] == 'activate' ? 'Y' : 'N');
                foreach ($listID as &$discountID) {
                    $result = Internals\DiscountTable::update($discountID, $fields);
                    if (!$result->isSuccess()) {
                        $adminList->AddGroupError(implode('<br>', $result->getErrorMessages()), $discountID);
                    }
                    unset($result);
                }
                unset($discountID, $fields);
                break;
            case 'delete':
                foreach ($listID as &$discountID) {
                    $result = Internals\DiscountTable::delete($discountID);
                    if (!$result->isSuccess()) {
                        $adminList->AddGroupError(implode('<br>', $result->getErrorMessages()), $discountID);
                    }
                    unset($result);
                }
                unset($discountID);
                break;
        }
    }
    unset($listID);
}
$headerList = array();
$headerList['ID'] = array('id' => 'ID', 'content' => 'ID', 'title' => '', 'sort' => 'ID', 'default' => true);
$headerList['LID'] = array('id' => 'LID', 'content' => Loc::getMessage('PERS_TYPE_LID'), 'title' => Loc::getMessage('BX_SALE_ADM_DSC_HEADER_TITLE_LID'), 'sort' => 'LID', 'default' => true);
$headerList['NAME'] = array('id' => 'NAME', 'content' => Loc::getMessage('BT_SALE_DISCOUNT_ADM_TITLE_NAME'), 'title' => Loc::getMessage('BX_SALE_ADM_DSC_HEADER_TITLE_NAME'), 'default' => true);