USP_DATAFORMTEMPLATE_LOAD_EVENTISMULTIPART

The load procedure used by the view dataform template "Event Is Multi-Part View Form"

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter used to load the fields defined on the form.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@ISMULTIPART bit INOUT Event is multi-part

Definition

Copy

                CREATE procedure dbo.USP_DATAFORMTEMPLATE_LOAD_EVENTISMULTIPART
                (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @ISMULTIPART bit = null output
                )    
                as
                set nocount on;

                set @DATALOADED = 1;
                if (select count(ID) from dbo.EVENT where MAINEVENTID = @ID) > 0 or (select count(EVENTHIERARCHY.ID) from dbo.EVENTHIERARCHY inner join dbo.EVENT on EVENT.ID = EVENTHIERARCHY.ID where EVENTHIERARCHY.ID = @ID and EVENT.MAINEVENTID is null) > 0
                    set @ISMULTIPART = 1;
                else
                    set @ISMULTIPART = 0;

                return 0;