USP_DATAFORMTEMPLATE_ADD_MEMBERSHIPLEVEL_PRELOAD

The load procedure used by the edit dataform template "Membership Level Add Data Form"

Parameters

Parameter Parameter Type Mode Description
@MEMBERSHIPPROGRAMID uniqueidentifier IN Input parameter indicating the context ID for the record being added.
@TERMS xml INOUT Terms
@BASECURRENCYID uniqueidentifier INOUT Currency

Definition

Copy


                    CREATE procedure dbo.USP_DATAFORMTEMPLATE_ADD_MEMBERSHIPLEVEL_PRELOAD
                    (
                        @MEMBERSHIPPROGRAMID uniqueidentifier,
                        @TERMS xml = null output,
                        @BASECURRENCYID uniqueidentifier = null output
                    )
                    as
                        set nocount on;
                        declare @ID uniqueidentifier;

                        select
                            @BASECURRENCYID = MEMBERSHIPPROGRAM.BASECURRENCYID
                        from
                            dbo.MEMBERSHIPPROGRAM
                        where
                            MEMBERSHIPPROGRAM.ID = @MEMBERSHIPPROGRAMID

                        set @ID = newid()
                        set @TERMS = '<TERMS>
                                        <ITEM>
                                            <AMOUNT></AMOUNT>
                                            <ID>'+convert(nvarchar(36),@ID)+'</ID>
                                            <SEQUENCE></SEQUENCE>
                                            <TERMCODE>0</TERMCODE>
                                            <BASECURRENCYID>'+convert(nvarchar(36),@BASECURRENCYID)+'</BASECURRENCYID>
                                        </ITEM>
                                      </TERMS>'

                        return 0;