USP_DATAFORMTEMPLATE_VIEW_SYSTEMROLE_SITE_SECURITY

The load procedure used by the view dataform template "System Role Site Security Group 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.
@SITEID uniqueidentifier INOUT Site ID
@SITENAME nvarchar(1024) INOUT Site name
@SITEDESCRIPTION nvarchar(max) INOUT Description
@HASSITEID bit INOUT Has Site
@SITESECURITYMODE bit INOUT Site Security Mode

Definition

Copy


                CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_SYSTEMROLE_SITE_SECURITY
                (
                    @ID uniqueidentifier,
                    @DATALOADED bit = 0 output,
                    @SITEID uniqueidentifier = null output,
                    @SITENAME nvarchar(1024) = null output,
                    @SITEDESCRIPTION nvarchar(max) = null output,
                    @HASSITEID bit = null output,
                    @SITESECURITYMODE bit = null output

                ) as
                    set nocount on;

                    set @DATALOADED = 0

                    select
                        @DATALOADED = 1,
                        @SITEID = SR.[SITEID],
                        @SITENAME = case when S.[NAME] is null then '<none>' else S.[NAME] end,
                        @SITEDESCRIPTION = S.[DESCRIPTION],
                        @HASSITEID = case when SR.[SITEID] is null then 0 else 1 end,
                        @SITESECURITYMODE=SR.SITESECURITYMODE
                    from
                        dbo.[SYSTEMROLE] SR
                    left join
                        dbo.[SITE] S
                    on
                        SR.[SITEID] = S.[ID]
                    where
                        SR.[ID] = @ID;

                    return 0;