UFN_EVENT_VALIDAPPEAL_NOTMAINEVENT
Validates that the team fundraising event is not a main event for other events. Main events cannot be team fundraising events.
Return
Return Type |
---|
bit |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@EVENTID | uniqueidentifier | IN | |
@APPEALID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_EVENT_VALIDAPPEAL_NOTMAINEVENT
(
@EVENTID uniqueidentifier = null,
@APPEALID uniqueidentifier = null
)
returns bit with execute as caller
as
begin
if @APPEALID is not null
begin
if exists
(
select
ID
from
dbo.EVENT
where
EVENT.MAINEVENTID = @EVENTID
) --Supporting events exist, a main event cannot be a team fundraising event
return 0;
else
return 1;
end
return 1;
end