USP_DATAFORMTEMPLATE_VIEW_BATCHTEMPLATELISTPAGEDATA

The load procedure used by the view dataform template "Batch Template List Page View Form"

Parameters

Parameter Parameter Type Mode Description
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.
@DATALOADED bit INOUT Output parameter indicating whether or not data was actually loaded.
@SHOWBATCHDESIGNADD bit INOUT Show batch design add

Definition

Copy


CREATE procedure dbo.USP_DATAFORMTEMPLATE_VIEW_BATCHTEMPLATELISTPAGEDATA
(
    @CURRENTAPPUSERID uniqueidentifier, 
    @DATALOADED bit = 0 output,                    
    @SHOWBATCHDESIGNADD bit = null output                    
)
as
    set nocount on;
    --since this is just returning whether or not data exists in the system, return 1 whether the data exists or not

    set @DATALOADED = 1;

    if exists (select top 1 ID from dbo.BATCHTYPECATALOG where dbo.UFN_SECURITY_APPUSER_GRANTED_BATCHTYPE(@CURRENTAPPUSERID, BATCHTYPECATALOG.ID) = 1)
        set @SHOWBATCHDESIGNADD = 1
    else
        set @SHOWBATCHDESIGNADD = 0                        

    return 0;