USP_DATAFORMTEMPLATE_EDITLOAD_MEMBERSHIPPROGRAM
The load procedure used by the edit dataform template "Membership Program 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. |
@NAME | nvarchar(100) | INOUT | Name |
@DESCRIPTION | nvarchar(255) | INOUT | Description |
@SITEID | uniqueidentifier | INOUT | Site |
@CARDFORMAT | nvarchar(255) | INOUT | Card format |
@EXPIRESONCODE | tinyint | INOUT | Expiration date |
@ALLOWMULTIPLEMEMBERSHIPS | bit | INOUT | Allow multiple memberships |
@BACKDATEMEMBERSHIPS | bit | INOUT | |
@CUTOFFDAY | tinyint | INOUT | Cutoff date |
@CUTOFFDATEFORYEAR | char(4) | INOUT | Cutoff date |
@EXPIRATIONDATES | xml | INOUT | Expiration dates |
@SITEREQUIRED | bit | INOUT | |
@CURRENTAPPUSERID | uniqueidentifier | IN | Input parameter indicating the ID of the current user. |
@LETTERTEMPLATEID | uniqueidentifier | INOUT | Letter template to use |
@ALLOWADDONADULT | bit | INOUT | Allow additional members |
@ADDONADULTPRICE | money | INOUT | Price |
@ALLOWADDONGUEST | bit | INOUT | Allow guests |
@ADDONGUESTPRICE | money | INOUT | Price |
@BASECURRENCYID | uniqueidentifier | INOUT | Currency |
@REPORTCATALOGID | uniqueidentifier | INOUT | Report to use |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_MEMBERSHIPPROGRAM(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@NAME nvarchar(100) = null output,
@DESCRIPTION nvarchar(255) = null output,
@SITEID uniqueidentifier=null output,
@CARDFORMAT nvarchar(255) = null output,
@EXPIRESONCODE tinyint = null output,
@ALLOWMULTIPLEMEMBERSHIPS bit = null output,
@BACKDATEMEMBERSHIPS bit = null output,
@CUTOFFDAY tinyint = null output,
@CUTOFFDATEFORYEAR char(4) = null output,
@EXPIRATIONDATES xml = null output,
@SITEREQUIRED bit = null output,
@CURRENTAPPUSERID uniqueidentifier = null,
@LETTERTEMPLATEID uniqueidentifier = null output,
@ALLOWADDONADULT bit = null output,
@ADDONADULTPRICE money = null output,
@ALLOWADDONGUEST bit = null output,
@ADDONGUESTPRICE money = null output,
@BASECURRENCYID uniqueidentifier = null output,
@REPORTCATALOGID uniqueidentifier = null output
)
as
set nocount on;
set @DATALOADED = 0;
set @TSLONG = 0;
select
@DATALOADED = 1,
@TSLONG = TSLONG,
@NAME = NAME,
@DESCRIPTION = DESCRIPTION,
@SITEID = SITEID,
@CARDFORMAT = CARDFORMAT,
@EXPIRESONCODE = EXPIRESONCODE,
@BACKDATEMEMBERSHIPS = BACKDATEMEMBERSHIPS,
@ALLOWMULTIPLEMEMBERSHIPS = ALLOWMULTIPLEMEMBERSHIPS,
@CUTOFFDAY = CUTOFFDAY,
@CUTOFFDATEFORYEAR = CUTOFFDATEFORYEAR,
@SITEREQUIRED = dbo.UFN_SITEREQUIREDFORUSER(@CURRENTAPPUSERID),
@LETTERTEMPLATEID = LETTERTEMPLATEID,
@ALLOWADDONADULT = ALLOWADDONADULT,
@ADDONADULTPRICE = ADDONADULTPRICE,
@ALLOWADDONGUEST = ALLOWADDONGUEST,
@ADDONGUESTPRICE = ADDONGUESTPRICE,
@BASECURRENCYID = BASECURRENCYID,
@REPORTCATALOGID = REPORTCATALOGID
from dbo.MEMBERSHIPPROGRAM
where ID = @ID;
if @CUTOFFDAY = 0
set @CUTOFFDAY = null;
set @EXPIRATIONDATES = dbo.UFN_MEMBERSHIPPROGRAM_GETENDDATE_TOITEMLISTXML(@ID);
return 0;