USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTRECOGNITIONDECLINEDLEVELS
The load procedure used by the edit dataform template "ConstituentRecognitionDeclinedLevels Edit Data 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. |
@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. |
@DECLINEDRECOGNITIONLEVELS | xml | INOUT | Declined recognition program levels |
@REASONCODEID | uniqueidentifier | INOUT | |
@DECLINEPROGRAM | bit | INOUT |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_CONSTITUENTRECOGNITIONDECLINEDLEVELS
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@DECLINEDRECOGNITIONLEVELS xml = null output,
@REASONCODEID uniqueidentifier = null output,
@DECLINEPROGRAM bit = null output
)
as
set nocount on;
declare @CONSTITUENTID as uniqueidentifier;
declare @RECOGNITIONPROGRAMID as uniqueidentifier;
select @CONSTITUENTID=CONSTITUENTID,
@RECOGNITIONPROGRAMID=RECOGNITIONPROGRAMID
from dbo.CONSTITUENTRECOGNITION
where @ID = ID
set @REASONCODEID = (select top 1 REASONCODEID from dbo.CONSTITUENTRECOGNITIONDECLINEDLEVEL where CONSTITUENTID = @CONSTITUENTID and RECOGNITIONPROGRAMID = @RECOGNITIONPROGRAMID)
set @DATALOADED = 1
select
@DATALOADED = 1,
@DECLINEDRECOGNITIONLEVELS = (SELECT [DECLINED], [DECLINEDLEVELID], [RECOGNITIONLEVELID],[RECOGNITIONLEVELNAME]
FROM dbo.[UFN_CONSTITUENTRECOGNITION_GETDECLINEDLEVELS](@CONSTITUENTID, @RECOGNITIONPROGRAMID)
for xml raw('ITEM'),type,elements,root('DECLINEDRECOGNITIONLEVELS'),BINARY BASE64)
return 0;