USP_DATAFORMTEMPLATE_EDIT_BENEFIT_3

The save procedure used by the edit dataform template "Benefit Edit Form".

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
@SITES xml IN Sites
@CURRENTAPPUSERID uniqueidentifier IN Input parameter indicating the ID of the current user.

Definition

Copy


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

                begin try
                    declare @TSLONG bigint
                    declare @DATALOADED bit =0

          declare @BENEFITVENDORID uniqueidentifier
          declare @FULFILLMENTVENDORID uniqueidentifier
          declare @BENEFITDESC nvarchar(100)
          declare @COST money

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

                    exec dbo.USP_DATAFORMTEMPLATE_EDIT_BENEFIT_4 @ID, @NAME,DESCRIPTION, @BENEFITCATEGORYCODEID, @VALUE, @SENDBENEFITCODE, @USEPERCENT,@VALUEPERCENT, @SITES, @CURRENTAPPUSERID,@BENEFITVENDORID,@FULFILLMENTVENDORID,@BENEFITDESC,@COST;

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

                    return 0
                end