UFN_REGISTRANTREGISTRATION_VALIDEVENTPRICE

Validates that the event price comes from the same event as the registrant.

Return

Return Type
bit

Parameters

Parameter Parameter Type Mode Description
@REGISTRANTID uniqueidentifier IN
@EVENTPRICEID uniqueidentifier IN

Definition

Copy


            create function dbo.UFN_REGISTRANTREGISTRATION_VALIDEVENTPRICE
            (
                @REGISTRANTID uniqueidentifier = null,
                @EVENTPRICEID uniqueidentifier = null
            )
            returns bit with execute as caller
            as
            begin
                if
                (
                    select
                        EVENTID
                    from
                        dbo.REGISTRANT
                    where
                        ID = @REGISTRANTID
                )
                =
                (
                    select
                        EVENTID
                    from
                        dbo.EVENTPRICE
                    where
                        ID = @EVENTPRICEID
                )
                    return 1;

                return 0;
            end