USP_DATAFORMTEMPLATE_EDITLOAD_FAFBENEFIT
The load procedure used by the edit dataform template "FAFBenefit Edit 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. |
@NAME | nvarchar(100) | INOUT | Name |
@DESCRIPTION | nvarchar(255) | INOUT | Description |
@BENEFITCATEGORYCODEID | uniqueidentifier | INOUT | Category |
@VALUE | money | INOUT | Value |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
@BENEFITOPTIONS | xml | INOUT | Benefit options |
@SITES | xml | INOUT | |
@SITEREQUIRED | bit | INOUT | |
@CURRENTAPPUSERID | uniqueidentifier | IN |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_FAFBENEFIT
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(255) = null output,
@BENEFITCATEGORYCODEID uniqueidentifier = null output,
@VALUE money = null output,
--@SENDBENEFITCODE tinyint = null output,
@TSLONG bigint = 0 output,
@BENEFITOPTIONS xml = null output,
@SITES xml = null output,
@SITEREQUIRED bit = null output,
@CURRENTAPPUSERID uniqueidentifier = null
)
as
begin
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
set @SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID);
select
@DATALOADED = 1,
@NAME = NAME,
@DESCRIPTION = DESCRIPTION,
@BENEFITCATEGORYCODEID = BENEFITCATEGORYCODEID,
@VALUE = VALUE,
@SITES = dbo.UFN_BENEFITSITE_GETSITES_TOITEMLISTXML(@ID),
--@SENDBENEFITCODE = SENDBENEFITCODE,
@TSLONG=TSLONG
from
dbo.BENEFIT
where
ID = @ID;
set @BENEFITOPTIONS = dbo.UFN_BENEFIT_GETBENEFITOPTIONS_TOITEMLISTXML(@ID);
return 0
end