USP_DATAFORMTEMPLATE_EDIT_BENEFIT_2

Edit a benefit catalog item

Parameters

Parameter Parameter Type Mode Description
@ID uniqueidentifier IN The input ID parameter indicating the ID of the record being edited.
@CHANGEAGENTID uniqueidentifier IN Input parameter indicating the ID of the change agent invoking the procedure.
@NAME nvarchar(100) IN Name
@DESCRIPTION nvarchar(255) IN Description
@BENEFITCATEGORYCODEID uniqueidentifier IN Category
@VALUE money IN Value
@SENDBENEFITCODE tinyint IN Send benefit when pledge is
@USEPERCENT bit IN Use percent
@VALUEPERCENT numeric(20, 2) IN Percent

Definition

Copy


            CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDIT_BENEFIT_2
            (
                @ID uniqueidentifier,
                @CHANGEAGENTID uniqueidentifier = null,                
                @NAME nvarchar(100),
                @DESCRIPTION nvarchar(255),
                @BENEFITCATEGORYCODEID uniqueidentifier,
                @VALUE money,
                @SENDBENEFITCODE tinyint,
                @USEPERCENT bit,
                @VALUEPERCENT numeric(20, 2)
            )
            as                
            begin                
                set nocount on;
                declare @CURRENTDATE datetime
                set @CURRENTDATE = getdate()

                begin try
                    declare @TSLONG bigint
                    declare @DATALOADED bit =0
                    declare @SITES xml
                    declare @CURRENTAPPUSERID uniqueidentifier = null

                    exec dbo.USP_DATAFORMTEMPLATE_EDITLOAD_BENEFIT @ID, @DATALOADED, @NAME, @DESCRIPTION, @BENEFITCATEGORYCODEID, @VALUE, @SENDBENEFITCODE, @TSLONG, @USEPERCENT, @VALUEPERCENT, @SITES

                    exec dbo.USP_DATAFORMTEMPLATE_EDIT_BENEFIT_3 @ID, @NAME,DESCRIPTION, @BENEFITCATEGORYCODEID, @VALUE, @SENDBENEFITCODE, @USEPERCENT,@VALUEPERCENT, @SITES, @CURRENTAPPUSERID;

                    end try
                    begin catch
                        exec dbo.USP_RAISE_ERROR
                        return 1
                    end catch

                    return 0
                end