spAddUpdate_FundRaisers
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PKID | int | INOUT | |
@SiteContentID | int | IN | |
@BackOfficeID | int | IN | |
@Name | nvarchar(40) | IN | |
@Description | nvarchar(200) | IN | |
@CategoryID | int | IN | |
@StartDate | datetime | IN | |
@EndDate | datetime | IN | |
@Inactive | bit | IN | |
@Goal | money | IN | |
@Dirty | bit | IN | |
@Options | ntext | IN | |
@EmailIDAckn | int | IN | |
@EmailIDAppeal | int | IN | |
@EmailIDThanks | int | IN | |
@EmailIDFollowUp | int | IN | |
@EmailIDMisc | int | IN | |
@IsFunctional | bit | IN | |
@ConstituentCodeID | int | IN | |
@AthonLocked | bit | IN | |
@AthonDownloadPledges | bit | IN | |
@IsCarePageManager | bit | IN | |
@MaxNumberOfPages | int | IN | |
@SyncStatus | int | IN | |
@DateLastSynced | datetime | IN |
Definition
Copy
CREATE PROCEDURE [dbo].[spAddUpdate_FundRaisers]
(
@PKID int output,
@SiteContentID int,
@BackOfficeID int,
@Name nvarchar(40),
@Description nvarchar(200),
@CategoryID int,
@StartDate datetime,
@EndDate datetime,
@Inactive bit,
@Goal money,
@Dirty bit,
@Options ntext,
@EmailIDAckn int,
@EmailIDAppeal int,
@EmailIDThanks int,
@EmailIDFollowUp int,
@EmailIDMisc int,
@IsFunctional bit,
@ConstituentCodeID int,
@AthonLocked bit,
@AthonDownloadPledges bit,
@IsCarePageManager bit,
@MaxNumberOfPages int,
@SyncStatus int,
@DateLastSynced datetime
)
AS
begin transaction
if (@PKID<=0)
begin
INSERT INTO FundRaisers
(
[SiteContentID] ,
[BackOfficeID],
[Name],
[Description],
[CategoryID],
[StartDate],
[EndDate],
[Inactive],
[Goal],
[Dirty],
[Options],
[EmailIDAckn],
[EmailIDAppeal],
[EmailIDThanks],
[EmailIDFollowUp],
[EmailIDMisc],
[IsFunctional],
[ConstituentCodeID],
[AthonLocked],
[AthonDownloadPledges],
[IsCarePageManager],
[MaxNumberOfPages],
[SyncStatus],
[DateLastSynced]
)VALUES(
@SiteContentID ,
@BackOfficeID,
@Name,
@Description,
@CategoryID,
@StartDate,
@EndDate,
@Inactive,
@Goal,
@Dirty,
@Options,
@EmailIDAckn,
@EmailIDAppeal,
@EmailIDThanks,
@EmailIDFollowUp,
@EmailIDMisc,
@IsFunctional,
@ConstituentCodeID,
@AthonLocked,
@AthonDownloadPledges,
@IsCarePageManager,
@MaxNumberOfPages,
@SyncStatus,
@DateLastSynced
)
SELECT
@PKID = @@Identity
end else begin
UPDATE FundRaisers SET
[SiteContentID] =@SiteContentID,
[BackOfficeID] =@BackOfficeID,
[Name] =@Name,
[Description] =@Description,
[CategoryID] =@CategoryID,
[StartDate] =@StartDate,
[EndDate] =@EndDate,
[Inactive] =@Inactive,
[Goal] =@Goal,
[Dirty] =@Dirty,
[Options] =@Options,
[EmailIDAckn] =@EmailIDAckn,
[EmailIDAppeal] =@EmailIDAppeal,
[EmailIDThanks] =@EmailIDThanks,
[EmailIDFollowUp] =@EmailIDFollowUp,
[EmailIDMisc] =@EmailIDMisc,
[IsFunctional] =@IsFunctional,
[ConstituentCodeID] =@ConstituentCodeID,
[AthonLocked] =@AthonLocked,
[AthonDownloadPledges] =@AthonDownloadPledges,
[IsCarePageManager] =@IsCarePageManager,
[MaxNumberOfPages] =@MaxNumberOfPages,
[SyncStatus] =@SyncStatus,
[DateLastSynced] = @DateLastSynced
WHERE ID=@PKID
end
commit transaction