USP_DATAFORMTEMPLATE_EDITLOAD_MARRIAGERELATIONSHIP
The load procedure used by the edit dataform template "Marriage Relationship 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. |
@SPOUSEGENDERCODE | tinyint | INOUT | A new spouse with gender |
@SPOUSERELATIONSHIPTYPECODEID | uniqueidentifier | INOUT | Becomes the |
@MARRIAGERELATIONSHIPASSOCIATIONS | xml | INOUT | For existing relationships on one spouse |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_MARRIAGERELATIONSHIP(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@SPOUSEGENDERCODE tinyint = null output,
@SPOUSERELATIONSHIPTYPECODEID uniqueidentifier = null output,
@MARRIAGERELATIONSHIPASSOCIATIONS xml = null output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@SPOUSEGENDERCODE = SPOUSEGENDERCODE,
@SPOUSERELATIONSHIPTYPECODEID = SPOUSERELATIONSHIPTYPECODEID
from dbo.MARRIAGERELATIONSHIP
where ID = @ID;
select @MARRIAGERELATIONSHIPASSOCIATIONS = dbo.UFN_MARRIAGERELATIONSHIP_GETASSOCIATIONS_TOITEMLISTXML(@ID);
return 0;